readclose3diet
Read a whole file into a stralloc
Usage
#include <readclose.h>
int readclose(int fd,stralloc* sa,size_t bufsize);
Overview
readclose reads the whole content into the stralloc sa. The file is read in chunks of bufsize bytes size. If everything worked fine, readclose returns 0. On error, readclose returns -1 and sets errno appropriately.
Releases
4 releases since Debian 3.1 (Sarge); the text changed 1 time.