summaryrefslogtreecommitdiff
path: root/usr.bin/getopt
Commit message (Collapse)AuthorAgeFilesLines
* Convert `cap_enter() < 0 && errno != ENOSYS` to `caph_enter() < 0`.Mariusz Zaborski2018-06-191-1/+1
| | | | | | | No functional change intended. Notes: svn path=/head/; revision=335395
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2016-11-131-0/+2
| | | | | | | | MFC after: 2 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=308606
* Capsicumize some trivial stdio programsConrad Meyer2016-11-081-0/+6
| | | | | | | | | | | | Trivially capsicumize some simple programs that just interact with stdio. This list of programs uses 'pledge("stdio")' in OpenBSD. No objection from: allanjude, emaste, oshogbo Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D8307 Notes: svn path=/head/; revision=308432
* use : instead of true...John-Mark Gurney2015-08-011-6/+6
| | | | | | | | Change file file to file1 file2, partly for igor, and partly because it's odd to pass the same file to a command twice.. Notes: svn path=/head/; revision=286159
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+17
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+18
|/ | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* Fix typo in example getopt(1) script: $i vs $1 [1]Ulrich Spörlein2011-01-261-17/+17
| | | | | | | | | | | While here apply style hammer. PR: docs/154289 [1] Submitted by: Jamie Landeg Jones <jamie@bishopston.net> MFC after: 1 week Notes: svn path=/head/; revision=217890
* mdoc: drop redundant .Pp and .LP callsUlrich Spörlein2010-10-081-2/+0
| | | | | | | They have no effect when coming in pairs, or before .Bl/.Bd Notes: svn path=/head/; revision=213573
* Fix an error in the EXAMPLES section of getopt(1), which is based onBenedict Reuschling2010-07-071-3/+3
| | | | | | | | | | | | | | | | | the same fix present in NetBSD. Note: the getopt man page contains more antique information like this. An overhaul of the man page and/or sync with NetBSD would be the right thing to do. But since this is out of the scope of the PR, I'll leave it as it is for now. PR: docs/133118 Submitted by: Oleg A. Mamontov (oleg at mamontov dot net) Discussed with: jilles@ MFC after: 2 weeks Notes: svn path=/head/; revision=209772
* Revert most part of 200420 as requested, as more review and polish isXin LI2009-12-131-0/+1
| | | | | | | needed. Notes: svn path=/head/; revision=200462
* Remove unneeded header includes from usr.bin/ except contributed code.Xin LI2009-12-111-1/+0
| | | | | | | Tested with: make universe Notes: svn path=/head/; revision=200420
* getopt.c is public domain. Add a comment to that effect.Brooks Davis2008-05-152-57/+5
| | | | | | | | | | | | Remove confusing README. PR: bin/98911 Submitted by: Jason McIntyre <jmc at kerhand dot co dot uk> Obtained from: OpenBSD MFC after: 3 days Notes: svn path=/head/; revision=179020
* Expand *n't contractions.Ruslan Ermilov2005-02-131-1/+1
| | | | Notes: svn path=/head/; revision=141846
* Sort sections.Ruslan Ermilov2005-01-181-6/+6
| | | | Notes: svn path=/head/; revision=140420
* Added the EXIT STATUS section where appropriate.Ruslan Ermilov2005-01-171-1/+1
| | | | Notes: svn path=/head/; revision=140368
* Eliminate macro calls inside literal displays.Ruslan Ermilov2005-01-151-1/+0
| | | | Notes: svn path=/head/; revision=140295
* Fixed bad example.Ruslan Ermilov2004-07-071-1/+2
| | | | | | | Added reference to the getopts(1) shell builtin. Notes: svn path=/head/; revision=131749
* Deal with double whitespace.Ruslan Ermilov2004-07-031-1/+1
| | | | Notes: svn path=/head/; revision=131507
* Mechanically kill hard sentence breaks.Ruslan Ermilov2004-07-021-2/+4
| | | | Notes: svn path=/head/; revision=131491
* english(4) police.Jens Schweikhardt2002-12-271-1/+1
| | | | Notes: svn path=/head/; revision=108317
* ANSIify function definitions.David Malone2002-09-041-3/+1
| | | | | | | | | | | | Add some constness to avoid some warnings. Remove use register keyword. Deal with missing/unneeded extern/prototypes. Some minor type changes/casts to avoid warnings. Reviewed by: md5 Notes: svn path=/head/; revision=102944
* Consistently use FBSDIDDavid E. O'Brien2002-06-301-1/+2
| | | | Notes: svn path=/head/; revision=99112
* Minor nit; return(foo) from main rather than exit(foo).Mark Murray2002-04-281-1/+1
| | | | Notes: svn path=/head/; revision=95657
* Use `The .Nm utility'Philippe Charnier2002-04-191-6/+9
| | | | Notes: svn path=/head/; revision=95083
* Remove leaf node WARNS?=2 (that mainly I added). This shouldMark Murray2002-02-081-1/+0
| | | | | | | help the GCC3 transition and CURRENT in general. Notes: svn path=/head/; revision=90415
* Warns cleanup (just make main return an int).David Malone2001-12-032-0/+2
| | | | Notes: svn path=/head/; revision=87283
* mdoc(7) police: join split punctuation to macro calls.Ruslan Ermilov2001-08-101-2/+1
| | | | Notes: svn path=/head/; revision=81462
* Remove whitespace at EOL.Dima Dorfman2001-07-151-3/+3
| | | | Notes: svn path=/head/; revision=79755
* Include missing header files which define functions for which gcc hasDima Dorfman2001-06-241-0/+1
| | | | | | | builtins (e.g., exit, strcmp). Notes: svn path=/head/; revision=78718
* MAN[1-9] -> MAN.Ruslan Ermilov2001-03-271-1/+0
| | | | Notes: svn path=/head/; revision=74848
* mdoc(7) police: use the new features of the Nm macro.Ruslan Ermilov2000-11-201-3/+3
| | | | Notes: svn path=/head/; revision=68963
* mdoc(7) police: use certified section headers wherever possible.Ruslan Ermilov2000-11-171-1/+1
| | | | Notes: svn path=/head/; revision=68854
* getopt and friends are declared in <unistd.h>Warner Losh2000-09-041-2/+3
| | | | | | | getopt returns -1 not EOF. Notes: svn path=/head/; revision=65428
* Remove single-space hard sentence breaks. These degrade the qualitySheldon Hearn2000-03-011-1/+2
| | | | | | | | of the typeset output, tend to make diffs harder to read and provide bad examples for new-comers to mdoc. Notes: svn path=/head/; revision=57670
* mdoc(7) style fixesAlexey Zelkin1999-09-051-1/+3
| | | | | | | | PR: docs/13409 Reviewed by: mpp Notes: svn path=/head/; revision=50938
* Add $FreeBSD$ lines to man pages that are missing them to make itMike Pritchard1999-08-281-0/+2
| | | | | | | | | | easier for translation teams. PR: docs/13418 Submitted by: Alexey Zelkin <phantom@cris.net> Notes: svn path=/head/; revision=50534
* $Header$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50488
* Further backouts and changes to the example.Martin Cracauer1999-04-041-8/+22
| | | | | | | | getopt in bourne shell is in fact hard. Maybe perl isn't *that* bad after all... Notes: svn path=/head/; revision=45298
* Back out part of previous commit.Martin Cracauer1999-04-042-27/+16
| | | | | | | | | | | | Arguments with whitespaces are easy to fix, but in combination with shell metachars that should not be evaluated it is very hard, probably impossible to fix without going to a line-oriented solution. Next time I will believe Henry Spencer when he says "this looks easy to fix but isn't". Notes: svn path=/head/; revision=45279
* 1) Fix the case where a shellscript using getopt is called with aMartin Cracauer1999-04-032-18/+39
| | | | | | | | | | | | | | | | | | | | | | | | | parameter that has space in it, both in getopt.c and in the manpage example. 2) Fix the example in the manpage. The set(1) command is required to return 0 (POSIX 1003.2, section 3.14.11), so you can't test for getopt's exit status like the example did: #! /bin/sh set -- `getopt abo: $*` if test $? != 0 # wrong, tests for set's exit status, which is # always zero, no for getopt(1)'s. Fixes PR bin/5845, which thought it was getopt's fault, but in fact the manpage was wrong. I also updated the example to be more useful and updated the BUGS section. PR: bin/5845 Notes: svn path=/head/; revision=45271
* compare return value from getopt against -1 rather than EOF, per the finalWarner Losh1997-03-291-1/+1
| | | | | | | posix standard on the topic. Notes: svn path=/head/; revision=24360
* Cleanup. Boldfaced dashes didn't print at all, also corrected a fewJoerg Wunsch1996-10-221-9/+9
| | | | | | | | | other mdoc(5) usage errors. Pointed out by: kuku@physik.rwth-aachen.de (Chris Kukulies) Notes: svn path=/head/; revision=19111
* Fix a bunch of spelling errors in a bunch of man pages.Mike Pritchard1996-01-301-1/+1
| | | | Notes: svn path=/head/; revision=13744
* Added README which explains the copyright status of getopt(1)Nate Williams1993-07-271-0/+57
| | | | Notes: svn path=/head/; revision=202