#: 4060 S3/Languages
01-Jun-90 20:57:47
Sb: #3976-C file buffering
Fm: Mike Knudsen 72467,1111
To: Bob van der Poel 76510,2203 (X)
Bob, it's best to do output buffered, and one-key-at-a-time (no ENTER) input as
unbuffered. You can get the corresponding "raw" (Unix-ese) channel number as
"stdin->_fileno" or something close -- look in stdio.h to be sure. Just be sure
that whenever you do unbufeered I/O on the same path as buffered, always
fflush() the path first.
Also you can set buffered output so it WILL NOT turn CRs and LFs bytes into
CR-LF pairs. Do stdout->_flag |= _RBF.
Ask for more details if needed. Don't use setbuf(). But use fprintf(stderr,
...) if you want instant output quick.
|