bufalloc_flush.c (290B)
1 /* ISC license. */ 2 3 #include <skalibs/functypes.h> 4 #include <skalibs/allreadwrite.h> 5 #include <skalibs/bufalloc.h> 6 7 int bufalloc_flush (bufalloc *ba) 8 { 9 ba->p += allreadwrite((io_func_ref)ba->op, ba->fd, ba->x.s + ba->p, ba->x.len - ba->p) ; 10 bufalloc_clean(ba) ; 11 return !ba->x.len ; 12 }