#: 17583 S12/OS9/68000 (OSK)
01-Mar-93 17:46:17
Sb: #17578-#C help
Fm: Pete Lyall 76703,4230
To: LARRY OLSON 72227,3467 (X)
Larry -
I believe once buffering has been disabled, you can't turn it back on again, at
least not like that.
You could however _ummm_ cheat!
Try:
Do output (buffered mode)
stdout->flag |= _UNBUF; /* see stdio.h */
perform unbuffered output
stdout->flag &= ~_UNBUF
Resume buffered output.
Note that before unbuffering stdout, you should make sure that all characters
are flushed by doing an 'fflush(stdout)'.
Actually, using fflush(stdout) at any point is still the more efficient way to
do things. Single character (unbuffered) output is horribly abusive of the
system (and slow), if you don't really need it.
Pete Lyall
There is 1 Reply.
|