On Wed, May 08, 2002 at 01:28:34PM -0400, Brian F. Feldman wrote:
> Dag-Erling Smorgrav <email@example.com> wrote:
> > John Baldwin <jhb@FreeBSD.org> writes:
> > > I think green was implying that sed would have its own getopt instead
> > > of changing the system getopt.
> > Ugh. Nasty. Especially if the modified getopt() could be useful to
> > other programs as well (do we have any programs with options that take
> > optional arguments?)
> Okay, fine, assume we'd just do the same thing to the system's getopt()
> instead of a special getopt(). So then...?
Better to localise the dispicable behaviour to sed(1). Other programs
provide their own egetopt(), for non-standard stuff.
If sed(1) is supposed to be portable, it can't rely on such a change to
the system getopt(3), and I'd be hesitant to say we should at all. But
that's just a bikeshed opinion.
Well, that and I had patches to getopt(3) when I proposed optional args
to xargs(1) for GNU/compatability, and I was told outright by a few
individuals "don't touch getopt(3), even if your change won't affect
existing programs, it's non-portable as hell".
jmallett@FreeBSD.org | C, MIPS, POSIX, UNIX, BSD, IRC Geek.
http://www.FreeBSD.org | The Power to Serve
"I've never tried to give my life meaning by demeaning you."
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message