Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site sdcsla.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!vax135!cornell!uw-beaver!tektronix!hplabs!sdcrdcf!sdcsvax!sdcsla!west From: west@sdcsla.UUCP (Larry West) Newsgroups: net.unix Subject: Re: rcs blows up on suns Message-ID: <961@sdcsla.UUCP> Date: Sat, 31-Aug-85 04:36:17 EDT Article-I.D.: sdcsla.961 Posted: Sat Aug 31 04:36:17 1985 Date-Received: Thu, 5-Sep-85 07:26:20 EDT References: <830@panda.UUCP> <1075@sdcsvax.UUCP> Reply-To: west@sdcsla.UUCP (Larry West) Distribution: net Organization: UC San Diego: Institute for Cognitive Science Lines: 32 >> RCS blows up on Suns in part because Suns insist that a null pointer be a >> pointer to a null string; zero pointers won't do. > >Is this for real? Does any other system adopt this perverse convention? I (and others here) have been using RCS on Suns extensively for years. I've never had any problems with it, and I don't think anyone else has had anything major go wrong. So I doubt that the bad RCS code was that distributed by SMI. I suspect that what the original poster was complaining about was that things like: if ( *p ) ... ; [equal time for those who prefer more characters:] if ( *p != '\0' ) ... ; cause address faults on the Suns when (p == 0). When "p" == 0, of course, the above code is improper, unless your address space goes down to zero [it doesn't]. This will work on a Vax (e.g.), for no particularly good reason. If you ever intend to use something other than a Vax, you'd be safer writing things like: if ( p && *p ) ... ; I happen to like the way it works on the Vax, but it's a fluke and not to be counted on in general. -- Larry West Institute for Cognitive Science (USA+619-)452-6220 UC San Diego (mailcode C-015) [x6220] ARPA: La Jolla, CA 92093 U.S.A. UUCP: {ucbvax,sdcrdcf,decvax,ihnp4}!sdcsvax!sdcsla!west OR ulysses!sdcsla!west