summaryrefslogtreecommitdiff
path: root/src/libstddjb/cbuffer_put.c
blob: 12f513ee6f34d0dd8fc8d64a452e692f868ded11 (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_put (cbuffer_t *b, char const *s, unsigned int len)
{
  siovec_t v[2] ;
  cbuffer_wpeek(b, v) ;
  return cbuffer_WSEEK(b, siovec_scatter(v, 2, s, len)) ;
}