23 #define BUFFER_INIT(op, fd, buf, len) \
24 { (buf), 0, (len), (fd), (op) }
25 #define BUFFER_INSIZE 8192
26 #define BUFFER_OUTSIZE 8192
35 #define buffer_PUTC(s, c) \
37 ? ((s)->x[(s)->p++] = (c), 0) \
38 : buffer_put((s), &(c), 1))
47 #define buffer_PEEK(s) ((s)->x + (s)->n)
48 #define buffer_SEEK(s, len) (((s)->p -= (len)), ((s)->n += (len)))
50 #define buffer_GETC(s, c) \
52 ? (*(c) = (s)->x[(s)->n], buffer_SEEK((s), 1), 1) \
53 : buffer_get((s), (c), 1))
void buffer_init(buffer *, BufferOp, int, char *, unsigned int)
int buffer_get(buffer *, char *, unsigned int)
int buffer_putalign(buffer *, const char *, unsigned int)
char * buffer_peek(buffer *)
int buffer_put(buffer *, const char *, unsigned int)
void buffer_seek(buffer *, unsigned int)
int buffer_copy(buffer *, buffer *)
int buffer_putflush(buffer *, const char *, unsigned int)
int buffer_feed(buffer *)
int(* BufferOp)(int, const char *, int)
int buffer_bget(buffer *, char *, unsigned int)
int buffer_flush(buffer *)