aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/getopt
Commit message (Collapse)AuthorAgeFilesLines
* 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
* There was additional cruft at the bottom on the man page.Nate Williams1993-07-271-1/+0
| | | | Notes: svn path=/head/; revision=201
* Added getopt(1) from NetBSDNate Williams1993-07-263-0/+141
Notes: svn path=/head/; revision=194