X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fmhbuild.c;h=01acdb77e030120f951812faafd9efb8fa411ae9;hb=a1a744d898ec8842871dca302e6ae54d9233413f;hp=d636cf7c7d069133e4ceeb1059ba24be5ee7b8ae;hpb=0595979e1f0514b3da28762f336b3b9ac9eec5c5;p=mmh diff --git a/uip/mhbuild.c b/uip/mhbuild.c index d636cf7..01acdb7 100644 --- a/uip/mhbuild.c +++ b/uip/mhbuild.c @@ -319,6 +319,7 @@ build_mime(char *infile) struct part **pp; CT ct; FILE *in; + HF hp; umask(~m_gmprot()); @@ -348,7 +349,6 @@ build_mime(char *infile) switch (state = m_getfld(state, name, buf, sizeof(buf), in)) { case FLD: case FLDPLUS: - case FLDEOF: compnum++; /* abort if draft has Mime-Version header field */ @@ -367,7 +367,7 @@ build_mime(char *infile) while (state == FLDPLUS) state = m_getfld(state, name, buf, sizeof(buf), in); - goto finish_field; + continue; } /* get copies of the buffers */ @@ -384,18 +384,13 @@ build_mime(char *infile) /* Now add the header data to the list */ add_header(ct, np, vp); -finish_field: - /* if this wasn't the last hdr field, then continue */ - if (state != FLDEOF) - continue; - /* else fall... */ + continue; case FILEEOF: adios(EX_CONFIG, NULL, "draft has empty body -- no directives!"); /* NOTREACHED */ case BODY: - case BODYEOF: fseek(in, (long) (-strlen(buf)), SEEK_CUR); break; @@ -411,11 +406,9 @@ finish_field: } /* - * Iterate through the list of headers and call the function to MIME-ify - * them if required. - */ - - HF hp; + ** Iterate through the list of headers and call the function to + ** MIME-ify them if required. + */ for (hp = ct->c_first_hf; hp != NULL; hp = hp->next) { if (encode_rfc2047(hp->name, &hp->value, NULL)) { adios(EX_DATAERR, NULL, "Unable to encode header \"%s\"", hp->name);