skalibs

Mirror/fork of https://skarnet.org/software/skalibs/
git clone https://ccx.te2000.cz/git/skalibs
Log | Files | Refs | README | LICENSE

buffer_init.c (265B)


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