- fprintf(out, "\n%s", buf);
- while (state == BODY) {
- state = m_getfld(state, name, buf,
- sizeof(buf), in);
- fputs(buf, out);
+ fprintf(out, "\n%s", f.value);
+ while ((state = m_getfld2(state, &f, in)) == BODY2) {
+ if (f.valuelen >= NAMESZ) {
+ adios(EX_DATAERR, NULL, "Body contains a to long line");
+ }
+ fputs(f.value, out);