#include "../strff.h" #include 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; }