diff buffer.c @ 925:bae0b34bc059 pam

Better PAM through recursion
author Matt Johnston <matt@ucc.asn.au>
date Wed, 12 Mar 2014 23:40:02 +0800
parents 7dcb46da72d9
children 2fa71c3b2827
line wrap: on
line diff
--- a/buffer.c	Sat Mar 08 21:00:57 2014 +0800
+++ b/buffer.c	Wed Mar 12 23:40:02 2014 +0800
@@ -180,6 +180,11 @@
 	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) {