diff options
author | Matt Johnston <matt@ucc.asn.au> | 2005-07-08 13:28:03 +0000 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2005-07-08 13:28:03 +0000 |
commit | aaa0b1ec3c8e0fe9d827565f17a06e87abe8bfa3 (patch) | |
tree | 4e71aec4c8f68f799c9dbdf1107923af9efc7a94 /buffer.c | |
parent | 03731c723bda295a6f6ee8346d622ea45d796563 (diff) | |
parent | 215a369c2b0e49107f3a7e9d55175bd590145836 (diff) |
merge of 9522146cb07d4576f161fc4567c2c2fbd6f61fbb
and b11630c15bc4d0649dba51c3572cac6f44e0ab0e
--HG--
extra : convert_revision : e0686662cdbee8c0b06e72e6105a390ea4f4c007
Diffstat (limited to 'buffer.c')
-rw-r--r-- | buffer.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -160,6 +160,16 @@ unsigned char buf_getbyte(buffer* buf) { return buf->data[buf->pos++]; } +/* Get a bool from the buffer and increment the pos */ +unsigned char buf_getbool(buffer* buf) { + + unsigned char b; + b = buf_getbyte(buf); + if (b != 0) + b = 1; + return b; +} + /* put a byte, incrementing the length if required */ void buf_putbyte(buffer* buf, unsigned char val) { |