home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / msdos / c / djgpp / include / fmodes.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-03-03  |  937 b   |  35 lines

  1.  
  2. #ifndef _Fmodes_h
  3. #ifdef __GNUG__
  4. #pragma once
  5. #pragma interface
  6. #endif
  7. #define _Fmodes_h 1
  8.  
  9. enum io_mode                    // known unix file IO modes
  10. {
  11.   io_readonly   = 0,            
  12.   io_writeonly  = 1,
  13.   io_readwrite  = 2, 
  14.   io_appendonly = 3,
  15.   io_append     = 4,            // append, plus allow reads
  16. };
  17.  
  18. enum access_mode                // ways to open a file
  19. {
  20.   a_createonly  = 0,            // create, fail if file exists
  21.   a_create      = 1,            // create if doesn't exist, else truncate
  22.   a_useonly     = 2,            // use (no truncate)  fail if doesn't exist
  23.   a_use         = 3,            // use (no truncate), create if doesn't exist
  24. };
  25.  
  26. enum state_value                // File states
  27.   _good         = 0,            // all is well
  28.   _eof          = 1,            // at eof
  29.   _fail         = 2,            // logical or physical IO error
  30.   _bad          = 4             // unopened/corrupted
  31. };
  32.  
  33. #endif
  34.