@@@ man wip
[mLib] / struct / buf-putf.c
index 3b4261d..9a4cc54 100644 (file)
  */
 
 static int putch(void *out, int ch)
-  { buf *b = out; return (buf_putbyte(b, ch)); }
+  { buf *b = out; return (buf_putbyte(b, ch) ? -1 : 1); }
 
 static int putm(void *out, const char *p, size_t sz)
-  { buf *b = out; return (buf_put(b, p, sz)); }
+  { buf *b = out; return (buf_put(b, p, sz) ? -1 : sz); }
 
 static int nputf(void *out, size_t maxsz, const char *p, ...)
 {