Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!mtune!codas!cpsc6a!cpsc6b!crs From: crs@cpsc6b.cpsc6a.att.com (C. R. Seaman) Newsgroups: comp.lang.c Subject: Re: Pet peeve #1473 Message-ID: <317@cpsc6b.cpsc6a.att.com> Date: Tue, 15-Sep-87 16:49:52 EDT Article-I.D.: cpsc6b.317 Posted: Tue Sep 15 16:49:52 1987 Date-Received: Fri, 18-Sep-87 01:42:09 EDT References: <9001@brl-adm.ARPA> <368@rabbit1.UUCP> Organization: AT&T (CPSC), Oakland, CA Lines: 19 In article <368@rabbit1.UUCP>, dml@rabbit1.UUCP (David Langdon) writes: < in article <9001@brl-adm.ARPA>, ultra!wayne@ames.arpa (Wayne Hathaway) says: < > < >>>>> #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... Maybe I am missing something here... I see how easy it would be to insert the code to output the error number, but why bother? If perror doesn't know what the error is, (meaning, the number is greater than sys_nerr), what good will knowing the number do you? WHERE ARE YOU GOING TO LOOK IT UP? -- Chris Seaman | o\ /o crs@cpsc6a.att.com | || See "Attack of the Killer Smiley"! ..!ihnp4!cpsc6a!crs | \vvvvvv/ Coming Soon to a newsgroup near you! | \____/