summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/getopt_long.3 (follow)
Commit message (Collapse)AuthorAgeFilesLines
* .Li -> .Vt where appropriate;jmc2022-09-111-3/+3
| | | | | | from josiah frentsos, tweaked by schwarze ok schwarze
* refer to longindex as an argument, not a field;jmc2022-01-061-3/+3
| | | | | | from uwe@netbsd -r1.22 ok millert
* For open/openat, if the flags parameter does not contain O_CREAT, thederaadt2021-10-241-3/+3
| | | | | | | | | | | | | 3rd (variadic) mode_t parameter is irrelevant. Many developers in the past have passed mode_t (0, 044, 0644, or such), which might lead future people to copy this broken idiom, and perhaps even believe this parameter has some meaning or implication or application. Delete them all. This comes out of a conversation where tb@ noticed that a strange (but intentional) pledge behaviour is to always knock-out high-bits from mode_t on a number of system calls as a safety factor, and his bewilderment that this appeared to be happening against valid modes (at least visually), but no sorry, they are all irrelevant junk. They could all be 0xdeafbeef. ok millert
* Document how to make getopt_long(3) process arguments in order and stopstsp2020-01-131-2/+18
| | | | | at the first non-option argument. I had to read source code to figure it out.
* Follow style(9) and drop lint /* NOTREACHED */ annotations fromtb2016-01-041-3/+2
| | | | | | | | the examples. Diff from Juuso Lapinlampi < wub () partyvan ! eu >, thanks! ok schwarze@
* Use the fancy .In macro for includes. From Jan Klemkow. ok jmc schwarzetedu2013-06-051-3/+3
|
* tweak for clarity, ok millert@, jmc@espie2011-03-211-4/+4
|
* Fix PR 6267: recheck POSIXLY_CORRECT each time getopt_long() starts a newguenther2011-03-051-21/+2
| | | | | | | | argv and don't suppress the handling of leading '-' in optstring when POSIXLY_CORRECT is set. Based on patch from Eric Blake. ok and manpage update from millert@, manpage ok jmc@
* Correctly escape a literal colon in an enclosure;schwarze2011-01-241-3/+3
| | | | the \: roff escape is an optional line break.
* more wacky macro fixing;jmc2010-09-191-37/+37
|
* from ginsbach@netbsd, -r1.18:jmc2007-07-031-2/+7
| | | | | | | | Document that getopt_long(3) can and will accept unique abbreviated long option names. This feature has been present since getopt_long(3) was first released in NetBSD 1.5. This is also standard GNU getopt_long(3) behavior. ok millert
* convert to new .Dd format;jmc2007-05-311-2/+2
|
* fix some dodgy displays;jmc2007-02-061-2/+2
|
* tidy up examplesjaredy2005-10-111-5/+5
| | | | | | | | - use err() for error handling - add lint hints - spacing nits and missing braces ok otto
* - typos, grammar, punctuation, layout tweaksjaredy2005-07-261-74/+156
| | | | | | | | - use `$' for command prompts - clean up: use a bullet list instead of adding junk to denote list items ok jmc
* - Rename index to longindex and explain its use.fgsch2004-01-061-9/+20
| | | | | | | | - Talk about zeroing the last element of the longopts array. - Remove '?' from the switch and some KNF to the code. - Change 0's to NULL where appropriate. jmc@ ok.
* escape punctuation;jmc2003-09-021-2/+2
| | | | ok deraadt@
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* Remove some liesmillert2003-06-021-4/+1
|
* typos;jmc2003-05-101-8/+8
|
* of ofderaadt2003-02-241-2/+2
|
* Document BSD behavior of accepting '-' within optstring as long asmillert2002-12-101-5/+25
| | | | | | | | it is not the fist character of optstring (since that would conflict with GNU semantics). Update the bit on "W;" within optstring when called as getopt (not getopt_long) to current reality.
* make getopt_long and getopt_long_only protos match getopt.hmillert2002-12-051-3/+3
|
* Add "RETURN VALUES" sectionsmillert2002-12-041-1/+28
|
* GNU-like getopt_long() from NetBSD with changes by me to supportmillert2002-12-031-0/+326
getopt_long_only(). At some point this should replace the BSD getopt(3) but we are not there yet. While I am here add protection from the multiple getopt() definitions due to conflicting standards.