From a3d849510ecad775e265ab7b6090e85576f48ef7 Mon Sep 17 00:00:00 2001 From: markus schnalke Date: Thu, 12 Nov 2015 08:23:04 +0100 Subject: [PATCH] m_getfld2: ERR2 means a read error, thus name it IOERR2 --- h/mh.h | 2 +- sbr/m_getfld2.c | 8 ++++---- uip/distsbr.c | 4 ++-- uip/mhbuild.c | 2 +- uip/mhl.c | 2 +- uip/mhparse.c | 2 +- uip/pick.c | 2 +- uip/slocal.c | 2 +- uip/sortm.c | 2 +- uip/spost.c | 2 +- uip/whom.c | 2 +- 11 files changed, 15 insertions(+), 15 deletions(-) diff --git a/h/mh.h b/h/mh.h index a93d9a9..8107a3e 100644 --- a/h/mh.h +++ b/h/mh.h @@ -214,7 +214,7 @@ struct field { enum state { LENERR2 = -2, FMTERR2 = -3, - ERR2 = -1, + IOERR2 = -1, FLD2 = 0, BODY2, FILEEOF2, diff --git a/sbr/m_getfld2.c b/sbr/m_getfld2.c index a17eb03..5920425 100644 --- a/sbr/m_getfld2.c +++ b/sbr/m_getfld2.c @@ -27,7 +27,7 @@ static size_t copyname(char *, char *); /* ** For the states FLD2, BODY2 and FMTERR2 memory is allocated for f->value. -** For the states LENERR2, ERR2 and FILEEOF2 no memory is allocated. +** For the states LENERR2, IOERR2 and FILEEOF2 no memory is allocated. */ enum state m_getfld2(enum state s, struct field *f, FILE *msg) @@ -42,7 +42,7 @@ m_getfld2(enum state s, struct field *f, FILE *msg) if (feof(msg)) { return FILEEOF2; } else { - return ERR2; + return IOERR2; } } @@ -95,7 +95,7 @@ m_getfld2(enum state s, struct field *f, FILE *msg) nchars = getline(&tmpline, &len, msg); if (nchars <= 0) { free(tmpline); - return ERR2; + return IOERR2; } if (nchars >= NAMESZ) { @@ -125,7 +125,7 @@ m_getfld2(enum state s, struct field *f, FILE *msg) if (falted == FAIL) { free(tmpline); - return ERR2; + return IOERR2; } free(tmpline); diff --git a/uip/distsbr.c b/uip/distsbr.c index 494c298..9c20fda 100644 --- a/uip/distsbr.c +++ b/uip/distsbr.c @@ -77,7 +77,7 @@ distout(char *drft, char *msgnam, char *backup) case LENERR2: case FMTERR2: - case ERR2: + case IOERR2: advise(NULL, "Please re-edit draft and fix that header."); leave_bad: ; fclose(ifp); @@ -194,7 +194,7 @@ ready_msg(char *msgnam) case LENERR2: case FMTERR2: - case ERR2: + case IOERR2: advise(NULL, "format error in message %s", msgnam); return NOTOK; diff --git a/uip/mhbuild.c b/uip/mhbuild.c index b8e9f93..ec5623a 100644 --- a/uip/mhbuild.c +++ b/uip/mhbuild.c @@ -385,7 +385,7 @@ build_mime(char *infile) case LENERR2: case FMTERR2: - case ERR2: + case IOERR2: adios(EX_CONFIG, NULL, "message format error in component #%d", compnum); diff --git a/uip/mhl.c b/uip/mhl.c index fcdb77f..8becba9 100644 --- a/uip/mhl.c +++ b/uip/mhl.c @@ -699,7 +699,7 @@ mhlfile(FILE *fp, char *mname, int ofilen, int ofilec) case LENERR2: case FMTERR2: - case ERR2: + case IOERR2: advise(NULL, "format error in message %s", mname); exitstat++; return; diff --git a/uip/mhparse.c b/uip/mhparse.c index 1cbefed..257bc66 100644 --- a/uip/mhparse.c +++ b/uip/mhparse.c @@ -269,7 +269,7 @@ get_content(FILE *in, char *file, int toplevel) case LENERR2: case FMTERR2: - case ERR2: + case IOERR2: adios(EX_DATAERR, NULL, "message format error in component #%d", compnum); diff --git a/uip/pick.c b/uip/pick.c index a5e658d..993527b 100644 --- a/uip/pick.c +++ b/uip/pick.c @@ -1262,7 +1262,7 @@ plist case LENERR2: case FMTERR2: - case ERR2: + case IOERR2: advise(NULL, "format error in message %d", msgnum); /* FALL */ diff --git a/uip/slocal.c b/uip/slocal.c index 5760a83..c3b45e8 100644 --- a/uip/slocal.c +++ b/uip/slocal.c @@ -795,7 +795,7 @@ parse(int fd) case LENERR2: case FMTERR2: - case ERR2: + case IOERR2: advise(NULL, "format error in message"); break; diff --git a/uip/sortm.c b/uip/sortm.c index 43dc7dc..61953e1 100644 --- a/uip/sortm.c +++ b/uip/sortm.c @@ -355,7 +355,7 @@ get_fields(char *datesw, int msg, struct smsg *smsg) case LENERR2: case FMTERR2: - case ERR2: + case IOERR2: admonish(NULL, "format error in message %d (header #%d)", msg, compnum); if (datecomp) { free(datecomp); diff --git a/uip/spost.c b/uip/spost.c index 6282e75..04479a1 100644 --- a/uip/spost.c +++ b/uip/spost.c @@ -253,7 +253,7 @@ main(int argc, char **argv) case LENERR2: case FMTERR2: - case ERR2: + case IOERR2: adios(EX_DATAERR, NULL, "message format error in component #%d", compnum); diff --git a/uip/whom.c b/uip/whom.c index e1aab77..a72c84f 100644 --- a/uip/whom.c +++ b/uip/whom.c @@ -225,7 +225,7 @@ process(char *file) case LENERR2: case FMTERR2: - case ERR2: + case IOERR2: adios(EX_DATAERR, NULL, "message format error in component #%d", compnum); -- 1.7.10.4