Subject: Re: CVS commit: src
To: Hubert Feyrer <email@example.com>
From: Parag Patel <firstname.lastname@example.org>
Date: 01/23/1999 10:53:35
I have a getopt replacement that is almost completely backward
compatible, but also parses full or partial string arguments, numeric
arguments, and "+" options (which are also parsed as "--" options).
One missing feature is the ability to set the global "opterr". It
currently behaves as if this is set to 0. Support could be easily
added but I have not had the desire to do so.
Feel free to check out <ftp://ftp.codegen.com/pub/getoptx/getoptx.tgz>
and use. It's complete with a man-page and self-test.
The main arg-parsing loop looks something like this:
while ((c = getoptx(argc, argv,
/* minus options */
/* plus options (may be NULL) */
)) != EOF)
case 'a': ...
case '1001': ...
The code is free for any use as long as all the copyrights are
maintained in the sources. It is *not* copylefted. It's also very
small and simple.
-- Parag Patel