]> diplodocus.org Git - nmh/blobdiff - uip/mhbuild.c
Support iCalendar event request files that don't end with a newline.
[nmh] / uip / mhbuild.c
index a0903c571a9d0b027531f6e913ed25cfb46c25fd..cdbf50f221531f78c3fbe3d4d7d40221092679ba 100644 (file)
@@ -1,6 +1,4 @@
-
-/*
- * mhbuild.c -- expand/translate MIME composition files
+/* mhbuild.c -- expand/translate MIME composition files
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
@@ -56,9 +54,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 +92,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 +111,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 +243,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);
                }