C Language and Libraries Help (clang.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
_setmode
 Summary Example                         Up Contents Index Back
─────Run-Time Library───────────────────────────────────────────────────────
 
     The _setmode function sets the translation mode of the file given
     by <handle> to <mode>. The mode must be either the _O_TEXT or
     _O_BINARY manifest constant.
 
     The _setmode function is typically used to modify the default
     translation mode of stdin, stdout, stderr, _stdaux, and _stdprn,
     but it can be used on any file. If _setmode is applied to the
     file handle for a stream, the _setmode function should be called
     before any input or output operations are performed on the
     stream.
 
     Return Value
 
     If successful, _setmode returns the previous translation mode. A
     return value of -1 indicates an error, and errno is set to either
     EBADF or EINVAL.
                                    -♦-