Questions about C on a Prime (primix)

Bob Larson blarson at oberon.UUCP
Wed Mar 26 09:53:32 AEST 1986


[I answered the original authors questions via mail.  I'm relpying to
the replies posted by people not using primes.]

Prime C does normally use characters with the most significant bit set.
Under Primos, this is for compatability with their other compilers and
utilities.  On Primix, (Primes port of Unix Sys Vr0 on a primos kernal
and filesystem, concurently with  Primos) this is due to sharing the 
file system with Primos.  Character constansts of the form '\nnn' do not
have the high bit set unless nnn > 177.  '\0' is still the normal string
terminator.  As Doug Gywn deduced, characters are unsigned.  

There is a compiler option to produce character constants with the high
bit cleared.  Using this option will probably force you to write all of
your own i/o routines.

Actully, the high bit is not the most obnoxious thing about the Prime
file system.  Other things to watch for are space compression, trailing
blank deletion, and padding lines to an even number of characters.  
(Disk files cannot contain an odd number of bytes.)

My experence with Primix is from a conference almost a year ago, before
it was released.  I do use the C compiler under Primos.  (The same compiler
is used with Primix, but with different libraries.)

(Character handling is a dog on Prime C without the -ix option and a Prime
that will handle it.)

-- 
Bob Larson
Arpa: Blarson at Usc-Ecl.Arpa
Uucp: ihnp4!sdcrdcf!oberon!blarson



More information about the Comp.lang.c mailing list