summaryrefslogtreecommitdiff
path: root/src/misc/getopt_long.c
AgeCommit message (Collapse)AuthorLines
2014-12-20set optopt in getopt_longRich Felker-0/+1
this is undocumented but possibly expected behavior of GNU getopt_long, and useful when error message printing has been suppressed.
2014-12-20add error message printing to getopt_long and make related improvementsRich Felker-4/+30
some related changes are also made to getopt, and the return value of getopt_long in the case of missing arguments is fixed.
2014-12-13simplify getopt_long argv permutation loop logicRich Felker-3/+1
2014-12-13fix handling of "--" with getopt_long argv permutationRich Felker-1/+0
if argv permutation is used, the option terminator "--" should be moved before any skipped non-option arguments rather than being left in the argv tail where the caller will see and interpret it.
2014-12-11accept null longopts pointer in getopt_longRich Felker-1/+1
this is an undocumented feature of GNU getopt_long that the BSD version also mimics, and is reportedly needed by some programs.
2014-12-10support abbreviated options in getopt_longRich Felker-7/+18
2014-12-10support options after non-option arguments in getopt_long (argv permutation)Rich Felker-0/+39
2014-12-02add support for non-option arguments extension to getoptGianluca Anzolin-3/+4
this is a GNU extension, activated by including '-' as the first character of the options string, whereby non-option arguments are processed as if they were arguments to an option character '\1' rather than ending option processing.
2012-09-30add getopt reset supportRich Felker-0/+7
based on proposed patches by Daniel Cegiełka, with minor changes: - use a weak symbol for optreset so it doesn't clash with namespace - also reset optpos (position in multi-option arg like -lR) - also make getopt_long support reset
2012-09-07cleanup src/linux and src/misc trees, etc.Rich Felker-0/+52
previously, it was pretty much random which one of these trees a given function appeared in. they have now been organized into: src/linux: non-POSIX linux syscalls (possibly shard with other nixen) src/legacy: various obsolete/legacy functions, mostly wrappers src/misc: still mostly uncategorized; some misc POSIX, some nonstd src/crypt: crypt hash functions further cleanup will be done later.