(Minor) cleanup of some of the autoconf code with respect to the handling
[mmh] / uip / whatnowsbr.c
index a719431..58ac8bd 100644 (file)
@@ -634,7 +634,7 @@ editfile (char **ed, char **arg, char *file, int use, struct msgs *mp,
     struct stat st;
 
 #ifdef HAVE_LSTAT
-    int        slinked;
+    int        slinked = 0;
 #if 0
     int oumask;        /* PJS: for setting permissions on symlinks. */
 #endif
@@ -980,6 +980,12 @@ check_draft (char *msgnam)
 # define SASLminc(a)  0
 #endif /* CYRUS_SASL */
 
+#ifndef TLS_SUPPORT
+# define TLSminc(a)  (a)
+#else /* TLS_SUPPORT */
+# define TLSminc(a)   0
+#endif /* TLS_SUPPORT */
+
 static struct swit  sendswitches[] = {
 #define        ALIASW            0
     { "alias aliasfile", 0 },
@@ -1044,7 +1050,7 @@ static struct swit  sendswitches[] = {
 #define        CLIESW           30
     { "client host", -6 },
 #define        SERVSW           31
-    { "server host", -6 },
+    { "server host", 6 },
 #define        SNOOPSW          32
     { "snoop", -5 },
 #define SDRFSW           33
@@ -1063,6 +1069,10 @@ static struct swit  sendswitches[] = {
     { "attach file", 6 },
 #define SNDATTACHFORMAT   40
     { "attachformat", 7 },
+#define PORTSW           41
+    { "port server-port-name/number", 4 },
+#define TLSSW            42
+    { "tls", TLSminc(-3) },
     { NULL, 0 }
 };
 
@@ -1217,6 +1227,7 @@ sendit (char *sp, char **arg, char *file, int pushed)
                case SOMLSW:
                case SNOOPSW:
                case SASLSW:
+               case TLSSW:
                    vec[vecp++] = --cp;
                    continue;
 
@@ -1227,6 +1238,7 @@ sendit (char *sp, char **arg, char *file, int pushed)
                case SERVSW:
                case SASLMECHSW:
                case USERSW:
+               case PORTSW:
                    vec[vecp++] = --cp;
                    if (!(cp = *argp++) || *cp == '-') {
                        advise (NULL, "missing argument to %s", argp[-2]);
@@ -1312,7 +1324,7 @@ sendit (char *sp, char **arg, char *file, int pushed)
 #endif /* not lint */
            && altmsg) {
        vec[vecp++] = "-dist";
-       distfile = getcpy (m_scratch (altmsg, invo_name));
+       distfile = getcpy (m_mktemp2(altmsg, invo_name, NULL, NULL));
        if (link (altmsg, distfile) == NOTOK)
            adios (distfile, "unable to link %s to", altmsg);
     } else {