rcs blows up on suns

Larry West west at sdcsla.UUCP
Sat Aug 31 18:36:17 AEST 1985


>> 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: <west at nprdc.ARPA>		La Jolla, CA  92093  U.S.A.
UUCP: {ucbvax,sdcrdcf,decvax,ihnp4}!sdcsvax!sdcsla!west OR ulysses!sdcsla!west



More information about the Comp.unix mailing list