This commit is contained in:
kento2 2026-09-04 19:59:24 +02:00
commit 55385f8857
69 changed files with 1125 additions and 0 deletions

15
strff/strff_read_sa.c Normal file
View 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;
}