home *** CD-ROM | disk | FTP | other *** search
-
- #ifndef _Fmodes_h
- #ifdef __GNUG__
- #pragma once
- #pragma interface
- #endif
- #define _Fmodes_h 1
-
- enum io_mode // known unix file IO modes
- { // for the atari, these are text mode IO modes
- io_readonly = 0, // (ie: line terminator is CRLF and
- io_writeonly = 1, // CR's are automatically stripped by
- io_readwrite = 2, // the IO library routines)
- io_appendonly = 3,
- io_append = 4 // append, plus allow reads
-
- #ifdef atarist
- ,
- _atari_bin = 64,
- _atari_text = 128,
-
- io_readonly_bin = _atari_bin+io_readonly, // additional modes for
- io_writeonly_bin = _atari_bin+io_writeonly, // binary mode IO
- io_readwrite_bin = _atari_bin+io_readwrite, // see all bytes in
- io_appendonly_bin = _atari_bin+io_appendonly, // stream including CR's
- io_append_bin = _atari_bin+io_append,
-
- io_readonly_text = _atari_text+io_readonly, // text modes
- io_writeonly_text = _atari_text+io_writeonly,
- io_readwrite_text = _atari_text+io_readwrite,
- io_appendonly_text = _atari_text+io_appendonly,
- io_append_text = _atari_text+io_append
-
- #endif
- };
-
- enum access_mode // ways to open a file
- {
- a_createonly = 0, // create, fail if file exists
- a_create = 1, // create if doesn't exist, else truncate
- a_useonly = 2, // use (no truncate) fail if doesn't exist
- a_use = 3 // use (no truncate), create if doesn't exist
- };
-
- enum state_value // File states
- {
- _good = 0, // all is well
- _eof = 1, // at eof
- _fail = 2, // logical or physical IO error
- _bad = 4 // unopened/corrupted
- #ifdef atarist
- ,
- _bin = _atari_bin, // binary mode
- _text = _atari_text // text mode
- #endif
- };
-
- #endif
-