register struct comp *cptr;
struct format *fmt;
char *cp = NULL;
+ m_getfld_state_t gstate = 0;
/*
* Open the message we'll be scanning for components
* these routines?
*/
- for (state = FLD;;) {
+ for (;;) {
int msg_count = sizeof msgbuf;
- state = m_getfld(state, name, msgbuf, &msg_count, tmp);
+ state = m_getfld (&gstate, name, msgbuf, &msg_count, tmp);
switch (state) {
case FLD:
case FLDPLUS:
if (i != -1) {
while (state == FLDPLUS) {
msg_count = sizeof msgbuf;
- state = m_getfld(state, name, msgbuf, &msg_count, tmp);
+ state = m_getfld (&gstate, name, msgbuf, &msg_count, tmp);
fmt_appendcomp(i, name, msgbuf);
}
}
while (state == FLDPLUS)
msg_count = sizeof msgbuf;
- state = m_getfld(state, name, msgbuf, &msg_count, tmp);
+ state = m_getfld (&gstate, name, msgbuf, &msg_count, tmp);
break;
case LENERR:
adios(NULL, "m_getfld() returned %d", state);
}
}
+ m_getfld_state_destroy (&gstate);
/*
* Override any components just in case they were included in the