getc() != EOF

Jack Jansen jack at vu44.UUCP
Mon Jun 4 19:45:39 AEST 1984


With the PR1ME c-compiler, chars are unsigned, and they have
their parity bit on(!!). This means that 
    while( (c=getc())!= EOF)
doesn't work, since the (c=getc()) is not sign-extended to
an integer, but just zero padded. As soon as I found this
out I worked myself through the C manual, but this behavior 
doesn't seem to violate the standard.....
	Jack, {philabs|decvax}!mcvax!vu44!jack



More information about the Comp.unix.wizards mailing list