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

#include <skalibs/cbuffer.h>
#include <skalibs/siovec.h>

unsigned int cbuffer_getv (cbuffer_t *b, siovec_t const *v, unsigned int n)
{
  siovec_t vsrc[2] ;
  cbuffer_rpeek(b, vsrc) ;
  return cbuffer_RSEEK(b, siovec_deal(v, n, vsrc, 2)) ;
}