[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
getopt documentation
From: |
Eric Blake |
Subject: |
getopt documentation |
Date: |
Tue, 31 Oct 2006 20:39:52 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Thunderbird/1.5.0.7 Mnenhy/0.7.4.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
This tripped me up; in order to fix a POSIX-compliance bug in M4, I had to
switch over to using shortopts starting with '-', but the wrong
documentation cost me some debug time.
OK to commit?
2006-10-31 Eric Blake <address@hidden>
* lib/getopt_.h: Fix comments.
- --
Life is short - so eat dessert first!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFSBcH84KuGfSFAYARAnbqAKCVefVxj1ICuSgZJGV4e/nTwxWk3gCffEWO
iOS0EJ31kFJ2C49mBV13Eeo=
=IoQ9
-----END PGP SIGNATURE-----
Index: lib/getopt_.h
===================================================================
RCS file: /sources/gnulib/gnulib/lib/getopt_.h,v
retrieving revision 1.11
diff -u -p -r1.11 getopt_.h
--- lib/getopt_.h 23 Sep 2005 04:15:13 -0000 1.11
+++ lib/getopt_.h 1 Nov 2006 03:38:47 -0000
@@ -1,5 +1,5 @@
/* Declarations for getopt.
- Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2005
+ Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2005,2006
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -196,9 +196,10 @@ struct option
scanning, explicitly telling `getopt' that there are no more
options.
- If OPTS begins with `--', then non-option arguments are treated as
- arguments to the option '\0'. This behavior is specific to the GNU
- `getopt'. */
+ If OPTS begins with `-', then non-option arguments are treated as
+ arguments to the option '\1'. This behavior is specific to the GNU
+ `getopt'. If OPTS begins with `+', or POSIXLY_CORRECT is set in
+ the environment, then do not permute arguments. */
extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
__THROW;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- getopt documentation,
Eric Blake <=