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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 /*
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
4 * Programmed and designed by Matti 'ccr' Hamalainen
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
5 * (C) Copyright 2011 Tecnic Software productions (TNSP)
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
6 */
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
7 #ifndef DMFILE_H
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8 #define DMFILE_H
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
9
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
10 #include "dmlib.h"
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
11
434
380c226c75af Add C++ guard.
Matti Hamalainen <ccr@tnsp.org>
parents: 414
diff changeset
12 #ifdef __cplusplus
380c226c75af Add C++ guard.
Matti Hamalainen <ccr@tnsp.org>
parents: 414
diff changeset
13 extern "C" {
380c226c75af Add C++ guard.
Matti Hamalainen <ccr@tnsp.org>
parents: 414
diff changeset
14 #endif
380c226c75af Add C++ guard.
Matti Hamalainen <ccr@tnsp.org>
parents: 414
diff changeset
15
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
17 /* Plain file endianess functions
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
18 */
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
19 #define DM_DEFINE_FFUNC(xname, xtype, z) \
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
22
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
23 #include "dmfiletmpl.h"
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
24
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
25 #undef DM_DEFINE_FFUNC
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
32
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
33
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
34 #ifdef __cplusplus
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
35 }
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
36 #endif
434
380c226c75af Add C++ guard.
Matti Hamalainen <ccr@tnsp.org>
parents: 414
diff changeset
37
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
38 #endif // DMFILE_H