plong

Unnamed repository; edit this file 'description' to name the repository.
git clone https://git.inz.fi/plong
Log | Files | Refs

buf.c (147B)


      1 #include <errno.h>
      2 #include "buf.h"
      3 
      4 int buf_char(struct buf *b, char c)
      5 {
      6 	if (b->data >= b->end)
      7 		return ENOMEM;
      8 	*b->data++ = c;
      9 	return 0;
     10 }
     11