[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: getopt
On Mon, 19 Jan 1998, Konrad Kokoszkiewicz wrote:
Yves said:
> > I found a public domain replacement for getopt(). It looks like
> > an improvement over what we have in the lib right now. I have
> > put it on my site {ftp://ftp.cam.org/users/ypell} for everyone's
> > perusal and testing if you are so inclined.
>
> Yes, but change the file permissions to 644 rather than 600 :)
:-) Oops. The file permission has been changed.
BTW, I think I know why getopt() misbehaves with teardrop:
The SysV getopt() clones I have seen (the current MiNTlib one,
and the new one I found), seem to insist that options must be
the first thing on the command line after the command name. If
the first thing they see is not an option, they just return EOF
and stop looking altogether. Is that really how getopt() is
supposed to work in SysV? The problem with teardrop is that it
wants the first two parametres to be IP numbers, not options;
our getopt() is unable to accomodate that.
Yves
- References:
- Re: getopt
- From: Konrad Kokoszkiewicz <draco@nidus.mi.com.pl>