buffer_unget(3)
limb manual
buffer_unget(3)
NAME
buffer_unget - "unget" data from a reading I/O buffer
SYNOPSIS
#include <limb/buffer.h>
size_t buffer_unget(buffer *buf, size_t len)
DESCRIPTION
The buffer_unget() macro will "restore" up to len bytes of data into the
buffer pointed by buf. This simply means that the last len bytes of data
from its internal memory (most likely taken out via buffer_get(3) or similar)
are back to being considered in the buffer.
RETURN VALUE
The buffer_unget() function returns the amount of bytes re-put into the
buffer, which may be less than len (even 0 if the buffer was full).