buffer_getallnf.c (267B)
1 /* ISC license. */ 2 3 #include <errno.h> 4 #include <skalibs/buffer.h> 5 6 int buffer_getallnofill (buffer *b, char *s, size_t len) 7 { 8 size_t r = buffer_getnofill(b, s, len) ; 9 if (r < len) 10 { 11 buffer_unget(b, r) ; 12 return (errno = ENOBUFS, 0) ; 13 } 14 return 1 ; 15 }