CT ct;
FILE *in;
HF hp;
- m_getfld_state_t gstate = 0;
+ m_getfld_state_t gstate;
struct attach_list *attach_head = NULL, *attach_tail = NULL, *at_entry;
convert_list *convert_head = NULL, *convert_tail = NULL, *convert;
* draft into the linked list of header fields for
* the new MIME message.
*/
- m_getfld_track_filepos (&gstate, in);
+ gstate = m_getfld_state_init(in);
+ m_getfld_track_filepos2(&gstate);
for (compnum = 1;;) {
int bufsz = sizeof buf;
- switch (state = m_getfld (&gstate, name, buf, &bufsz, in)) {
+ switch (state = m_getfld2(&gstate, name, buf, &bufsz)) {
case FLD:
case FLDPLUS:
compnum++;
if (!strcasecmp (name, TYPE_FIELD)) {
while (state == FLDPLUS) {
bufsz = sizeof buf;
- state = m_getfld (&gstate, name, buf, &bufsz, in);
+ state = m_getfld2(&gstate, name, buf, &bufsz);
}
goto finish_field;
}
/* if necessary, get rest of field */
while (state == FLDPLUS) {
bufsz = sizeof buf;
- state = m_getfld (&gstate, name, buf, &bufsz, in);
+ state = m_getfld2(&gstate, name, buf, &bufsz);
vp = add (buf, vp); /* add to previous value */
}
char *type = np + strlen (MHBUILD_FILE_PSEUDOHEADER);
char *filename = vp;
- /* vp should begin with a space because m_getfld()
+ /* vp should begin with a space because m_getfld2()
includes the space after the colon in buf. */
while (isspace((unsigned char) *filename)) { ++filename; }
/* Trim trailing newline and any other whitespace. */
char *type = np + strlen (MHBUILD_ARGS_PSEUDOHEADER);
char *argstring = vp;
- /* vp should begin with a space because m_getfld()
+ /* vp should begin with a space because m_getfld2()
includes the space after the colon in buf. */
while (isspace((unsigned char) *argstring)) { ++argstring; }
/* Trim trailing newline and any other whitespace. */