]> diplodocus.org Git - nmh/blobdiff - uip/whatnowsbr.c
Deference char pointer to test for empty string instead of strlen(3).
[nmh] / uip / whatnowsbr.c
index b9518e8b8b9c7bebd3f6b30255fc8b5b9c9ea0ac..d6c336f673bf9c107e503571f2ecff450d0b820d 100644 (file)
@@ -237,9 +237,9 @@ WhatNow (int argc, char **argv)
     snprintf (prompt, sizeof(prompt), myprompt, invo_name);
     for (;;) {
 #ifdef READLINE_SUPPORT
-       if (!(argp = getans_via_readline (prompt, aleqs))) {
+       if (!(argp = read_switch_multiword_via_readline (prompt, aleqs))) {
 #else /* ! READLINE_SUPPORT */
-       if (!(argp = getans (prompt, aleqs))) {
+       if (!(argp = read_switch_multiword (prompt, aleqs))) {
 #endif /* READLINE_SUPPORT */
            (void) m_unlink (LINK);
            done (1);
@@ -942,15 +942,14 @@ buildfile (char **argp, char *file)
     X("client host", -6, CLIESW) \
     X("server host", 6, SERVSW) \
     X("snoop", -5, SNOOPSW) \
-    X("draftfolder +folder", -6, SDRFSW) \
-    X("draftmessage msg", -6, SDRMSW) \
-    X("nodraftfolder", -3, SNDRFSW) \
-    X("sasl", SASLminc(-4), SASLSW) \
-    X("nosasl", SASLminc(-6), NOSASLSW) \
-    X("saslmaxssf", SASLminc(-10), SASLMXSSFSW) \
-    X("saslmech", SASLminc(-5), SASLMECHSW) \
-    X("authservice", SASLminc(-11), AUTHSERVICESW) \
-    X("user username", SASLminc(-4), USERSW) \
+    X("draftfolder +folder", 0, SDRFSW) \
+    X("draftmessage msg", 0, SDRMSW) \
+    X("nodraftfolder", 0, SNDRFSW) \
+    X("sasl", SASLminc(4), SASLSW) \
+    X("nosasl", SASLminc(6), NOSASLSW) \
+    X("saslmech", SASLminc(5), SASLMECHSW) \
+    X("authservice", SASLminc(0), AUTHSERVICESW) \
+    X("user username", SASLminc(4), USERSW) \
     X("attach fieldname", 6, SNDATTACHSW) \
     X("noattach", 0, SNDNOATTACHSW) \
     X("attachformat", 7, SNDATTACHFORMAT) \
@@ -1165,7 +1164,6 @@ sendit (char *sp, char **arg, char *file, int pushed)
                case WIDTHSW:
                case CLIESW:
                case SERVSW:
-               case SASLMXSSFSW:
                case USERSW:
                case PORTSW:
                case MTSSM:
@@ -1255,13 +1253,6 @@ sendit (char *sp, char **arg, char *file, int pushed)
         if (user == NULL) {
             adios (NULL, "must specify -user with -saslmech xoauth2");
         }
-
-        vec[vecp++] = "-authservice";
-        if (saslmech  &&  ! strcasecmp(saslmech, "xoauth2")) {
-            vec[vecp++] = mh_oauth_do_xoauth (user, auth_svc, snoop ? stderr : NULL);
-        } else {
-            vec[vecp++] = auth_svc;
-        }
     }
 #else
     NMH_UNUSED(saslmech);
@@ -1277,7 +1268,7 @@ sendit (char *sp, char **arg, char *file, int pushed)
 
     closefds (3);
 
-    if (sendsbr (vec, vecp, program, file, &st, 1) == OK)
+    if (sendsbr (vec, vecp, program, file, &st, 1, auth_svc) == OK)
        done (0);
 }
 
@@ -1334,7 +1325,7 @@ removefile (char *drft)
 
 
 /*
- * Return 1 if we already have a MIME-Verson header, 0 otherwise.
+ * Return 1 if we already have a MIME-Version header, 0 otherwise.
  */
 
 static int