Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site oberon.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!decwrl!pyramid!hplabs!sdcrdcf!oberon!blarson From: blarson@oberon.UUCP (Bob Larson) Newsgroups: net.lang.c Subject: Re: Questions about C on a Prime (primix) Message-ID: <231@oberon.UUCP> Date: Tue, 25-Mar-86 18:53:32 EST Article-I.D.: oberon.231 Posted: Tue Mar 25 18:53:32 1986 Date-Received: Thu, 27-Mar-86 07:42:28 EST References: <988@plus5.UUCP> <325@hadron.UUCP> <2023@brl-smoke.ARPA> Reply-To: blarson@oberon.UUCP (Bob Larson) Organization: U. of So. Calif., Los Angeles Lines: 31 [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@Usc-Ecl.Arpa Uucp: ihnp4!sdcrdcf!oberon!blarson