]> diplodocus.org Git - nmh/blobdiff - uip/mhbuild.c
Generalized condition for support of parameter value tests.
[nmh] / uip / mhbuild.c
index 58b37c4ee670eb20560b5765325a292f401ddc8c..0ca09e10d319f7de909300bf44d4e214706361a4 100644 (file)
@@ -46,7 +46,7 @@
     X("version", 0, VERSIONSW) \
     X("help", 0, HELPSW) \
     X("debug", -5, DEBUGSW) \
-    X("dist", -4, DISTSW) \
+    X("dist", 0, DISTSW) \
 
 #define X(sw, minchars, id) id,
 DEFINE_SWITCH_ENUM(MHBUILD);
@@ -56,9 +56,11 @@ DEFINE_SWITCH_ENUM(MHBUILD);
 DEFINE_SWITCH_ARRAY(MHBUILD, switches);
 #undef X
 
+/* utf-8 is for Email Address Internationalization, using SMTPUTF8. */
 #define MIMEENCODING_SWITCHES \
     X("base64", 0, BASE64SW) \
     X("quoted-printable", 0, QUOTEDPRINTSW) \
+    X("utf-8", 0, UTF8SW) \
 
 #define X(sw, minchars, id) id,
 DEFINE_SWITCH_ENUM(MIMEENCODING);
@@ -92,7 +94,6 @@ static int unlink_outfile = 0;
 static void unlink_done (int) NORETURN;
 
 /* mhbuildsbr.c */
-int output_message (CT, char *);
 int output_message_fp (CT, FILE *, char*);
 
 
@@ -112,7 +113,7 @@ main (int argc, char **argv)
     int header_encoding = CE_UNKNOWN;
     size_t n;
 
-    if (nmh_init(argv[0], 1)) { return 1; }
+    if (nmh_init(argv[0], 2)) { return 1; }
 
     done=unlink_done;
 
@@ -244,6 +245,9 @@ main (int argc, char **argv)
                case QUOTEDPRINTSW:
                    header_encoding = CE_QUOTED;
                    break;
+               case UTF8SW:
+                   header_encoding = CE_8BIT;
+                   break;
                default:
                    adios (NULL, "Internal error: algorithm %s", cp);
                }