lib/byteq.c
/* Returns the number of contiguous bytes of free space starting at the head
 * of 'q'. */
Returns the number of contiguous bytes of free space starting at the head
of 'q'.
Returns the number of contiguous bytes of free space starting at the head of ' q ' .
int
byteq_headroom(const struct byteq *q)
{
    int avail = byteq_avail(q);
    int head_to_end = q->size - (q->head & (q->size - 1));
    return MIN(avail, head_to_end);
}
int byteq_headroom ( const struct byteq * q ) { int avail = byteq_avail ( q ) ; int head_to_end = q -> size - ( q -> head & ( q -> size - 1 ) ) ; return MIN ( avail , head_to_end ) ; }
Returns the number of contiguous bytes of free space starting at the head
 of 'q'.
Returns the number of contiguous bytes of free space starting at the head of ' q ' .