[net.lang.c] How can this be broken ?!!?

don@umd5 (Chris Sylvain) (10/15/86)

This worked with Ultrix 1.2:
	while( fputc( fgetc(fd), fe) != EOF );
But is broken with 4.3BSD [!!] on the same microVAX ...
The char M-^? is written endlessly to the "fe" file.
M-^? means 8th bit set, lower 7 bits == ^? ...
<stdio.h> says: #define EOF (-1)
fputc and fgetc are int functions, and fgetc is supposed to return EOF
at the end of the file. I fixed my code by using feof(fd) ...
Am I right by saying the above code fragment by rights should still work ?

-- 
--==---==---==--
.. Long time the manxome foe he sought -- ..

ARPA: don@umd5.UMD.EDU     BITNET: don%umd5@umd2
UUCP: ..!{ seismo!umcp-cs, ihnp4!rlgvax }!cvl!umd5!don

** WARNING: don@mimsy.UMD.EDU is a different person **
** (umcp-cs and mimsy.umd.edu are the same machine) **
**   -->   Please double-check the address   <--    **