morrist@ncrcae.UUCP (Tom Morris) (11/25/85)
I seem to recall seeing a public domain getopt function posted on the net several months ago. I saw no need for it at the time, but now I find that I need it in order to port a program to my PC. Can someone mail me a copy or a pointer to a copy of the source? Tom Morris
bd@hpda.UUCP (Bob Desinger) (12/02/85)
We got a version of getopt (free, I hear) from the AT&T Toolchest. I think we got what we paid for. It didn't even compile under our 4.2BSD system. The code uses strchr() and strrchr() with no #ifdef INDEX or any other courtesies like that. It also has an "#ident" directive, which the '4th Generation Make' documentation says is an obsolete cpp directive. (It's obsolete if you're using the *new* make, which you can buy from the AT&T Toolchest. The old make/cpp never heard of it. Perhaps it's an 8th-edition development.) Also, the makefile refers to a non- existent program, evidently a cat-like program that tests getopt. Sorta frustrating on all sides. This is not the kind of Unix support I would have expected from AT&T, nor the kind of coding quality I expected from the industry's largest Unix vendor. Bob Desinger ucbvax!hpda!bd PS: Check your mod.sources archives for a better getopt. There are two rival versions that have floated around, but I'm not sure which is superior.