Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!husc6!harvard!panda!genrad!decvax!decwrl!sun!guy From: guy@sun.UUCP Newsgroups: net.lang.c Subject: Re: Question on getopt() Message-ID: <5530@sun.uucp> Date: Sat, 26-Jul-86 18:20:15 EDT Article-I.D.: sun.5530 Posted: Sat Jul 26 18:20:15 1986 Date-Received: Sun, 27-Jul-86 06:05:00 EDT References: <14935@ucbvax.BERKELEY.EDU> <1078@ttrdc.UUCP> <240@petrus.UUCP> Organization: Sun Microsystems, Inc. Lines: 20 > > GETOPT(3C) UNIX System V GETOPT(3C) > ... > > included in optstring. This error message may be disabled > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > by setting opterr to a non-zero value. > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > Not that the man page we have here (seems to be BSB 4.3) does not have the > sentence marked with ^^^^s for a very good reason: its not true. Under > 4.3 you can't suppress the messages except by rewriting getopt. It's not true in ANY version of UNIX, System V *or* 4.3BSD. In BOTH versions, if you set "opterr" to *zero*, it will suppress the error messages. Read the code, not the manual page! The S5 page lies because it says setting "opterr" to a non-zero value turns off error messages; the 4.3 page doesn't indicate that setting "opterr" to zero turns off error messages. -- Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com (or guy@sun.arpa)