- for (state = FLD;;) {
- switch (state = m_getfld (state, name, field, sizeof(field), fp)) {
- case FLD:
- case FLDPLUS:
- case FLDEOF:
- if (state == FLDPLUS) {
- cp = getcpy (field);
- while (state == FLDPLUS) {
- state = m_getfld (state, name, field, sizeof(field), fp);
- cp = add (field, cp);
- }
- seq_init (mp, getcpy (name), trimcpy (cp));
- free (cp);
- } else {
- seq_init (mp, getcpy (name), trimcpy (field));
- }
- if (state == FLDEOF)
- break;
- continue;
-
- case BODY:
- case BODYEOF:
- adios (NULL, "no blank lines are permitted in %s", seqfile);
- /* fall */
-
- case FILEEOF:
- break;
+ for (state = FLD2;;) {
+ switch (state = m_getfld2(state, &f, fp)) {
+ case LENERR2:
+ state = FLD2;
+ /* FALL */
+ case FLD2:
+ seq_init(mp, mh_xstrdup(f.name), trimcpy(f.value));
+ continue;
+
+ case BODY2:
+ adios(EX_CONFIG, NULL, "no blank lines are permitted in %s",
+ seqfile);
+ /* FALL */
+
+ case FILEEOF2:
+ break;