X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fnew.c;h=7a5a06b6a5e83592285e85ef5bd992a6a30a574d;hp=c4026ba48d20057bfdb383fe05bb34616d5abad7;hb=5b792c4424571f05bc2008e3109797d18d7d00d1;hpb=8e5be81f784682822f5e868c1bf3c8624682bd23 diff --git a/uip/new.c b/uip/new.c index c4026ba..7a5a06b 100644 --- a/uip/new.c +++ b/uip/new.c @@ -110,66 +110,65 @@ get_msgnums(char *folder, char *sequences[]) 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); - } + 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); - } + /* + ** 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); - } else { - /* and here */ - if (seq_in_list(name, sequences)) { - this_msgnums = trimcpy(field); - 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); + } else { + /* and here */ + if (seq_in_list(name, sequences)) { + this_msgnums = trimcpy(field); + if (msgnums == NULL) { + msgnums = this_msgnums; + } else { + old_msgnums = msgnums; + msgnums = concat(old_msgnums, " ", this_msgnums, (void *)NULL); + free(old_msgnums); + free(this_msgnums); } } + } - if (state == FLDEOF) - break; - continue; + if (state == FLDEOF) + break; + continue; - case BODY: - case BODYEOF: - adios(NULL, "no blank lines are permitted in %s", seqfile); - /* fall */ + case BODY: + case BODYEOF: + adios(NULL, "no blank lines are permitted in %s", + seqfile); + /* fall */ - case FILEEOF: - break; + case FILEEOF: + break; - default: - adios(NULL, "%s is poorly formatted", seqfile); + default: + adios(NULL, "%s is poorly formatted", seqfile); } break; /* break from for loop */ }