summaryrefslogtreecommitdiffstats
path: root/newlib/libc/stdlib/getopt.c
Commit message (Collapse)AuthorAgeFilesLines
* * newlib/libc/stdlib/getopt.c (getopt_internal): Add missing braces.Corinna Vinschen2013-11-131-12/+16
|
* * newlib/libc/include/getopt.h (struct option): name field should beCorinna Vinschen2013-11-131-14/+22
| | | | | | | "const char *". * newlib/libc/stdlib/getopt.c (getopt_internal): Use fputs()/fputc() instead of fprintf() to save code space. Fix signed/unsigned comparison.
* * libc/libc/stdlib/getopt.c (getopt_internal): Fix NULL pointer access.Corinna Vinschen2013-11-121-0/+4
|
* * libc/stdlib/getopt.c (getopt_internal): Align handling of colon toCorinna Vinschen2012-10-161-5/+27
| | | | | SUSv4 requirements. (__getopt_long_r): Fix formatting.
* 2008-03-07 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2008-03-071-0/+4
| | | | | | | | | * libc/include/getopt.h: Hide newlib extensions under the __need_getopt_newlib flag. * libc/stdlib/getopt.c: #define __need_getopt_newlib before including getopt.h. Put entire code under !HAVE_GETOPT to support platforms with their own getopt implementation. * configure.host: Specify HAVE_GETOPT for x86-linux.
* 2008-02-29 Gregory Pietsch <gpietsch@comcast.net>Jeff Johnston2008-02-291-175/+249
| | | | | | | | | | | * libc/stdlib/getopt.c (getopt_internal): Rewrite to accept data area so as to support reentrant calls. Change all callers to fill in data area with global values and restore any changes to the global values after call. (__getopt_r, __getopt_long_r, __getopt_long_only_r): New routines to support reentrancy that add a data area argument. * libc/include/getopt.h: Add new _r routines and provide macros so they can be called with using double-underscores.
* 2008-02-12 Peter Rosin <peda@lysator.liu.se>Jeff Johnston2008-02-121-7/+2
| | | | | | * libc/stdlib/getopt.c (getopt_internal): Handle optional arguments better for long options and short options not appearing as the first option in a sequence.
* Avoid more compiler warnings.Eric Blake2007-05-291-1/+1
| | | | | | | | | * libc/stdlib/btowc.c: Add missing header. * libc/stdlib/getopt.c (getopt_internal): Initialize variable. * libc/stdlib/system.c (do_system) [__CYGWIN__]: Add declaration. * libc/stdlib/wctob.c: Add missing header. * libc/string/strcpy.c (strcpy): Avoid warnings. * libc/string/strrchr.c (strrchr): Likewise.
* 2006-01-04 Gregory Pietsch <gpietsch@comcast.net>Jeff Johnston2006-01-041-107/+396
| | | | | | * libc/stdlib/getopt.c: Replaced with version that adds getopt_long and getopt_long_only support. * libc/include/getopt.h: New file.
* import newlib-2000-02-17 snapshotChristopher Faylor2000-02-171-0/+117