Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!ames!hc!beta!unm-la!unmvax!turing!mike From: mike@turing.unm.edu (Mike Bushnell) Newsgroups: news.software.b,comp.lang.c Subject: Re: News for Xenix on PC AT ? Message-ID: <476@unmvax.UNM.EDU> Date: Mon, 27-Apr-87 14:27:00 EDT Article-I.D.: unmvax.476 Posted: Mon Apr 27 14:27:00 1987 Date-Received: Wed, 29-Apr-87 02:09:25 EDT References: <18346@ucbvax.BERKELEY.EDU> <145@sds.UUCP> <17005@sun.uucp> <2440@ulysses.homer.nj.att.com> <148@sds.UUCP> Sender: news@unmvax.UNM.EDU Reply-To: mike@turing.UUCP (Mike Bushnell) Organization: University of New Mexico, Albuquerque Lines: 16 Xref: mnetor news.software.b:555 comp.lang.c:1923 In article <148@sds.UUCP> dave@sds.UUCP (dave schmidt x194) writes: >... >On the other hand, if 0 cannot be a valid function address, why does >signal not return 0 on error? I would be curious to know. > >Dave Schmidt Because *every* function in section 2 of the manual returns -1 on an error. It just happens that signal is one of the very few which normally return pointers. If compiler writers were *really* nasty, they could make this bomb. Fortunately, they are on our side. I like to cast signal to an int before checking for -1 just to be on the safe side. Michael I. Bushnell a/k/a Bach II hi!turing!mike@hc.dspo.gov