lib/getopt_int.h


Log

Author Commit Date CI Message
Paul Eggert 281b825e 2018-01-01T00:57:25 maint: Run 'make update-copyright'
Paul Eggert ca35d468 2017-09-13T00:48:18 all: prefer https: URLs
Zack Weinberg d9c418c8 2017-04-06T11:14:14 getopt: annotate files with relationship to glibc As the final act in this patchset, adjust the message at the top of each file to indicate which files are synced with glibc. (This has already been done for most of the headers.) * lib/getopt.c, lib/getopt1.c, lib/getopt_int.h: Mention in top-of-file boilerplate that these files are shared between glibc and gnulib.
Zack Weinberg ef3ea3cc 2017-04-06T11:14:14 getopt: tidy up _getopt_initialize a bit _getopt_data.__posixly_correct is completely redundant to _getopt_data.__ordering, and some work that logically belongs in _getopt_initialize was being done by _getopt_internal_r, making the code harder to understand. As a side effect, getenv will no longer be called if the first character of the options string is '+' or '-', which is probably a Good Thing. (Perhaps we should have a flag character that specifically asks for the permutation behavior?) * lib/getopt_int.h (_getopt_data): Remove __posixly_correct field. * lib/getopt.c (_getopt_internal_r): Move some initialization code... (_getopt_initialize): ...here. Don't set d->__posixly_correct.
Zack Weinberg 2dcee3a7 2017-04-06T11:14:13 getopt: harmonize comments with glibc The comments explaining how the behavior of 'getopt' varies depending on whether it's the standalone version and whether there are special characters at the beginning of the options string were inconsistent between gnulib and glibc, and also out of sync with the code. * lib/getopt.c, lib/getopt_int.h: Harmonize comments with glibc.
Zack Weinberg 74a8c9fc 2017-04-06T11:14:13 getopt: remove USE_NONOPTION_FLAGS getopt includes code to parse an environment variable named _XXX_GNU_nonoption_argv_flags_ (where XXX is the current process's PID in decimal); but all of it has been #ifdefed out since 2001, with no official way to turn it back on. According to commentary in glibc's config.h.in, bash version 2.0 set this environment variable to indicate argv elements that were the result of glob expansion and therefore should not be treated as options, but the feature was "disabled later" because "it caused problems". According to bash's CHANGES file, "later" was release 2.01; it gives no more detail about what the problems were. Version 2.0 of bash was released on the last day of 1996, and version 2.01 in June of 1997. Twenty years later, I think it is safe to assume that this environment variable isn't coming back. * lib/getopt_int.h: Remove all #ifdef USE_NONOPTION_FLAGS blocks. * lib/getopt.c: Likewise. Also remove SWAP_FLAGS and the __libc_argc and __libc_argv externs, which were only used by
Zack Weinberg 64abc9c7 2017-04-06T11:14:13 getopt: tabify, in preparation for merge with glibc glibc sticks to the GNU default of indenting with a mix of 8-column tabs and spaces; make the gnulib copy match. getopt.h is not included because it is *not* going to be merged in its present form. * getopt.c, getopt1.c, getopt_int.h: Tabify.
Paul Eggert bd78ca3d 2017-03-22T10:25:04 getopt: merge from glibc This does not change anything substantial; it merely simplifies hypothetical merges back to glibc. * lib/getopt.c, lib/getopt.in.h, lib/getopt1.c, lib/getopt_int.h: Change copyright notice to match what is in glibc. * lib/getopt.c: Reorder includes to match glibc. Remove uses of USE_IN_LIBIO. Remove 'register'. In __LIBC code, use __open_memstream rather than open_memstream and __glibc_likely instead of __builtin_expect. * lib/getopt.in.h (__posix_getopt) [!__GETOPT_PREFIX]: New decl.
Paul Eggert a3fd683d 2017-01-01T02:59:23 version-etc: new year * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
Paul Eggert 71090a2a 2016-01-01T00:56:19 version-etc: new year * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
Paul Eggert b9bfe784 2015-01-01T01:38:23 version-etc: new year * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date. * all files: Run 'make update-copyright'.
Eric Blake 1276a2c5 2014-01-01T00:04:40 maint: update copyright I ran 'make update-copyright'. Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake 9fc81090 2013-01-01T00:50:58 maint: update all copyright year number ranges Run "make update-copyright". Compare to commit 1602f0a from last year. Signed-off-by: Eric Blake <eblake@redhat.com>
Paul Eggert 51e801f2 2012-01-05T23:53:49 In commentary, do not use ` to quote.
Jim Meyering 1602f0af 2012-01-01T10:04:58 maint: update all copyright year number ranges Run "make update-copyright".
Bruno Haible 5d8fde12 2011-02-23T10:58:06 Fix misindentation of preprocessor directives. * lib/argp-namefrob.h: Reindent preprocessor directives. * lib/getopt_int.h (struct _getopt_data): Likewise. * lib/progreloc.c (maybe_executable, find_executable): Likewise. * lib/vasnprintf.c (decode_long_double): Likewise. * tests/test-argmatch.c: Insert blank lines, for clarity. * tests/test-exclude.c: Likewise.
Jim Meyering d60f3b0c 2011-01-01T20:17:23 maint: update almost all copyright ranges to include 2011 Run the new "make update-copyright" rule.
Eric Blake e7b3c4c7 2010-04-16T14:08:15 getopt: allow compilation with C++ A C++ compiler complains that REQUIRE_ORDER is unknown if it is buried inside the struct. * lib/getopt_int.h (__ordering): Hoist enum declaration outside struct. * lib/getopt.c (_getopt_internal_r): Use correct type. Reported by Dagobert Michelson, via Joel E. Denny. Signed-off-by: Eric Blake <eblake@redhat.com>
Jim Meyering b2e2010c 2010-01-01T10:31:12 update nearly all FSF copyright year lists to include 2010 Use the same procedure as for 2009, outlined in http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/20081
Eric Blake 2494f34b 2009-12-16T12:03:14 getopt: synchronize from glibc Make gnulib closer to glibc, to make tracking it easier to track extent of pending patches against glibc. * lib/getopt.c (_getopt_initialize, _getopt_internal_r): Swap parameter order. Adjust all callers. (_getopt_internal_r, main): Adjust quoting in error messages. Drop considerations for outdated POSIX 1003.2 error message. * lib/getopt1.c (_getopt_long_r, _getopt_long_only_r): Adjust callers. * lib/getopt_int.h (_getopt_internal_r): Adjust prototype. Signed-off-by: Eric Blake <ebb9@byu.net>
Bruno Haible 441aa304 2009-12-10T20:28:30 Use spaces for indentation, not tabs.
Eric Blake 40c7699e 2009-10-05T14:34:25 getopt: avoid clash with FreeBSD _getopt_internal * lib/getopt.in.h (_getopt_internal): Override the name. * lib/getopt_int.h (includes): Pick up any overrides. Reported by Reuben Thomas. Signed-off-by: Eric Blake <ebb9@byu.net>
Bruno Haible 57fdfd3f 2007-10-07T19:14:58 Change copyright notice from GPLv2+ to GPLv3+.
Paul Eggert 267a39ba 2005-05-14T06:03:57 *** empty log message ***
Paul Eggert 06ee59a5 2004-11-17T01:13:54 Merge from coreutils to support a more-standard getopt.
Paul Eggert 9822da27 2004-11-11T21:16:28 (_getopt_internal, _getopt_internal_r, _getopt_long_r, _getopt_long_only_r): Use __getopt_argv_count.
Paul Eggert 32eb10d7 2004-03-09T19:42:23 Sync getopt and argp from libc CVS.