TIP: Click on subject to list as thread! ANSI
echo: cis.languages
to: Bob van der Poel 76510,2203 (X)
from: Mike Knudsen 72467,1111
date: 1990-06-01 20:57:47
subject: #3976-C file buffering

#: 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.

SOURCE: compuserve via textfiles.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.