Function setmode

Top 

Declaration:

int setmode(long handle, int amode);

 

Sets mode of an open file.

setmode sets the mode of the opened file associated with handle to either binary or text. The amode argument must have the value of either O_BINARY or O_TEXT, never both. (These symbolic constants are defined in system.h).

Returned Value

setmode returns the previous translation mode, if successful. On error, it returns -1 and sets the errno global variable to

EINVAL       Invalid argument