- /* copied from seq_read.c:seq_public */
- 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);
- }
-
- /*
- ** Here's where we differ from
- ** seq_public: if it's in a
- ** sequence we want, save the list
- ** of messages.
- */
- if (seq_in_list(name, sequences)) {
- this_msgnums = trimcpy(cp);
- if (msgnums == NULL) {
- msgnums = this_msgnums;
- } else {
- old_msgnums = msgnums;
- msgnums = concat(old_msgnums, " ", this_msgnums, (void *)NULL);
- free(old_msgnums);
- free(this_msgnums);
- }
- }
- free (cp);
+ for (state = FLD2;;) {
+ switch (state = m_getfld2(state, &f, fp)) {
+ case LENERR2:
+ state = FLD2;
+ /* FALL */
+
+ case FLD2:
+ /*
+ ** if it's in a sequence we want,
+ ** save the list of messages.
+ */
+ if (seq_in_list(f.name, sequences)) {
+ this_msgnums = trimcpy(f.value);
+ if (strlen(this_msgnums) == 0) {
+ free(this_msgnums);
+ continue;
+ } else if (msgnums == NULL) {
+ msgnums = this_msgnums;