|
maug
Quick and dirty C mini-augmentation library.
|

Data Fields | |
| uint8_t | type |
| The RetroFile Types flag describing this file. | |
| union MFILE_HANDLE | h |
| The physical handle or pointer to access the file by. | |
| off_t | last_read |
| off_t | mem_cursor |
| Current position if its type is MFILE_CADDY_TYPE_MEM_BUFFER. | |
| uint8_t * | mem_buffer |
| Locked pointer for MFILE_HANDLE::mem. | |
| uint8_t | flags |
| off_t | sz |
| Size of the current file/buffer in bytes. | |
| char | filename [MAUG_PATH_SZ_MAX+1] |
| mfile_has_bytes_t | has_bytes |
| mfile_cursor_t | cursor |
| mfile_read_byte_t | read_byte |
| mfile_read_block_t | read_block |
| mfile_seek_t | seek |
| mfile_read_int_t | read_int |
| mfile_read_line_t | read_line |
| mfile_printf_t | printf |
| mfile_vprintf_t | vprintf |
| mfile_write_block_t | write_block |
Related Functions | |
(Note that these are not member functions.) | |
| typedef MERROR_RETVAL(* | mfile_vprintf_t) (struct MFILE_CADDY *p_file, uint8_t flags, const char *fmt, va_list args) |
| Callback to printf the given format string, replacing tokens from the providied pre-initialized list of args. More... | |
| #define | MFILE_FLAG_READ_ONLY 0x01 |
| Flag for MFILE_CADDY::flags indicating this file is read-only. | |
| #define | MFILE_FLAG_HANDLE_LOCKED 0x02 |
| Flag for MFILE_CADDY::flags indicating subsequent internal unlocks should unlock the handle back to its buffer. Should only be set internally! | |
| MERROR_RETVAL | mfile_mem_write_block (struct MFILE_CADDY *p_f, const uint8_t *buf, size_t buf_sz) |
| Insert provided buffer into the given file. More... | |