Mercurial > hg > dmlib
diff src/dmgrowbuf.h @ 1531:260bf529a8f2
Implement current len/offs push/pop for growbuf.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 12 May 2018 03:23:32 +0300 |
parents | e8fe529f4341 |
children | 907160399b24 |
line wrap: on
line diff
--- a/src/dmgrowbuf.h Sat May 12 03:10:47 2018 +0300 +++ b/src/dmgrowbuf.h Sat May 12 03:23:32 2018 +0300 @@ -15,9 +15,11 @@ typedef struct { - Uint8 *data; - size_t len, size, mingrow; + Uint8 *data, *adata; + size_t len, size, mingrow, offs; BOOL allocated; + int nstack; + struct { size_t offs, len; } stack[32]; } DMGrowBuf; @@ -37,6 +39,9 @@ BOOL dmGrowBufPutU32BE(DMGrowBuf *buf, const Uint32 val); BOOL dmGrowBufPutU32LE(DMGrowBuf *buf, const Uint32 val); +void dmGrowBufPush(DMGrowBuf *buf); +void dmGrowBufPop(DMGrowBuf *buf); + #ifdef __cplusplus }