int buffer_getallnofill (buffer_ref b, char *buf, unsigned int len)
{
  register unsigned int r = buffer_getnofill(b, buf, len) ;
  if (r == len) return 0 ;
  buffer_unget(b, r) ;
  errno = ENOBUFS ;
  return -1 ;
}
Пример #2
0
int buffer_getallnofill (buffer *b, char *s, unsigned int len)
{
    register unsigned int r = buffer_getnofill(b, s, len) ;
    if (r < len)
    {
        buffer_unget(b, r) ;
        return (errno = ENOBUFS, 0) ;
    }
    return 1 ;
}
Пример #3
0
int buffer_getvallnofill (buffer *b, siovec_t const *v, unsigned int n)
{
  register unsigned int r = buffer_getvnofill(b, v, n) ;
  if (r < siovec_len(v, n))
  {
    buffer_unget(b, r) ;
    return (errno = ENOBUFS, 0) ;
  }
  return 1 ;
}