mhl and mhbuild ignore to long lines master
authorPhilipp Takacs <philipp@bureaucracy.de>
Sun, 17 Sep 2023 16:35:35 +0000 (18:35 +0200)
committerPhilipp Takacs <philipp@bureaucracy.de>
Sun, 24 Sep 2023 22:03:28 +0000 (00:03 +0200)
test/tests/show/test-longlines
uip/mhbuild.c
uip/mhl.c

index f6ae126..54e8616 100644 (file)
@@ -105,7 +105,11 @@ EOF
 
 # check it
 cat > $expected <<-EOF
-mhl: format error in message 13
+Date:    Sun, 15 Jul 2018 12:26:59 +0200
+From:    foo@example.edu
+To:      bar@example.edu
+Subject: 999 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+
 part       text/plain                   4
 foo
 EOF
@@ -163,7 +167,11 @@ EOF
 
 # check it
 cat > $expected <<-EOF
-mhl: format error in message 15
+Date:    Sun, 15 Jul 2018 12:26:59 +0200
+From:    foo@example.edu
+To:      bar@example.edu
+Subject: 999 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+
 part       text/plain                   4
 foo
 EOF
index c032022..f9674a3 100644 (file)
@@ -350,6 +350,8 @@ build_mime(char *infile)
        */
        for (compnum = 1, state = FLD2;;) {
                switch (state = m_getfld2(state, &f, in)) {
+               case LENERR2:
+                       state = FLD2;
                case FLD2:
                        compnum++;
 
@@ -384,7 +386,6 @@ build_mime(char *infile)
                        adios(EX_CONFIG, NULL, "draft has empty body -- no directives!");
                        /* NOTREACHED */
 
-               case LENERR2:
                case FMTERR2:
                case IOERR2:
                        adios(EX_CONFIG, NULL, "message format error in component #%d",
index fa83602..dd77f5b 100644 (file)
--- a/uip/mhl.c
+++ b/uip/mhl.c
@@ -654,6 +654,8 @@ mhlfile(FILE *fp, char *mname, int ofilen, int ofilec)
 
        for (state = FLD2; !eflag; ) {
                switch (state = m_getfld2(state, &f, fp)) {
+               case LENERR2:
+                       state = FLD2;
                case FLD2:
                        for (ip = ignores; *ip; ip++)
                                if (simplematch(*ip, f.name)) {
@@ -729,7 +731,6 @@ mhlfile(FILE *fp, char *mname, int ofilen, int ofilec)
                        }
                        return;
 
-               case LENERR2:
                case FMTERR2:
                case IOERR2:
                        advise(NULL, "format error in message %s", mname);