New version of getopt()

Lloyd Zusman ljz at fxgrp.UUCP
Sat May 14 12:48:00 AEST 1988


There was recently a heated discussion here in comp.lang.c as to the
merits and drawbacks of getopt(), especially with regard to how it
returns '?' on errors.  In light of this, I decided that I could write
a better getopt(), and I believe I have done so.  It is called
'egetopt()' (for "extended getopt()") and I have just netmailed it to
be posted in comp.sources.unix.

For those of you who believe that getopt() is perfect and should never
be improved (yes, I know you're out there!), egetopt() is designed to
exactly mirror its predecessor's behavior in the default case.  For
others who want some added features, I hope that this program will
prove to be useful.

Look for egetopt() in comp.sources.unix in the near future.


--
    Lloyd Zusman
    Master Byte Software
    Los Gatos, California		Internet: ljz at fx.com
    "We take things well in hand."	UUCP:     ...!ames!fxgrp!ljz



More information about the Comp.lang.c mailing list