summaryrefslogtreecommitdiff
path: root/src/libstddjb/cbuffer_getv.c
blob: 22bd6f75ebd2b81585cc6bec0304c8081d45933d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* 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] ;
  register unsigned int w ;
  cbuffer_rpeek(b, vsrc) ;
  w = siovec_deal(v, n, vsrc, 2) ;
  return cbuffer_RSEEK(b, w) ;
}