15 lines
305 B
C
15 lines
305 B
C
#include "../strff.h"
|
|
#include <libowfat/stralloc.h>
|
|
|
|
int strff_read_sa(struct strff *strff, stralloc *sa)
|
|
{
|
|
int n;
|
|
char buf[1024];
|
|
for (;;) {
|
|
n = strff_read(strff, sizeof buf, buf);
|
|
if (n == 0) break;
|
|
if (n < 0) return 0;
|
|
if (!stralloc_catb(sa, buf, n)) return 0;
|
|
}
|
|
return 1;
|
|
}
|