File: openreadclose.3

package info (click to toggle)
libowfat 0.28-6
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 4,068 kB
  • sloc: ansic: 12,863; makefile: 16
file content (17 lines) | stat: -rw-r--r-- 638 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
.TH openreadclose 3
.SH NAME
openreadclose \- read a whole file into a stralloc
.SH SYNTAX
.B #include <openreadclose.h>

int \fBopenreadclose\fP(const char *\fIfilename\fR,
           stralloc* \fIsa\fR,size_t \fIbufsize\fR);
.SH DESCRIPTION
openreadclose opens the file \fIfilename\fR for reading and reads the
whole content into the stralloc \fIsa\fR.  The file is read in chunks of
\fIbufsize\fR bytes size.  If everything worked fine, openreadclose
returns 1.  If the file did not exist, openreadclose returns 0.  On
every other error, openreadclose returns -1 and sets errno
appropriately.
.SH "SEE ALSO"
open_read(3), readclose(3)