Mercurial > hg > dmlib
annotate dmfile.h @ 434:380c226c75af
Add C++ guard.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 03 Nov 2012 14:52:52 +0200 |
parents | c452a459e552 |
children | b2b461829c61 |
rev | line source |
---|---|
0 | 1 /* |
2 * DMLib | |
414
c452a459e552
Clear up the file descriptions.
Matti Hamalainen <ccr@tnsp.org>
parents:
405
diff
changeset
|
3 * -- Standard I/O (stdio) file write/read endianess helpers |
0 | 4 * Programmed and designed by Matti 'ccr' Hamalainen |
5 * (C) Copyright 2011 Tecnic Software productions (TNSP) | |
6 */ | |
7 #ifndef DMFILE_H | |
8 #define DMFILE_H | |
9 | |
10 #include "dmlib.h" | |
11 | |
434 | 12 #ifdef __cplusplus |
13 extern "C" { | |
14 #endif | |
15 | |
0 | 16 |
17 /* Plain file endianess functions | |
18 */ | |
19 #define DM_DEFINE_FFUNC(xname, xtype, z) \ | |
20 BOOL dm_fread_ ## xname (FILE *f, xtype *v); \ | |
405
d0257d0004f6
Implement dm_{read,write}_byte() and constify.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
21 BOOL dm_fwrite_ ## xname (FILE *f, const xtype v); |
0 | 22 |
23 #include "dmfiletmpl.h" | |
24 | |
25 #undef DM_DEFINE_FFUNC | |
26 | |
405
d0257d0004f6
Implement dm_{read,write}_byte() and constify.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
27 BOOL dm_fread_str(FILE *f, void *, const size_t); |
d0257d0004f6
Implement dm_{read,write}_byte() and constify.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
28 BOOL dm_fwrite_str(FILE *f, const void *, const size_t); |
d0257d0004f6
Implement dm_{read,write}_byte() and constify.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
29 |
d0257d0004f6
Implement dm_{read,write}_byte() and constify.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
30 BOOL dm_fread_byte(FILE *f, Uint8 *); |
d0257d0004f6
Implement dm_{read,write}_byte() and constify.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
31 BOOL dm_fwrite_byte(FILE *f, const Uint8); |
0 | 32 |
33 | |
34 #ifdef __cplusplus | |
35 } | |
36 #endif | |
434 | 37 |
0 | 38 #endif // DMFILE_H |