Mirror of :pserver:cvs@cvs.fefe.de:/cvs libowfat https://www.fefe.de/libowfat/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
638 B

  1. .TH openreadclose 3
  2. .SH NAME
  3. openreadclose \- read a whole file into a stralloc
  5. .B #include <openreadclose.h>
  6. int \fBopenreadclose\fP(const char *\fIfilename\fR,
  7. stralloc* \fIsa\fR,size_t \fIbufsize\fR);
  9. openreadclose opens the file \fIfilename\fR for reading and reads the
  10. whole content into the stralloc \fIsa\fR. The file is read in chunks of
  11. \fIbufsize\fR bytes size. If everything worked fine, openreadclose
  12. returns 1. If the file did not exist, openreadclose returns 0. On
  13. every other error, openreadclose returns -1 and sets errno
  14. appropriately.
  15. .SH "SEE ALSO"
  16. open_read(3), readclose(3)