setmode
◄Summary► ◄Example► ◄Up► ◄Contents► ◄Index► ◄Back►
────────────────────────────────────────────────────────────────────────────
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.
-♦-