Mercurial > hg > dmlib
view src/dmresw.c @ 1260:94e9444b0fa7
Only initialize defpannings up to nchannels.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 10 Mar 2015 11:49:38 +0200 |
parents | 9f06f6661cdf |
children | 0cac3360a0aa |
line wrap: on
line source
/* * DMLib * -- Resource management * Programmed and designed by Matti 'ccr' Hamalainen * (C) Copyright 2011-2015 Tecnic Software productions (TNSP) */ #include "dmresw.h" int dmf_write_str(DMResource *f, const void *s, const size_t l) { return dmfwrite(s, 1, l, f) == l; } BOOL dmf_write_byte(DMResource *f, const Uint8 val) { return dmfputc(val, f) == val; } #define DM_DEFINE_FFUNC(xname, xtype, xmacro) \ 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; \ } #include "dmfiletmpl.h" #undef DM_DEFINE_FFUNC