2 * Buffer handling functions of the IFD handler library
4 * Copyright (C) 2003, Olaf Kirch <okir@suse.de>
7 #ifndef OPENCT_BUFFER_H
8 #define OPENCT_BUFFER_H
14 #ifdef HAVE_SYS_TYPES_H
15 #include <sys/types.h>
18 typedef struct ct_buf {
20 unsigned int head, tail, size;
24 extern void ct_buf_init(ct_buf_t *, void *, size_t);
25 extern void ct_buf_set(ct_buf_t *, void *, size_t);
26 extern int ct_buf_get(ct_buf_t *, void *, size_t);
27 extern int ct_buf_put(ct_buf_t *, const void *, size_t);
28 extern int ct_buf_putc(ct_buf_t *, int);
29 extern unsigned int ct_buf_avail(ct_buf_t *);
30 extern void * ct_buf_head(ct_buf_t *);
36 #endif /* OPENCT_BUFFER_H */