]> diplodocus.org Git - nmh/commitdiff
Remove support for -ebcdicsafe/-noebcdicsafe switches in various utilities.
authorKen Hornstein <kenh@pobox.com>
Fri, 4 Jan 2013 20:12:15 +0000 (15:12 -0500)
committerKen Hornstein <kenh@pobox.com>
Fri, 4 Jan 2013 20:12:15 +0000 (15:12 -0500)
docs/COMPLETION-ZSH
docs/pending-release-notes
man/mhbuild.man
man/mhn.man
uip/mhbuild.c
uip/mhbuildsbr.c
uip/mhn.c
uip/mhoutsbr.c
uip/mhtest.c
uip/mshcmds.c
uip/viamail.c

index 5c10cc895b9ccfd882f3af97858683269b35d258..3514080ddad1893e19ee8eec62425e1f8b8d2916 100644 (file)
@@ -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
index 1467018b7db1a64298f566ed8a9b4b961c94a18f..c8dd62312848f9fd6622dfe4175bedf4950af48f 100644 (file)
@@ -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
index 7bd3103c8507dfc8005b9aa2018a4dfbc4ebfce7..c2a736510cc69982964fc608d1e4c30178a4701d 100644 (file)
@@ -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
index cd15735251c8fc512cbd81804936a27db46521ee..5864aa435b6bad95da10a5a4d5a1232d250f3225 100644 (file)
@@ -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
index e8e74231b53edd2bcdc2beb949ea31ff247c4375..1fdeb6f91681e6da6cbeb35a830573347ecda0b8 100644 (file)
@@ -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;
index ec2c195a2c6a7ed85b05beb96e5718e24ac95531..653c5b3f380d926a6a07a313cf9789da91a29c95 100644 (file)
@@ -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
index 65e78d31d98b3a1d0820ae8c534c7ebdcdd27bf9..aab681f2438f4d3b7dac36826bea8caebff7bfc2 100644 (file)
--- 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)
index 97f97f08ffdf3eae1e9444ae2b01327aeb6674c1..57a5df93db59fa6a9320789d7fa5f28bddc46885 100644 (file)
 #include <h/mhparse.h>
 
 
-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++;
index cbaefd33f9eedb5b43feefcb432fadd77a7ef3d0..fda60f7764d500ee4bced9c0105980febda03e5b 100644 (file)
@@ -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 */
 
index 5f571b49796ff49b5a58467ce7ef44fe70e7d70b..35e7d2737c04caaad2ec8e1b7b9f10f26962eb4c 100644 (file)
@@ -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:
index 2176200200210d45c426788ae9bc6a3534458955..4fde61bb04cab802bec908e01ed74fe4187a09a2 100644 (file)
@@ -50,8 +50,6 @@ extern int debugsw;
 extern int splitsw;
 extern int verbsw;
 
-int ebcdicsw = 0;      /* hack for linking purposes */
-
 /*
  * static prototypes
  */