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