Mail Archives: djgpp/1995/07/21/11:10:43
I'm just starting to play with djgpp v2, and I have a question. How do you
set binary or text mode of the standard input and output?
From emacs.c:
#ifdef MSDOS
/* We do all file input/output as binary files. When we need to translate
newlines, we do that manually. */
_fmode = O_BINARY;
(stdin)->_flag &= ~_IOTEXT;
(stdout)->_flag &= ~_IOTEXT;
(stderr)->_flag &= ~_IOTEXT;
#endif /* MSDOS */
The #define _IOTEXT is not in stdio.h (it was in previous versions). Is it
the same as pre v2? Is there a "portable" or "standard" way to do this in
ANS C?
I remember twiddling bits like this with Borland, but I also seem to
remember a setmode() call, but if you knew my memory....
Thanks,
Dale
- Raw text -