public domain getopt

Tony L. Hansen hansen at pegasus.UUCP
Wed May 2 00:54:16 AEST 1984


One minor difference between the behaviour of the public domain getopt(1)
recently posted and the System III/System V/System Vr2 getopt(1) is that
AT&T's doesn't output any of the new option list until it has scanned the
entire option list first for errors.  Change the printf's into some
combination of strcat's and sprintf's into a string buffer while scanning
the arguments. Then output the new list all at once with a printf. The
coding is left as an exercise for the reader....

					Tony Hansen
					pegasus!hansen



More information about the Comp.sources.unix mailing list