case MUTT_YES:
strfcpy (buf, fixed, sizeof (buf));
goto retry_name;
- case -1:
+ case MUTT_ABORT:
return;
}
}
int r;
snprintf (tmp, sizeof (tmp), _("Convert to %s upon sending?"),
mutt_get_parameter ("charset", b->parameter));
- if ((r = mutt_yesorno (tmp, !b->noconv)) != -1)
+ if ((r = mutt_yesorno (tmp, !b->noconv)) != MUTT_ABORT)
b->noconv = (r == MUTT_NO);
}
if((r = mutt_yesorno(msg, MUTT_YES)) == MUTT_YES)
mutt_update_encoding(idx[i]->content);
- else if(r == -1)
+ else if(r == MUTT_ABORT)
return -1;
}
}
if (!fccSet && *fcc)
{
if ((i = query_quadoption (OPT_COPY,
- _("Save a copy of this message?"))) == -1)
+ _("Save a copy of this message?"))) == MUTT_ABORT)
break;
else if (i == MUTT_NO)
*fcc = 0;
loop = 0;
break;
}
- else if (i == -1)
+ else if (i == MUTT_ABORT)
break; /* abort */
/* fall through to postpone! */
_("%s Do you really want to use the key?"),
_(warn_s));
- if (mutt_yesorno (buff, 0) != 1)
+ if (mutt_yesorno (buff, 0) != MUTT_YES)
{
mutt_clear_error ();
break;
continue;
}
}
- else if (r == -1)
+ else if (r == MUTT_ABORT)
{
FREE (&keylist);
rfc822_free_address (&addr);
BODY *tmp_smime_pbody = NULL;
BODY *tmp_pgp_pbody = NULL;
int flags = (WithCrypto & APPLICATION_PGP)? msg->security: 0;
- int i;
if (!WithCrypto)
return -1;
if ((msg->content->type != TYPETEXT) ||
ascii_strcasecmp (msg->content->subtype, "plain"))
{
- if ((i = query_quadoption (OPT_PGPMIMEAUTO,
- _("Inline PGP can't be used with attachments. Revert to PGP/MIME?"))) != MUTT_YES)
+ if (query_quadoption (OPT_PGPMIMEAUTO,
+ _("Inline PGP can't be used with attachments. Revert to PGP/MIME?")) != MUTT_YES)
{
mutt_error _("Mail not sent: inline PGP can't be used with attachments.");
return -1;
}
/* otherwise inline won't work...ask for revert */
- if ((i = query_quadoption (OPT_PGPMIMEAUTO, _("Message can't be sent inline. Revert to using PGP/MIME?"))) != MUTT_YES)
+ if (query_quadoption (OPT_PGPMIMEAUTO, _("Message can't be sent inline. Revert to using PGP/MIME?")) != MUTT_YES)
{
mutt_error _("Mail not sent.");
return -1;
break;
if (ch.ch < 0)
{
- def = -1;
+ def = MUTT_ABORT;
break;
}
regfree (& reno);
#endif
- if (def != -1)
+ if (def != MUTT_ABORT)
{
addstr ((char *) (def == MUTT_YES ? yes : no));
mutt_refresh ();
if (option(OPTSSLFORCETLS))
rc = MUTT_YES;
else if ((rc = query_quadoption (OPT_SSLSTARTTLS,
- _("Secure connection with TLS?"))) == -1)
+ _("Secure connection with TLS?"))) == MUTT_ABORT)
goto err_close_conn;
if (rc == MUTT_YES) {
if ((rc = imap_exec (idata, "STARTTLS", IMAP_CMD_FAIL_OK)) == -1)
return -1;
snprintf (buf, sizeof (buf), _("Create %s?"), mailbox);
- if (option (OPTCONFIRMCREATE) && mutt_yesorno (buf, 1) < 1)
+ if (option (OPTCONFIRMCREATE) && mutt_yesorno (buf, 1) != MUTT_YES)
return -1;
if (imap_create_mailbox (idata, mailbox) < 0)
break;
dprint (3, (debugfile, "imap_fast_trash: server suggests TRYCREATE\n"));
snprintf (prompt, sizeof (prompt), _("Create %s?"), mbox);
- if (option (OPTCONFIRMCREATE) && mutt_yesorno (prompt, 1) < 1)
+ if (option (OPTCONFIRMCREATE) && mutt_yesorno (prompt, 1) != MUTT_YES)
{
mutt_clear_error ();
goto out;
break;
dprint (3, (debugfile, "imap_copy_messages: server suggests TRYCREATE\n"));
snprintf (prompt, sizeof (prompt), _("Create %s?"), mbox);
- if (option (OPTCONFIRMCREATE) && mutt_yesorno (prompt, 1) < 1)
+ if (option (OPTCONFIRMCREATE) && mutt_yesorno (prompt, 1) != MUTT_YES)
{
mutt_clear_error ();
goto out;
/* possible arguments to set_quadoption() */
enum
{
+ MUTT_ABORT = -1,
MUTT_NO,
MUTT_YES,
MUTT_ASKNO,
snprintf (tmp, sizeof (tmp), _("Append messages to %s?"), s);
if ((rc = mutt_yesorno (tmp, MUTT_YES)) == MUTT_NO)
ret = 1;
- else if (rc == -1)
+ else if (rc == MUTT_ABORT)
ret = -1;
}
}
snprintf (tmp, sizeof (tmp), _("Create %s?"), s);
if ((rc = mutt_yesorno (tmp, MUTT_YES)) == MUTT_NO)
ret = 1;
- else if (rc == -1)
+ else if (rc == MUTT_ABORT)
ret = -1;
}
}
if (nntp_data && nntp_data->nserv && nntp_data->group)
{
int rc = query_quadoption (OPT_CATCHUP, _("Mark all articles read?"));
- if (rc < 0)
+ if (rc == MUTT_ABORT)
{
ctx->closing = 0;
return -1;
{
mutt_expand_path (mbox, sizeof (mbox));
snprintf (buf, sizeof (buf), _("Move read messages to %s?"), mbox);
- if ((move_messages = query_quadoption (OPT_MOVE, buf)) == -1)
+ if ((move_messages = query_quadoption (OPT_MOVE, buf)) == MUTT_ABORT)
{
ctx->closing = 0;
return (-1);
snprintf (buf, sizeof (buf), ctx->deleted == 1
? _("Purge %d deleted message?") : _("Purge %d deleted messages?"),
ctx->deleted);
- if ((purge = query_quadoption (OPT_DELETE, buf)) < 0)
+ if ((purge = query_quadoption (OPT_DELETE, buf)) == MUTT_ABORT)
{
ctx->closing = 0;
return (-1);
snprintf (buf, sizeof (buf), ctx->deleted == 1
? _("Purge %d deleted message?") : _("Purge %d deleted messages?"),
ctx->deleted);
- if ((purge = query_quadoption (OPT_DELETE, buf)) < 0)
+ if ((purge = query_quadoption (OPT_DELETE, buf)) == MUTT_ABORT)
return (-1);
else if (purge == MUTT_NO)
{
continue;
}
}
- else if (r == -1)
+ else if (r == MUTT_ABORT)
{
FREE (&keylist);
rfc822_free_address (&addr);
{
ret = query_quadoption (OPT_SSLSTARTTLS,
_("Secure connection with TLS?"));
- if (ret == -1)
+ if (ret == MUTT_ABORT)
return -2;
pop_data->use_stls = 1;
if (ret == MUTT_YES)
&& !check_can_decode (idx, idxlen, cur))
{
if ((rc = query_quadoption (OPT_MIMEFWDREST,
-_("Can't decode all tagged attachments. MIME-forward the others?"))) == -1)
+_("Can't decode all tagged attachments. MIME-forward the others?"))) == MUTT_ABORT)
goto bail;
else if (rc == MUTT_NO)
mime_fwd_any = 0;
if (nattach > 1 && !check_can_decode (idx, idxlen, cur))
{
if ((rc = query_quadoption (OPT_MIMEFWDREST,
- _("Can't decode all tagged attachments. MIME-encapsulate the others?"))) == -1)
+ _("Can't decode all tagged attachments. MIME-encapsulate the others?"))) == MUTT_ABORT)
return;
else if (rc == MUTT_YES)
mime_reply_any = 1;
in->mail_followup_to->mailbox,
in->mail_followup_to->next ? ",..." : "");
- if ((hmfupto = query_quadoption (OPT_MFUPTO, prompt)) == -1)
+ if ((hmfupto = query_quadoption (OPT_MFUPTO, prompt)) == MUTT_ABORT)
return -1;
}
rfc822_free_address (&tmp);
if (in->mail_followup_to && hmfupto == MUTT_YES &&
- default_to (&out->cc, in, flags & SENDLISTREPLY, hmfupto) == -1)
+ default_to (&out->cc, in, flags & SENDLISTREPLY, hmfupto) == MUTT_ABORT)
return (-1); /* abort */
}
else
{
- if (default_to (&out->to, in, flags & SENDGROUPREPLY, hmfupto) == -1)
+ if (default_to (&out->to, in, flags & SENDGROUPREPLY, hmfupto) == MUTT_ABORT)
return (-1); /* abort */
if ((flags & SENDGROUPREPLY) && (!in->mail_followup_to || hmfupto != MUTT_YES))
if (flags & SENDREPLY)
{
- if ((i = query_quadoption (OPT_INCLUDE, _("Include message in reply?"))) == -1)
+ if ((i = query_quadoption (OPT_INCLUDE, _("Include message in reply?"))) == MUTT_ABORT)
return (-1);
if (i == MUTT_YES)
/* If the user is composing a new message, check to see if there
* are any postponed messages first.
*/
- if ((i = query_quadoption (OPT_RECALL, _("Recall postponed message?"))) == -1)
+ if ((i = query_quadoption (OPT_RECALL, _("Recall postponed message?"))) == MUTT_ABORT)
return rv;
if(i == MUTT_YES)
rc = MUTT_YES;
else if (mutt_bit_isset (Capabilities, STARTTLS) &&
(rc = query_quadoption (OPT_SSLSTARTTLS,
- _("Secure connection with TLS?"))) == -1)
+ _("Secure connection with TLS?"))) == MUTT_ABORT)
return rc;
if (rc == MUTT_YES)