Mercurial > hg > dmlib
diff src/dmresw.c @ 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 | 73545a442ffe |
children |
line wrap: on
line diff
--- a/src/dmresw.c Thu Dec 08 15:56:36 2022 +0200 +++ b/src/dmresw.c Thu Dec 08 15:59:22 2022 +0200 @@ -7,24 +7,24 @@ #include "dmres.h" -BOOL dmf_write_str(DMResource *fh, const void *data, const size_t len) +bool dmf_write_str(DMResource *fh, const void *data, const size_t len) { return dmfwrite(data, len, 1, fh) == 1; } -BOOL dmf_write_byte(DMResource *fh, const Uint8 val) +bool dmf_write_byte(DMResource *fh, const Uint8 val) { return dmfputc(val, fh) == val; } #define DM_DEFINE_FFUNC(xname, xtype, xmacro) \ -BOOL dmf_write_ ## xname (DMResource *f, const xtype v) { \ +bool dmf_write_ ## xname (DMResource *f, const xtype v) { \ xtype result = DM_NATIVE_TO_ ## xmacro (v); \ if (dmfwrite(&result, sizeof( xtype ), 1, f) != 1) \ - return FALSE; \ - return TRUE; \ + return false; \ + return true; \ } #include "dmfiletmpl.h"