Using getopt to parse multi-argument options

Henry Spencer henry at utzoo.uucp
Fri Jan 20 05:29:46 AEST 1989


In article <3141 at ttrdc.UUCP> levy at ttrdc.UUCP (Daniel R. Levy) writes:
>Actually, what Roy had in mind IS possible.  Yes it violates the syntax
>standard, but if one is masochistic enough to WANT that, it's doable through
>suitable abuse of optind...

This is not portable; it assumes a specific implementation of getopt.
Unless things have changed, the getopt(3) documentation makes no promise
that user changes to optind will be reflected back into getopt's innards.

It probably works in the existing implementations, but that's not the
same thing.
-- 
Allegedly heard aboard Mir: "A |     Henry Spencer at U of Toronto Zoology
toast to comrade Van Allen!!"  | uunet!attcan!utzoo!henry henry at zoo.toronto.edu



More information about the Comp.lang.c mailing list