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

NAME

6       openreadclose - read a whole file into a stralloc
7

SYNTAX

9       #include <openreadclose.h>
10
11       ssize_t openreadclose(const char *filename,
12                  stralloc* sa,size_t bufsize);
13

DESCRIPTION

15       openreadclose  opens  the file filename for reading and reads the whole
16       content into the stralloc sa.  The file is read in  chunks  of  bufsize
17       bytes  size.   If  everything worked fine, openreadclose returns 1.  If
18       the file did not exist, openreadclose returns 0.  On every other error,
19       openreadclose returns -1 and sets errno appropriately.
20

SEE ALSO

22       open_read(3), readclose(3)
23
24
25
26                                                              openreadclose(3)
Impressum