13#define BUFFER_INIT(op,fd,buf,len) { (buf), 0, (len), (fd), (op) }
14#define BUFFER_SMALL 256
15#define BUFFER_INSIZE 8192
16#define BUFFER_OUTSIZE 8192
17#define BUFFER_MTUSIZE 1450
29#define buffer_PUTC(s,c) \
30 ( ((s)->n != (s)->p) \
31 ? ( (s)->x[(s)->p++] = (c), 0 ) \
32 : buffer_put((s),&(c),1) \
42#define buffer_PEEK(s) ( (s)->x + (s)->n )
43#define buffer_SEEK(s,len) ( ( (s)->p -= (len) ) , ( (s)->n += (len) ) )
45#define buffer_GETC(s,c) \
47 ? ( *(c) = (s)->x[(s)->n], buffer_SEEK((s),1), 1 ) \
48 : buffer_get((s),(c),1) \
char * buffer_peek(buffer *)
int buffer_puts(buffer *, const char *)
ssize_t buffer_unixread(int, char *, size_t)
int buffer_put(buffer *, const char *, size_t)
ssize_t buffer_unixwrite(int, char *, size_t)
int buffer_putflush(buffer *, const char *, size_t)
int buffer_putsflush(buffer *, const char *)
int buffer_get(buffer *, char *, size_t)
void buffer_seek(buffer *, size_t)
int buffer_bget(buffer *, char *, size_t)
int buffer_copy(buffer *, buffer *)
int buffer_feed(buffer *)
int buffer_putsalign(buffer *, const char *)
int buffer_putalign(buffer *, const char *, size_t)
int buffer_flush(buffer *)
void buffer_init(buffer *, ssize_t(*op)(), int, char *, size_t)