7static int getsa(buffer *
b,stralloc *
sa,
int *
match)
10 if (getln(
b,
sa,
match,
'\n') == -1)
return -1;
12 if (!
sa->len)
return 0;
13 if (!stralloc_append(
sa,
"\n"))
return -1;
18static stralloc line = {0};
19static stralloc nextline = {0};
33 switch (getsa(
b,&nextline,&
match)) {
37 if (flaglineok) dohf(&line);
44 if ((nextline.s[0] ==
' ') || (nextline.s[0] ==
'\t')) {
45 if (!stralloc_cat(&line,&nextline))
return -1;
51 if (nextline.len == 1) {
57 if (stralloc_starts(&nextline,
"From ")) {
59 if (!stralloc_cat(&line,&nextline))
return -1;
61 if (!stralloc_copy(&line,&nextline))
return -1;
73 switch (getsa(
b,&nextline,&
match)) {
76 case 1: dobl(&nextline);
int stralloc_copys(stralloc *, char const *)