Path: utzoo!utgpu!watserv1!watmath!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!rpi!uupsi!ficc!peter From: peter@ficc.ferranti.com (Peter da Silva) Newsgroups: comp.sources.d Subject: Re: v01INF1: Status - Status of comp.sources.reviewed Message-ID: <6_WAABB@xds13.ferranti.com> Date: 22 Apr 91 17:37:06 GMT References: <1991Apr16.131650.24389@scuzzy.in-berlin.de> <1307:Apr1702:20:0991@kramden.acf.nyu.edu> <25835:Apr1908:41:2991@kramden.acf.nyu.edu> Reply-To: peter@ficc.ferranti.com (Peter da Silva) Organization: Xenix Support, FICC Lines: 17 In article meissner@osf.org (Michael Meissner) writes: > This can produce the wrong error message if sprintf sets errno (for > example if it calls malloc and malloc fails). I'm sure it can, but there are more systems where errno doesn't exist and perror still works than where sprintf calls malloc. As you say, if you can depend on ANSI C you can use strerror. If not, I'd rather stick to the lowest common denominator. In fact, I don't know of any implementations where sprintf can set errno. Does *anyone* know of one? (I once considered, on the Amiga, having perror pop up a requestor if the program was called from Workbench...) -- Peter da Silva. `-_-' peter@ferranti.com +1 713 274 5180. 'U` "Have you hugged your wolf today?"