History log of /freebsd-10.0-release/usr.bin/getopt/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


217890 26-Jan-2011 uqs

Fix typo in example getopt(1) script: $i vs $1 [1]
While here apply style hammer.

PR: docs/154289 [1]
Submitted by: Jamie Landeg Jones <jamie@bishopston.net>
MFC after: 1 week


213573 08-Oct-2010 uqs

mdoc: drop redundant .Pp and .LP calls

They have no effect when coming in pairs, or before .Bl/.Bd


209772 07-Jul-2010 bcr

Fix an error in the EXAMPLES section of getopt(1), which is based on
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


200462 13-Dec-2009 delphij

Revert most part of 200420 as requested, as more review and polish is
needed.


200420 11-Dec-2009 delphij

Remove unneeded header includes from usr.bin/ except contributed code.

Tested with: make universe


179020 15-May-2008 brooks

getopt.c is public domain. Add a comment to that effect.

Remove confusing README.

PR: bin/98911
Submitted by: Jason McIntyre <jmc at kerhand dot co dot uk>
Obtained from: OpenBSD
MFC after: 3 days


141846 13-Feb-2005 ru

Expand *n't contractions.


140420 18-Jan-2005 ru

Sort sections.


140368 17-Jan-2005 ru

Added the EXIT STATUS section where appropriate.


140295 15-Jan-2005 ru

Eliminate macro calls inside literal displays.


131749 07-Jul-2004 ru

Fixed bad example.
Added reference to the getopts(1) shell builtin.


131507 03-Jul-2004 ru

Deal with double whitespace.


131491 02-Jul-2004 ru

Mechanically kill hard sentence breaks.


108317 27-Dec-2002 schweikh

english(4) police.


102944 04-Sep-2002 dwmalone

ANSIify function definitions.
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


99112 30-Jun-2002 obrien

Consistently use FBSDID


95657 28-Apr-2002 markm

Minor nit; return(foo) from main rather than exit(foo).


95083 19-Apr-2002 charnier

Use `The .Nm utility'


90415 08-Feb-2002 markm

Remove leaf node WARNS?=2 (that mainly I added). This should
help the GCC3 transition and CURRENT in general.


87283 03-Dec-2001 dwmalone

Warns cleanup (just make main return an int).


81462 10-Aug-2001 ru

mdoc(7) police: join split punctuation to macro calls.


79755 15-Jul-2001 dd

Remove whitespace at EOL.


78718 24-Jun-2001 dd

Include missing header files which define functions for which gcc has
builtins (e.g., exit, strcmp).


74848 27-Mar-2001 ru

MAN[1-9] -> MAN.


68963 20-Nov-2000 ru

mdoc(7) police: use the new features of the Nm macro.


68854 17-Nov-2000 ru

mdoc(7) police: use certified section headers wherever possible.


65428 04-Sep-2000 imp

getopt and friends are declared in <unistd.h>
getopt returns -1 not EOF.


57670 01-Mar-2000 sheldonh

Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.


50938 05-Sep-1999 phantom

mdoc(7) style fixes

PR: docs/13409
Reviewed by: mpp


50534 28-Aug-1999 mpp

Add $FreeBSD$ lines to man pages that are missing them to make it
easier for translation teams.

PR: docs/13418
Submitted by: Alexey Zelkin <phantom@cris.net>


50488 28-Aug-1999 peter

$Header$ -> $FreeBSD$


45298 04-Apr-1999 cracauer

Further backouts and changes to the example.

getopt in bourne shell is in fact hard. Maybe perl isn't *that* bad
after all...


45279 04-Apr-1999 cracauer

Back out part of previous commit.

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".


45271 03-Apr-1999 cracauer

1) Fix the case where a shellscript using getopt is called with a
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


24360 29-Mar-1997 imp

compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.


19111 22-Oct-1996 joerg

Cleanup. Boldfaced dashes didn't print at all, also corrected a few
other mdoc(5) usage errors.

Pointed out by: kuku@physik.rwth-aachen.de (Chris Kukulies)


13744 30-Jan-1996 mpp

Fix a bunch of spelling errors in a bunch of man pages.


202 27-Jul-1993 nate

Added README which explains the copyright status of getopt(1)


201 27-Jul-1993 nate

There was additional cruft at the bottom on the man page.


194 26-Jul-1993 nate

Added getopt(1) from NetBSD