CompuServe Messages

C problems

    09-Mar-91 09:55:50
Sb: #8222-C problems
Fm: Greg Comeau@Comeau Cmptg 72331,3421
To: Robert Hayes 70431,1737
>with Aztec I couldn't find a setvbuf function setvbuf() is a superset of setbuf(), the former being ANSI and the latter being a UNIXism. >I suppose this means you'll want me to clean up my dos code for the >fflush stuff? So long as you brought it up, yes! Ya see, what the compiler vendors are probably doing is just resetting the buffer pointer and some other stuff which becomes innocuous for something like stdin, so it *appears* that the “input buffer'' has been cleared. What's at issue is exactly what this input buffer is as well as where it is. In that light input is different from output since you may have type a 20 character line but under most environments stdio won't know anything about it until you hit the return (and then there are all sort of other idiosyncrasies like your stdio buffering requests as well as you environments buffering settings. And of course it gets even more confusing when the input then comes from a file rather than an “interactive device'').