ungetc will put characters back into an _IOSTRG input stream

Karl Heuer karl at haddock.ima.isc.com
Wed Feb 22 06:53:04 AEST 1989


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 at haddock.isc.com), The Walking Lint



More information about the Comp.bugs.4bsd.ucb-fixes mailing list