+/* --- @buf_getu16@ --- *
+ *
+ * Arguments: @buf *b@ = pointer to a buffer block
+ * @uint16 *w@ = where to put the word
+ *
+ * Returns: Zero if OK, or nonzero if there wasn't a word there.
+ *
+ * Use: Gets a 16-bit word from a buffer.
+ */
+
+int buf_getu16(buf *b, uint16 *w)
+{
+ if (BENSURE(b, 2))
+ return (-1);
+ *w = LOAD16(b->p);
+ BSTEP(b, 2);
+ return (0);
+}
+
+/* --- @buf_putu16@ --- *
+ *
+ * Arguments: @buf *b@ = pointer to a buffer block
+ * @uint16 w@ = word to write
+ *
+ * Returns: Zero if OK, nonzero if there wasn't enough space.
+ *
+ * Use: Puts a 16-but word in a buffer.
+ */
+
+int buf_putu16(buf *b, uint16 w)
+{
+ if (BENSURE(b, 2))
+ return (-1);
+ STORE16(b->p, w);
+ BSTEP(b, 2);
+ return (0);
+}
+
+/* --- @buf_getu32@ --- *