maug
Quick and dirty C mini-augmentation library.
|
Abstraction layer for dealing with files on retro systems. More...
Topics | |
RetroFile Types | |
Types of files/data stores that mfile can abstract from. | |
Files | |
file | mfile.h |
Data Structures | |
union | MFILE_HANDLE |
struct | MFILE_CADDY |
Macros | |
#define | MAUG_PATH_MAX 256 |
Maximum size allocated for asset paths. | |
#define | MFILE_FLAG_READ_ONLY 0x01 |
#define | MFILE_READ_FLAG_LSBF 0x01 |
#define | MFILE_TRACE_LVL 0 |
#define | mfile_check_lock(p_file) |
#define | mfile_default_case(p_file) |
#define | mfile_has_bytes(p_file) |
#define | mfile_get_sz(p_file) |
Typedefs | |
typedef MERROR_RETVAL(* | mfile_seek_t) (struct MFILE_CADDY *p_file, off_t pos) |
typedef MERROR_RETVAL(* | mfile_read_int_t) (struct MFILE_CADDY *p_file, uint8_t *buf, size_t buf_sz, uint8_t flags) |
typedef MERROR_RETVAL(* | mfile_read_line_t) (struct MFILE_CADDY *p_file, char *buf, off_t buf_sz, uint8_t flags) |
typedef struct MFILE_CADDY | mfile_t |
Functions | |
MERROR_RETVAL | mfile_lock_buffer (MAUG_MHANDLE, off_t, mfile_t *p_file) |
Lock a buffer and assign it to an mfile_t to read/write. | |
MERROR_RETVAL | mfile_open_read (const char *filename, mfile_t *p_file) |
Open a file and read it into memory or memory-map it. | |
void | mfile_close (mfile_t *p_file) |
Close a file opened with mfile_open_read(). | |
Abstraction layer for dealing with files on retro systems.
#define mfile_check_lock | ( | p_file | ) |
#define mfile_default_case | ( | p_file | ) |
#define mfile_get_sz | ( | p_file | ) |
#define mfile_has_bytes | ( | p_file | ) |
MERROR_RETVAL mfile_open_read | ( | const char * | filename, |
mfile_t * | p_file ) |
Open a file and read it into memory or memory-map it.
filename | NULL-terminated path to file to open. |