Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!husc6!seismo!nbires!vianet!devine From: devine@vianet.UUCP Newsgroups: comp.unix.questions Subject: Re: Stdio flaws? Message-ID: <195@vianet.UUCP> Date: Tue, 16-Jun-87 15:20:16 EDT Article-I.D.: vianet.195 Posted: Tue Jun 16 15:20:16 1987 Date-Received: Thu, 18-Jun-87 04:23:03 EDT References: <345@phoenix.PRINCETON.EDU> <19977@sun.uucp> <798@mcgill-vision.UUCP> Organization: Western Digital, Boulder Tech Ctr Lines: 11 Summary: Microsoft C library allows flushing input In article <798@mcgill-vision.UUCP>, mouse@mcgill-vision.UUCP (der Mouse) writes: > >> For some unknown reason, fflush(3) only flushes output buffers, not > >> input buffers. > The reason is "that's how it's written." :-) Actually, that's how it is written for UNIX. The Microsoft DOS C library has a fflush() that operates on files opened for input or output. It clears the stdio buffer associated with that file by either writing the contents (if open for write) or clears the buffer (read file). Bob Devine