[comp.unix.wizards] fflush and input

sullivan@marge.math.binghamton.edu (fred sullivan) (12/09/87)

The Ultrix 2.0 manual says that if fflush is called for a file which is not
open for output, then EOF is returned.  This is true.  The SUN manual says
the same thing.  It is wrong.  In fact, the SUN fflush will flush an input
file.  What do other flavors of Unix say and do?  What is the correct way to
flush an input file?  (It's actually the last question that I need an answer
to.)

Fred Sullivan
Department of Mathematical Sciences
State University of New York at Binghamton
Binghamton, New York  13903
Email: sullivan@marge.math.binghamton.edu

gwyn@brl-smoke.ARPA (Doug Gwyn ) (12/13/87)

In article <750@bingvaxu.cc.binghamton.edu> sullivan@marge.math.binghamton.edu.cc.binghamton.edu (fred sullivan) writes:
>What is the correct way to flush an input file?

The question makes no sense in the context of fflush().
What is it you really want to do?