.
This commit is contained in:
commit
55385f8857
69 changed files with 1125 additions and 0 deletions
15
strff/strff_read_sa.c
Normal file
15
strff/strff_read_sa.c
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue