Mercurial > hg > dmlib
comparison src/dmfile.h @ 2586:9807ae37ad69
Require stdbool.h, we require C11 now.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 08 Dec 2022 15:59:22 +0200 |
parents | 6b1f41ca300a |
children |
comparison
equal
deleted
inserted
replaced
2585:ef6c826c5b7a | 2586:9807ae37ad69 |
---|---|
15 | 15 |
16 | 16 |
17 /* Plain file endianess functions | 17 /* Plain file endianess functions |
18 */ | 18 */ |
19 #define DM_DEFINE_FFUNC(xname, xtype, z) \ | 19 #define DM_DEFINE_FFUNC(xname, xtype, z) \ |
20 BOOL dm_fread_ ## xname (FILE *f, xtype *v); \ | 20 bool dm_fread_ ## xname (FILE *f, xtype *v); \ |
21 BOOL dm_fwrite_ ## xname (FILE *f, const xtype v); | 21 bool dm_fwrite_ ## xname (FILE *f, const xtype v); |
22 | 22 |
23 #include "dmfiletmpl.h" | 23 #include "dmfiletmpl.h" |
24 | 24 |
25 #undef DM_DEFINE_FFUNC | 25 #undef DM_DEFINE_FFUNC |
26 | 26 |
27 BOOL dm_fread_str(FILE *f, void *, const size_t); | 27 bool dm_fread_str(FILE *f, void *, const size_t); |
28 BOOL dm_fwrite_str(FILE *f, const void *, const size_t); | 28 bool dm_fwrite_str(FILE *f, const void *, const size_t); |
29 | 29 |
30 BOOL dm_fread_byte(FILE *f, Uint8 *); | 30 bool dm_fread_byte(FILE *f, Uint8 *); |
31 BOOL dm_fwrite_byte(FILE *f, const Uint8); | 31 bool dm_fwrite_byte(FILE *f, const Uint8); |
32 | 32 |
33 | 33 |
34 int dmWriteDataFile(FILE *outFile, const char *filename, const Uint8 *buf, const size_t bufSize); | 34 int dmWriteDataFile(FILE *outFile, const char *filename, const Uint8 *buf, const size_t bufSize); |
35 int dmReadDataFile(FILE *inFile, const char *filename, Uint8 **pbuf, size_t *pbufSize); | 35 int dmReadDataFile(FILE *inFile, const char *filename, Uint8 **pbuf, size_t *pbufSize); |
36 | 36 |