Mercurial > hg > dmlib
comparison src/dmresw.c @ 1607:0cac3360a0aa
Cleanups.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 14 May 2018 11:45:33 +0300 |
parents | 9f06f6661cdf |
children | 73545a442ffe |
comparison
equal
deleted
inserted
replaced
1606:93d1050eac99 | 1607:0cac3360a0aa |
---|---|
5 * (C) Copyright 2011-2015 Tecnic Software productions (TNSP) | 5 * (C) Copyright 2011-2015 Tecnic Software productions (TNSP) |
6 */ | 6 */ |
7 #include "dmresw.h" | 7 #include "dmresw.h" |
8 | 8 |
9 | 9 |
10 int dmf_write_str(DMResource *f, const void *s, const size_t l) | 10 BOOL dmf_write_str(DMResource *fh, const void *data, const size_t len) |
11 { | 11 { |
12 return dmfwrite(s, 1, l, f) == l; | 12 return dmfwrite(data, len, 1, fh) == 1; |
13 } | 13 } |
14 | 14 |
15 | 15 |
16 BOOL dmf_write_byte(DMResource *f, const Uint8 val) | 16 BOOL dmf_write_byte(DMResource *fh, const Uint8 val) |
17 { | 17 { |
18 return dmfputc(val, f) == val; | 18 return dmfputc(val, fh) == val; |
19 } | 19 } |
20 | 20 |
21 | 21 |
22 #define DM_DEFINE_FFUNC(xname, xtype, xmacro) \ | 22 #define DM_DEFINE_FFUNC(xname, xtype, xmacro) \ |
23 BOOL dmf_write_ ## xname (DMResource *f, const xtype v) { \ | 23 BOOL dmf_write_ ## xname (DMResource *f, const xtype v) { \ |