* rbuf_init - set up a buffer. * @rbuf: the struct rbuf. * @fd: the file descriptor. * @buf: the buffer to use. * @buf_max: the size of the buffer. * @expandfn: usually membuf_realloc. */
| 21 | * @expandfn: usually membuf_realloc. |
| 22 | */ |
| 23 | static inline void rbuf_init(struct rbuf *rbuf, |
| 24 | int fd, char *buffer, size_t buf_max, |
| 25 | void *(*expandfn)(struct membuf *, void *, size_t)) |
| 26 | { |
| 27 | rbuf->fd = fd; |
| 28 | membuf_init(&rbuf->m, buffer, buf_max, expandfn); |
| 29 | } |
| 30 | |
| 31 | /** |
| 32 | * rbuf_open - set up a buffer by opening a file. |
no outgoing calls