summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/getopt.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r267745, r268268:pfg2014-07-071-5/+8
| | | | | | | | | | | | getopt(3): recognize option:: as GNU extension for "optional options". Also ANSIfy a function declaration. While here update the OpenBSD patch level in getopt_long.c as we already have the corresponding change. Obtained from: NetBSD MFC after: 2 weeks
* Renumber clauses to reduce diffs to other versionsemaste2013-05-281-1/+1
| | | | | NetBSD, OpenBSD, and Android's Bionic number the clauses 1 through 3, so follow suit to make comparison easier.
* Per Regents of the University of Calfornia letter, remove advertisingimp2007-01-091-4/+0
| | | | | | clause. # If I've done so improperly on a file, please let me know.
* Merge some fixes from NetBSD's getopt.c v1.26:ache2004-03-061-26/+43
| | | | | | | | cleanups, handling 'ls -l-', handling '--*' Note this is in the same time back out of our v1.3 "Don't print an error message if the bad option is '?'" because it directly violates POSIX.
* Do not use __progname directly (except in [gs]etprogname(3)).markm2002-03-291-4/+7
| | | | | | Also, make an internal _getprogname() that is used only inside libc. For libc, getprogname(3) is a weak symbol in case a function of the same name is defined in userland.
* Fix the style of the SCM ID's.obrien2002-03-221-3/+2
| | | | I believe have made all of libc .c's as consistent as possible.
* If the string specifying the allowed options starts with a leading `:',jkoshy2001-08-161-5/+2
| | | | | | | | `getopt(3)' should not print a warning for missing argument values. PR: bin/29625 Reviewed by: mikeh MFC after: 1 week
* Don't print an error message if the bad option is '?'. This has beenimp2000-09-041-1/+1
| | | | | | | | | in my tree for a long time. bde reviewed this once upon a time and said it was OK, iirc. This also obviates the need to put ? in the optstring argument to preclude the extra warning message which some people think confuses users. When I made my getopt cleanups of a long time ago, this was the compromise reached. I just neglected to commit it until now.
* Fix handling of trailing :'s to match what other OSes do (spit outjkh1999-12-171-2/+8
| | | | | | a diagnostis). Submitted by: Guy Harris <gharris@flashcom.net>
* Import CSRG 4.4BSD-Lite2 lib/libc onto vendor branchpeter1997-03-111-5/+5
|
* BSD 4.4 Lite Lib Sourcesrgrimes1994-05-271-0/+117
OpenPOWER on IntegriCloud