summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib/getopt.c
Commit message (Collapse)AuthorAgeFilesLines
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-1/+3
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326025
* getopt(3): recognize option:: as GNU extension for "optional options".Pedro F. Giffuni2014-06-221-5/+8
| | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=267745
* Renumber clauses to reduce diffs to other versionsEd Maste2013-05-281-1/+1
| | | | | | | | NetBSD, OpenBSD, and Android's Bionic number the clauses 1 through 3, so follow suit to make comparison easier. Notes: svn path=/head/; revision=251069
* Per Regents of the University of Calfornia letter, remove advertisingWarner Losh2007-01-091-4/+0
| | | | | | | | | clause. # If I've done so improperly on a file, please let me know. Notes: svn path=/head/; revision=165903
* Merge some fixes from NetBSD's getopt.c v1.26:Andrey A. Chernov2004-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. Notes: svn path=/head/; revision=126696
* Do not use __progname directly (except in [gs]etprogname(3)).Mark Murray2002-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. Notes: svn path=/head/; revision=93399
* Fix the style of the SCM ID's.David E. O'Brien2002-03-221-3/+2
| | | | | | | I believe have made all of libc .c's as consistent as possible. Notes: svn path=/head/; revision=92986
* If the string specifying the allowed options starts with a leading `:',Joseph Koshy2001-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 Notes: svn path=/head/; revision=81746
* Don't print an error message if the bad option is '?'. This has beenWarner Losh2000-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. Notes: svn path=/head/; revision=65421
* Fix handling of trailing :'s to match what other OSes do (spit outJordan K. Hubbard1999-12-171-2/+8
| | | | | | | | | a diagnostis). Submitted by: Guy Harris <gharris@flashcom.net> Notes: svn path=/head/; revision=54713
* Import CSRG 4.4BSD-Lite2 lib/libc onto vendor branchPeter Wemm1997-03-111-0/+117
Notes: svn path=/vendor/CSRG/dist/; revision=23658