NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
lib/42596: getopt_long(3) manual does not mention + and - leading character in optstring parameter
>Number: 42596
>Category: lib
>Synopsis: getopt_long(3) manual does not mention + and - leading
>character in optstring parameter
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: lib-bug-people
>State: open
>Class: doc-bug
>Submitter-Id: net
>Arrival-Date: Sat Jan 09 00:30:01 +0000 2010
>Originator: Anthony Mallet
>Release: -current
>Organization:
>Environment:
NetBSD ficus 5.99.22 NetBSD 5.99.22 (FICUS) #9: Sat Nov 14 12:49:00 CET 2009
troot@ficus:/usr/obj/sys/arch/i386/compile/FICUS i386
>Description:
getopt_long(3) manual does not mention the special case where the
initial character of the optstring parameter is '+' or '-', except
extremely briefly in the implementation differences with glibc.
For reference, here is the relevant paragraph found in glibc-2.10.1:
``
By default, getopt() permutes the contents of argv as it scans, so that
eventually all the non-options are at the end. Two other modes are
also implemented. If the first character of optstring is '+' or the
environment variable POSIXLY_CORRECT is set, then option processing
stops as soon as a non-option argument is encountered. If the first
character of optstring is '-', then each non-option argv-element is
handled as if it were the argument of an option with character code 1.
''
>How-To-Repeat:
man 3 getopt_long
>Fix:
Home |
Main Index |
Thread Index |
Old Index