limb 0.2.0

2024-01-09

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).

SEE ALSO

buffer_wseek(3)

limb 0.1.0
2023-07-24
buffer_unput(3)