- * another buffer. The number, @16@ or @32@, is the width of
- * the length; @z@ means null-terminated.
- */
-
-#define GETBUF(suff) int buf_getbuf##suff(buf *b, buf *bb) \
-{ \
- void *p; \
- size_t n; \
- \
- if ((p = buf_getmem##suff(b, &n)) == 0) \
- return (-1); \
- buf_init(bb, p, n); \
- return (0); \
-}
-DOSUFFIXES(GETBUF)
-
-/* --- @buf_putbuf{8,16,32,z}@ --- *
- *
- * Arguments: @buf *b@ = pointer to a buffer block
- * @buf *bb@ = buffer to write
- *
- * Returns: Zero if it worked, nonzero if there wasn't enough space.
- *
- * Use: Puts the contents of a buffer to a buffer. The number, @16@
- * or @32@, is the width of the length; @z@ means null-
- * terminated.
- */
-
-#define PUTBUF(suff) int buf_putbuf##suff(buf *b, buf *bb) \
- { return (buf_putmem##suff(b, BBASE(bb), BLEN(bb))); }
-DOSUFFIXES(PUTBUF)
-
-/* --- @buf_getstr{8,16,32,z}@ --- *
- *
- * Arguments: @buf *b@ = pointer to a buffer block
- * @dstr *d@ = where to put the result
- *
- * Returns: Zero if it worked, nonzero if there wasn't enough space.
- *
- * Use: Gets a block of data from a buffer, and writes its contents
- * to a string. The number, @16@ or @32@, is the width of the
- * length; @z@ means null-terminated.