diff options
Diffstat (limited to 'buffer.c')
-rw-r--r-- | buffer.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -180,6 +180,11 @@ void buf_putbyte(buffer* buf, unsigned char val) { buf->pos++; } +void buf_putbool(buffer* buf, unsigned int val) { + char truth = val ? 1 : 0; + buf_putbyte(buf, truth); +} + /* returns an in-place pointer to the buffer, checking that * the next len bytes from that position can be used */ unsigned char* buf_getptr(buffer* buf, unsigned int len) { |