2 * AcessOS Standard C Library
4 * Configuration Options
13 #define FILE_FLAG_MODE_READ 0x0001
14 #define FILE_FLAG_MODE_WRITE 0x0002
15 #define FILE_FLAG_MODE_EXEC 0x0003
16 #define FILE_FLAG_MODE_APPEND 0x0004
17 #define FILE_FLAG_MODE_MASK 0x0007
19 #define FILE_FLAG_M_EXT 0x0010
20 #define FILE_FLAG_M_BINARY 0x0020
22 #define FILE_FLAG_EOF 0x0100
23 #define FILE_FLAG_LINEBUFFERED 0x1000 // Flush when '\n' encountered
24 #define FILE_FLAG_OURBUFFER 0x2000 // Buffer is owned by stdio
26 #define FILE_FLAG_ALLOC 0x8000 // Internal 'is used' flag
28 #define _GetFileMode(fp) ((fp)->Flags & FILE_FLAG_MODE_MASK)
37 char *FileName; // heap
39 off_t BufferOfs; // File offset of first byte in buffer
41 size_t BufferPos; // First unused byte in the buffer (read/write pos essentially)
42 size_t BufferSpace; // Number of bytes allocated in \a Buffer