1buffer_getline(3)          Library Functions Manual          buffer_getline(3)
2
3
4

NAME

6       buffer_getline - read line from buffer
7

SYNTAX

9       #include <buffer.h>
10
11       ssize_t buffer_getline(buffer* b,char* x,size_t len);
12

DESCRIPTION

14       buffer_getline  copies  data  from b to x[0], x[1], ..., x[len-1] until
15       len bytes have been copied or a new-line character  ('\n')  is  encoun‐
16       tered.  That character is also copied.
17
18       Note  that  line is not 0-terminated to make reading lines with 0-bytes
19       possible through this interface.
20

RETURN VALUE

22       Number of bytes read (without '\n'), -1 on error (setting errno).
23

SEE ALSO

25       buffer_init(3), buffer_feed(3),  buffer_peek(3),  buffer_seek(3),  buf‐
26       fer(3)
27
28
29
30                                                             buffer_getline(3)
Impressum