command line options

Doug Gwyn gwyn at brl-smoke.ARPA
Fri Apr 15 07:44:18 AEST 1988


In article <2585 at ttrdc.UUCP> levy at ttrdc.UUCP (Daniel R. Levy) writes:
># >':' is special-cased in getopt.c.  Look at the code.
>Have I made myself clear[er]?

Yes, you're correct that AT&T's getopt() implementation doesn't support
a ":opts" third argument, even though neither : nor ? is disallowed by
the command syntax standard rules.  Since the interface spec for getopt()
gives a special meaning to '?' but not to ':' return, it is clear that
no conforming getopt() implementation could support a ? option.  It is
not so clear that none could support : (which could also be specified
via "x::yz"), but at least we now know that AT&T's (which is the one
presumably everyone actually uses) doesn't.  I must say it surprises me..

If anyone thinks we're nit-picking, they're right.  I suspect very few
getopt()-using applications use anything other than letters of the
alphabet (in either case) for valid option designators.



More information about the Comp.unix.wizards mailing list