Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ukma!xanth!nic.MR.NET!thor.acc.stolaf.edu!mike From: mike@thor.acc.stolaf.edu (Mike Haertel) Newsgroups: comp.unix.wizards Subject: sticky EOF Keywords: stdio Message-ID: <2017@thor.acc.stolaf.edu> Date: 7 May 89 01:07:19 GMT Organization: St. Olaf College; Northfield, MN Lines: 19 After EOF is returned for the first time, Berkeley stdio functions will not attempt to read further input if the user tries, but will instead continue returning EOF. In Ritchie stdio (v7, System V) subsequent calls to stdio functions will attempt further reads, and return EOF only if the further reads also return EOF. I'm curious which behavior people prefer. The Berkeley behavior is more convenient for a certain class of lazy programmer, and the Ritchie behavior is more similar to the underlying Unix calls. The May 13 1988 dpANS merely says "If the stream is at end-of-file, the end-of-file indicator for the stream is set and fgetc returns EOF." It doesn't appear to say anything about the behavior of subsequent calls. -- Mike Haertel main() ??< printf("hello, world??/n"); ??>