X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fmhbuild.c;h=5cccd2a78fd63b59392dde2b0f951fe97efdeeb7;hp=cc319f5dcaa64c546df421d6eac21be3d2928d34;hb=01a3480928da485b4d6109d36d751dfa71799d58;hpb=8d8f1c3abc586c005c904e52c4adbfe694d2201c diff --git a/uip/mhbuild.c b/uip/mhbuild.c index cc319f5..5cccd2a 100644 --- a/uip/mhbuild.c +++ b/uip/mhbuild.c @@ -29,35 +29,31 @@ #include static struct swit switches[] = { -#define EBCDICSW 0 - { "ebcdicsafe", 0 }, -#define NEBCDICSW 1 - { "noebcdicsafe", 0 }, -#define HEADSW 2 +#define HEADSW 0 { "headers", 0 }, -#define NHEADSW 3 +#define NHEADSW 1 { "noheaders", 0 }, -#define LISTSW 4 +#define LISTSW 2 { "list", 0 }, -#define NLISTSW 5 +#define NLISTSW 3 { "nolist", 0 }, -#define RFC934SW 6 +#define RFC934SW 4 { "rfc934mode", 0 }, -#define NRFC934SW 7 +#define NRFC934SW 5 { "norfc934mode", 0 }, -#define VERBSW 8 +#define VERBSW 6 { "verbose", 0 }, -#define NVERBSW 9 +#define NVERBSW 7 { "noverbose", 0 }, -#define CONTENTIDSW 10 +#define CONTENTIDSW 8 { "contentid", 0 }, -#define NCONTENTIDSW 11 +#define NCONTENTIDSW 9 { "nocontentid", 0 }, -#define VERSIONSW 12 +#define VERSIONSW 10 { "version", 0 }, -#define HELPSW 13 +#define HELPSW 11 { "help", 0 }, -#define DEBUGSW 14 +#define DEBUGSW 12 { "debug", -5 }, { NULL, 0 } }; @@ -103,7 +99,6 @@ static CT build_mime(char *); int debugsw = 0; int verbosw = 0; -int ebcdicsw = 0; int listsw = 0; int rfc934sw = 0; int contentidsw = 1; @@ -183,13 +178,6 @@ main(int argc, char **argv) print_version(invo_name); done(1); - case EBCDICSW: - ebcdicsw++; - continue; - case NEBCDICSW: - ebcdicsw = 0; - continue; - case HEADSW: headsw++; continue; @@ -1130,42 +1118,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 @@ -1412,7 +1364,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; @@ -1459,11 +1410,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; } @@ -1471,7 +1420,6 @@ scan_content(CT ct) case CT_APPLICATION: check8bit = 1; - checkebcdic = ebcdicsw; checklinelen = 1; checklinespace = 1; checkboundary = 1; @@ -1479,7 +1427,6 @@ scan_content(CT ct) case CT_MESSAGE: check8bit = 0; - checkebcdic = 0; checklinelen = 0; checklinespace = 0; checkboundary = 1; @@ -1493,7 +1440,6 @@ scan_content(CT ct) ** since we are forcing use of base64. */ check8bit = 0; - checkebcdic = 0; checklinelen = 0; checklinespace = 0; checkboundary = 0; @@ -1519,16 +1465,6 @@ scan_content(CT ct) /* no need to keep checking */ check8bit = 0; } - /* - ** Check if character is ebcdic-safe. - ** We only check this if also checking - ** for 8bit data. - */ - if (checkebcdic && !ebcdicsafe[*cp & 0xff]) { - ebcdicunsafe = 1; - /* no need to keep checking */ - checkebcdic = 0; - } } } @@ -1605,7 +1541,7 @@ scan_content(CT ct) *ep = cp; } - if (contains8bit || ebcdicunsafe || linelen || linespace) + if (contains8bit || linelen || linespace) ct->c_encoding = CE_QUOTED; else ct->c_encoding = CE_7BIT; @@ -1613,7 +1549,7 @@ scan_content(CT ct) case CT_APPLICATION: /* For application type, use base64, except when postscript */ - if (contains8bit || ebcdicunsafe || linelen || linespace) + if (contains8bit || linelen || linespace) ct->c_encoding = (ct->c_subtype == APPLICATION_POSTSCRIPT) ? CE_QUOTED : CE_BASE64;