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

NAME

6       buffer_flush - feed buffer to write function
7

SYNTAX

9       #include <buffer.h>
10
11       int buffer_flush(buffer* b);
12

DESCRIPTION

14       buffer_flush  feeds  a  string  d[0], d[1], ..., d[dlen-1] to the write
15       operation by calling
16
17         op(fd,d,dlen)
18
19       If op successfully handles one or more bytes at the  beginning  of  the
20       string,  it  must return the number of bytes handled; if this number is
21       smaller than dlen, buffer_flush will call op again with the rest of the
22       string.  If  op  does  not  handle any bytes, and does not encounter an
23       error, it must return 0, or return -1  with  errno  set  to  EINTR;  in
24       either case, buffer_flush will immediately call op again. If op encounā€
25       ters an error, it must return -1 with errno set to something other than
26       EINTR; buffer_flush will pass the error to the caller.
27
28       On  success, buffer_flush returns 0. On error, buffer_flush returns -1,
29       setting errno appropriately.
30

SEE ALSO

32       buffer_init(3)
33
34
35
36                                                               buffer_flush(3)
Impressum