getc() != EOF

Brandon Allbery bsafw at ncoast.UUCP
Mon Jun 4 11:10:35 AEST 1984


	The local "lint" tells me that ((ch = getc ()) != EOF) is illegal on
IBM-based Cs.  This fits in with the (assumption) that an IBM/370 C would use
EBCDIC, NOT ASCII, and all 8 bits of the character data are significant, so
the ONLY way to trap an EOF would be the feof () function.  (OK, for normal
text files, 0xff is not normally used, but they may have thought they were
stretching it.  They don't use 0x0a either, usually, although I've never run
Unix on an IBM.)

-- 
--------------------------------------------------------------------------------

						Brandon Allbery
						decvax!cwruecmp!ncoast!bsafw
"...he himself being one universe's prime	MCI MAIL: 161-7070
example of utter, rambunctious free will!"	USMail (core dump):
							6504 Chestnut Road
							Independence, OH 44131



More information about the Comp.unix.wizards mailing list