1 #ifndef IO_BUF__IBUF__H__ 2 #define IO_BUF__IBUF__H__ 4 #include "iobuf_common.h" 16 typedef int (*
ibuf_fn)(int,
void*,
unsigned long);
34 int ibuf_open(
ibuf* in,
const char* filename,
unsigned bufsize);
37 #define ibuf_close(in) iobuf_close(&((in)->io)) 39 #define ibuf_closed(in) iobuf_closed(&((in)->io)) 41 #define ibuf_error(in) iobuf_error(&((in)->io)) 43 #define ibuf_timedout(in) iobuf_timedout(&((in)->io)) 50 #define ibuf_rewind(in) ibuf_seek(in,0) 52 #define ibuf_seekfwd(in,off) ibuf_seek(ibuf_tell(in)+(offset)) 57 int ibuf_gets(
ibuf* in,
char* data,
unsigned datalen,
char boundary);
iobuf io
Definition: ibuf.h:22
int ibuf_peek(ibuf *in, char *ch)
Definition: ibuf_peek.c:5
int ibuf_getstr(ibuf *in, struct str *s, char boundary)
Definition: ibuf_getstr.c:5
int ibuf_read_large(ibuf *in, char *data, unsigned datalen)
Definition: ibuf_read.c:13
int ibuf_getnetstring(ibuf *in, struct str *s)
Definition: ibuf_getnetstring.c:10
unsigned count
Definition: ibuf.h:24
ibuf_fn readfn
Definition: ibuf.h:26
int ibuf_seek(ibuf *in, unsigned offset)
Definition: ibuf_seek.c:7
int ibuf_getstr_crlf(ibuf *in, struct str *s)
Definition: ibuf_getstr_crlf.c:21
int ibuf_open(ibuf *in, const char *filename, unsigned bufsize)
Definition: ibuf_open.c:5
ibuf inbuf
Definition: ibuf_stdin.c:7
int ibuf_eof(ibuf *in)
Definition: ibuf_status.c:4
int ibuf_init(ibuf *in, int fd, ibuf_fn fn, unsigned flags, unsigned bufsize)
Definition: ibuf_init.c:5
int ibuf_readall(ibuf *in, struct str *s)
Definition: ibuf_readall.c:5
int ibuf_read(ibuf *in, char *data, unsigned datalen)
Definition: ibuf_read.c:55
int ibuf_refill(ibuf *in)
Definition: ibuf_refill.c:11
int ibuf_gets(ibuf *in, char *data, unsigned datalen, char boundary)
Definition: ibuf_gets.c:4
int ibuf_openreadclose(const char *filename, struct str *s)
Definition: ibuf_openreadclose.c:5
Definition: iobuf_common.h:48
unsigned ibuf_tell(ibuf *in)
Definition: ibuf_tell.c:4
int(* ibuf_fn)(int, void *, unsigned long)
Definition: ibuf.h:16
int ibuf_getc(ibuf *in, char *ch)
Definition: ibuf_getc.c:4
int ibuf_getu(ibuf *in, unsigned long *data)
Definition: ibuf_getu.c:4