don't warn if lenerr is ignored
authorPhilipp Takacs <philipp@bureaucracy.de>
Sun, 8 May 2016 16:21:34 +0000 (18:21 +0200)
committerPhilipp Takacs <philipp@bureaucracy.de>
Sun, 8 May 2016 16:21:34 +0000 (18:21 +0200)
uip/mhparse.c
uip/pick.c
uip/prompter.c
uip/scansbr.c
uip/slocal.c
uip/sortm.c
uip/whom.c

index c250675..b860dcf 100644 (file)
@@ -251,7 +251,6 @@ get_content(FILE *in, char *file, int toplevel)
        for (compnum = 1, state = FLD2;;) {
                switch (state = m_getfld2(state, &f, in)) {
                case LENERR2:
        for (compnum = 1, state = FLD2;;) {
                switch (state = m_getfld2(state, &f, in)) {
                case LENERR2:
-                       advise(NULL, "To long field");
                        state = FLD2;
                        /* FALL */
                case FLD2:
                        state = FLD2;
                        /* FALL */
                case FLD2:
index b0205fd..7d9c086 100644 (file)
@@ -1249,6 +1249,10 @@ plist
        fseek(fp, start, SEEK_SET);
        for (state = FLD2, bp = NULL;;) {
                switch (state = m_getfld2(state, &f, fp)) {
        fseek(fp, start, SEEK_SET);
        for (state = FLD2, bp = NULL;;) {
                switch (state = m_getfld2(state, &f, fp)) {
+               case LENERR2:
+                       state = FLD2;
+                       /* FALL */
+
                case FLD2:
                        if (bp) {
                                mh_free0(&bp);
                case FLD2:
                        if (bp) {
                                mh_free0(&bp);
@@ -1259,7 +1263,6 @@ plist
                        }
                        continue;
 
                        }
                        continue;
 
-               case LENERR2:
                case FMTERR2:
                        advise(NULL, "format error in message %d", msgnum);
                        state = FLD2;
                case FMTERR2:
                        advise(NULL, "format error in message %d", msgnum);
                        state = FLD2;
index bc7cd43..ea17b91 100644 (file)
@@ -141,9 +141,9 @@ main(int argc, char **argv)
        for (state = FLD2;;) {
                switch (state = m_getfld2(state, &f, in)) {
                case LENERR2:
        for (state = FLD2;;) {
                switch (state = m_getfld2(state, &f, in)) {
                case LENERR2:
-                       advise(NULL, "Header to long");
                        state = FLD2;
                        /* FALL */
                        state = FLD2;
                        /* FALL */
+
                case FLD2:
                        /*
                        ** Check if the value of field contains
                case FLD2:
                        /*
                        ** Check if the value of field contains
index feef5c0..0495838 100644 (file)
@@ -107,6 +107,9 @@ scan(FILE *inb, int innum, int outnum, char *fmtstr, int width, int curflg,
        for (compnum = 1, state = FLD2; ; ) {
                state = m_getfld2(state, &f, inb);
                switch (state) {
        for (compnum = 1, state = FLD2; ; ) {
                state = m_getfld2(state, &f, inb);
                switch (state) {
+               case LENERR2:
+                       state = FLD2;
+                       /* FALL */
                case FLD2:
                        compnum++;
                        if (incing) {
                case FLD2:
                        compnum++;
                        if (incing) {
@@ -191,16 +194,14 @@ body:;
                        }
                        goto finished;
 
                        }
                        goto finished;
 
-               case LENERR2:
-                       advise(NULL, "line \"%s\" too long", trim(f.value));
-                       goto handleerror;
-
                case FMTERR2:
                        if (strncmp("From ", f.value, 5)==0) {
                                state = FILEEOF2;
                                goto finished;
                        }
                case FMTERR2:
                        if (strncmp("From ", f.value, 5)==0) {
                                state = FILEEOF2;
                                goto finished;
                        }
-                       /* FALL */
+                       compnum++;
+                       advise(NULL, "formate error in component #%d", compnum);
+                       continue;
 
                case IOERR2:
 handleerror:;
 
                case IOERR2:
 handleerror:;
index 26cad52..bff4320 100644 (file)
@@ -759,7 +759,6 @@ parse(int fd)
        for (i = 0, state = FLD2;;) {
                switch (state = m_getfld2(state, &f, in)) {
                case LENERR2:
        for (i = 0, state = FLD2;;) {
                switch (state = m_getfld2(state, &f, in)) {
                case LENERR2:
-                       advise(NULL, "format error in message");
                        state = FLD2;
                        /* FALL */
 
                        state = FLD2;
                        /* FALL */
 
index 061ae5a..ff69bc9 100644 (file)
@@ -332,7 +332,6 @@ get_fields(char *datesw, int msg, struct smsg *smsg)
        for (compnum = 1, state = FLD2;; compnum++) {
                switch (state = m_getfld2(state, &f, in)) {
                case LENERR2:
        for (compnum = 1, state = FLD2;; compnum++) {
                switch (state = m_getfld2(state, &f, in)) {
                case LENERR2:
-                       admonish(NULL, "To long header field in message %d (header %s, #%d)", msg, f.name, compnum);
                        state = FLD2;
                        /* FALL */
                case FLD2:
                        state = FLD2;
                        /* FALL */
                case FLD2:
@@ -355,6 +354,10 @@ get_fields(char *datesw, int msg, struct smsg *smsg)
                        break;
 
                case FMTERR2:
                        break;
 
                case FMTERR2:
+                       admonish(NULL, "format error in message %d (header #%d)", msg, compnum);
+                       state = FLD2;
+                       continue;
+
                case IOERR2:
                        admonish(NULL, "format error in message %d (header #%d)", msg, compnum);
                        if (datecomp) {
                case IOERR2:
                        admonish(NULL, "format error in message %d (header #%d)", msg, compnum);
                        if (datecomp) {
index e02994f..7486dd8 100644 (file)
@@ -216,7 +216,6 @@ process(char *file)
        for (compnum=1, state=FLD2;; compnum++) {
                switch (state = m_getfld2(state, &f, in)) {
                case LENERR2:
        for (compnum=1, state=FLD2;; compnum++) {
                switch (state = m_getfld2(state, &f, in)) {
                case LENERR2:
-                       advise(NULL, "field %d contains a to long line", f.name);
                        state = FLD2;
                        /* FALL */
                case FLD2:
                        state = FLD2;
                        /* FALL */
                case FLD2:
@@ -228,6 +227,9 @@ process(char *file)
                        break;
 
                case FMTERR2:
                        break;
 
                case FMTERR2:
+                       advise(NULL, "message format error in component #%d", compnum);
+                       continue;
+
                case IOERR2:
                        adios(EX_DATAERR, NULL, "message format error in component #%d",
                                        compnum);
                case IOERR2:
                        adios(EX_DATAERR, NULL, "message format error in component #%d",
                                        compnum);