scanf pushback (was: X3J11 Pleasanton meeting summary)

Karl Heuer karl at haddock.ima.isc.com
Tue Oct 9 04:50:40 AEST 1990


In article <14057 at smoke.BRL.MIL> gwyn at smoke.BRL.MIL (Doug Gwyn) writes:
>I think the main motivation was the abhorrence many members have to
>the idea that when scanning an input stream they might have to "push
>back" several characters.

But even with this ruling, they still have to be able to push back two
characters: one via scanf(), and a second one via ungetc().  Adding this
second slot is the hard part--once you've solved that, extending it to
the four (or whatever) slots needed by the "smarter scanf" is easy.

Karl W. Z. Heuer (karl at kelp.ima.isc.com or ima!kelp!karl), The Walking Lint



More information about the Comp.std.c mailing list