maug
Quick and dirty C mini-augmentation library.
Data Fields | Related Functions
MFILE_CADDY Struct Reference

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.
 
maug_path filename
 

Related Functions

(Note that these are not member functions.)

#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...
 
MERROR_RETVAL mfile_vprintf (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...
 

The documentation for this struct was generated from the following file: