Welcome to little lamb

Code » limb » release » tree

[release] / src / doc / buffer.h / buffer_fill.3.md

% limb manual
% buffer_fill(3)
% limb 0.1.0
% 2023-07-24

# NAME

buffer_fill - fill a reading I/O buffer

# SYNOPSIS

    #include <limb/buffer.h>

```pre hl
ssize_t buffer_fill(buffer *<em>buf</em>)
```

# DESCRIPTION

The `buffer_fill`() function will fill data into the internal memory of the
buffer pointed by `buf`, by reading from the file descriptor associated with the
buffer.

# RETURN VALUE

The `buffer_fill`() function returns the amount of bytes read into the buffer on
succes. Otherwise it returns -1 and sets `errno` to indicate the error.

# ERRORS

The `buffer_fill`() function may fail if :

: *ENOBUFS*
:: The buffer is full.

It may also fail and set `errno` for any of the error specified for its
operational function, as set via e.g. [buffer_init](3).