Fixed places in the code relying the C99-ism of declarations in the
[mmh] / sbr / mts.c
index c529156..cb11a77 100644 (file)
--- a/sbr/mts.c
+++ b/sbr/mts.c
@@ -64,7 +64,6 @@ static char localmbox[BUFSIZ];
  */
 static char *sm_method = "smtp";
 int  sm_mts    = MTS_SMTP;
-char *hostable = nmhetcdir(/hosts);
 char *sendmail = SENDMAILPATH;
 
 /*
@@ -108,7 +107,6 @@ static struct bind binds[] = {
     { "mmdelim1", &mmdlm1 },
     { "mmdelim2", &mmdlm2 },
     { "mts",      &sm_method },
-    { "hostable", &hostable  },
     { "sendmail", &sendmail  },
     { "clientname",  &clientname },
     { "servers", &servers },
@@ -129,11 +127,10 @@ static struct bind binds[] = {
 void
 mts_init (char *name)
 {
-    NMH_UNUSED (name);
-
     const char *cp;
     FILE *fp;
     static int inited = 0;
+    NMH_UNUSED (name);
 
     if (inited++ || (fp = fopen (get_mtsconf_pathname(), "r")) == NULL)
        return;
@@ -395,16 +392,10 @@ getuserinfo (void)
     else if ((cp = context_find("Signature")))
        strncpy (fullname, cp, sizeof(fullname));
 
-    if (strchr(fullname, '.')) {               /*  quote any .'s */
-       char tmp[BUFSIZ];
-
-       /* should quote "'s too */
-       snprintf (tmp, sizeof(tmp), "\"%s\"", fullname);
-       strncpy (fullname, tmp, sizeof(fullname));
-    }
-
     fullname[sizeof(fullname) - 1] = '\0';
 
+    escape_display_name(fullname, sizeof(fullname));
+
     localmbox[0] = '\0';
 
     return;