3.4 _fmode

The _fmode variable controls the default file-translation mode.

It is declared in the STDLIB.H include file as follows:

extern int _fmode;

By default, the value of _fmode is _O_TEXT, causing files to be translated in text mode (unless specifically opened or set to binary mode). When _fmode is set to _O_BINARY, the default mode is binary. You can set _fmode to the flag _O_BINARY by linking with BINMODE.OBJ or by assigning _fmode the _O_BINARY value.