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

#include <sys/types.h>
#include <skalibs/stralloc.h>
#include <skalibs/bufalloc.h>

void bufalloc_init (bufalloc *ba, ssize_t (*op)(int, char const *, size_t), int fd)
{
  ba->x = stralloc_zero ;
  ba->op = op ;
  ba->fd = fd ;
  ba->p = 0 ;
}