blob: 2831fe14db808056c94a095924464f9f66071f83 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
/* ISC license. */
#include <errno.h>
#include <skalibs/cbuffer.h>
#include <skalibs/buffer.h>
int buffer_init (buffer *b, buffer_io_func_t *op, int fd, char *s, unsigned int len)
{
if (!cbuffer_init(&b->c, s, len)) return 0 ;
b->fd = fd ;
b->op = op ;
return 1 ;
}
|