NAME
buffer_isempty, buffer_isfull, buffer_isreadable, buffer_iswritable - state of an I/O buffer
SYNOPSIS
#include <limb/buffer.h>
int buffer_isempty(buffer *buf) int buffer_isfull(buffer *buf) int buffer_isreadable(buffer *buf) int buffer_iswritable(buffer *buf)
DESCRIPTION
The buffer_isempty
() macro returns whether or not the buffer pointed by buf
is empty, i.e. there is no data in its internal memory.
The buffer_isfull
() macro returns whether or not the buffer pointed by buf
is full, i.e. its internal memory is fully used.
The buffer_isreadable
() macro returns whether or not the buffer pointed by
buf
can be filled, i.e. has available space to read data from its associated
file descriptor.
The buffer_iswritable
() macro returns whether or not the buffer pointed by
buf
can be flushed, i.e. contains data to be flushed to its associated file
descriptor.
RETURN VALUE
These functions return 1 or 0 depending on the current state of the buffer
pointed by buf
.