annotate dmfile.h @ 405:d0257d0004f6

Implement dm_{read,write}_byte() and constify.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 03 Nov 2012 01:42:45 +0200
parents 32250b436bca
children c452a459e552
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
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3 * -- Main header file
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
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
12
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
13 /* Plain file endianess functions
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
14 */
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
15 #define DM_DEFINE_FFUNC(xname, xtype, z) \
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16 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
17 BOOL dm_fwrite_ ## xname (FILE *f, const xtype v);
0
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 #include "dmfiletmpl.h"
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
20
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
21 #undef DM_DEFINE_FFUNC
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
22
405
d0257d0004f6 Implement dm_{read,write}_byte() and constify.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
23 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
24 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
25
d0257d0004f6 Implement dm_{read,write}_byte() and constify.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
26 BOOL dm_fread_byte(FILE *f, Uint8 *);
d0257d0004f6 Implement dm_{read,write}_byte() and constify.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
27 BOOL dm_fwrite_byte(FILE *f, const Uint8);
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
28
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
29
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
30 #ifdef __cplusplus
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
31 }
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
32 #endif
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
33 #endif // DMFILE_H