From: Ken Hornstein Date: Fri, 4 Jan 2013 20:12:15 +0000 (-0500) Subject: Remove support for -ebcdicsafe/-noebcdicsafe switches in various utilities. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/f5a9aef6b97b9f07c8af62b2eb4d67fcbb995fb7?hp=-c Remove support for -ebcdicsafe/-noebcdicsafe switches in various utilities. --- f5a9aef6b97b9f07c8af62b2eb4d67fcbb995fb7 diff --git a/docs/COMPLETION-ZSH b/docs/COMPLETION-ZSH index 5c10cc89..3514080d 100644 --- a/docs/COMPLETION-ZSH +++ b/docs/COMPLETION-ZSH @@ -179,7 +179,7 @@ compctl -K mhfseq -x 's[+][@]' -K mhcomp -S / -q - 's[-]' \ compctl -K mhfseq -x 's[+][@]' -K mhcomp -S / -q - 's[-]' \ -k "(file part type list headers noheaders realsize norealsize nolist \ show serialonly noserialonly form pause nopause noshow store auto noauto \ - nostore cache nocache rcache wcache check nocheck ebcdicsafe noebcdicsafe \ + nostore cache nocache rcache wcache check nocheck \ rfc934mode norfc934mode verbose noverbose help)" - \ 'c[-1,-file]' -f - 'c[-1,-form]' -K mhfile - \ 'C[-1,-[rw]cache]' -k '(public private never ask)' -- mhn diff --git a/docs/pending-release-notes b/docs/pending-release-notes index 1467018b..c8dd6231 100644 --- a/docs/pending-release-notes +++ b/docs/pending-release-notes @@ -68,6 +68,9 @@ OBSOLETE/DEPRECATED FEATURES sendmail/pipe. - Support for the undocumented and deprecated --enable-nmh-debug configure flag has been removed. +- Support for encoding some characters designated as EBCDIC-unsafe + via the -ebcdicsafe and -noebcdicsafe switches to mhbuild has + been removed. --------- BUG FIXES diff --git a/man/mhbuild.man b/man/mhbuild.man index 7bd3103c..c2a73651 100644 --- a/man/mhbuild.man +++ b/man/mhbuild.man @@ -13,7 +13,6 @@ mhbuild \- translate MIME composition draft .RB [ \-realsize " | " \-norealsize ] .RB [ \-headers " | " \-noheaders ] .RB [ \-directives " | " \-nodirectives ] -.RB [ \-ebcdicsafe " | " \-noebcdicsafe ] .RB [ \-rfc934mode " | " \-norfc934mode ] .RB [ \-contentid " | " \-nocontentid ] .RB [ \-verbose " | " \-noverbose ] @@ -490,17 +489,6 @@ will encode each content with a transfer encoding, even it the content contains only 7\-bit data. This is to increase the likelihood that the content is not changed while in transport. -.PP -The switch -.B \-ebcdicsafe -will cause -.B mhbuild -to slightly change -the way in which it performs the \*(lqquoted-printable\*(rq transfer -encoding. Along with encoding 8\-bit characters, it will now also encode -certain common punctuation characters as well. This slightly reduces the -readability of the message, but allows the message to pass more reliably -through mail gateways which involve the EBCDIC character encoding. .SS "Invoking mhbuild" Typically, .B mhbuild @@ -696,6 +684,5 @@ line ::= "##" text EOL .RB ` \-norfc934mode ' .RB ` \-contentid ' .RB ` \-nocheck ' -.RB ` \-noebcdicsafe ' .RB ` \-noverbose ' .fi diff --git a/man/mhn.man b/man/mhn.man index cd157352..5864aa43 100644 --- a/man/mhn.man +++ b/man/mhn.man @@ -41,7 +41,6 @@ mhn \- display/list/store/cache MIME messages .B mhn .B \-build .I file -.RB [ \-ebcdicsafe " | " \-noebcdicsafe ] .RB [ \-rfc934mode " | " \-norfc934mode ] .ad .SH DESCRIPTION diff --git a/uip/mhbuild.c b/uip/mhbuild.c index e8e74231..1fdeb6f9 100644 --- a/uip/mhbuild.c +++ b/uip/mhbuild.c @@ -29,43 +29,39 @@ static struct swit switches[] = { { "directives", 0 }, #define NDIRECTIVES 3 { "nodirectives", 0 }, -#define EBCDICSW 4 - { "ebcdicsafe", 0 }, -#define NEBCDICSW 5 - { "noebcdicsafe", 0 }, -#define HEADSW 6 +#define HEADSW 4 { "headers", 0 }, -#define NHEADSW 7 +#define NHEADSW 5 { "noheaders", 0 }, -#define LISTSW 8 +#define LISTSW 6 { "list", 0 }, -#define NLISTSW 9 +#define NLISTSW 7 { "nolist", 0 }, -#define SIZESW 10 +#define SIZESW 8 { "realsize", 0 }, -#define NSIZESW 11 +#define NSIZESW 9 { "norealsize", 0 }, -#define RFC934SW 12 +#define RFC934SW 10 { "rfc934mode", 0 }, -#define NRFC934SW 13 +#define NRFC934SW 11 { "norfc934mode", 0 }, -#define VERBSW 14 +#define VERBSW 12 { "verbose", 0 }, -#define NVERBSW 15 +#define NVERBSW 13 { "noverbose", 0 }, -#define RCACHESW 16 +#define RCACHESW 14 { "rcache policy", 0 }, -#define WCACHESW 17 +#define WCACHESW 15 { "wcache policy", 0 }, -#define CONTENTIDSW 18 +#define CONTENTIDSW 16 { "contentid", 0 }, -#define NCONTENTIDSW 19 +#define NCONTENTIDSW 17 { "nocontentid", 0 }, -#define VERSIONSW 20 +#define VERSIONSW 18 { "version", 0 }, -#define HELPSW 21 +#define HELPSW 19 { "help", 0 }, -#define DEBUGSW 22 +#define DEBUGSW 20 { "debug", -5 }, { NULL, 0 } }; @@ -83,7 +79,6 @@ extern char *cache_private; int debugsw = 0; int verbosw = 0; -int ebcdicsw = 0; int listsw = 0; int rfc934sw = 0; int contentidsw = 1; @@ -188,13 +183,6 @@ main (int argc, char **argv) checksw = 0; continue; - case EBCDICSW: - ebcdicsw++; - continue; - case NEBCDICSW: - ebcdicsw = 0; - continue; - case HEADSW: headsw++; continue; diff --git a/uip/mhbuildsbr.c b/uip/mhbuildsbr.c index ec2c195a..653c5b3f 100644 --- a/uip/mhbuildsbr.c +++ b/uip/mhbuildsbr.c @@ -36,7 +36,6 @@ extern int debugsw; extern int verbosw; -extern int ebcdicsw; extern int listsw; extern int rfc934sw; extern int contentidsw; @@ -911,42 +910,6 @@ set_id (CT ct, int top) } -static char ebcdicsafe[0x100] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -}; - - /* * Fill out, or expand the various contents in the composition * draft. Read-in any necessary files. Parse and execute any @@ -1190,7 +1153,6 @@ scan_content (CT ct) int checklinelen = 0, linelen = 0; /* check for long lines */ int checkboundary = 0, boundaryclash = 0; /* check if clashes with multipart boundary */ int checklinespace = 0, linespace = 0; /* check if any line ends with space */ - int checkebcdic = 0, ebcdicunsafe = 0; /* check if contains ebcdic unsafe characters */ unsigned char *cp = NULL, buffer[BUFSIZ]; struct text *t = NULL; FILE *in = NULL; @@ -1231,11 +1193,9 @@ scan_content (CT ct) check8bit = 1; checkboundary = 1; if (ct->c_subtype == TEXT_PLAIN) { - checkebcdic = 0; checklinelen = 0; checklinespace = 0; } else { - checkebcdic = ebcdicsw; checklinelen = 1; checklinespace = 1; } @@ -1243,7 +1203,6 @@ scan_content (CT ct) case CT_APPLICATION: check8bit = 1; - checkebcdic = ebcdicsw; checklinelen = 1; checklinespace = 1; checkboundary = 1; @@ -1251,7 +1210,6 @@ scan_content (CT ct) case CT_MESSAGE: check8bit = 0; - checkebcdic = 0; checklinelen = 0; checklinespace = 0; @@ -1270,7 +1228,6 @@ scan_content (CT ct) * since we are forcing use of base64. */ check8bit = 0; - checkebcdic = 0; checklinelen = 0; checklinespace = 0; checkboundary = 0; @@ -1295,14 +1252,6 @@ scan_content (CT ct) contains8bit = 1; check8bit = 0; /* no need to keep checking */ } - /* - * Check if character is ebcdic-safe. We only check - * this if also checking for 8bit data. - */ - if (checkebcdic && !ebcdicsafe[*cp & 0xff]) { - ebcdicunsafe = 1; - checkebcdic = 0; /* no need to keep checking */ - } } } @@ -1370,7 +1319,7 @@ scan_content (CT ct) *ep = cp; } - if (contains8bit || ebcdicunsafe || linelen || linespace || checksw) + if (contains8bit || linelen || linespace || checksw) ct->c_encoding = CE_QUOTED; else ct->c_encoding = CE_7BIT; @@ -1378,7 +1327,7 @@ scan_content (CT ct) case CT_APPLICATION: /* For application type, use base64, except when postscript */ - if (contains8bit || ebcdicunsafe || linelen || linespace || checksw) + if (contains8bit || linelen || linespace || checksw) ct->c_encoding = (ct->c_subtype == APPLICATION_POSTSCRIPT) ? CE_QUOTED : CE_BASE64; else diff --git a/uip/mhn.c b/uip/mhn.c index 65e78d31..aab681f2 100644 --- a/uip/mhn.c +++ b/uip/mhn.c @@ -107,13 +107,9 @@ static struct swit switches[] = { { "build", -5 }, #define NBUILDSW 36 { "nobuild", -7 }, -#define EBCDICSW 37 - { "ebcdicsafe", -10 }, -#define NEBCDICSW 38 - { "noebcdicsafe", -12 }, -#define RFC934SW 39 +#define RFC934SW 37 { "rfc934mode", -10 }, -#define NRFC934SW 40 +#define NRFC934SW 38 { "norfc934mode", -12 }, { NULL, 0 } }; @@ -154,7 +150,6 @@ int verbosw = 0; * variables for mhbuild (mhn -build) */ static int buildsw = 0; -static int ebcdicsw = 0; static int rfc934sw = 0; /* @@ -398,12 +393,6 @@ do_cache: case NRFC934SW: rfc934sw = -1; continue; - case EBCDICSW: - ebcdicsw = 1; - continue; - case NEBCDICSW: - ebcdicsw = -1; - continue; case VERBSW: verbosw = 1; @@ -493,11 +482,6 @@ do_cache: vecp = 0; vec[vecp++] = "mhbuild"; - if (ebcdicsw == 1) - vec[vecp++] = "-ebcdicsafe"; - else if (ebcdicsw == -1) - vec[vecp++] = "-noebcdicsafe"; - if (rfc934sw == 1) vec[vecp++] = "-rfc934mode"; else if (rfc934sw == -1) @@ -525,11 +509,6 @@ do_cache: vecp = 0; vec[vecp++] = "mhbuild"; - if (ebcdicsw == 1) - vec[vecp++] = "-ebcdicsafe"; - else if (ebcdicsw == -1) - vec[vecp++] = "-noebcdicsafe"; - if (rfc934sw == 1) vec[vecp++] = "-rfc934mode"; else if (rfc934sw == -1) diff --git a/uip/mhoutsbr.c b/uip/mhoutsbr.c index 97f97f08..57a5df93 100644 --- a/uip/mhoutsbr.c +++ b/uip/mhoutsbr.c @@ -20,43 +20,6 @@ #include -extern int ebcdicsw; - -static char ebcdicsafe[0x100] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -}; - /* * prototypes */ @@ -372,8 +335,7 @@ writeQuoted (CT ct, FILE *out) break; default: - if (*cp < '!' || *cp > '~' - || (ebcdicsw && !ebcdicsafe[*cp & 0xff])) + if (*cp < '!' || *cp > '~') goto three_print; putc (*cp, out); n++; diff --git a/uip/mhtest.c b/uip/mhtest.c index cbaefd33..fda60f77 100644 --- a/uip/mhtest.c +++ b/uip/mhtest.c @@ -55,8 +55,6 @@ static struct swit switches[] = { }; -int ebcdicsw = 0; /* hack for linking purposes */ - /* mhparse.c */ extern char *tmp; /* directory to place temp files */ diff --git a/uip/mshcmds.c b/uip/mshcmds.c index 5f571b49..35e7d273 100644 --- a/uip/mshcmds.c +++ b/uip/mshcmds.c @@ -1280,57 +1280,53 @@ static struct swit mhnswit[] = { { "noauto", 0 }, #define MHNDEBUGSW 2 { "debug", -5 }, -#define MHNEBCDICSW 3 - { "ebcdicsafe", 0 }, -#define MHNNEBCDICSW 4 - { "noebcdicsafe", 0 }, -#define MHNFORMSW 5 +#define MHNFORMSW 3 { "form formfile", 4 }, -#define MHNHEADSW 6 +#define MHNHEADSW 4 { "headers", 0 }, -#define MHNNHEADSW 7 +#define MHNNHEADSW 5 { "noheaders", 0 }, -#define MHNLISTSW 8 +#define MHNLISTSW 6 { "list", 0 }, -#define MHNNLISTSW 9 +#define MHNNLISTSW 7 { "nolist", 0 }, -#define MHNPARTSW 10 +#define MHNPARTSW 8 { "part number", 0 }, -#define MHNSIZESW 11 +#define MHNSIZESW 9 { "realsize", 0 }, -#define MHNNSIZESW 12 +#define MHNNSIZESW 10 { "norealsize", 0 }, -#define MHNRFC934SW 13 +#define MHNRFC934SW 11 { "rfc934mode", 0 }, -#define MHNNRFC934SW 14 +#define MHNNRFC934SW 12 { "norfc934mode", 0 }, -#define MHNSERIALSW 15 +#define MHNSERIALSW 13 { "serialonly", 0 }, -#define MHNNSERIALSW 16 +#define MHNNSERIALSW 14 { "noserialonly", 0 }, -#define MHNSHOWSW 17 +#define MHNSHOWSW 15 { "show", 0 }, -#define MHNNSHOWSW 18 +#define MHNNSHOWSW 16 { "noshow", 0 }, -#define MHNSTORESW 19 +#define MHNSTORESW 17 { "store", 0 }, -#define MHNNSTORESW 20 +#define MHNNSTORESW 18 { "nostore", 0 }, -#define MHNTYPESW 21 +#define MHNTYPESW 19 { "type content", 0 }, -#define MHNVERBSW 22 +#define MHNVERBSW 20 { "verbose", 0 }, -#define MHNNVERBSW 23 +#define MHNNVERBSW 21 { "noverbose", 0 }, -#define MHNHELPSW 24 +#define MHNHELPSW 22 { "help", 0 }, -#define MHNPROGSW 25 +#define MHNPROGSW 23 { "moreproc program", -4 }, -#define MHNNPROGSW 26 +#define MHNNPROGSW 24 { "nomoreproc", -3 }, -#define MHNLENSW 27 +#define MHNLENSW 25 { "length lines", -4 }, -#define MHNWIDSW 28 +#define MHNWIDSW 26 { "width columns", -4 }, { NULL, 0 } }; @@ -1365,8 +1361,6 @@ mhncmd (char **args) case MHNAUTOSW: case MHNNAUTOSW: case MHNDEBUGSW: - case MHNEBCDICSW: - case MHNNEBCDICSW: case MHNHEADSW: case MHNNHEADSW: case MHNLISTSW: diff --git a/uip/viamail.c b/uip/viamail.c index 21762002..4fde61bb 100644 --- a/uip/viamail.c +++ b/uip/viamail.c @@ -50,8 +50,6 @@ extern int debugsw; extern int splitsw; extern int verbsw; -int ebcdicsw = 0; /* hack for linking purposes */ - /* * static prototypes */