Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Jun 1999 01:12:41 -0600
From:      Warner Losh <imp@harmony.village.org>
To:        "Kenneth D. Merry" <ken@plutotech.com>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/usr.sbin/i4b/isdnd main.c src/usr.sbin/i4b/isdndebug main.c src/usr.sbin/i4b/isdndecode main.c src/usr.s 
Message-ID:  <199906240712.BAA36091@harmony.village.org>
In-Reply-To: Your message of "Thu, 24 Jun 1999 00:56:41 MDT." <199906240656.AAA84827@panzer.plutotech.com> 
References:  <199906240656.AAA84827@panzer.plutotech.com>  

next in thread | previous in thread | raw e-mail | index | archive | help
In message <199906240656.AAA84827@panzer.plutotech.com> "Kenneth D. Merry" writes:
: - I maintain iostat, and you didn't ask me about the change

I maintain getopt consistancy in the tree...  The '?' was
inconsistantly used.  In the past I've made large global changes like
this to getopt usage.  The adding of '?' to usage strings in the past
is something that Bruce has complained about, which is why I've added
it to my list of things to filter on.  Changes like this have
generally not been reviewed since they cut accross so many different
areas.  cf the EOF -> -1 changes ...

If posix allows it, I'd rather change getopt(3) to not complain about
'?' being an illegal option when the option is '?'.  This would make
all the programs consistant, and also make old programs which use '?'
as an option.

Comments?

Warner

P.S.  I really didn't anticipate this to have any reaction at all.  As
usual, if things aren't like, I'll back it out.

Index: getopt.c
===================================================================
RCS file: /home/imp/FreeBSD/CVS/src/lib/libc/stdlib/getopt.c,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 getopt.c
--- getopt.c	1997/03/11 11:27:48	1.1.1.2
+++ getopt.c	1999/06/24 07:03:28
@@ -85,7 +85,7 @@
 			return (-1);
 		if (!*place)
 			++optind;
-		if (opterr && *ostr != ':')
+		if (opterr && *ostr != ':' && *ostr != BADCH)
 			(void)fprintf(stderr,
 			    "%s: illegal option -- %c\n", __progname, optopt);
 		return (BADCH);


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199906240712.BAA36091>