1readclose(3) Library Functions Manual readclose(3)
2
3
4
6 readclose - read a whole file into a stralloc
7
9 #include <readclose.h>
10
11 int readclose(int fd,stralloc* sa,size_t bufsize);
12
14 readclose reads the whole content into the stralloc sa. The file is
15 read in chunks of bufsize bytes size. If everything worked fine, read‐
16 close returns 0. On error, readclose returns -1 and sets errno appro‐
17 priately.
18
20 open_read(3), openreadclose(3), readclose_append(3)
21
22
23
24 readclose(3)