Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!mit-eddie!ll-xn!cit-vax!ucla-cs!sdcrdcf!burdvax!bpa!cbmvax!hutch!rabbit1!dml From: dml@rabbit1.UUCP (David Langdon) Newsgroups: comp.lang.c Subject: Re: Pet peeve #1473 Message-ID: <368@rabbit1.UUCP> Date: Fri, 28-Aug-87 08:12:39 EDT Article-I.D.: rabbit1.368 Posted: Fri Aug 28 08:12:39 1987 Date-Received: Sat, 5-Sep-87 02:33:47 EDT References: <9001@brl-adm.ARPA> Organization: Rabbit Software Corp., Malvern PA Lines: 24 in article <9001@brl-adm.ARPA>, ultra!wayne@ames.arpa (Wayne Hathaway) says: > > No flame against the poster, but when I saw the following come by > today it reminded me of what I think is the absolute *WORST* of the > "UNIX philosophy": > >>>>> #define STRERR() ((errno >=0 && errno < sys_nerr) ? \ >>>>> sys_errlist[errno] : "Unknown error") > > What's wrong with this? Simply that it doesn't tell you what the > unknown value of errno *IS*! When I first saw code like this in > "perror" itself I absolutely could not believe it. Sure it takes a > miniscule amount more work to print "Unknown error 666." > > Wayne Hathaway ultra!wayne@Ames.ARPA Not only doesn't it tell you what the problem was, it also will not get through the preprocessor under some of the older UNIX dialects. -- David Langdon Rabbit Software Corp. (215) 647-0440 7 Great Valley Parkway East Malvern PA 19355 ...!ihnp4!{cbmvax,cuuxb}!hutch!dml ...!psuvax1!burdvax!hutch!dml