Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!iuvax!pur-ee!uiucdcs!uiucdcsb!mccaugh From: mccaugh@uiucdcsb.UUCP Newsgroups: comp.lang.c Subject: Re: ungetc Message-ID: <165600020@uiucdcsb> Date: Wed, 28-Oct-87 01:25:00 EST Article-I.D.: uiucdcsb.165600020 Posted: Wed Oct 28 01:25:00 1987 Date-Received: Sat, 31-Oct-87 01:56:45 EST References: <6592@brl-smoke.ARPA> Lines: 8 Nf-ID: #R:brl-smoke.ARPA:6592:uiucdcsb:165600020:000:408 Nf-From: uiucdcsb.cs.uiuc.edu!mccaugh Oct 28 00:25:00 1987 Not sure why you want an int for first argument to 'ungetc' -- Harbison&Steele report char, not int (page 316). Also, the stream must have been opened for input and buffered, and one character must already have been read to be pushed back. Perhaps you were concerned about the return-value, which is (int) c. Al- so, trying to push EOF has no effect and just returns EOF as value. mccaugh @ uiucmsl