From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@cse.psu.edu Subject: Re: [9fans] bungetc error From: Charles Forsyth Date: Thu, 3 Jan 2008 00:24:54 +0000 In-Reply-To: <20080102215128.GB810@shodan.homeunix.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-wlhgnzqslknzpiojiorgbpyifu" Topicbox-Message-UUID: 255adf6a-ead3-11e9-9d60-3106f5b1d025 This is a multi-part message in MIME format. --upas-wlhgnzqslknzpiojiorgbpyifu Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit i assumed the intention was: in practice it's sometimes a nuisance to have to keep a flag in the application to say whether eof has been reached or not, when it could be done by allowing an unget at eof. --upas-wlhgnzqslknzpiojiorgbpyifu Content-Type: message/rfc822 Content-Disposition: inline Received: from mail.cse.psu.edu ([130.203.4.6]) by lavoro; Wed Jan 2 21:59:59 GMT 2008 Received: from psuvax1.cse.psu.edu (localhost [127.0.0.1]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 2669210AE4 for ; Wed, 2 Jan 2008 16:52:36 -0500 (EST) X-Original-To: 9fans@cse.psu.edu Delivered-To: 9fans@cse.psu.edu Received: from localhost (localhost [127.0.0.1]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 3B570F8C9 for <9fans@cse.psu.edu>; Wed, 2 Jan 2008 16:51:46 -0500 (EST) Received: from mail.cse.psu.edu ([127.0.0.1]) by localhost (psuvax1 [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 12871-01-43 for <9fans@cse.psu.edu>; Wed, 2 Jan 2008 16:51:42 -0500 (EST) Received: from mail-in-10.arcor-online.net (mail-in-10.arcor-online.net [151.189.21.50]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 2F7BE1086C for <9fans@cse.psu.edu>; Wed, 2 Jan 2008 16:51:42 -0500 (EST) Received: from mail-in-04-z2.arcor-online.net (mail-in-04-z2.arcor-online.net [151.189.8.16]) by mail-in-10.arcor-online.net (Postfix) with ESMTP id 547101F5160 for <9fans@cse.psu.edu>; Wed, 2 Jan 2008 22:51:39 +0100 (CET) Received: from mail-in-02.arcor-online.net (mail-in-02.arcor-online.net [151.189.21.42]) by mail-in-04-z2.arcor-online.net (Postfix) with ESMTP id 43EA8ABC7E for <9fans@cse.psu.edu>; Wed, 2 Jan 2008 22:51:39 +0100 (CET) Received: from shodan.homeunix.net (dslb-082-083-224-085.pools.arcor-ip.net [82.83.224.85]) by mail-in-02.arcor-online.net (Postfix) with ESMTP id E9E0436E86A for <9fans@cse.psu.edu>; Wed, 2 Jan 2008 22:51:30 +0100 (CET) Received: from shodan.homeunix.net (localhost [127.0.0.1]) by shodan.homeunix.net (8.14.2/8.14.2) with ESMTP id m02LpUmN002383 for <9fans@cse.psu.edu>; Wed, 2 Jan 2008 22:51:30 +0100 (CET) (envelope-from mn@shodan.anadrom.net) Received: (from mn@localhost) by shodan.homeunix.net (8.14.2/8.14.2/Submit) id m02LpTiN002382 for 9fans@cse.psu.edu; Wed, 2 Jan 2008 22:51:29 +0100 (CET) (envelope-from mn) Date: Wed, 2 Jan 2008 22:51:28 +0100 From: Martin Neubauer To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Subject: Re: [9fans] bungetc error Message-ID: <20080102215128.GB810@shodan.homeunix.net> References: <16287bc4-e635-4d1d-9ede-2f3f02c8e8ae@f52g2000hsa.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16287bc4-e635-4d1d-9ede-2f3f02c8e8ae@f52g2000hsa.googlegroups.com> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD/6.3-PRERELEASE (i386) X-Uptime: 10:49pm up 5:38, 3 users, load averages: 0,38 0,26 0,26 X-Virus-Scanned: ClamAV 0.91.2/5343/Wed Jan 2 18:41:01 2008 on mail-in-02.arcor-online.net X-Virus-Status: Clean X-Virus-Scanned: by amavisd-new at cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: 9fans-bounces+forsyth=terzarima.net@cse.psu.edu Errors-To: 9fans-bounces+forsyth=terzarima.net@cse.psu.edu * smahapatra_ct@yahoo.com (smahapatra_ct@yahoo.com) wrote: > I think after bgetc returns Beof, bungetc should change the state, but > not decrement bp->icount. I don't think so. Bungetc ungets the last character read, not Beof. --upas-wlhgnzqslknzpiojiorgbpyifu--