summaryrefslogtreecommitdiff
path: root/src/libstddjb/buffer_init.c
blob: 09d4910a168c959942482c5680a0e28670a6d587 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* ISC license. */

#include <errno.h>
#include <skalibs/buffer.h>

int buffer_init_aux (buffer *b, buffer_io_func_t *op, int fd, char *s, unsigned int len, void *aux)
{
  if (!cbuffer_init(&b->c, s, len)) return 0 ;
  b->fd = fd ;
  b->op = op ;
  b->aux = aux ;
  return 1 ;
}