blob: 50d361e2594a2a83eb51fe09f40f6dce84e7048f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
/* ISC license. */
#include <skalibs/stralloc.h>
#include <skalibs/djbunix.h>
int openslurpclose (stralloc *sa, char const *fn)
{
int r ;
int fd = open_readb(fn) ;
if (fd == -1) return 0 ;
r = slurp(sa, fd) ;
fd_close(fd) ;
return r ;
}
|