qc.hlp (Table of Contents; Topic list)
File-Mode Constants
                                             Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
  Constant:  O_TEXT, O_BINARY, O_RAW
 
  Include:   <fcntl.h>
 
  Context:   open, sopen (<oflag> argument)
             setmode (<mode> argument)
             _pipe (<textmode> argument)
 
  Synopsis:  The O_BINARY and O_TEXT manifest constants determine the
             translation mode for files (open and sopen) or the
             translation mode for streams (setmode).
 
     The allowed values are shown below:
 
     Constant     Meaning
 
     O_TEXT       Sets text (translated) mode. Carriage-return──
                  line-feed combinations (CR-LF) are translated into a
                  single line feed (LF) on input. Line-feed characters
                  are translated into CR-LF combinations on output.
 
                  Also, CTRL+Z is interpreted as an end-of-file
                  character on input. In files opened for reading and
                  reading/writing, fopen checks for CTRL+Z at the end
                  of the file and removes it, if possible. This is done
                  because using the fseek and ftell functions to move
                  within a file ending with CTRL+Z may cause fseek to
                  behave improperly near the end of the file.
 
     O_BINARY     Sets binary (untranslated) mode. The above
                  translations are suppressed.
 
     O_RAW        Same as O_BINARY. Supported for C 2.0 compatibility.