4.2BSD _filbuf() question

David Elliott dce at hammer.UUCP
Thu Jan 12 08:13:58 AEST 1984


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



More information about the Comp.unix.wizards mailing list