Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 (Tek) 9/26/83; site hammer.UUCP Path: utzoo!linus!decvax!microsoft!uw-beaver!tektronix!orca!hammer!dce From: dce@hammer.UUCP (David Elliott) Newsgroups: net.unix-wizards Subject: 4.2BSD _filbuf() question Message-ID: <448@hammer.UUCP> Date: Wed, 11-Jan-84 17:13:58 EST Article-I.D.: hammer.448 Posted: Wed Jan 11 17:13:58 1984 Date-Received: Sat, 14-Jan-84 03:12:13 EST Organization: Tektronix, Wilsonville OR. Lines: 27 The 4.2BSD version of _filbuf() immediately returns EOF every time it is called after encountering EOF, unless this is cleared via clrerr() or rewind(). For those of you that don't realize it, _filbuf() is the heart of getc() and getchar(). This may be useful, but it affects some programs. For example, in 4.1c, I can execute: cat - file1 - file2 - file3 > file4 and I can type in a little message before each file. In 4.2, I can only type a message for the first file;all others get an empty message. Is it reasonable for Berkeley to have changed the functionality of a routine when the routine has been around for years with the same functionality? From just the above example, it seems obvious that the implementors of this change did not think about the effect on existing programs. I'd like to hear opinions on this subject. David Elliott tektronix!tekecs!dce