if (mutt_check_alias_name (buf, fixed))
{
- switch (mutt_yesorno (_("Warning: This alias name may not work. Fix it?"), 1))
+ switch (mutt_yesorno (_("Warning: This alias name may not work. Fix it?"), M_YES))
{
- case 1:
+ case M_YES:
strfcpy (buf, fixed, sizeof (buf));
goto retry_name;
case -1:
buf[0] = 0;
rfc822_write_address (buf, sizeof (buf), new->addr);
snprintf (prompt, sizeof (prompt), _("[%s = %s] Accept?"), new->name, buf);
- if (mutt_yesorno (prompt, 1) != 1)
+ if (mutt_yesorno (prompt, M_YES) != M_YES)
{
mutt_free_alias (&new);
return;
a->filename, newfile));
if (safe_symlink (a->filename, newfile) == -1)
{
- if (!mutt_yesorno (_("Can't match nametemplate, continue?"), 1))
+ if (mutt_yesorno (_("Can't match nametemplate, continue?"), M_YES) != M_YES)
goto bailout;
}
unlink_newfile = 1;
a->filename, newfile));
if (safe_symlink (a->filename, newfile) == -1)
{
- if (!mutt_yesorno (_("Can't match nametemplate, continue?"), 1))
+ if (mutt_yesorno (_("Can't match nametemplate, continue?"), M_YES) != M_YES)
goto bailout;
}
unlink_newfile = 1;
/* send case: the file is already there */
if (safe_symlink (a->filename, tempfile) == -1)
{
- if (mutt_yesorno (_("Can't match nametemplate, continue?"), 1) == M_YES)
+ if (mutt_yesorno (_("Can't match nametemplate, continue?"), M_YES) == M_YES)
strfcpy (tempfile, a->filename, sizeof (tempfile));
else
goto return_error;
{
if (safe_symlink(a->filename, newfile) == -1)
{
- if (mutt_yesorno (_("Can't match nametemplate, continue?"), 1) != M_YES)
+ if (mutt_yesorno (_("Can't match nametemplate, continue?"), M_YES) != M_YES)
{
rfc1524_free_entry (&entry);
return 0;
0, COLS-extra_space, 0, 0,
prompt, sizeof (prompt), 0);
strcat (prompt, "...?"); /* __STRCAT_CHECKED__ */
- if (mutt_yesorno (prompt, 1) != 1)
+ if (mutt_yesorno (prompt, M_YES) != M_YES)
{
rfc822_free_address (&adr);
CLEARLINE (LINES-1);
* to fit.
*/
answer_string = safe_malloc (COLS + 1);
- snprintf (answer_string, COLS + 1, " ([%s]/%s): ", def ? yes : no, def ? no : yes);
+ snprintf (answer_string, COLS + 1, " ([%s]/%s): ", def == M_YES ? yes : no, def == M_NO ? no : yes);
answer_string_len = strlen (answer_string);
printw ("%.*s%s", COLS - answer_string_len, msg, answer_string);
FREE (&answer_string);
#endif
(tolower (ch.ch) == 'y'))
{
- def = 1;
+ def = M_YES;
break;
}
else if (
#endif
(tolower (ch.ch) == 'n'))
{
- def = 0;
+ def = M_NO;
break;
}
else
regfree (& reno);
#endif
- if (def >= 0)
+ if (def != -1)
{
- addstr ((char *) (def ? yes : no));
+ addstr ((char *) (def == M_YES ? yes : no));
mutt_refresh ();
}
return (def);
curs_set (1);
if (Timeout)
timeout (-1); /* restore blocking operation */
- if (mutt_yesorno (_("Exit Mutt?"), 1) == 1)
+ if (mutt_yesorno (_("Exit Mutt?"), M_YES) == M_YES)
{
endwin ();
exit (1);
if (stat (fpath, &sb) == -1 && errno == ENOENT)
{
snprintf (msg, sizeof (msg), _("%s does not exist. Create it?"), Maildir);
- if (mutt_yesorno (msg, 1) == 1)
+ if (mutt_yesorno (msg, M_YES) == M_YES)
{
if (mkdir (fpath, 0700) == -1 && errno != EEXIST)
mutt_error ( _("Can't create %s: %s."), Maildir, strerror (errno));
return -1;
if (S_ISDIR (st.st_mode))
{
- if (mutt_yesorno (_("File is a directory, save under it?"), 1) != M_YES)
+ if (mutt_yesorno (_("File is a directory, save under it?"), M_YES) != M_YES)
return (-1);
if (!attname || !attname[0])
{
if (option (OPTCONFIRMAPPEND))
{
snprintf (tmp, sizeof (tmp), _("Append messages to %s?"), s);
- if (mutt_yesorno (tmp, 1) < 1)
+ if (mutt_yesorno (tmp, M_YES) != M_YES)
ret = 0;
}
}
if (option (OPTCONFIRMCREATE))
{
snprintf (tmp, sizeof (tmp), _("Create %s?"), s);
- if (mutt_yesorno (tmp, 1) < 1)
+ if (mutt_yesorno (tmp, M_YES) != M_YES)
ret = 0;
}
}
snprintf(msg, sizeof(msg), _("Lock count exceeded, remove lock for %s?"),
path);
- if(retry && mutt_yesorno(msg, 1) == 1)
+ if(retry && mutt_yesorno(msg, M_YES) == M_YES)
{
flags |= DL_FL_FORCE;
retry--;
snprintf (buff, sizeof (buff), _("%s Do you really want to use the key?"),
_(s));
- if (mutt_yesorno (buff, 0) != 1)
+ if (mutt_yesorno (buff, M_NO) != M_YES)
{
mutt_clear_error ();
break;
snprintf (prompt, sizeof (prompt),
cur ? _("Bounce message to %s...?") : _("Bounce messages to %s...?"), buf);
- if (mutt_yesorno (prompt, 1) != 1)
+ if (mutt_yesorno (prompt, M_YES) != M_YES)
goto bail;
if (cur)
}
if (mutt_get_field ("Subject: ", buf, sizeof (buf), 0) != 0 ||
- (!buf[0] && query_quadoption (OPT_SUBJECT, _("No subject, abort?")) != 0))
+ (!buf[0] && query_quadoption (OPT_SUBJECT, _("No subject, abort?")) != M_NO))
{
mutt_message _("No subject, aborting.");
return (-1);