🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.bugs.4bsd
Article #1349

Re: ungetc will put characters back into an _IOSTRG input stream

#1349
From: Karl Heuer
Date: Tue, 21 Feb 1989 20:53
6 lines
929 bytes
The solutions I've seen all involve changing ungetc().  It would also be
possible to change the scanf() internals to just decrement _ptr instead of
calling ungetc(); I believe that, in the usual stdio implementation, this
would do the right thing for both string files and real files.

Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint
Technical Details
Message-ID: <11821@haddock.ima.isc.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!clyde!ima!haddock!karl
References: <20282@lll-winken.LLNL.GOV> <7898@boring.cwi.nl>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!clyde!ima!haddock!karl
From: karl@haddock.ima.isc.com (Karl Heuer)
Newsgroups: comp.bugs.4bsd
Subject: Re: ungetc will put characters back into an _IOSTRG input stream
Summary: Could change _doscan instead of ungetc
Keywords: writable strings, shared strings (text segment), sscanf, ungetc
Message-ID: <11821@haddock.ima.isc.com>
Date: 21 Feb 89 20:53:04 GMT
References: <20282@lll-winken.LLNL.GOV> <7898@boring.cwi.nl>
Reply-To: karl@haddock.ima.isc.com (Karl Heuer)
Organization: Interactive Systems, Boston
Lines: 6