char name[NAMESZ], *scanl;
unsigned char *cp;
static int dat[5]; /* aux. data for format routine */
+ m_getfld_state_t gstate;
FILE *out;
NMH_UNUSED (msg);
/*
* pick any interesting stuff out of msg "inb"
*/
- for (state = FLD;;) {
+ m_getfld_state_init (&gstate);
+ for (;;) {
int msg_count = sizeof tmpbuf;
- state = m_getfld (state, name, tmpbuf, &msg_count, inb);
+ state = m_getfld (gstate, name, tmpbuf, &msg_count, inb);
switch (state) {
case FLD:
case FLDPLUS:
char_read += msg_count;
while (state == FLDPLUS) {
msg_count= sizeof tmpbuf;
- state = m_getfld(state, name, tmpbuf, &msg_count, inb);
+ state = m_getfld (gstate, name, tmpbuf, &msg_count, inb);
fmt_appendcomp(i, name, tmpbuf);
char_read += msg_count;
}
while (state == FLDPLUS) {
msg_count= sizeof tmpbuf;
- state = m_getfld (state, name, tmpbuf, &msg_count, inb);
+ state = m_getfld (gstate, name, tmpbuf, &msg_count, inb);
}
break;
adios (NULL, "m_getfld() returned %d", state);
}
}
+ m_getfld_state_destroy (&gstate);
/*
* format and output the header lines.