buffer_unput(3)
limb manual
buffer_unput(3)
NAME
buffer_unput - "unput" data from a writing I/O buffer
SYNOPSIS
#include <limb/buffer.h>
size_t buffer_unput(buffer *buf, size_t len)
DESCRIPTION
The buffer_unput
() macro will remove up to len
bytes of data from the buffer
pointed by buf
. Obviously any data previously written out (via e.g. a call
to buffer_flush(3)) cannot be removed, only data currently held in the
buffer's internal memory can thusly be removed.
RETURN VALUE
The buffer_unput
() function returns the amount of bytes removed from the
buffer, which may be less than len
(even 0 if the buffer was empty).