-#ifdef LINUX_STDIO
- state = m_getfld(state, name, scnout->_IO_write_ptr,
- (long)scnout->_IO_write_ptr-(long)scnout->_IO_write_end , inb);
- scnout->_IO_write_ptr += msg_count;
-#elif defined(__DragonFly__)
- state = m_getfld(state, name, ((struct __FILE_public *)scnout)->_p, -(((struct __FILE_public *)scnout)->_w), inb );
- ((struct __FILE_public *)scnout)->_w -= msg_count;
- ((struct __FILE_public *)scnout)->_p += msg_count;
-#else
- state = m_getfld( state, name, scnout->_ptr, -(scnout->_cnt), inb );
- scnout->_cnt -= msg_count;
- scnout->_ptr += msg_count;
-#endif
- }
- goto finished;
-
- case LENERR:
- case FMTERR:
- fprintf(stderr, innum ? "??Format error (message %d) in " : "??Format error in ", outnum ? outnum : innum);
- fprintf(stderr, "component %d\n", compnum);
-
- if (outnum) {
- FPUTS("\n\nBAD MSG:\n");
- FPUTS(name);
- if (putc('\n', scnout) == EOF)
- DIEWRERR();
- state = BODY;
- goto body;
- }
- /* fall through */
-
- case FILEEOF:
- goto finished;
-
- default:
- adios(NULL, "getfld() returned %d", state);
+ } while ((cptr = cptr->c_next));
+ }
+
+ while (state == FLDPLUS) {
+ state = m_getfld(state, name, tmpbuf, SBUFSIZ,
+ inb);
+ if (outnum)
+ FPUTS(tmpbuf);
+ }
+ break;
+
+ case BODY:
+ state = FILEEOF;
+ goto finished;
+
+ case LENERR:
+ case FMTERR:
+ fprintf(stderr, innum ? "??Format error (message %d) in " : "??Format error in ", outnum ? outnum : innum);
+ fprintf(stderr, "component %d\n", compnum);
+
+ if (outnum) {
+ FPUTS("\n\nBAD MSG:\n");
+ FPUTS(name);
+ if (putc('\n', scnout) == EOF)
+ DIEWRERR();
+ }
+ /* fall through */
+
+ case FILEEOF:
+ goto finished;
+
+ default:
+ adios(NULL, "getfld() returned %d", state);