Commit Graph

9 Commits

Author SHA1 Message Date
Ed Maste
3fb3b97c4d Renumber clauses to reduce diffs to other versions
NetBSD, OpenBSD, and Android's Bionic number the clauses 1 through 3,
so follow suit to make comparison easier.
2013-05-28 20:57:40 +00:00
Warner Losh
c879ae3536 Per Regents of the University of Calfornia letter, remove advertising
clause.

# If I've done so improperly on a file, please let me know.
2007-01-09 00:28:16 +00:00
Andrey A. Chernov
9109761318 Merge some fixes from NetBSD's getopt.c v1.26:
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.
2004-03-06 17:05:45 +00:00
Mark Murray
4cd0119367 Do not use __progname directly (except in [gs]etprogname(3)).
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.
2002-03-29 22:43:43 +00:00
David E. O'Brien
333fc21e3c Fix the style of the SCM ID's.
I believe have made all of libc .c's as consistent as possible.
2002-03-22 21:53:29 +00:00
Joseph Koshy
2f46ebcdb7 If the string specifying the allowed options starts with a leading `:',
`getopt(3)' should not print a warning for missing argument values.

PR:		bin/29625
Reviewed by:	mikeh
MFC after:	1 week
2001-08-16 03:27:03 +00:00
Warner Losh
e9d918edb6 Don't print an error message if the bad option is '?'. This has been
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.
2000-09-04 03:49:22 +00:00
Jordan K. Hubbard
f8d7aff7a0 Fix handling of trailing :'s to match what other OSes do (spit out
a diagnostis).

Submitted by:	Guy Harris <gharris@flashcom.net>
1999-12-17 01:52:15 +00:00
Peter Wemm
662909a780 Import CSRG 4.4BSD-Lite2 lib/libc onto vendor branch 1997-03-11 11:29:42 +00:00