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

#include <sys/types.h>
#include <sys/uio.h>
#include <skalibs/siovec.h>
#include <skalibs/cbuffer.h>

size_t cbuffer_putv (cbuffer_t *b, struct iovec const *v, unsigned int n)
{
  struct iovec vdest[2] ;
  size_t w ;
  cbuffer_wpeek(b, vdest) ;
  w = siovec_deal(vdest, 2, v, n) ;
  return cbuffer_WSEEK(b, w) ;
}