setmode

Sets, at the operating system level, the translation mode to the specified value

Local Servers:nonblocking
Remote Servers:nonblocking
Platform:NLM
Service:Operating System I/O

Syntax

  #include <nwfileio.h>  
   
  int setmode  (  
     int   handle,  
     int   mode);
  

Parameters

handle
(IN) Specifies a file handle.
mode
(IN) Specifies the translation mode.

Return Values

If successful, the setmode function returns the previous mode that was set for the file. Otherwise, a value of -1 is returned. When an error has occurred, the global variable errno contains a value indicating the type of error that has been detected.

Remarks

The setmode function sets the translation mode to be the value of mode for the file whose file handle is given by handle. The mode parameter can contain the following value:

  • O_BINARY—Data is read or written unchanged.

See Also

close, creat, eof, filelength, fileno, fstat, isatty, lseek, open, read, sopen, tell, write