Convert a header line according to RFC 2047 unless raw output is requested
authorJoey Schulze <joey@infodrom.org>
Wed, 8 Feb 2006 08:55:46 +0000 (08:55 +0000)
committerJoey Schulze <joey@infodrom.org>
Wed, 8 Feb 2006 08:55:46 +0000 (08:55 +0000)
output.c

index f9935ae..d829a2f 100644 (file)
--- a/output.c
+++ b/output.c
@@ -38,6 +38,7 @@
  */
 
 #include <stdio.h>
+#include "rfc2047.h"
 #include "optdefs.h"
 
 #define MAIL_FROM      "Mail from"
 
 void emit(char *prefix, char *realname, char *subject, int priority, int opt_flags)
 {
+  if (!(opt_flags & OPT_RAW)) {
+    realname = convert_header (realname);
+    subject = convert_header (subject);
+  }
+
   if (opt_flags & OPT_WINDOW) {
     if (prefix != NULL)
       printf ("%s: ", prefix);