Mercurial > hg > dmlib
diff src/dmgrowbuf.h @ 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 | c6ee41fd98dd |
children |
line wrap: on
line diff
--- a/src/dmgrowbuf.h Thu Dec 08 15:56:36 2022 +0200 +++ b/src/dmgrowbuf.h Thu Dec 08 15:59:22 2022 +0200 @@ -25,10 +25,10 @@ len, // Size requested mingrow; // Minimum amount of bytes the allocation size grows by - BOOL - backwards, // TRUE if the buffer grows backwards (e.g. "offs" moves backwards) - literal, // TRUE if dmGrowBufPut*() functions stores data "literally" in backwards mode - is_const; // TRUE will cause any reallocs etc. modifications to fail + bool + backwards, // true if the buffer grows backwards (e.g. "offs" moves backwards) + literal, // true if dmGrowBufPut*() functions stores data "literally" in backwards mode + is_const; // true will cause any reallocs etc. modifications to fail } DMGrowBuf; @@ -46,17 +46,17 @@ DMGrowBuf * dmGrowBufConstCreateFrom(DMGrowBuf *buf, Uint8 *data, const size_t len); -BOOL dmGrowBufGrow(DMGrowBuf *buf, const size_t amount); -BOOL dmGrowBufCheckGrow(DMGrowBuf *buf, const size_t nsize); +bool dmGrowBufGrow(DMGrowBuf *buf, const size_t amount); +bool dmGrowBufCheckGrow(DMGrowBuf *buf, const size_t nsize); -BOOL dmGrowBufPut(DMGrowBuf *buf, const Uint8 *data, const size_t len); -BOOL dmGrowBufPutU8(DMGrowBuf *buf, const Uint8 value); -BOOL dmGrowBufPutU16BE(DMGrowBuf *buf, const Uint16 val); -BOOL dmGrowBufPutU16LE(DMGrowBuf *buf, const Uint16 val); -BOOL dmGrowBufPutU32BE(DMGrowBuf *buf, const Uint32 val); -BOOL dmGrowBufPutU32LE(DMGrowBuf *buf, const Uint32 val); +bool dmGrowBufPut(DMGrowBuf *buf, const Uint8 *data, const size_t len); +bool dmGrowBufPutU8(DMGrowBuf *buf, const Uint8 value); +bool dmGrowBufPutU16BE(DMGrowBuf *buf, const Uint16 val); +bool dmGrowBufPutU16LE(DMGrowBuf *buf, const Uint16 val); +bool dmGrowBufPutU32BE(DMGrowBuf *buf, const Uint32 val); +bool dmGrowBufPutU32LE(DMGrowBuf *buf, const Uint32 val); -BOOL dmGrowBufGetU8(DMGrowBuf *buf, Uint8 *value); +bool dmGrowBufGetU8(DMGrowBuf *buf, Uint8 *value); #ifdef __cplusplus