added readWholeFile and more generic tracelog with va_list
This commit is contained in:
parent
4cc2159793
commit
aa39e2563d
4 changed files with 88 additions and 10 deletions
11
file.h
11
file.h
|
|
@ -15,6 +15,11 @@ typedef struct {
|
|||
void *handle;
|
||||
} file_t;
|
||||
|
||||
typedef struct {
|
||||
char *buf;
|
||||
size_t len;
|
||||
} fread_buf_t;
|
||||
|
||||
file_t fileOpen(const char *fname, int mode);
|
||||
void fileClose(file_t *ctx);
|
||||
|
||||
|
|
@ -33,6 +38,12 @@ void fileRewind(file_t *ctx);
|
|||
|
||||
uint64_t fileTell(file_t *ctx);
|
||||
|
||||
fread_buf_t fileReadWhole(const char *fname);
|
||||
fread_buf_t fileReadWholeFP(file_t *ctx);
|
||||
|
||||
str_t fileReadWholeText(const char *fname);
|
||||
str_t fileReadWholeFPText(file_t *ctx);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue