skalibs

Mirror/fork of https://skarnet.org/software/skalibs/
git clone https://ccx.te2000.cz/git/skalibs
Log | Files | Refs | README | LICENSE

buffer_putflush.c (228B)


      1 /* ISC license. */
      2 
      3 #include <skalibs/buffer.h>
      4 
      5 ssize_t buffer_putflush (buffer *b, char const *s, size_t len)
      6 {
      7   ssize_t r = buffer_put(b, s, len) ;
      8   if (r < 0) return -1 ;
      9   if (!buffer_flush(b)) return -1 ;
     10   return r ;
     11 }