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);
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) \
case WIDTHSW:
case CLIESW:
case SERVSW:
- case SASLMXSSFSW:
case USERSW:
case PORTSW:
case MTSSM:
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);
closefds (3);
- if (sendsbr (vec, vecp, program, file, &st, 1) == OK)
+ if (sendsbr (vec, vecp, program, file, &st, 1, auth_svc) == OK)
done (0);
}
/*
- * 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