Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!umcp-cs!cvl!umd5!don From: don@umd5 (Chris Sylvain) Newsgroups: net.lang.c Subject: How can this be broken ?!!? Message-ID: <1287@umd5> Date: Wed, 15-Oct-86 15:01:10 EDT Article-I.D.: umd5.1287 Posted: Wed Oct 15 15:01:10 1986 Date-Received: Thu, 16-Oct-86 02:39:58 EDT Organization: University of Maryland, College Park Lines: 20 Keywords: EOF 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 == ^? ... 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 <-- **