Replace the packed array of booleans with separate `bool`s.
{
AliasTable[menu->current]->del = (op == OP_DELETE);
menu->redraw |= REDRAW_CURRENT;
- if (option(OPT_RESOLVE) && menu->current < menu->max - 1)
+ if (OPT_RESOLVE && menu->current < menu->max - 1)
{
menu->current++;
menu->redraw |= REDRAW_INDEX;
last->next = NULL;
}
- if (option(OPT_USE_DOMAIN) && (fqdn = mutt_fqdn(1)))
+ if (OPT_USE_DOMAIN && (fqdn = mutt_fqdn(1)))
{
/* now qualify all local addresses */
mutt_addr_qualify(head, fqdn);
_("---Command: %-30.30s Attachment: %s"), command, type);
}
- if ((mutt_wait_filter(thepid) || (entry->needsterminal && option(OPT_WAIT_KEY))) && !use_pager)
+ if ((mutt_wait_filter(thepid) || (entry->needsterminal && OPT_WAIT_KEY)) && !use_pager)
mutt_any_key_to_continue(NULL);
if (tempfd != -1)
if (rv == -1)
mutt_debug(1, "Error running \"%s\"!", command);
- if ((rv != 0) || (entry->needsterminal && option(OPT_WAIT_KEY)))
+ if ((rv != 0) || (entry->needsterminal && OPT_WAIT_KEY))
mutt_any_key_to_continue(NULL);
}
}
else
{
/* Use built-in handler */
- set_option(OPT_VIEW_ATTACH); /* disable the "use 'v' to view this part"
+ OPT_VIEW_ATTACH = true; /* disable the "use 'v' to view this part"
* message in case of error */
if (mutt_decode_save_attachment(fp, a, pagerfile, MUTT_DISPLAY, 0))
{
- unset_option(OPT_VIEW_ATTACH);
+ OPT_VIEW_ATTACH = false;
goto return_error;
}
- unset_option(OPT_VIEW_ATTACH);
+ OPT_VIEW_ATTACH = false;
}
if (a->description)
if (mutt_wait_filter(thepid) != 0)
rc = 0;
- if (rc == 0 || option(OPT_WAIT_KEY))
+ if (rc == 0 || OPT_WAIT_KEY)
mutt_any_key_to_continue(NULL);
return rc;
}
mutt_file_copy_stream(ifp, fpout);
mutt_file_fclose(&fpout);
mutt_file_fclose(&ifp);
- if (mutt_wait_filter(thepid) || option(OPT_WAIT_KEY))
+ if (mutt_wait_filter(thepid) || OPT_WAIT_KEY)
mutt_any_key_to_continue(NULL);
}
else
if (rc == -1)
mutt_debug(1, "Error running \"%s\"!", command);
- if ((rc != 0) || option(OPT_WAIT_KEY))
+ if ((rc != 0) || OPT_WAIT_KEY)
mutt_any_key_to_continue(NULL);
}
mutt_file_fclose(&fpout);
mutt_file_fclose(&ifp);
- if (mutt_wait_filter(thepid) != 0 || option(OPT_WAIT_KEY))
+ if (mutt_wait_filter(thepid) != 0 || OPT_WAIT_KEY)
mutt_any_key_to_continue(NULL);
rc = 1;
}
#ifdef USE_NNTP
case SORT_SIZE:
case SORT_DATE:
- if (option(OPT_NEWS))
+ if (OPT_NEWS)
return;
#endif
default:
snprintf(fmt, sizeof(fmt), "%%%sd", prec);
snprintf(buf, buflen, fmt, Context->new);
}
- else if (option(OPT_MARK_OLD) &&
- folder->ff->nd->last_cached >= folder->ff->nd->first_message &&
+ else if (OPT_MARK_OLD && folder->ff->nd->last_cached >= folder->ff->nd->first_message &&
folder->ff->nd->last_cached <= folder->ff->nd->last_message)
{
snprintf(fmt, sizeof(fmt), "%%%sd", prec);
(state->entry)[state->entrylen].imap = false;
#endif
#ifdef USE_NNTP
- if (option(OPT_NEWS))
+ if (OPT_NEWS)
(state->entry)[state->entrylen].nd = (struct NntpData *) data;
#endif
(state->entrylen)++;
char *d, const char *prefix)
{
#ifdef USE_NNTP
- if (option(OPT_NEWS))
+ if (OPT_NEWS)
{
struct NntpServer *nserv = CurrentNewsSrv;
char buffer[LONG_STRING];
#ifdef USE_NNTP
- if (option(OPT_NEWS))
+ if (OPT_NEWS)
{
struct NntpServer *nserv = CurrentNewsSrv;
for (unsigned int i = 0; i < nserv->groups_num; i++)
{
struct NntpData *nntp_data = nserv->groups_list[i];
- if (nntp_data &&
- (nntp_data->new || (nntp_data->subscribed &&
- (nntp_data->unread || !option(OPT_SHOW_ONLY_UNREAD)))))
+ if (nntp_data && (nntp_data->new || (nntp_data->subscribed &&
+ (nntp_data->unread || !OPT_SHOW_ONLY_UNREAD))))
add_folder(menu, state, nntp_data->group, NULL, NULL, NULL, nntp_data);
}
}
static int select_file_search(struct Menu *menu, regex_t *re, int n)
{
#ifdef USE_NNTP
- if (option(OPT_NEWS))
+ if (OPT_NEWS)
return (regexec(re, ((struct FolderFile *) menu->data)[n].desc, 0, NULL, 0));
#endif
return (regexec(re, ((struct FolderFile *) menu->data)[n].name, 0, NULL, 0));
folder.num = num;
#ifdef USE_NNTP
- if (option(OPT_NEWS))
+ if (OPT_NEWS)
mutt_expando_format(buf, buflen, 0, MuttIndexWindow->cols,
NONULL(GroupIndexFormat), group_index_format_str,
(unsigned long) &folder, MUTT_FORMAT_ARROWCURSOR);
menu->tagged = 0;
#ifdef USE_NNTP
- if (option(OPT_NEWS))
+ if (OPT_NEWS)
{
if (buffy)
snprintf(title, titlelen, _("Subscribed newsgroups"));
memset(&state, 0, sizeof(struct BrowserState));
#ifdef USE_NNTP
- if (option(OPT_NEWS))
+ if (OPT_NEWS)
{
if (*f)
mutt_str_strfcpy(prefix, f, sizeof(prefix));
menu->help = mutt_compile_help(helpstr, sizeof(helpstr), MENU_FOLDER,
#ifdef USE_NNTP
- option(OPT_NEWS) ? FolderNewsHelp :
+ OPT_NEWS ? FolderNewsHelp :
#endif
- FolderHelp);
+ FolderHelp);
mutt_push_current_menu(menu);
init_menu(&state, menu, title, sizeof(title), buffy);
}
}
- if (buffy || option(OPT_NEWS)) /* USE_NNTP */
+ if (buffy || OPT_NEWS) /* USE_NNTP */
{
mutt_str_strfcpy(f, state.entry[menu->current].name, flen);
mutt_expand_path(f, flen);
#ifdef USE_IMAP
case OP_BROWSER_TOGGLE_LSUB:
- if (option(OPT_IMAP_LIST_SUBSCRIBED))
- unset_option(OPT_IMAP_LIST_SUBSCRIBED);
+ if (OPT_IMAP_LIST_SUBSCRIBED)
+ OPT_IMAP_LIST_SUBSCRIBED = false;
else
- set_option(OPT_IMAP_LIST_SUBSCRIBED);
+ OPT_IMAP_LIST_SUBSCRIBED = true;
mutt_unget_event(0, OP_CHECK_NEW);
break;
case OP_CHANGE_DIRECTORY:
#ifdef USE_NNTP
- if (option(OPT_NEWS))
+ if (OPT_NEWS)
break;
#endif
#ifdef USE_NNTP
case OP_CATCHUP:
case OP_UNCATCHUP:
- if (option(OPT_NEWS))
+ if (OPT_NEWS)
{
struct FolderFile *ff = &state.entry[menu->current];
int rc;
break;
case OP_LOAD_ACTIVE:
- if (option(OPT_NEWS))
+ if (OPT_NEWS)
{
struct NntpServer *nserv = CurrentNewsSrv;
#ifdef USE_NNTP
case OP_SUBSCRIBE_PATTERN:
case OP_UNSUBSCRIBE_PATTERN:
- if (option(OPT_NEWS))
+ if (OPT_NEWS)
{
struct NntpServer *nserv = CurrentNewsSrv;
regex_t rx;
/* when $mail_check_recent is set, if the new/ directory hasn't been modified since
* the user last exited the mailbox, then we know there is no recent mail.
*/
- if (check_new && option(OPT_MAIL_CHECK_RECENT))
+ if (check_new && OPT_MAIL_CHECK_RECENT)
{
if (stat(path, &sb) == 0 && sb.st_mtime < mailbox->last_visited)
{
mailbox->msg_unread++;
if (check_new)
{
- if (option(OPT_MAIL_CHECK_RECENT))
+ if (OPT_MAIL_CHECK_RECENT)
{
snprintf(msgpath, sizeof(msgpath), "%s/%s", path, de->d_name);
/* ensure this message was received since leaving this mailbox */
rc = buffy_maildir_check_dir(mailbox, "new", check_new, check_stats);
- check_new = !rc && option(OPT_MAILDIR_CHECK_CUR);
+ check_new = !rc && OPT_MAILDIR_CHECK_CUR;
if (check_new || check_stats)
if (buffy_maildir_check_dir(mailbox, "cur", check_new, check_stats))
rc = 1;
int new_or_changed;
struct Context ctx;
- if (option(OPT_CHECK_MBOX_SIZE))
+ if (OPT_CHECK_MBOX_SIZE)
new_or_changed = sb->st_size > mailbox->size;
else
new_or_changed = sb->st_mtime > sb->st_atime ||
if (new_or_changed)
{
- if (!option(OPT_MAIL_CHECK_RECENT) || sb->st_mtime > mailbox->last_visited)
+ if (!OPT_MAIL_CHECK_RECENT || sb->st_mtime > mailbox->last_visited)
{
rc = 1;
mailbox->new = true;
}
}
- else if (option(OPT_CHECK_MBOX_SIZE))
+ else if (OPT_CHECK_MBOX_SIZE)
{
/* some other program has deleted mail from the folder */
mailbox->size = (off_t) sb->st_size;
#endif
}
}
- else if (option(OPT_CHECK_MBOX_SIZE) && Context && Context->path)
+ else if (OPT_CHECK_MBOX_SIZE && Context && Context->path)
tmp->size = (off_t) sb.st_size; /* update the size of current folder */
#ifdef USE_SIDEBAR
{
struct utimbuf ut;
- if (option(OPT_CHECK_MBOX_SIZE))
+ if (OPT_CHECK_MBOX_SIZE)
{
struct Buffy *b = mutt_find_mailbox(buf);
if (b && !b->new)
* reading it), the size is set to 0 so that later when we check we see
* that it increased. without check_mbox_size we probably don't care.
*/
- if (option(OPT_CHECK_MBOX_SIZE) && stat((*b)->path, &sb) == 0 &&
- !test_new_folder((*b)->path))
+ if (OPT_CHECK_MBOX_SIZE && stat((*b)->path, &sb) == 0 && !test_new_folder((*b)->path))
{
/* some systems out there don't have an off_t type */
(*b)->size = (off_t) sb.st_size;
if (!force && (t - BuffyTime < MailCheck))
return BuffyCount;
- if (option(OPT_MAIL_CHECK_STATS) && (t - BuffyStatsTime >= MailCheckStatsInterval))
+ if (OPT_MAIL_CHECK_STATS && (t - BuffyStatsTime >= MailCheckStatsInterval))
{
check_stats = true;
BuffyStatsTime = t;
{
s += 5;
*col = strtol(s, &eptr, 10);
- if (!*s || *eptr || *col < 0 ||
- (*col >= COLORS && !option(OPT_NO_CURSES) && has_colors()))
+ if (!*s || *eptr || *col < 0 || (*col >= COLORS && !OPT_NO_CURSES && has_colors()))
{
snprintf(err->data, err->dsize, _("%s: color not supported by term"), s);
return -1;
if (
#ifdef HAVE_COLOR
/* we're running without curses */
- option(OPT_NO_CURSES) || /* we're parsing an uncolor command, and have no colors */
+ OPT_NO_CURSES || /* we're parsing an uncolor command, and have no colors */
(parse_uncolor && !has_colors())
/* we're parsing an unmono command, and have colors */
|| (!parse_uncolor && has_colors())
else if (object == MT_COLOR_INDEX_TAG)
do_uncolor(buf, s, &ColorIndexTagList, &do_cache, parse_uncolor);
- if (do_cache && !option(OPT_NO_CURSES))
+ if (do_cache && !OPT_NO_CURSES)
{
mutt_set_menu_redraw_full(MENU_MAIN);
/* force re-caching of index colors */
#ifdef HAVE_COLOR
#ifdef HAVE_USE_DEFAULT_COLORS
- if (!option(OPT_NO_CURSES) && has_colors()
+ if (!OPT_NO_CURSES && has_colors()
/* delay use_default_colors() until needed, since it initializes things */
&& (fg == COLOR_DEFAULT || bg == COLOR_DEFAULT || object == MT_COLOR_TREE) &&
use_default_colors() != OK)
{
bool dry_run = false;
- if (option(OPT_NO_CURSES) || !has_colors())
+ if (OPT_NO_CURSES || !has_colors())
dry_run = true;
return parse_color(buf, s, err, parse_color_pair, dry_run);
bool dry_run = false;
#ifdef HAVE_COLOR
- if (option(OPT_NO_CURSES) || has_colors())
+ if (OPT_NO_CURSES || has_colors())
dry_run = true;
#else
- if (option(OPT_NO_CURSES))
+ if (OPT_NO_CURSES)
dry_run = true;
#endif
fputs("\n\n", fpout);
}
- chflags = (option(OPT_WEED) ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE | CH_FROM | CH_DISPLAY;
+ chflags = (OPT_WEED ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE | CH_FROM | CH_DISPLAY;
#ifdef USE_NOTMUCH
if (Context->magic == MUTT_NOTMUCH)
chflags |= CH_VIRTUAL;
if (r == -1)
mutt_error(_("Error running \"%s\"!"), buf);
unlink(tempfile);
- if (!option(OPT_NO_CURSES))
+ if (!OPT_NO_CURSES)
keypad(stdscr, true);
if (r != -1)
mutt_set_flag(Context, cur, MUTT_READ, 1);
- if (r != -1 && option(OPT_PROMPT_AFTER))
+ if (r != -1 && OPT_PROMPT_AFTER)
{
mutt_unget_event(mutt_any_key_to_continue(_("Command: ")), 0);
rc = km_dokey(MENU_PAGER);
*cmflags |= MUTT_CM_DECODE | MUTT_CM_CHARCONV;
*chflags |= CH_DECODE | CH_REORDER;
- if (option(OPT_WEED))
+ if (OPT_WEED)
{
*chflags |= CH_WEED;
*cmflags |= MUTT_CM_WEED;
return 1;
}
- set_option(OPT_KEEP_QUIET);
+ OPT_KEEP_QUIET = true;
pipe_msg(h, fpout, decode, print);
mutt_file_fclose(&fpout);
rc = mutt_wait_filter(thepid);
- unset_option(OPT_KEEP_QUIET);
+ OPT_KEEP_QUIET = false;
}
else
{
mutt_perror(_("Can't create filter process"));
return 1;
}
- set_option(OPT_KEEP_QUIET);
+ OPT_KEEP_QUIET = true;
pipe_msg(Context->hdrs[i], fpout, decode, print);
/* add the message separator */
if (sep)
mutt_file_fclose(&fpout);
if (mutt_wait_filter(thepid) != 0)
rc = 1;
- unset_option(OPT_KEEP_QUIET);
+ OPT_KEEP_QUIET = false;
}
}
else
mutt_perror(_("Can't create filter process"));
return 1;
}
- set_option(OPT_KEEP_QUIET);
+ OPT_KEEP_QUIET = true;
for (int i = 0; i < Context->msgcount; i++)
{
if (!message_is_tagged(Context, i))
mutt_file_fclose(&fpout);
if (mutt_wait_filter(thepid) != 0)
rc = 1;
- unset_option(OPT_KEEP_QUIET);
+ OPT_KEEP_QUIET = false;
}
}
- if (rc || option(OPT_WAIT_KEY))
+ if (rc || OPT_WAIT_KEY)
mutt_any_key_to_continue(NULL);
return rc;
}
}
mutt_expand_path(buffer, sizeof(buffer));
- pipe_message(h, buffer, option(OPT_PIPE_DECODE), 0, option(OPT_PIPE_SPLIT), PipeSep);
+ pipe_message(h, buffer, OPT_PIPE_DECODE, 0, OPT_PIPE_SPLIT, PipeSep);
}
void mutt_print_message(struct Header *h)
{
- if (quadoption(OPT_PRINT) && (!PrintCommand || !*PrintCommand))
+ if (OPT_PRINT && (!PrintCommand || !*PrintCommand))
{
mutt_message(_("No printing command has been defined."));
return;
h ? _("Print message?") : _("Print tagged messages?")) != MUTT_YES)
return;
- if (pipe_message(h, PrintCommand, option(OPT_PRINT_DECODE), 1,
- option(OPT_PRINT_SPLIT), "\f") == 0)
+ if (pipe_message(h, PrintCommand, OPT_PRINT_DECODE, 1, OPT_PRINT_SPLIT, "\f") == 0)
mutt_message(h ? _("Message printed") : _("Messages printed"));
else
mutt_message(h ? _("Message could not be printed") :
if (rc == -1)
mutt_debug(1, "Error running \"%s\"!", buf);
- if ((rc != 0) || option(OPT_WAIT_KEY))
+ if ((rc != 0) || OPT_WAIT_KEY)
mutt_any_key_to_continue(NULL);
mutt_buffy_check(true);
}
{
*chflags |= CH_DECODE; /* then decode RFC2047 headers, */
- if (option(OPT_WEED))
+ if (OPT_WEED)
{
*chflags |= CH_WEED; /* and respect $weed. */
*cmflags |= MUTT_CM_WEED;
{
mutt_set_flag(Context, h, MUTT_DELETE, 1);
mutt_set_flag(Context, h, MUTT_PURGE, 1);
- if (option(OPT_DELETE_UNTAG))
+ if (OPT_DELETE_UNTAG)
mutt_set_flag(Context, h, MUTT_TAG, 0);
}
mutt_debug(2, "completing %s\n", s);
#ifdef USE_NNTP
- if (option(OPT_NEWS))
+ if (OPT_NEWS)
{
struct NntpServer *nserv = CurrentNewsSrv;
unsigned int n = 0;
addstr(_(" (S/MIME)"));
}
- if (option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT) && (msg->security & OPPENCRYPT))
+ if (OPT_CRYPT_OPPORTUNISTIC_ENCRYPT && (msg->security & OPPENCRYPT))
addstr(_(" (OppEnc mode)"));
mutt_window_clrtoeol(MuttIndexWindow);
{
draw_envelope_addr(HDR_FROM, msg->env->from);
#ifdef USE_NNTP
- if (!option(OPT_NEWS_SEND))
+ if (!OPT_NEWS_SEND)
{
#endif
draw_envelope_addr(HDR_TO, msg->env->to);
mutt_window_mvprintw(MuttIndexWindow, HDR_CC, 0, "%*s",
HeaderPadding[HDR_FOLLOWUPTO], Prompts[HDR_FOLLOWUPTO]);
mutt_paddstr(W, NONULL(msg->env->followup_to));
- if (option(OPT_X_COMMENT_TO))
+ if (OPT_X_COMMENT_TO)
{
mutt_window_mvprintw(MuttIndexWindow, HDR_BCC, 0, "%*s",
HeaderPadding[HDR_XCOMMENTTO], Prompts[HDR_XCOMMENTTO]);
#ifdef USE_NNTP
int news = 0; /* is it a news article ? */
- if (option(OPT_NEWS_SEND))
+ if (OPT_NEWS_SEND)
news++;
#endif
while (loop)
{
#ifdef USE_NNTP
- unset_option(OPT_NEWS); /* for any case */
+ OPT_NEWS = false; /* for any case */
#endif
switch (op = mutt_menu_loop(menu))
{
break;
#endif
edit_address_list(HDR_TO, &msg->env->to);
- if (option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT))
+ if (OPT_CRYPT_OPPORTUNISTIC_ENCRYPT)
{
crypt_opportunistic_encrypt(msg);
redraw_crypt_lines(msg);
break;
#endif
edit_address_list(HDR_BCC, &msg->env->bcc);
- if (option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT))
+ if (OPT_CRYPT_OPPORTUNISTIC_ENCRYPT)
{
crypt_opportunistic_encrypt(msg);
redraw_crypt_lines(msg);
break;
#endif
edit_address_list(HDR_CC, &msg->env->cc);
- if (option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT))
+ if (OPT_CRYPT_OPPORTUNISTIC_ENCRYPT)
{
crypt_opportunistic_encrypt(msg);
redraw_crypt_lines(msg);
}
break;
case OP_COMPOSE_EDIT_X_COMMENT_TO:
- if (news && option(OPT_X_COMMENT_TO))
+ if (news && OPT_X_COMMENT_TO)
{
if (msg->env->x_comment_to)
mutt_str_strfcpy(buf, msg->env->x_comment_to, sizeof(buf));
mutt_message_hook(NULL, msg, MUTT_SEND2HOOK);
break;
case OP_COMPOSE_EDIT_MESSAGE:
- if (Editor && (mutt_str_strcmp("builtin", Editor) != 0) && !option(OPT_EDIT_HEADERS))
+ if (Editor && (mutt_str_strcmp("builtin", Editor) != 0) && !OPT_EDIT_HEADERS)
{
mutt_edit_file(Editor, msg->content->filename);
mutt_update_encoding(msg->content);
/* fallthrough */
case OP_COMPOSE_EDIT_HEADERS:
if ((mutt_str_strcmp("builtin", Editor) != 0) &&
- (op == OP_COMPOSE_EDIT_HEADERS ||
- (op == OP_COMPOSE_EDIT_MESSAGE && option(OPT_EDIT_HEADERS))))
+ (op == OP_COMPOSE_EDIT_HEADERS || (op == OP_COMPOSE_EDIT_MESSAGE && OPT_EDIT_HEADERS)))
{
char *tag = NULL, *err = NULL;
mutt_env_to_local(msg->env);
mutt_error(_("Bad IDN in \"%s\": '%s'"), tag, err);
FREE(&err);
}
- if (option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT))
+ if (OPT_CRYPT_OPPORTUNISTIC_ENCRYPT)
crypt_opportunistic_encrypt(msg);
}
else
prompt = _("Open mailbox to attach message from");
#ifdef USE_NNTP
- unset_option(OPT_NEWS);
+ OPT_NEWS = false;
if (op == OP_COMPOSE_ATTACH_NEWS_MESSAGE)
{
CurrentNewsSrv = nntp_select_server(NewsServer, false);
break;
prompt = _("Open newsgroup to attach message from");
- set_option(OPT_NEWS);
+ OPT_NEWS = true;
}
#endif
break;
#ifdef USE_NNTP
- if (option(OPT_NEWS))
+ if (OPT_NEWS)
nntp_expand_path(fname, sizeof(fname), &CurrentNewsSrv->conn->account);
else
#endif
if (!mx_is_pop(fname))
#endif
#ifdef USE_NNTP
- if (!mx_is_nntp(fname) && !option(OPT_NEWS))
+ if (!mx_is_nntp(fname) && !OPT_NEWS)
#endif
/* check to make sure the file exists and is readable */
if (access(fname, R_OK) == -1)
old_sort_aux = SortAux;
Context = ctx;
- set_option(OPT_ATTACH_MSG);
+ OPT_ATTACH_MSG = true;
mutt_message(_("Tag the messages you want to attach!"));
close = mutt_index_menu();
- unset_option(OPT_ATTACH_MSG);
+ OPT_ATTACH_MSG = false;
if (!Context)
{
if (!ctx->append)
{
/* If the file was removed, remove the compressed folder too */
- if ((access(ctx->path, F_OK) != 0) && !option(OPT_SAVE_EMPTY))
+ if ((access(ctx->path, F_OK) != 0) && !OPT_SAVE_EMPTY)
{
remove(ctx->realpath);
}
snprintf(prompt, sizeof(prompt), "%s: ", interaction->prompt);
resp[0] = '\0';
- if (option(OPT_NO_CURSES) || mutt_get_field(prompt, resp, sizeof(resp), 0))
+ if (OPT_NO_CURSES || mutt_get_field(prompt, resp, sizeof(resp), 0))
return SASL_FAIL;
interaction->len = mutt_str_strlen(resp) + 1;
/* we accept v4 or v6 STREAM sockets */
memset(&hints, 0, sizeof(hints));
- if (option(OPT_USE_IPV6))
+ if (OPT_USE_IPV6)
hints.ai_family = AF_UNSPEC;
else
hints.ai_family = AF_INET;
host_idna = conn->account.host;
#endif
- if (!option(OPT_NO_CURSES))
+ if (!OPT_NO_CURSES)
mutt_message(_("Looking up %s..."), conn->account.host);
rc = getaddrinfo(host_idna, port, &hints, &res);
return -1;
}
- if (!option(OPT_NO_CURSES))
+ if (!OPT_NO_CURSES)
mutt_message(_("Connecting to %s..."), conn->account.host);
rc = -1;
host_idna = conn->account.host;
#endif
- if (!option(OPT_NO_CURSES))
+ if (!OPT_NO_CURSES)
mutt_message(_("Looking up %s..."), conn->account.host);
he = gethostbyname(host_idna);
return -1;
}
- if (!option(OPT_NO_CURSES))
+ if (!OPT_NO_CURSES)
mutt_message(_("Connecting to %s..."), conn->account.host);
rc = -1;
#ifdef HAVE_SSL_PARTIAL_CHAIN
X509_VERIFY_PARAM *param = NULL;
- if (option(OPT_SSL_VERIFY_PARTIAL_CHAINS))
+ if (OPT_SSL_VERIFY_PARTIAL_CHAINS)
{
param = X509_VERIFY_PARAM_new();
if (param)
*/
static bool check_certificate_expiration(X509 *peercert, bool silent)
{
- if (option(OPT_SSL_VERIFY_DATES) != MUTT_NO)
+ if (OPT_SSL_VERIFY_DATES != MUTT_NO)
{
if (X509_cmp_current_time(X509_get_notBefore(peercert)) >= 0)
{
/* The leaf/host certificate can't be skipped. */
#ifdef HAVE_SSL_PARTIAL_CHAIN
- if ((idx != 0) && (option(OPT_SSL_VERIFY_PARTIAL_CHAINS)))
+ if ((idx != 0) && OPT_SSL_VERIFY_PARTIAL_CHAINS)
ALLOW_SKIP = 1;
#endif
menu->help = helpstr;
done = 0;
- set_option(OPT_IGNORE_MACRO_EVENTS);
+ OPT_IGNORE_MACRO_EVENTS = true;
while (!done)
{
switch (mutt_menu_loop(menu))
break;
}
}
- unset_option(OPT_IGNORE_MACRO_EVENTS);
+ OPT_IGNORE_MACRO_EVENTS = false;
mutt_pop_current_menu(menu);
mutt_menu_destroy(&menu);
mutt_debug(2, "done=%d\n", done);
* a second time with preverify_ok = 1. Don't show it or the user
* will think their "s" key is broken.
*/
- if (option(OPT_SSL_VERIFY_PARTIAL_CHAINS))
+ if (OPT_SSL_VERIFY_PARTIAL_CHAINS)
{
if (skip_mode && preverify_ok && (pos == last_pos) && last_cert)
{
/* check hostname only for the leaf certificate */
buf[0] = 0;
- if (pos == 0 && option(OPT_SSL_VERIFY_HOST) != MUTT_NO)
+ if (pos == 0 && OPT_SSL_VERIFY_HOST != MUTT_NO)
{
if (!check_host(cert, host, buf, sizeof(buf)))
{
}
/* disable SSL protocols as needed */
- if (!option(OPT_SSL_USE_TLSV1))
+ if (!OPT_SSL_USE_TLSV1)
{
SSL_CTX_set_options(data->ctx, SSL_OP_NO_TLSv1);
}
* as Fedora 17 are on OpenSSL 1.0.0.
*/
#ifdef SSL_OP_NO_TLSv1_1
- if (!option(OPT_SSL_USE_TLSV1_1))
+ if (!OPT_SSL_USE_TLSV1_1)
{
SSL_CTX_set_options(data->ctx, SSL_OP_NO_TLSv1_1);
}
#endif
#ifdef SSL_OP_NO_TLSv1_2
- if (!option(OPT_SSL_USE_TLSV1_2))
+ if (!OPT_SSL_USE_TLSV1_2)
{
SSL_CTX_set_options(data->ctx, SSL_OP_NO_TLSv1_2);
}
#endif
- if (!option(OPT_SSL_USE_SSLV2))
+ if (!OPT_SSL_USE_SSLV2)
{
SSL_CTX_set_options(data->ctx, SSL_OP_NO_SSLv2);
}
- if (!option(OPT_SSL_USE_SSLV3))
+ if (!OPT_SSL_USE_SSLV3)
{
SSL_CTX_set_options(data->ctx, SSL_OP_NO_SSLv3);
}
- if (option(OPT_SSL_USESYSTEMCERTS))
+ if (OPT_SSL_USESYSTEMCERTS)
{
if (!SSL_CTX_set_default_verify_paths(data->ctx))
{
goto bail_ssldata;
}
#ifdef SSL_OP_NO_TLSv1_2
- if (!option(OPT_SSL_USE_TLSV1_2))
+ if (!OPT_SSL_USE_TLSV1_2)
ssl_options |= SSL_OP_NO_TLSv1_2;
#endif
#ifdef SSL_OP_NO_TLSv1_1
- if (!option(OPT_SSL_USE_TLSV1_1))
+ if (!OPT_SSL_USE_TLSV1_1)
ssl_options |= SSL_OP_NO_TLSv1_1;
#endif
#ifdef SSL_OP_NO_TLSv1
- if (!option(OPT_SSL_USE_TLSV1))
+ if (!OPT_SSL_USE_TLSV1)
ssl_options |= SSL_OP_NO_TLSv1;
#endif
/* these are always set */
goto bail_ctx;
}
- if (option(OPT_SSL_USESYSTEMCERTS))
+ if (OPT_SSL_USESYSTEMCERTS)
{
if (!SSL_CTX_set_default_verify_paths(ssldata->ctx))
{
return -1;
}
- if (option(OPT_SSL_VERIFY_DATES) != MUTT_NO)
+ if (OPT_SSL_VERIFY_DATES != MUTT_NO)
{
if (gnutls_x509_crt_get_expiration_time(cert) < time(NULL))
*certerr |= CERTERR_EXPIRED;
*certerr |= CERTERR_NOTYETVALID;
}
- if (chainidx == 0 && option(OPT_SSL_VERIFY_HOST) != MUTT_NO &&
+ if (chainidx == 0 && OPT_SSL_VERIFY_HOST != MUTT_NO &&
!gnutls_x509_crt_check_hostname(cert, hostname) &&
!tls_check_stored_hostname(certdata, hostname))
*certerr |= CERTERR_HOSTNAME;
menu->help = helpstr;
done = 0;
- set_option(OPT_IGNORE_MACRO_EVENTS);
+ OPT_IGNORE_MACRO_EVENTS = true;
while (!done)
{
switch (mutt_menu_loop(menu))
break;
}
}
- unset_option(OPT_IGNORE_MACRO_EVENTS);
+ OPT_IGNORE_MACRO_EVENTS = false;
mutt_pop_current_menu(menu);
mutt_menu_destroy(&menu);
gnutls_x509_crt_deinit(cert);
else
mutt_str_strcat(priority, priority_size, "NORMAL");
- if (!option(OPT_SSL_USE_TLSV1_2))
+ if (!OPT_SSL_USE_TLSV1_2)
{
nproto--;
mutt_str_strcat(priority, priority_size, ":-VERS-TLS1.2");
}
- if (!option(OPT_SSL_USE_TLSV1_1))
+ if (!OPT_SSL_USE_TLSV1_1)
{
nproto--;
mutt_str_strcat(priority, priority_size, ":-VERS-TLS1.1");
}
- if (!option(OPT_SSL_USE_TLSV1))
+ if (!OPT_SSL_USE_TLSV1)
{
nproto--;
mutt_str_strcat(priority, priority_size, ":-VERS-TLS1.0");
}
- if (!option(OPT_SSL_USE_SSLV3))
+ if (!OPT_SSL_USE_SSLV3)
{
nproto--;
mutt_str_strcat(priority, priority_size, ":-VERS-SSL3.0");
{
size_t nproto = 0; /* number of tls/ssl protocols */
- if (option(OPT_SSL_USE_TLSV1_2))
+ if (OPT_SSL_USE_TLSV1_2)
protocol_priority[nproto++] = GNUTLS_TLS1_2;
- if (option(OPT_SSL_USE_TLSV1_1))
+ if (OPT_SSL_USE_TLSV1_1)
protocol_priority[nproto++] = GNUTLS_TLS1_1;
- if (option(OPT_SSL_USE_TLSV1))
+ if (OPT_SSL_USE_TLSV1)
protocol_priority[nproto++] = GNUTLS_TLS1;
- if (option(OPT_SSL_USE_SSLV3))
+ if (OPT_SSL_USE_SSLV3)
protocol_priority[nproto++] = GNUTLS_SSL3;
protocol_priority[nproto] = 0;
tls_get_client_cert(conn);
- if (!option(OPT_NO_CURSES))
+ if (!OPT_NO_CURSES)
{
mutt_message(_("SSL/TLS connection using %s (%s/%s/%s)"),
gnutls_protocol_get_name(gnutls_protocol_get_version(data->state)),
{
/* Add some fake headers based on notmuch data */
char *folder = nm_header_get_folder(h);
- if (folder && !(option(OPT_WEED) && mutt_matches_ignore("folder")))
+ if (folder && !(OPT_WEED && mutt_matches_ignore("folder")))
{
char buf[LONG_STRING];
mutt_str_strfcpy(buf, folder, sizeof(buf));
}
#endif
char *tags = driver_tags_get(&h->tags);
- if (tags && !(option(OPT_WEED) && mutt_matches_ignore("tags")))
+ if (tags && !(OPT_WEED && mutt_matches_ignore("tags")))
{
fputs("Tags: ", out);
fputs(tags, out);
if (flags & MUTT_CM_PREFIX)
{
- if (option(OPT_TEXT_FLOWED))
+ if (OPT_TEXT_FLOWED)
mutt_str_strfcpy(prefix, ">", sizeof(prefix));
else
mutt_make_string_flags(prefix, sizeof(prefix), NONULL(IndentString), Context, hdr, 0);
void mutt_refresh(void)
{
/* don't refresh when we are waiting for a child. */
- if (option(OPT_KEEP_QUIET))
+ if (OPT_KEEP_QUIET)
return;
/* don't refresh in the middle of macros unless necessary */
- if (MacroBufferCount && !option(OPT_FORCE_REFRESH) && !option(OPT_IGNORE_MACRO_EVENTS))
+ if (MacroBufferCount && !OPT_FORCE_REFRESH && !OPT_IGNORE_MACRO_EVENTS)
return;
/* else */
if (UngetCount)
return UngetKeyEvents[--UngetCount];
- if (!option(OPT_IGNORE_MACRO_EVENTS) && MacroBufferCount)
+ if (!OPT_IGNORE_MACRO_EVENTS && MacroBufferCount)
return MacroEvents[--MacroBufferCount];
SigInt = 0;
return timeout;
}
- if ((ch & 0x80) && option(OPT_META_KEY))
+ if ((ch & 0x80) && OPT_META_KEY)
{
/* send ALT-x as ESC-x */
ch &= ~0x80;
{
int rc;
- set_option(OPT_IGNORE_MACRO_EVENTS);
+ OPT_IGNORE_MACRO_EVENTS = true;
rc = mutt_get_field(msg, buf, buflen, flags);
- unset_option(OPT_IGNORE_MACRO_EVENTS);
+ OPT_IGNORE_MACRO_EVENTS = false;
return rc;
}
void mutt_clear_error(void)
{
ErrorBuf[0] = 0;
- if (!option(OPT_NO_CURSES))
+ if (!OPT_NO_CURSES)
mutt_window_clearline(MuttMessageWindow, 0);
}
mutt_simple_format(ErrorBuf, sizeof(ErrorBuf), 0, MuttMessageWindow->cols,
FMT_LEFT, 0, scratch, sizeof(scratch), 0);
- if (!option(OPT_KEEP_QUIET))
+ if (!OPT_KEEP_QUIET)
{
if (error)
BEEP();
}
if (error)
- set_option(OPT_MSG_ERR);
+ OPT_MSG_ERR = true;
else
- unset_option(OPT_MSG_ERR);
+ OPT_MSG_ERR = false;
}
void mutt_curses_error(const char *fmt, ...)
if (!progress)
return;
- if (option(OPT_NO_CURSES))
+ if (OPT_NO_CURSES)
return;
memset(progress, 0, sizeof(struct Progress));
struct timeval tv = { 0, 0 };
unsigned int now = 0;
- if (option(OPT_NO_CURSES))
+ if (OPT_NO_CURSES)
return;
if (!progress->inc)
void mutt_reflow_windows(void)
{
- if (option(OPT_NO_CURSES))
+ if (OPT_NO_CURSES)
return;
mutt_debug(2, "entering\n");
MuttStatusWindow->rows = 1;
MuttStatusWindow->cols = COLS;
- MuttStatusWindow->row_offset = option(OPT_STATUS_ON_TOP) ? 0 : LINES - 2;
+ MuttStatusWindow->row_offset = OPT_STATUS_ON_TOP ? 0 : LINES - 2;
MuttStatusWindow->col_offset = 0;
memcpy(MuttHelpWindow, MuttStatusWindow, sizeof(struct MuttWindow));
- if (!option(OPT_HELP))
+ if (!OPT_HELP)
MuttHelpWindow->rows = 0;
else
- MuttHelpWindow->row_offset = option(OPT_STATUS_ON_TOP) ? LINES - 2 : 0;
+ MuttHelpWindow->row_offset = OPT_STATUS_ON_TOP ? LINES - 2 : 0;
memcpy(MuttMessageWindow, MuttStatusWindow, sizeof(struct MuttWindow));
MuttMessageWindow->row_offset = LINES - 1;
MuttIndexWindow->rows = MAX(
LINES - MuttStatusWindow->rows - MuttHelpWindow->rows - MuttMessageWindow->rows, 0);
MuttIndexWindow->row_offset =
- option(OPT_STATUS_ON_TOP) ? MuttStatusWindow->rows : MuttHelpWindow->rows;
+ OPT_STATUS_ON_TOP ? MuttStatusWindow->rows : MuttHelpWindow->rows;
#ifdef USE_SIDEBAR
- if (option(OPT_SIDEBAR_VISIBLE))
+ if (OPT_SIDEBAR_VISIBLE)
{
memcpy(MuttSidebarWindow, MuttIndexWindow, sizeof(struct MuttWindow));
MuttSidebarWindow->cols = SidebarWidth;
MuttIndexWindow->cols -= SidebarWidth;
- if (option(OPT_SIDEBAR_ON_RIGHT))
+ if (OPT_SIDEBAR_ON_RIGHT)
{
MuttSidebarWindow->col_offset = COLS - SidebarWidth;
}
MuttMessageWindow->rows = mw_rows;
MuttMessageWindow->row_offset = LINES - mw_rows;
- MuttStatusWindow->row_offset = option(OPT_STATUS_ON_TOP) ? 0 : LINES - mw_rows - 1;
+ MuttStatusWindow->row_offset = OPT_STATUS_ON_TOP ? 0 : LINES - mw_rows - 1;
- if (option(OPT_HELP))
- MuttHelpWindow->row_offset = option(OPT_STATUS_ON_TOP) ? LINES - mw_rows - 1 : 0;
+ if (OPT_HELP)
+ MuttHelpWindow->row_offset = OPT_STATUS_ON_TOP ? LINES - mw_rows - 1 : 0;
MuttIndexWindow->rows = MAX(
LINES - MuttStatusWindow->rows - MuttHelpWindow->rows - MuttMessageWindow->rows, 0);
#ifdef USE_SIDEBAR
- if (option(OPT_SIDEBAR_VISIBLE))
+ if (OPT_SIDEBAR_VISIBLE)
MuttSidebarWindow->rows = MuttIndexWindow->rows;
#endif
void mutt_show_error(void)
{
- if (option(OPT_KEEP_QUIET))
+ if (OPT_KEEP_QUIET)
return;
- SETCOLOR(option(OPT_MSG_ERR) ? MT_COLOR_ERROR : MT_COLOR_MESSAGE);
+ SETCOLOR(OPT_MSG_ERR ? MT_COLOR_ERROR : MT_COLOR_MESSAGE);
mutt_window_mvaddstr(MuttMessageWindow, 0, 0, ErrorBuf);
NORMAL_COLOR;
mutt_window_clrtoeol(MuttMessageWindow);
{
int e = errno;
- if (!option(OPT_NO_CURSES))
+ if (!OPT_NO_CURSES)
{
/* at least in some situations (screen + xterm under SuSE11/12) endwin()
* doesn't properly flush the screen without an explicit call.
}
#define CHECK_ATTACH \
- if (option(OPT_ATTACH_MSG)) \
+ if (OPT_ATTACH_MSG) \
{ \
mutt_flushinp(); \
mutt_error(_(Function_not_permitted_in_attach_message_mode)); \
#define FLAGGED(h) mutt_thread_contains_flagged(Context, h)
#define CAN_COLLAPSE(header) \
- ((option(OPT_COLLAPSE_UNREAD) || !UNREAD(header)) && \
- (option(OPT_COLLAPSE_FLAGGED) || !FLAGGED(header)))
+ ((OPT_COLLAPSE_UNREAD || !UNREAD(header)) && (OPT_COLLAPSE_FLAGGED || !FLAGGED(header)))
/* de facto standard escapes for tsl/fsl */
static char *tsl = "\033]0;";
}
/* save the list of new messages */
- if (option(OPT_UNCOLLAPSE_NEW) && oldcount && check != MUTT_REOPENED &&
+ if (OPT_UNCOLLAPSE_NEW && oldcount && check != MUTT_REOPENED &&
((Sort & SORT_MASK) == SORT_THREADS))
{
save_new = mutt_mem_malloc(sizeof(struct Header *) * (ctx->msgcount - oldcount));
mutt_sort_headers(ctx, (check == MUTT_REOPENED));
/* uncollapse threads with new mail */
- if (option(OPT_UNCOLLAPSE_NEW) && ((Sort & SORT_MASK) == SORT_THREADS))
+ if (OPT_UNCOLLAPSE_NEW && ((Sort & SORT_MASK) == SORT_THREADS))
{
if (check == MUTT_REOPENED)
{
size_t bufsz, int *oldcount, int *index_hint)
{
#ifdef USE_NNTP
- if (option(OPT_NEWS))
+ if (OPT_NEWS)
{
- unset_option(OPT_NEWS);
+ OPT_NEWS = false;
nntp_expand_path(buf, bufsz, &CurrentNewsSrv->conn->account);
}
else
update_index(menu, Context, check, *oldcount, *index_hint);
FREE(&new_last_folder);
- set_option(OPT_SEARCH_INVALID);
+ OPT_SEARCH_INVALID = true;
menu->redraw |= REDRAW_INDEX | REDRAW_STATUS;
return 0;
}
* switch statement would need to be run. */
mutt_folder_hook(buf);
- Context = mx_open_mailbox(
- buf, (option(OPT_READ_ONLY) || (op == OP_MAIN_CHANGE_FOLDER_READONLY)) ? MUTT_READONLY : 0,
- NULL);
+ Context = mx_open_mailbox(buf, (OPT_READ_ONLY || (op == OP_MAIN_CHANGE_FOLDER_READONLY)) ? MUTT_READONLY : 0, NULL);
if (Context)
{
menu->current = ci_first_message();
else
menu->current = 0;
- if (((Sort & SORT_MASK) == SORT_THREADS) && option(OPT_COLLAPSE_ALL))
+ if (((Sort & SORT_MASK) == SORT_THREADS) && OPT_COLLAPSE_ALL)
collapse_all(menu, 0);
#ifdef USE_SIDEBAR
mutt_clear_error();
mutt_buffy_check(true); /* force the buffy check after we have changed the folder */
menu->redraw = REDRAW_FULL;
- set_option(OPT_SEARCH_INVALID);
+ OPT_SEARCH_INVALID = true;
return 0;
}
mutt_draw_statusline(MuttStatusWindow->cols, buf, sizeof(buf));
NORMAL_COLOR;
menu->redraw &= ~REDRAW_STATUS;
- if (option(OPT_TS_ENABLED) && TSSupported)
+ if (OPT_TS_ENABLED && TSSupported)
{
menu_status_line(buf, sizeof(buf), menu, NONULL(TSStatusFormat));
mutt_ts_status(buf);
int index_hint; /* used to restore cursor position */
bool do_buffy_notify = true;
int close = 0; /* did we OP_QUIT or OP_EXIT out of this menu? */
- int attach_msg = option(OPT_ATTACH_MSG);
+ int attach_msg = OPT_ATTACH_MSG;
menu = mutt_new_menu(MENU_MAIN);
menu->make_entry = index_make_entry;
if (!attach_msg)
mutt_buffy_check(true); /* force the buffy check after we enter the folder */
- if (((Sort & SORT_MASK) == SORT_THREADS) && option(OPT_COLLAPSE_ALL))
+ if (((Sort & SORT_MASK) == SORT_THREADS) && OPT_COLLAPSE_ALL)
{
collapse_all(menu, 0);
menu->redraw = REDRAW_FULL;
* any 'op' below could do mutt_enter_command(), either here or
* from any new menu launched, and change $sort/$sort_aux
*/
- if (option(OPT_NEED_RESORT) && Context && Context->msgcount && menu->current >= 0)
+ if (OPT_NEED_RESORT && Context && Context->msgcount && menu->current >= 0)
resort_index(menu);
menu->max = Context ? Context->vcount : 0;
oldcount = Context ? Context->msgcount : 0;
- if (option(OPT_REDRAW_TREE) && Context && Context->msgcount && (Sort & SORT_MASK) == SORT_THREADS)
+ if (OPT_REDRAW_TREE && Context && Context->msgcount && (Sort & SORT_MASK) == SORT_THREADS)
{
mutt_draw_tree(Context);
menu->redraw |= REDRAW_STATUS;
- unset_option(OPT_REDRAW_TREE);
+ OPT_REDRAW_TREE = false;
}
if (Context)
menu->redraw = REDRAW_FULL;
}
- set_option(OPT_SEARCH_INVALID);
+ OPT_SEARCH_INVALID = true;
}
else if (check == MUTT_NEW_MAIL || check == MUTT_REOPENED || check == MUTT_FLAGS)
{
if (!Context->hdrs[i]->read)
{
mutt_message(_("New mail in this mailbox."));
- if (option(OPT_BEEP_NEW))
+ if (OPT_BEEP_NEW)
beep();
if (NewMailCommand)
{
menu->redraw = REDRAW_FULL;
menu->max = Context->vcount;
- set_option(OPT_SEARCH_INVALID);
+ OPT_SEARCH_INVALID = true;
}
}
if (mutt_buffy_notify())
{
menu->redraw |= REDRAW_STATUS;
- if (option(OPT_BEEP_NEW))
+ if (OPT_BEEP_NEW)
beep();
if (NewMailCommand)
{
else
menu->oldcurrent = -1;
- if (option(OPT_ARROW_CURSOR))
+ if (OPT_ARROW_CURSOR)
mutt_window_move(MuttIndexWindow, menu->current - menu->top + menu->offset, 2);
- else if (option(OPT_BRAILLE_FRIENDLY))
+ else if (OPT_BRAILLE_FRIENDLY)
mutt_window_move(MuttIndexWindow, menu->current - menu->top + menu->offset, 0);
else
mutt_window_move(MuttIndexWindow, menu->current - menu->top + menu->offset,
tag = true;
continue;
}
- else if (option(OPT_AUTO_TAG) && Context && Context->tagged)
+ else if (OPT_AUTO_TAG && Context && Context->tagged)
tag = true;
mutt_clear_error();
}
#ifdef USE_NNTP
- unset_option(OPT_NEWS); /* for any case */
+ OPT_NEWS = false; /* for any case */
#endif
#ifdef USE_NOTMUCH
{
snprintf(buf2, sizeof(buf2), "!~R!~D~s%s",
Context->pattern ? Context->pattern : ".*");
- set_option(OPT_HIDE_READ);
+ OPT_HIDE_READ = true;
}
else
{
mutt_str_strfcpy(buf2, Context->pattern + 8, sizeof(buf2));
if (!*buf2 || (strncmp(buf2, ".*", 2) == 0))
snprintf(buf2, sizeof(buf2), "~A");
- unset_option(OPT_HIDE_READ);
+ OPT_HIDE_READ = false;
}
FREE(&Context->pattern);
Context->pattern = mutt_str_strdup(buf2);
update_index(menu, Context, check, oldcount, index_hint);
menu->redraw = REDRAW_FULL; /* new mail arrived? */
- set_option(OPT_SEARCH_INVALID);
+ OPT_SEARCH_INVALID = true;
}
}
break;
if (Context && Context->msgcount)
{
resort_index(menu);
- set_option(OPT_SEARCH_INVALID);
+ OPT_SEARCH_INVALID = true;
}
if (menu->menu == MENU_PAGER)
{
CHECK_MSGCOUNT;
CHECK_VISIBLE;
- if (tag && !option(OPT_AUTO_TAG))
+ if (tag && !OPT_AUTO_TAG)
{
for (j = 0; j < Context->msgcount; j++)
if (message_is_visible(Context, j))
Context->last_tag);
menu->redraw |= REDRAW_STATUS;
- if (option(OPT_RESOLVE) && menu->current < Context->vcount - 1)
+ if (OPT_RESOLVE && menu->current < Context->vcount - 1)
{
menu->current++;
menu->redraw |= REDRAW_MOTION_RESYNCH;
{
if (mx_close_mailbox(Context, &index_hint) != 0)
{
- set_option(OPT_SEARCH_INVALID);
+ OPT_SEARCH_INVALID = true;
menu->redraw = REDRAW_FULL;
break;
}
}
imap_logout_all();
mutt_message(_("Logged out of IMAP servers."));
- set_option(OPT_SEARCH_INVALID);
+ OPT_SEARCH_INVALID = true;
menu->redraw = REDRAW_FULL;
break;
#endif
break;
}
}
- set_option(OPT_SEARCH_INVALID);
+ OPT_SEARCH_INVALID = true;
}
else if (check == MUTT_NEW_MAIL || check == MUTT_REOPENED)
update_index(menu, Context, check, oc, index_hint);
op = OP_DISPLAY_MESSAGE;
continue;
}
- if (option(OPT_RESOLVE))
+ if (OPT_RESOLVE)
{
menu->current = ci_next_undeleted(menu->current);
if (menu->current == -1)
#ifdef USE_NNTP
case OP_MAIN_CHANGE_GROUP:
case OP_MAIN_CHANGE_GROUP_READONLY:
- unset_option(OPT_NEWS);
+ OPT_NEWS = false;
#endif
- if (attach_msg || option(OPT_READ_ONLY) ||
+ if (attach_msg || OPT_READ_ONLY ||
#ifdef USE_NNTP
op == OP_MAIN_CHANGE_GROUP_READONLY ||
#endif
#endif
else
{
- if (option(OPT_CHANGE_FOLDER_NEXT) && Context && Context->path)
+ if (OPT_CHANGE_FOLDER_NEXT && Context && Context->path)
{
mutt_str_strfcpy(buf, Context->path, sizeof(buf));
mutt_pretty_mailbox(buf, sizeof(buf));
#ifdef USE_NNTP
if (op == OP_MAIN_CHANGE_GROUP || op == OP_MAIN_CHANGE_GROUP_READONLY)
{
- set_option(OPT_NEWS);
+ OPT_NEWS = true;
CurrentNewsSrv = nntp_select_server(NewsServer, false);
if (!CurrentNewsSrv)
break;
* again while reading the message.
*/
if (op == OP_DISPLAY_HEADERS)
- toggle_option(OPT_WEED);
+ OPT_WEED = !OPT_WEED;
- unset_option(OPT_NEED_RESORT);
+ OPT_NEED_RESORT = false;
if ((Sort & SORT_MASK) == SORT_THREADS && CURHDR->collapsed)
{
mutt_uncollapse_thread(Context, CURHDR);
mutt_set_virtual(Context);
- if (option(OPT_UNCOLLAPSE_JUMP))
+ if (OPT_UNCOLLAPSE_JUMP)
menu->current = mutt_thread_next_unread(Context, CURHDR);
}
- if (option(OPT_PGP_AUTO_DECODE) &&
- (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
+ if (OPT_PGP_AUTO_DECODE && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
{
mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw);
}
op = mutt_display_message(CURHDR);
if (op < 0)
{
- unset_option(OPT_NEED_RESORT);
+ OPT_NEED_RESORT = false;
break;
}
menu->redraw |= REDRAW_STATUS;
if (tag)
menu->redraw |= REDRAW_INDEX;
- else if (option(OPT_RESOLVE))
+ else if (OPT_RESOLVE)
{
menu->current = ci_next_undeleted(menu->current);
if (menu->current == -1)
else
{
mutt_set_flag(Context, CURHDR, MUTT_FLAG, !CURHDR->flagged);
- if (option(OPT_RESOLVE))
+ if (OPT_RESOLVE)
{
menu->current = ci_next_undeleted(menu->current);
if (menu->current == -1)
else
mutt_set_flag(Context, CURHDR, MUTT_READ, 1);
- if (option(OPT_RESOLVE))
+ if (OPT_RESOLVE)
{
menu->current = ci_next_undeleted(menu->current);
if (menu->current == -1)
menu->redraw |= REDRAW_STATUS;
if (tag)
menu->redraw |= REDRAW_INDEX;
- else if (option(OPT_RESOLVE))
+ else if (OPT_RESOLVE)
{
menu->current = ci_next_undeleted(menu->current);
if (menu->current == -1)
{
menu->current = mutt_uncollapse_thread(Context, CURHDR);
mutt_set_virtual(Context);
- if (option(OPT_UNCOLLAPSE_JUMP))
+ if (OPT_UNCOLLAPSE_JUMP)
menu->current = mutt_thread_next_unread(Context, CURHDR);
}
else if (CAN_COLLAPSE(CURHDR))
{
mutt_tag_set_flag(MUTT_DELETE, 1);
mutt_tag_set_flag(MUTT_PURGE, (op == OP_PURGE_MESSAGE));
- if (option(OPT_DELETE_UNTAG))
+ if (OPT_DELETE_UNTAG)
mutt_tag_set_flag(MUTT_TAG, 0);
menu->redraw |= REDRAW_INDEX;
}
{
mutt_set_flag(Context, CURHDR, MUTT_DELETE, 1);
mutt_set_flag(Context, CURHDR, MUTT_PURGE, (op == OP_PURGE_MESSAGE));
- if (option(OPT_DELETE_UNTAG))
+ if (OPT_DELETE_UNTAG)
mutt_set_flag(Context, CURHDR, MUTT_TAG, 0);
- if (option(OPT_RESOLVE))
+ if (OPT_RESOLVE)
{
menu->current = ci_next_undeleted(menu->current);
if (menu->current == -1)
break;
}
- if (option(OPT_DELETE_UNTAG))
+ if (OPT_DELETE_UNTAG)
mutt_thread_set_flag(CURHDR, MUTT_TAG, 0, subthread);
- if (option(OPT_RESOLVE))
+ if (OPT_RESOLVE)
{
menu->current = ci_next_undeleted(menu->current);
if (menu->current == -1)
else
edit = false;
- if (option(OPT_PGP_AUTO_DECODE) &&
- (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
+ if (OPT_PGP_AUTO_DECODE && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
{
mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw);
}
CHECK_MSGCOUNT;
CHECK_VISIBLE;
CHECK_ATTACH;
- if (option(OPT_PGP_AUTO_DECODE) &&
- (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
+ if (OPT_PGP_AUTO_DECODE && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
{
mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw);
}
CHECK_MSGCOUNT;
CHECK_VISIBLE;
CHECK_ATTACH;
- if (option(OPT_PGP_AUTO_DECODE) &&
- (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
+ if (OPT_PGP_AUTO_DECODE && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
{
mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw);
}
CHECK_ATTACH;
CHECK_MSGCOUNT;
CHECK_VISIBLE;
- if (option(OPT_PGP_AUTO_DECODE) &&
- (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
+ if (OPT_PGP_AUTO_DECODE && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
{
mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw);
}
/* in an IMAP folder index with imap_peek=no, piping could change
* new or old messages status to read. Redraw what's needed.
*/
- if (Context->magic == MUTT_IMAP && !option(OPT_IMAP_PEEK))
+ if (Context->magic == MUTT_IMAP && !OPT_IMAP_PEEK)
{
menu->redraw |= (tag ? REDRAW_INDEX : REDRAW_CURRENT) | REDRAW_STATUS;
}
/* in an IMAP folder index with imap_peek=no, printing could change
* new or old messages status to read. Redraw what's needed.
*/
- if (Context->magic == MUTT_IMAP && !option(OPT_IMAP_PEEK))
+ if (Context->magic == MUTT_IMAP && !OPT_IMAP_PEEK)
{
menu->redraw |= (tag ? REDRAW_INDEX : REDRAW_CURRENT) | REDRAW_STATUS;
}
if (rc != -1)
{
- if (option(OPT_RESOLVE))
+ if (OPT_RESOLVE)
{
menu->current = (op == OP_MAIN_READ_THREAD ? mutt_next_thread(CURHDR) :
mutt_next_subthread(CURHDR));
CHECK_ATTACH;
CHECK_MSGCOUNT;
CHECK_VISIBLE;
- if (option(OPT_PGP_AUTO_DECODE) &&
- (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
+ if (OPT_PGP_AUTO_DECODE && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
{
mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw);
}
if (rc != -1)
{
- if (option(OPT_RESOLVE))
+ if (OPT_RESOLVE)
{
if (op == OP_TAG_THREAD)
menu->current = mutt_next_thread(CURHDR);
{
mutt_set_flag(Context, CURHDR, MUTT_DELETE, 0);
mutt_set_flag(Context, CURHDR, MUTT_PURGE, 0);
- if (option(OPT_RESOLVE) && menu->current < Context->vcount - 1)
+ if (OPT_RESOLVE && menu->current < Context->vcount - 1)
{
menu->current++;
menu->redraw |= REDRAW_MOTION_RESYNCH;
op == OP_UNDELETE_THREAD ? 0 : 1);
if (rc != -1)
{
- if (option(OPT_RESOLVE))
+ if (OPT_RESOLVE)
{
if (op == OP_UNDELETE_THREAD)
menu->current = mutt_next_thread(CURHDR);
break;
case OP_SIDEBAR_TOGGLE_VISIBLE:
- toggle_option(OPT_SIDEBAR_VISIBLE);
+ OPT_SIDEBAR_VISIBLE = !OPT_SIDEBAR_VISIBLE;
mutt_reflow_windows();
break;
addch('\n');
}
- if ((!e->cc && option(OPT_ASKCC)) || force)
+ if ((!e->cc && OPT_ASKCC) || force)
{
addstr("Cc: ");
tmp[0] = '\0';
addch('\n');
}
- if (option(OPT_ASKBCC) || force)
+ if (OPT_ASKBCC || force)
{
addstr("Bcc: ");
tmp[0] = '\0';
buf = NULL;
bufmax = buflen = 0;
- if (option(OPT_EDIT_HEADERS))
+ if (OPT_EDIT_HEADERS)
{
mutt_env_to_local(msg->env);
mutt_edit_headers(NONULL(Visual), path, msg, NULL, 0);
mutt_set_flag(Context, cur, MUTT_PURGE, 1);
mutt_set_flag(Context, cur, MUTT_READ, 1);
- if (option(OPT_DELETE_UNTAG))
+ if (OPT_DELETE_UNTAG)
mutt_set_flag(Context, cur, MUTT_TAG, 0);
}
else if (rc == -1)
if (bf)
{
- if (!h->deleted && !ctx->readonly && (!h->flagged || !option(OPT_FLAG_SAFE)))
+ if (!h->deleted && !ctx->readonly && (!h->flagged || !OPT_FLAG_SAFE))
{
h->deleted = true;
update = true;
WHERE struct RegexList *NoSpamList;
WHERE struct ReplaceList *SubjectRegexList;
-/* bit vector for the yes/no/ask variable type */
-#ifdef MAIN_C
-unsigned char QuadOptions[(OPT_QUAD_MAX * 2 + 7) / 8];
-#else
-extern unsigned char QuadOptions[];
-#endif
-
WHERE unsigned short Counter;
#ifdef USE_NNTP
snprintf(type, sizeof(type), "%s/%s", TYPE(b), b->subtype);
- if (option(OPT_IMPLICIT_AUTOVIEW))
+ if (OPT_IMPLICIT_AUTOVIEW)
{
/* $implicit_autoview is essentially the same as "auto_view *" */
is_av = 1;
if (choice)
{
- if (s->flags & MUTT_DISPLAY && !option(OPT_WEED))
+ if (s->flags & MUTT_DISPLAY && !OPT_WEED)
{
fseeko(s->fpin, choice->hdr_offset, SEEK_SET);
mutt_file_copy_bytes(s->fpin, s->fpout, choice->offset - choice->hdr_offset);
{
mutt_copy_hdr(s->fpin, s->fpout, off_start, b->parts->offset,
(((s->flags & MUTT_WEED) ||
- ((s->flags & (MUTT_DISPLAY | MUTT_PRINTING)) && option(OPT_WEED))) ?
+ ((s->flags & (MUTT_DISPLAY | MUTT_PRINTING)) && OPT_WEED)) ?
(CH_WEED | CH_REORDER) :
0) |
(s->prefix ? CH_PREFIX : 0) | CH_DECODE | CH_FROM |
}
state_puts(" --]\n", s);
print_part_line(s, p, 0);
- if (!option(OPT_WEED))
+ if (!OPT_WEED)
{
fseeko(s->fpin, p->hdr_offset, SEEK_SET);
mutt_file_copy_bytes(s->fpin, s->fpout, p->offset - p->hdr_offset);
NONULL(p->subtype));
}
- if ((s->flags & MUTT_REPLYING) && (option(OPT_INCLUDE_ONLYFIRST)) &&
- (s->flags & MUTT_FIRSTDONE))
+ if ((s->flags & MUTT_REPLYING) && OPT_INCLUDE_ONLYFIRST && (s->flags & MUTT_FIRSTDONE))
{
break;
}
}
mutt_copy_hdr(s->fpin, s->fpout, ftello(s->fpin), b->parts->offset,
- (option(OPT_WEED) ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE, NULL);
+ (OPT_WEED ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE, NULL);
}
}
else if (expiration && expire < time(NULL))
s);
mutt_copy_hdr(s->fpin, s->fpout, ftello(s->fpin), b->parts->offset,
- (option(OPT_WEED) ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE | CH_DISPLAY,
- NULL);
+ (OPT_WEED ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE | CH_DISPLAY, NULL);
}
}
else
state_printf(
s, _("[-- and the indicated access-type %s is unsupported --]\n"), access_type);
mutt_copy_hdr(s->fpin, s->fpout, ftello(s->fpin), b->parts->offset,
- (option(OPT_WEED) ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE | CH_DISPLAY,
- NULL);
+ (OPT_WEED ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE | CH_DISPLAY, NULL);
}
}
while ((buf = mutt_file_read_line(buf, &sz, s->fpin, NULL, 0)))
{
- if ((mutt_str_strcmp(buf, "-- ") != 0) && option(OPT_TEXT_FLOWED))
+ if ((mutt_str_strcmp(buf, "-- ") != 0) && OPT_TEXT_FLOWED)
{
l = mutt_str_strlen(buf);
while (l > 0 && buf[l - 1] == ' ')
*/
if ((WithCrypto & APPLICATION_PGP) && mutt_is_application_pgp(b))
handler = crypt_pgp_application_pgp_handler;
- else if (option(OPT_REFLOW_TEXT) &&
+ else if (OPT_REFLOW_TEXT &&
(mutt_str_strcasecmp("flowed", mutt_param_get("format", b->parameter)) == 0))
{
handler = rfc3676_handler;
}
else if (WithCrypto && b->type == TYPEAPPLICATION)
{
- if (option(OPT_DONT_HANDLE_PGP_KEYS) &&
- (mutt_str_strcasecmp("pgp-keys", b->subtype) == 0))
+ if (OPT_DONT_HANDLE_PGP_KEYS && (mutt_str_strcasecmp("pgp-keys", b->subtype) == 0))
{
/* pass raw part through for key extraction */
plaintext = true;
/* only respect disposition == attachment if we're not
displaying from the attachment menu (i.e. pager) */
- if ((!option(OPT_HONOR_DISPOSITION) ||
- (b->disposition != DISPATTACH || option(OPT_VIEW_ATTACH))) &&
+ if ((!OPT_HONOR_DISPOSITION || (b->disposition != DISPATTACH || OPT_VIEW_ATTACH)) &&
(plaintext || handler))
{
rc = run_decode_and_handler(b, s, handler, plaintext);
}
/* print hint to use attachment menu for disposition == attachment
if we're not already being called from there */
- else if ((s->flags & MUTT_DISPLAY) ||
- (b->disposition == DISPATTACH && !option(OPT_VIEW_ATTACH) &&
- option(OPT_HONOR_DISPOSITION) && (plaintext || handler)))
+ else if ((s->flags & MUTT_DISPLAY) || (b->disposition == DISPATTACH && !OPT_VIEW_ATTACH &&
+ OPT_HONOR_DISPOSITION && (plaintext || handler)))
{
state_mark_attach(s);
- if (option(OPT_HONOR_DISPOSITION) && b->disposition == DISPATTACH)
+ if (OPT_HONOR_DISPOSITION && b->disposition == DISPATTACH)
fputs(_("[-- This is an attachment "), s->fpout);
else
state_printf(s, _("[-- %s/%s is unsupported "), TYPE(b), b->subtype);
- if (!option(OPT_VIEW_ATTACH))
+ if (!OPT_VIEW_ATTACH)
{
char keystroke[SHORT_STRING];
printfresult =
snprintf(kcdbpath, sizeof(kcdbpath), "%s#type=kct#opts=%s#rcomp=lex",
- path, option(OPT_HEADER_CACHE_COMPRESS) ? "lc" : "l");
+ path, OPT_HEADER_CACHE_COMPRESS ? "lc" : "l");
if ((printfresult < 0) || (printfresult >= sizeof(kcdbpath)))
{
return NULL;
{
int flags = VL_OWRITER | VL_OCREAT;
- if (option(OPT_HEADER_CACHE_COMPRESS))
+ if (OPT_HEADER_CACHE_COMPRESS)
flags |= VL_OZCOMP;
return vlopen(path, flags, VL_CMPLEX);
TCBDB *db = tcbdbnew();
if (!db)
return NULL;
- if (option(OPT_HEADER_CACHE_COMPRESS))
+ if (OPT_HEADER_CACHE_COMPRESS)
tcbdbtune(db, 0, 0, 0, -1, -1, BDBTDEFLATE);
if (tcbdbopen(db, path, BDBOWRITER | BDBOCREAT))
return db;
if (!optional)
{
make_from_addr(hdr->env, tmp, sizeof(tmp), 1);
- if (!option(OPT_SAVE_ADDRESS) && (p = strpbrk(tmp, "%@")))
+ if (!OPT_SAVE_ADDRESS && (p = strpbrk(tmp, "%@")))
*p = 0;
mutt_format_s(buf, buflen, prec, tmp);
}
we can simply compare strings as we don't generate References for
multiple Message-Ids in IRT anyways */
#ifdef USE_NNTP
- if (!option(OPT_NEWS_SEND))
+ if (!OPT_NEWS_SEND)
#endif
if (!STAILQ_EMPTY(&msg->env->in_reply_to) &&
(STAILQ_EMPTY(&n->in_reply_to) ||
else
{
n += col - MuttIndexWindow->cols;
- if (option(OPT_MARKERS))
+ if (OPT_MARKERS)
n++;
}
col = pad(f, n, col_b);
if (!f)
return;
- if (option(OPT_HISTORY_REMOVE_DUPS))
+ if (OPT_HISTORY_REMOVE_DUPS)
for (hclass = 0; hclass < HC_LAST; hclass++)
dup_hashes[hclass] = mutt_hash_create(MAX(10, SaveHistory * 2), MUTT_HASH_STRDUP_KEYS);
if (hclass >= HC_LAST)
continue;
*p = '\0';
- if (option(OPT_HISTORY_REMOVE_DUPS) &&
- (dup_hash_inc(dup_hashes[hclass], linebuf + read) > 1))
+ if (OPT_HISTORY_REMOVE_DUPS && (dup_hash_inc(dup_hashes[hclass], linebuf + read) > 1))
{
regen_file = true;
continue;
if (hclass >= HC_LAST)
continue;
*p = '\0';
- if (option(OPT_HISTORY_REMOVE_DUPS) &&
- (dup_hash_dec(dup_hashes[hclass], linebuf + read) > 0))
+ if (OPT_HISTORY_REMOVE_DUPS && (dup_hash_dec(dup_hashes[hclass], linebuf + read) > 0))
{
continue;
}
mutt_file_fclose(&tmp);
unlink(tmpfname);
}
- if (option(OPT_HISTORY_REMOVE_DUPS))
+ if (OPT_HISTORY_REMOVE_DUPS)
for (hclass = 0; hclass < HC_LAST; hclass++)
mutt_hash_destroy(&dup_hashes[hclass]);
}
*/
if (*s != ' ' && (!h->hist[prev] || (mutt_str_strcmp(h->hist[prev], s) != 0)))
{
- if (option(OPT_HISTORY_REMOVE_DUPS))
+ if (OPT_HISTORY_REMOVE_DUPS)
remove_history_dups(hclass, s);
if (save && SaveHistory)
save_history(hclass, s);
if (addr_hook(path, pathlen, MUTT_FCCHOOK, NULL, hdr) != 0)
{
- if ((option(OPT_SAVE_NAME) || option(OPT_FORCE_NAME)) && (env->to || env->cc || env->bcc))
+ if ((OPT_SAVE_NAME || OPT_FORCE_NAME) && (env->to || env->cc || env->bcc))
{
adr = env->to ? env->to : (env->cc ? env->cc : env->bcc);
mutt_safe_path(buf, sizeof(buf), adr);
mutt_file_concat_path(path, NONULL(Folder), buf, pathlen);
- if (!option(OPT_FORCE_NAME) && mx_access(path, W_OK) != 0)
+ if (!OPT_FORCE_NAME && mx_access(path, W_OK) != 0)
mutt_str_strfcpy(path, NONULL(Record), pathlen);
}
else
return -1;
}
- save_lsub = option(OPT_IMAP_CHECK_SUBSCRIBED);
- unset_option(OPT_IMAP_CHECK_SUBSCRIBED);
- mutt_str_strfcpy(list_cmd, option(OPT_IMAP_LIST_SUBSCRIBED) ? "LSUB" : "LIST",
- sizeof(list_cmd));
+ save_lsub = OPT_IMAP_CHECK_SUBSCRIBED;
+ OPT_IMAP_CHECK_SUBSCRIBED = false;
+ mutt_str_strfcpy(list_cmd, OPT_IMAP_LIST_SUBSCRIBED ? "LSUB" : "LIST", sizeof(list_cmd));
idata = imap_conn_find(&(mx.account), 0);
if (!idata)
mutt_clear_error();
if (save_lsub)
- set_option(OPT_IMAP_CHECK_SUBSCRIBED);
+ OPT_IMAP_CHECK_SUBSCRIBED = true;
FREE(&mx.mbox);
return 0;
fail:
if (save_lsub)
- set_option(OPT_IMAP_CHECK_SUBSCRIBED);
+ OPT_IMAP_CHECK_SUBSCRIBED = true;
FREE(&mx.mbox);
return -1;
}
return;
}
- if (!option(OPT_IMAP_CHECK_SUBSCRIBED))
+ if (!OPT_IMAP_CHECK_SUBSCRIBED)
return;
idata->cmdtype = IMAP_CT_LIST;
mutt_debug(3, "Found %s in buffy list (OV: %d ON: %d U: %d)\n", mailbox,
olduv, oldun, status->unseen);
- if (option(OPT_MAIL_CHECK_RECENT))
+ if (OPT_MAIL_CHECK_RECENT)
{
if (olduv && olduv == status->uidvalidity)
{
return -1;
}
- else if (option(OPT_IMAP_SERVERNOISE) && (mutt_str_strncasecmp("NO", s, 2) == 0))
+ else if (OPT_IMAP_SERVERNOISE && (mutt_str_strncasecmp("NO", s, 2) == 0))
{
mutt_debug(2, "Handling untagged NO\n");
mutt_debug(1, "Error parsing %s\n", path);
return -1;
}
- if (!(*hidata = imap_conn_find(&(mx.account), option(OPT_IMAP_PASSIVE) ? MUTT_IMAP_CONN_NONEW : 0)) ||
+ if (!(*hidata = imap_conn_find(&(mx.account), OPT_IMAP_PASSIVE ? MUTT_IMAP_CONN_NONEW : 0)) ||
(*hidata)->state < IMAP_AUTHENTICATED)
{
FREE(&mx.mbox);
if (imap_parse_path(path, &mx))
return -1;
- idata = imap_conn_find(&mx.account, option(OPT_IMAP_PASSIVE) ? MUTT_IMAP_CONN_NONEW : 0);
+ idata = imap_conn_find(&mx.account, OPT_IMAP_PASSIVE ? MUTT_IMAP_CONN_NONEW : 0);
if (!idata)
{
FREE(&mx.mbox);
if (!ctx || !ctx->data)
{
- idata = imap_conn_find(&mx->account,
- option(OPT_IMAP_PASSIVE) ? MUTT_IMAP_CONN_NONEW : 0);
+ idata = imap_conn_find(&mx->account, OPT_IMAP_PASSIVE ? MUTT_IMAP_CONN_NONEW : 0);
if (!idata)
{
FREE(&mx->mbox);
/* get root delimiter, '/' as default */
idata->delim = '/';
imap_exec(idata, "LIST \"\" \"\"", IMAP_CMD_QUEUE);
- if (option(OPT_IMAP_CHECK_SUBSCRIBED))
+ if (OPT_IMAP_CHECK_SUBSCRIBED)
imap_exec(idata, "LSUB \"\" \"*\"", IMAP_CMD_QUEUE);
/* we may need the root delimiter before we open a mailbox */
imap_exec(idata, NULL, IMAP_CMD_FAIL_OK);
#ifdef USE_SSL
/* Attempt STARTTLS if available and desired. */
if (!idata->conn->ssf &&
- (option(OPT_SSL_FORCE_TLS) || mutt_bit_isset(idata->capabilities, STARTTLS)))
+ (OPT_SSL_FORCE_TLS || mutt_bit_isset(idata->capabilities, STARTTLS)))
{
int rc;
- if (option(OPT_SSL_FORCE_TLS))
+ if (OPT_SSL_FORCE_TLS)
rc = MUTT_YES;
else if ((rc = query_quadoption(OPT_SSL_STARTTLS,
_("Secure connection with TLS?"))) == MUTT_ABORT)
}
}
- if (option(OPT_SSL_FORCE_TLS) && !idata->conn->ssf)
+ if (OPT_SSL_FORCE_TLS && !idata->conn->ssf)
{
mutt_error(_("Encrypted connection unavailable"));
mutt_sleep(1);
int result = 0;
/* try IDLE first, unless force is set */
- if (!force && option(OPT_IMAP_IDLE) && mutt_bit_isset(idata->capabilities, IDLE) &&
+ if (!force && OPT_IMAP_IDLE && mutt_bit_isset(idata->capabilities, IDLE) &&
(idata->state != IMAP_IDLE || time(NULL) >= idata->lastread + ImapKeepalive))
{
if (imap_cmd_idle(idata) < 0)
if (!*buf)
mutt_str_strfcpy(buf, "INBOX", sizeof(buf));
- if (option(OPT_IMAP_CHECK_SUBSCRIBED))
+ if (OPT_IMAP_CHECK_SUBSCRIBED)
{
mutt_buffer_init(&token);
mutt_buffer_init(&err);
/* fire off command */
snprintf(buf, sizeof(buf), "%s \"\" \"%s%%\"",
- option(OPT_IMAP_LIST_SUBSCRIBED) ? "LSUB" : "LIST", list);
+ OPT_IMAP_LIST_SUBSCRIBED ? "LSUB" : "LIST", list);
imap_cmd_start(idata, buf);
break;
mutt_debug(3, "server suggests TRYCREATE\n");
snprintf(prompt, sizeof(prompt), _("Create %s?"), mbox);
- if (option(OPT_CONFIRMCREATE) && mutt_yesorno(prompt, 1) != MUTT_YES)
+ if (OPT_CONFIRMCREATE && mutt_yesorno(prompt, 1) != MUTT_YES)
{
mutt_clear_error();
goto out;
return -1;
snprintf(buf, sizeof(buf), _("Create %s?"), mailbox);
- if (option(OPT_CONFIRMCREATE) && mutt_yesorno(buf, 1) != MUTT_YES)
+ if (OPT_CONFIRMCREATE && mutt_yesorno(buf, 1) != MUTT_YES)
return -1;
if (imap_create_mailbox(idata, mailbox) < 0)
idata->state = IMAP_AUTHENTICATED;
}
- if (option(OPT_MESSAGE_CACHE_CLEAN))
+ if (OPT_MESSAGE_CACHE_CLEAN)
imap_cache_clean(idata);
rc = 0;
else if (mutt_str_strncasecmp("old", s, 3) == 0)
{
s += 3;
- hd->old = option(OPT_MARK_OLD) ? true : false;
+ hd->old = OPT_MARK_OLD ? true : false;
}
else
{
snprintf(buf, sizeof(buf), "UID FETCH %u %s", HEADER_DATA(h)->uid,
(mutt_bit_isset(idata->capabilities, IMAP4REV1) ?
- (option(OPT_IMAP_PEEK) ? "BODY.PEEK[]" : "BODY[]") :
+ (OPT_IMAP_PEEK ? "BODY.PEEK[]" : "BODY[]") :
"RFC822"));
imap_cmd_start(idata, buf);
break;
mutt_debug(3, "server suggests TRYCREATE\n");
snprintf(prompt, sizeof(prompt), _("Create %s?"), mbox);
- if (option(OPT_CONFIRMCREATE) && mutt_yesorno(prompt, 1) != MUTT_YES)
+ if (OPT_CONFIRMCREATE && mutt_yesorno(prompt, 1) != MUTT_YES)
{
mutt_clear_error();
goto out;
mutt_set_flag(ctx, ctx->hdrs[i], MUTT_DELETE, 1);
mutt_set_flag(ctx, ctx->hdrs[i], MUTT_PURGE, 1);
- if (option(OPT_DELETE_UNTAG))
+ if (OPT_DELETE_UNTAG)
mutt_set_flag(ctx, ctx->hdrs[i], MUTT_TAG, 0);
}
}
{
mutt_set_flag(ctx, h, MUTT_DELETE, 1);
mutt_set_flag(ctx, h, MUTT_PURGE, 1);
- if (option(OPT_DELETE_UNTAG))
+ if (OPT_DELETE_UNTAG)
mutt_set_flag(ctx, h, MUTT_TAG, 0);
}
}
sigset_t oldmask;
int rc;
- bool imap_passive = option(OPT_IMAP_PASSIVE);
+ bool imap_passive = OPT_IMAP_PASSIVE;
- set_option(OPT_IMAP_PASSIVE);
- set_option(OPT_KEEP_QUIET);
+ OPT_IMAP_PASSIVE = true;
+ OPT_KEEP_QUIET = true;
sigprocmask(SIG_SETMASK, NULL, &oldmask);
sigaction(SIGALRM, &oldalrm, NULL);
sigprocmask(SIG_SETMASK, &oldmask, NULL);
- unset_option(OPT_KEEP_QUIET);
+ OPT_KEEP_QUIET = false;
if (!imap_passive)
- unset_option(OPT_IMAP_PASSIVE);
+ OPT_IMAP_PASSIVE = false;
return rc;
}
}
#endif
-static void toggle_quadoption(int opt)
+static int toggle_quadoption(int opt)
{
- int n = opt / 4;
- int b = (opt % 4) * 2;
-
- QuadOptions[n] ^= (1 << b);
+ /* toggle the low bit
+ * MUTT_NO <--> MUTT_YES
+ * MUTT_ASKNO <--> MUTT_ASKYES */
+ return opt ^= 1;
}
static int parse_regex(int idx, struct Buffer *tmp, struct Buffer *err)
return 1;
}
-void set_quadoption(int opt, int flag)
-{
- int n = opt / 4;
- int b = (opt % 4) * 2;
-
- QuadOptions[n] &= ~(0x3 << b);
- QuadOptions[n] |= (flag & 0x3) << b;
-}
-
-int quadoption(int opt)
-{
- int n = opt / 4;
- int b = (opt % 4) * 2;
-
- return (QuadOptions[n] >> b) & 0x3;
-}
-
int query_quadoption(int opt, const char *prompt)
{
- int v = quadoption(opt);
-
- switch (v)
+ switch (opt)
{
case MUTT_YES:
case MUTT_NO:
- return v;
+ return opt;
default:
- v = mutt_yesorno(prompt, (v == MUTT_ASKYES));
+ opt = mutt_yesorno(prompt, (opt == MUTT_ASKYES));
mutt_window_clearline(MuttMessageWindow, 0);
- return v;
+ return opt;
}
/* not reached */
break;
case DT_BOOL:
if (val->data)
- set_option(MuttVars[idx].data);
+ *(bool *) MuttVars[idx].data = true;
else
- unset_option(MuttVars[idx].data);
+ *(bool *) MuttVars[idx].data = false;
break;
case DT_QUAD:
- set_quadoption(MuttVars[idx].data, val->data);
+ *(short *) MuttVars[idx].data = val->data;
break;
case DT_NUMBER:
*((short *) MuttVars[idx].data) = val->data;
tmp->name = mutt_str_strdup(buf->data);
/* give the main addressbook code a chance */
if (CurrentMenu == MENU_ALIAS)
- set_option(OPT_MENU_CALLER);
+ OPT_MENU_CALLER = true;
}
else
{
break;
case DT_BOOL:
if (p->init)
- set_option(p->data);
+ *(bool *) p->data = true;
else
- unset_option(p->data);
+ *(bool *) p->data = false;
break;
case DT_QUAD:
- set_quadoption(p->data, p->init);
+ *(unsigned char *) p->data = p->init;
break;
case DT_NUMBER:
case DT_SORT:
mutt_set_menu_redraw(MENU_PAGER, REDRAW_FLOW);
}
if (p->flags & R_RESORT_SUB)
- set_option(OPT_SORT_SUBTHREADS);
+ OPT_SORT_SUBTHREADS = true;
if (p->flags & R_RESORT)
- set_option(OPT_NEED_RESORT);
+ OPT_NEED_RESORT = true;
if (p->flags & R_RESORT_INIT)
- set_option(OPT_RESORT_INIT);
+ OPT_RESORT_INIT = true;
if (p->flags & R_TREE)
- set_option(OPT_REDRAW_TREE);
+ OPT_REDRAW_TREE = true;
if (p->flags & R_REFLOW)
mutt_reflow_windows();
#ifdef USE_SIDEBAR
for (idx = 0; MuttVars[idx].option; idx++)
restore_default(&MuttVars[idx]);
mutt_set_current_menu_redraw_full();
- set_option(OPT_SORT_SUBTHREADS);
- set_option(OPT_NEED_RESORT);
- set_option(OPT_RESORT_INIT);
- set_option(OPT_REDRAW_TREE);
+ OPT_SORT_SUBTHREADS = true;
+ OPT_NEED_RESORT = true;
+ OPT_RESORT_INIT = true;
+ OPT_REDRAW_TREE = true;
return 0;
}
else
if (query)
{
- snprintf(err->data, err->dsize,
- option(MuttVars[idx].data) ? _("%s is set") : _("%s is unset"),
+ snprintf(err->data,
+ err->dsize, *(bool *) MuttVars[idx].data ? _("%s is set") : _("%s is unset"),
tmp->data);
return 0;
}
CHECK_PAGER;
if (unset)
- unset_option(MuttVars[idx].data);
+ *(bool *) MuttVars[idx].data = false;
else if (inv)
- toggle_option(MuttVars[idx].data);
+ *(bool *) MuttVars[idx].data = !(*(bool *) MuttVars[idx].data);
else
- set_option(MuttVars[idx].data);
+ *(bool *) MuttVars[idx].data = true;
}
else if (myvar || DTYPE(MuttVars[idx].type) == DT_STRING ||
DTYPE(MuttVars[idx].type) == DT_PATH || DTYPE(MuttVars[idx].type) == DT_ADDRESS ||
break;
}
- if (option(OPT_ATTACH_MSG) &&
+ if (OPT_ATTACH_MSG &&
(mutt_str_strcmp(MuttVars[idx].option, "reply_regexp") == 0))
{
snprintf(err->data, err->dsize,
static const char *const vals[] = { "no", "yes", "ask-no", "ask-yes" };
snprintf(err->data, err->dsize, "%s=%s", MuttVars[idx].option,
- vals[quadoption(MuttVars[idx].data)]);
+ vals[*(unsigned char *) MuttVars[idx].data]);
break;
}
s->dptr++;
mutt_extract_token(tmp, s, 0);
if (mutt_str_strcasecmp("yes", tmp->data) == 0)
- set_quadoption(MuttVars[idx].data, MUTT_YES);
+ MuttVars[idx].data = MUTT_YES;
else if (mutt_str_strcasecmp("no", tmp->data) == 0)
- set_quadoption(MuttVars[idx].data, MUTT_NO);
+ MuttVars[idx].data = MUTT_NO;
else if (mutt_str_strcasecmp("ask-yes", tmp->data) == 0)
- set_quadoption(MuttVars[idx].data, MUTT_ASKYES);
+ MuttVars[idx].data = MUTT_ASKYES;
else if (mutt_str_strcasecmp("ask-no", tmp->data) == 0)
- set_quadoption(MuttVars[idx].data, MUTT_ASKNO);
+ MuttVars[idx].data = MUTT_ASKNO;
else
{
snprintf(err->data, err->dsize, _("%s: invalid value"), tmp->data);
if (inv)
toggle_quadoption(MuttVars[idx].data);
else if (unset)
- set_quadoption(MuttVars[idx].data, MUTT_NO);
+ MuttVars[idx].data = MUTT_NO;
else
- set_quadoption(MuttVars[idx].data, MUTT_YES);
+ MuttVars[idx].data = MUTT_YES;
}
}
else if (DTYPE(MuttVars[idx].type) == DT_SORT)
mutt_set_menu_redraw(MENU_PAGER, REDRAW_FLOW);
}
if (MuttVars[idx].flags & R_RESORT_SUB)
- set_option(OPT_SORT_SUBTHREADS);
+ OPT_SORT_SUBTHREADS = true;
if (MuttVars[idx].flags & R_RESORT)
- set_option(OPT_NEED_RESORT);
+ OPT_NEED_RESORT = true;
if (MuttVars[idx].flags & R_RESORT_INIT)
- set_option(OPT_RESORT_INIT);
+ OPT_RESORT_INIT = true;
if (MuttVars[idx].flags & R_TREE)
- set_option(OPT_REDRAW_TREE);
+ OPT_REDRAW_TREE = true;
if (MuttVars[idx].flags & R_REFLOW)
mutt_reflow_windows();
#ifdef USE_SIDEBAR
rfc822_write_address(tmp, sizeof(tmp), *((struct Address **) MuttVars[idx].data), 0);
}
else if (DTYPE(MuttVars[idx].type) == DT_QUAD)
- mutt_str_strfcpy(tmp, vals[quadoption(MuttVars[idx].data)], sizeof(tmp));
+ mutt_str_strfcpy(tmp, vals[*(unsigned char *) MuttVars[idx].data], sizeof(tmp));
else if (DTYPE(MuttVars[idx].type) == DT_NUMBER)
{
short sval = *((short *) MuttVars[idx].data);
mutt_str_strfcpy(tmp, p, sizeof(tmp));
}
else if (DTYPE(MuttVars[idx].type) == DT_BOOL)
- mutt_str_strfcpy(tmp, option(MuttVars[idx].data) ? "yes" : "no", sizeof(tmp));
+ mutt_str_strfcpy(tmp, *(bool *) MuttVars[idx].data ? "yes" : "no", sizeof(tmp));
else
return 0;
#ifdef HAVE_GETSID
/* Unset suspend by default if we're the session leader */
if (getsid(0) == getpid())
- unset_option(OPT_SUSPEND);
+ OPT_SUSPEND = false;
#endif
mutt_init_history();
{
if (np->data)
{
- if (!option(OPT_NO_CURSES))
+ if (!OPT_NO_CURSES)
endwin();
if (source_rc(np->data, &err) != 0)
{
if (execute_commands(commands) != 0)
need_pause = 1;
- if (need_pause && !option(OPT_NO_CURSES))
+ if (need_pause && !OPT_NO_CURSES)
{
if (mutt_any_key_to_continue(NULL) == -1)
mutt_exit(1);
mutt_read_histfile();
#ifdef USE_NOTMUCH
- if (option(OPT_VIRTUAL_SPOOLFILE))
+ if (OPT_VIRTUAL_SPOOLFILE)
{
/* Find the first virtual folder and open it */
for (struct Buffy *b = Incoming; b; b = b->next)
struct Option MuttVars[] = {
/*++*/
- { "abort_noattach", DT_QUAD, R_NONE, OPT_ABORT_NOATTACH, MUTT_NO },
+ { "abort_noattach", DT_QUAD, R_NONE, UL &OPT_ABORT_NOATTACH, MUTT_NO },
/*
** .pp
** If set to \fIyes\fP, when composing messages containing the regular expression
** set attach_keyword = "\\<attach(|ed|ments?)\\>"
** .te
*/
- { "abort_nosubject", DT_QUAD, R_NONE, OPT_ABORT_NOSUBJECT, MUTT_ASKYES },
+ { "abort_nosubject", DT_QUAD, R_NONE, UL &OPT_ABORT_NOSUBJECT, MUTT_ASKYES },
/*
** .pp
** If set to \fIyes\fP, when composing messages and no subject is given
** \fIno\fP, composing messages with no subject given at the subject
** prompt will never be aborted.
*/
- { "abort_unmodified", DT_QUAD, R_NONE, OPT_ABORT_UNMODIFIED, MUTT_YES },
+ { "abort_unmodified", DT_QUAD, R_NONE, UL &OPT_ABORT_UNMODIFIED, MUTT_YES },
/*
** .pp
** If set to \fIyes\fP, composition will automatically abort after
** .dt %t .dd Character which indicates if the alias is tagged for inclusion
** .de
*/
- { "allow_8bit", DT_BOOL, R_NONE, OPT_ALLOW_8BIT, 1 },
+ { "allow_8bit", DT_BOOL, R_NONE, UL &OPT_ALLOW_8BIT, 1 },
/*
** .pp
** Controls whether 8-bit data is converted to 7-bit using either Quoted-
** Printable or Base64 encoding when sending mail.
*/
- { "allow_ansi", DT_BOOL, R_NONE, OPT_ALLOW_ANSI, 0 },
+ { "allow_ansi", DT_BOOL, R_NONE, UL &OPT_ALLOW_ANSI, 0 },
/*
** .pp
** Controls whether ANSI color codes in messages (and color tags in
** and give it the same color as your attachment color (see also
** $$crypt_timestamp).
*/
- { "arrow_cursor", DT_BOOL, R_MENU, OPT_ARROW_CURSOR, 0 },
+ { "arrow_cursor", DT_BOOL, R_MENU, UL &OPT_ARROW_CURSOR, 0 },
/*
** .pp
** When \fIset\fP, an arrow (``->'') will be used to indicate the current entry
** be redrawn on the screen when moving to the next or previous entries
** in the menu.
*/
- { "ascii_chars", DT_BOOL, R_BOTH, OPT_ASCII_CHARS, 0 },
+ { "ascii_chars", DT_BOOL, R_BOTH, UL &OPT_ASCII_CHARS, 0 },
/*
** .pp
** If \fIset\fP, NeoMutt will use plain ASCII characters when displaying thread
** and attachment trees, instead of the default \fIACS\fP characters.
*/
- { "askbcc", DT_BOOL, R_NONE, OPT_ASKBCC, 0 },
+ { "askbcc", DT_BOOL, R_NONE, UL &OPT_ASKBCC, 0 },
/*
** .pp
** If \fIset\fP, NeoMutt will prompt you for blind-carbon-copy (Bcc) recipients
** before editing an outgoing message.
*/
- { "askcc", DT_BOOL, R_NONE, OPT_ASKCC, 0 },
+ { "askcc", DT_BOOL, R_NONE, UL &OPT_ASKCC, 0 },
/*
** .pp
** If \fIset\fP, NeoMutt will prompt you for carbon-copy (Cc) recipients before
** editing the body of an outgoing message.
*/
#ifdef USE_NNTP
- { "ask_follow_up", DT_BOOL, R_NONE, OPT_ASK_FOLLOW_UP, 0 },
+ { "ask_follow_up", DT_BOOL, R_NONE, UL &OPT_ASK_FOLLOW_UP, 0 },
/*
** .pp
** If set, NeoMutt will prompt you for follow-up groups before editing
** the body of an outgoing message.
*/
- { "ask_x_comment_to", DT_BOOL, R_NONE, OPT_ASK_X_COMMENT_TO, 0 },
+ { "ask_x_comment_to", DT_BOOL, R_NONE, UL &OPT_ASK_X_COMMENT_TO, 0 },
/*
** .pp
** If set, NeoMutt will prompt you for x-comment-to field before editing
** The separator to add between attachments when operating (saving,
** printing, piping, etc) on a list of tagged attachments.
*/
- { "attach_split", DT_BOOL, R_NONE, OPT_ATTACH_SPLIT, 1 },
+ { "attach_split", DT_BOOL, R_NONE, UL &OPT_ATTACH_SPLIT, 1 },
/*
** .pp
** If this variable is \fIunset\fP, when operating (saving, printing, piping,
** will use your locale environment, so there is no need to set
** this except to override that default.
*/
- { "auto_tag", DT_BOOL, R_NONE, OPT_AUTO_TAG, 0 },
+ { "auto_tag", DT_BOOL, R_NONE, UL &OPT_AUTO_TAG, 0 },
/*
** .pp
** When \fIset\fP, functions in the \fIindex\fP menu which affect a message
** unset, you must first use the \fC<tag-prefix>\fP function (bound to ``;''
** by default) to make the next function apply to all tagged messages.
*/
- { "autoedit", DT_BOOL, R_NONE, OPT_AUTOEDIT, 0 },
+ { "autoedit", DT_BOOL, R_NONE, UL &OPT_AUTOEDIT, 0 },
/*
** .pp
** When \fIset\fP along with $$edit_headers, NeoMutt will skip the initial
** .pp
** Also see $$fast_reply.
*/
- { "beep", DT_BOOL, R_NONE, OPT_BEEP, 1 },
+ { "beep", DT_BOOL, R_NONE, UL &OPT_BEEP, 1 },
/*
** .pp
** When this variable is \fIset\fP, NeoMutt will beep when an error occurs.
*/
- { "beep_new", DT_BOOL, R_NONE, OPT_BEEP_NEW, 0 },
+ { "beep_new", DT_BOOL, R_NONE, UL &OPT_BEEP_NEW, 0 },
/*
** .pp
** When this variable is \fIset\fP, NeoMutt will beep whenever it prints a message
** notifying you of new mail. This is independent of the setting of the
** $$beep variable.
*/
- { "bounce", DT_QUAD, R_NONE, OPT_BOUNCE, MUTT_ASKYES },
+ { "bounce", DT_QUAD, R_NONE, UL &OPT_BOUNCE, MUTT_ASKYES },
/*
** .pp
** Controls whether you will be asked to confirm bouncing messages.
** message. Setting this variable to \fIno\fP is not generally useful,
** and thus not recommended, because you are unable to bounce messages.
*/
- { "bounce_delivered", DT_BOOL, R_NONE, OPT_BOUNCE_DELIVERED, 1 },
+ { "bounce_delivered", DT_BOOL, R_NONE, UL &OPT_BOUNCE_DELIVERED, 1 },
/*
** .pp
** When this variable is \fIset\fP, NeoMutt will include Delivered-To headers when
** bouncing messages. Postfix users may wish to \fIunset\fP this variable.
*/
- { "braille_friendly", DT_BOOL, R_NONE, OPT_BRAILLE_FRIENDLY, 0 },
+ { "braille_friendly", DT_BOOL, R_NONE, UL &OPT_BRAILLE_FRIENDLY, 0 },
/*
** .pp
** When this variable is \fIset\fP, NeoMutt will place the cursor at the beginning
** visual terminals don't permit making the cursor invisible.
*/
#ifdef USE_NNTP
- { "catchup_newsgroup", DT_QUAD, R_NONE, OPT_CATCHUP_NEWSGROUP, MUTT_ASKYES },
+ { "catchup_newsgroup", DT_QUAD, R_NONE, UL &OPT_CATCHUP_NEWSGROUP, MUTT_ASKYES },
/*
** .pp
** If this variable is \fIset\fP, NeoMutt will mark all articles in newsgroup
**
*/
#endif
- { "change_folder_next", DT_BOOL, R_NONE, OPT_CHANGE_FOLDER_NEXT, 0 },
+ { "change_folder_next", DT_BOOL, R_NONE, UL &OPT_CHANGE_FOLDER_NEXT, 0 },
/*
** .pp
** When this variable is \fIset\fP, the \fC<change-folder>\fP function
** \fBNote:\fP It should only be set in case NeoMutt isn't able to determine the
** character set used correctly.
*/
- { "check_mbox_size", DT_BOOL, R_NONE, OPT_CHECK_MBOX_SIZE, 0 },
+ { "check_mbox_size", DT_BOOL, R_NONE, UL &OPT_CHECK_MBOX_SIZE, 0 },
/*
** .pp
** When this variable is \fIset\fP, NeoMutt will use file size attribute instead of
** mailbox by performing a fast mailbox scan when it is defined.
** Afterwards the new mail status is tracked by file size changes.
*/
- { "check_new", DT_BOOL, R_NONE, OPT_CHECK_NEW, 1 },
+ { "check_new", DT_BOOL, R_NONE, UL &OPT_CHECK_NEW, 1 },
/*
** .pp
** \fBNote:\fP this option only affects \fImaildir\fP and \fIMH\fP style
** this variable is \fIunset\fP, no check for new mail is performed
** while the mailbox is open.
*/
- { "collapse_unread", DT_BOOL, R_NONE, OPT_COLLAPSE_UNREAD, 1 },
+ { "collapse_unread", DT_BOOL, R_NONE, UL &OPT_COLLAPSE_UNREAD, 1 },
/*
** .pp
** When \fIunset\fP, NeoMutt will not collapse a thread if it contains any
** unread messages.
*/
- { "collapse_flagged", DT_BOOL, R_NONE, OPT_COLLAPSE_FLAGGED, 1 },
+ { "collapse_flagged", DT_BOOL, R_NONE, UL &OPT_COLLAPSE_FLAGGED, 1 },
/*
** .pp
** When \fIunset\fP, NeoMutt will not collapse a thread if it contains any
** characters as question marks which can lead to undesired
** side effects (for example in regular expressions).
*/
- { "confirmappend", DT_BOOL, R_NONE, OPT_CONFIRMAPPEND, 1 },
+ { "confirmappend", DT_BOOL, R_NONE, UL &OPT_CONFIRMAPPEND, 1 },
/*
** .pp
** When \fIset\fP, NeoMutt will prompt for confirmation when appending messages to
** an existing mailbox.
*/
- { "confirmcreate", DT_BOOL, R_NONE, OPT_CONFIRMCREATE, 1 },
+ { "confirmcreate", DT_BOOL, R_NONE, UL &OPT_CONFIRMCREATE, 1 },
/*
** .pp
** When \fIset\fP, NeoMutt will prompt for confirmation when saving messages to a
** .pp
** Sets the default Content-Type for the body of newly composed messages.
*/
- { "copy", DT_QUAD, R_NONE, OPT_COPY, MUTT_YES },
+ { "copy", DT_QUAD, R_NONE, UL &OPT_COPY, MUTT_YES },
/*
** .pp
** This variable controls whether or not copies of your outgoing messages
** $$save_name, $$force_name and ``$fcc-hook''.
*/
{ "pgp_autoencrypt", DT_SYNONYM, R_NONE, UL "crypt_autoencrypt", 0 },
- { "crypt_autoencrypt", DT_BOOL, R_NONE, OPT_CRYPT_AUTOENCRYPT, 0 },
+ { "crypt_autoencrypt", DT_BOOL, R_NONE, UL &OPT_CRYPT_AUTOENCRYPT, 0 },
/*
** .pp
** Setting this variable will cause NeoMutt to always attempt to PGP
** settings can be overridden by use of the smime menu instead.
** (Crypto only)
*/
- { "crypt_autopgp", DT_BOOL, R_NONE, OPT_CRYPT_AUTOPGP, 1 },
+ { "crypt_autopgp", DT_BOOL, R_NONE, UL &OPT_CRYPT_AUTOPGP, 1 },
/*
** .pp
** This variable controls whether or not NeoMutt may automatically enable
** $$crypt_autosign, $$crypt_replysign and $$smime_is_default.
*/
{ "pgp_autosign", DT_SYNONYM, R_NONE, UL "crypt_autosign", 0 },
- { "crypt_autosign", DT_BOOL, R_NONE, OPT_CRYPT_AUTOSIGN, 0 },
+ { "crypt_autosign", DT_BOOL, R_NONE, UL &OPT_CRYPT_AUTOSIGN, 0 },
/*
** .pp
** Setting this variable will cause NeoMutt to always attempt to
** be overridden by use of the smime menu instead of the pgp menu.
** (Crypto only)
*/
- { "crypt_autosmime", DT_BOOL, R_NONE, OPT_CRYPT_AUTOSMIME, 1 },
+ { "crypt_autosmime", DT_BOOL, R_NONE, UL &OPT_CRYPT_AUTOSMIME, 1 },
/*
** .pp
** This variable controls whether or not NeoMutt may automatically enable
** $$crypt_replyencrypt,
** $$crypt_autosign, $$crypt_replysign and $$smime_is_default.
*/
- { "crypt_confirmhook", DT_BOOL, R_NONE, OPT_CRYPT_CONFIRMHOOK, 1 },
+ { "crypt_confirmhook", DT_BOOL, R_NONE, UL &OPT_CRYPT_CONFIRMHOOK, 1 },
/*
** .pp
** If set, then you will be prompted for confirmation of keys when using
** be presented. This is generally considered unsafe, especially where
** typos are concerned.
*/
- { "crypt_opportunistic_encrypt", DT_BOOL, R_NONE, OPT_CRYPT_OPPORTUNISTIC_ENCRYPT, 0 },
+ { "crypt_opportunistic_encrypt", DT_BOOL, R_NONE, UL &OPT_CRYPT_OPPORTUNISTIC_ENCRYPT, 0 },
/*
** .pp
** Setting this variable will cause NeoMutt to automatically enable and
** (Crypto only)
*/
{ "pgp_replyencrypt", DT_SYNONYM, R_NONE, UL "crypt_replyencrypt", 1 },
- { "crypt_replyencrypt", DT_BOOL, R_NONE, OPT_CRYPT_REPLYENCRYPT, 1 },
+ { "crypt_replyencrypt", DT_BOOL, R_NONE, UL &OPT_CRYPT_REPLYENCRYPT, 1 },
/*
** .pp
** If \fIset\fP, automatically PGP or OpenSSL encrypt replies to messages which are
** (Crypto only)
*/
{ "pgp_replysign", DT_SYNONYM, R_NONE, UL "crypt_replysign", 0 },
- { "crypt_replysign", DT_BOOL, R_NONE, OPT_CRYPT_REPLYSIGN, 0 },
+ { "crypt_replysign", DT_BOOL, R_NONE, UL &OPT_CRYPT_REPLYSIGN, 0 },
/*
** .pp
** If \fIset\fP, automatically PGP or OpenSSL sign replies to messages which are
** (Crypto only)
*/
{ "pgp_replysignencrypted", DT_SYNONYM, R_NONE, UL "crypt_replysignencrypted", 0 },
- { "crypt_replysignencrypted", DT_BOOL, R_NONE, OPT_CRYPT_REPLYSIGNENCRYPTED, 0 },
+ { "crypt_replysignencrypted", DT_BOOL, R_NONE, UL &OPT_CRYPT_REPLYSIGNENCRYPTED, 0 },
/*
** .pp
** If \fIset\fP, automatically PGP or OpenSSL sign replies to messages
** to find out whether an encrypted message is also signed.
** (Crypto only)
*/
- { "crypt_timestamp", DT_BOOL, R_NONE, OPT_CRYPT_TIMESTAMP, 1 },
+ { "crypt_timestamp", DT_BOOL, R_NONE, UL &OPT_CRYPT_TIMESTAMP, 1 },
/*
** .pp
** If \fIset\fP, NeoMutt will include a time stamp in the lines surrounding
** you may \fIunset\fP this setting.
** (Crypto only)
*/
- { "crypt_use_gpgme", DT_BOOL, R_NONE, OPT_CRYPT_USE_GPGME, 0 },
+ { "crypt_use_gpgme", DT_BOOL, R_NONE, UL &OPT_CRYPT_USE_GPGME, 0 },
/*
** .pp
** This variable controls the use of the GPGME-enabled crypto backends.
** Note that the GPGME backend does not support creating old-style inline
** (traditional) PGP encrypted or signed messages (see $$pgp_autoinline).
*/
- { "crypt_use_pka", DT_BOOL, R_NONE, OPT_CRYPT_USE_PKA, 0 },
+ { "crypt_use_pka", DT_BOOL, R_NONE, UL &OPT_CRYPT_USE_PKA, 0 },
/*
** .pp
** Controls whether NeoMutt uses PKA
** verification (only supported by the GPGME backend).
*/
{ "pgp_verify_sig", DT_SYNONYM, R_NONE, UL "crypt_verify_sig", 0 },
- { "crypt_verify_sig", DT_QUAD, R_NONE, OPT_CRYPT_VERIFY_SIG, MUTT_YES },
+ { "crypt_verify_sig", DT_QUAD, R_NONE, UL &OPT_CRYPT_VERIFY_SIG, MUTT_YES },
/*
** .pp
** If \fI``yes''\fP, always attempt to verify PGP or S/MIME signatures.
** ``$alternates'') and is to or cc'ed to a user matching the given
** regular expression.
*/
- { "delete", DT_QUAD, R_NONE, OPT_DELETE, MUTT_ASKYES },
+ { "delete", DT_QUAD, R_NONE, UL &OPT_DELETE, MUTT_ASKYES },
/*
** .pp
** Controls whether or not messages are really deleted when closing or
** deleting will automatically be purged without prompting. If set to
** \fIno\fP, messages marked for deletion will be kept in the mailbox.
*/
- { "delete_untag", DT_BOOL, R_NONE, OPT_DELETE_UNTAG, 1 },
+ { "delete_untag", DT_BOOL, R_NONE, UL &OPT_DELETE_UNTAG, 1 },
/*
** .pp
** If this option is \fIset\fP, NeoMutt will untag messages when marking them
** for deletion. This applies when you either explicitly delete a message,
** or when you save it to another folder.
*/
- { "digest_collapse", DT_BOOL, R_NONE, OPT_DIGEST_COLLAPSE, 1 },
+ { "digest_collapse", DT_BOOL, R_NONE, UL &OPT_DIGEST_COLLAPSE, 1 },
/*
** .pp
** If this option is \fIset\fP, NeoMutt's received-attachments menu will not show the subparts of
** for DSN. For SMTP delivery, DSN support is auto-detected so that it
** depends on the server whether DSN will be used or not.
*/
- { "duplicate_threads", DT_BOOL, R_RESORT|R_RESORT_INIT|R_INDEX, OPT_DUPLICATE_THREADS, 1 },
+ { "duplicate_threads", DT_BOOL, R_RESORT|R_RESORT_INIT|R_INDEX, UL &OPT_DUPLICATE_THREADS, 1 },
/*
** .pp
** This variable controls whether NeoMutt, when $$sort is set to \fIthreads\fP, threads
** that it thinks they are duplicates of each other with an equals sign
** in the thread tree.
*/
- { "edit_headers", DT_BOOL, R_NONE, OPT_EDIT_HEADERS, 0 },
+ { "edit_headers", DT_BOOL, R_NONE, UL &OPT_EDIT_HEADERS, 0 },
/*
** .pp
** This option allows you to edit the header of your outgoing messages
** This variable specifies the subject to be used when replying to an email
** with an empty subject. It defaults to "Re: your mail".
*/
- { "encode_from", DT_BOOL, R_NONE, OPT_ENCODE_FROM, 0 },
+ { "encode_from", DT_BOOL, R_NONE, UL &OPT_ENCODE_FROM, 0 },
/*
** .pp
** When \fIset\fP, NeoMutt will quoted-printable encode messages when
** .pp
** Escape character to use for functions in the built-in editor.
*/
- { "fast_reply", DT_BOOL, R_NONE, OPT_FAST_REPLY, 0 },
+ { "fast_reply", DT_BOOL, R_NONE, UL &OPT_FAST_REPLY, 0 },
/*
** .pp
** When \fIset\fP, the initial prompt for recipients and subject are skipped
** \fBNote:\fP this variable has no effect when the $$autoedit
** variable is \fIset\fP.
*/
- { "fcc_attach", DT_QUAD, R_NONE, OPT_FCC_ATTACH, MUTT_YES },
+ { "fcc_attach", DT_QUAD, R_NONE, UL &OPT_FCC_ATTACH, MUTT_YES },
/*
** .pp
** This variable controls whether or not attachments on outgoing messages
** are saved along with the main body of your message.
*/
- { "fcc_clear", DT_BOOL, R_NONE, OPT_FCC_CLEAR, 0 },
+ { "fcc_clear", DT_BOOL, R_NONE, UL &OPT_FCC_CLEAR, 0 },
/*
** .pp
** When this variable is \fIset\fP, FCCs will be stored unencrypted and
** signed.
** (PGP only)
*/
- { "flag_safe", DT_BOOL, R_NONE, OPT_FLAG_SAFE, 0 },
+ { "flag_safe", DT_BOOL, R_NONE, UL &OPT_FLAG_SAFE, 0 },
/*
** .pp
** If set, flagged messages cannot be deleted.
** %m requires $$mail_check_stats to be set.
** %n requires $$mail_check_stats to be set (except for IMAP mailboxes).
*/
- { "followup_to", DT_BOOL, R_NONE, OPT_FOLLOWUP_TO, 1 },
+ { "followup_to", DT_BOOL, R_NONE, UL &OPT_FOLLOWUP_TO, 1 },
/*
** .pp
** Controls whether or not the ``Mail-Followup-To:'' header field is
** of the same email for you.
*/
#ifdef USE_NNTP
- { "followup_to_poster", DT_QUAD, R_NONE, OPT_FOLLOWUP_TO_POSTER, MUTT_ASKYES },
+ { "followup_to_poster", DT_QUAD, R_NONE, UL &OPT_FOLLOWUP_TO_POSTER, MUTT_ASKYES },
/*
** .pp
** If this variable is \fIset\fP and the keyword "poster" is present in
** message via mail.
*/
#endif
- { "force_name", DT_BOOL, R_NONE, OPT_FORCE_NAME, 0 },
+ { "force_name", DT_BOOL, R_NONE, UL &OPT_FORCE_NAME, 0 },
/*
** .pp
** This variable is similar to $$save_name, except that NeoMutt will
** For a full listing of defined \fCprintf(3)\fP-like sequences see
** the section on $$index_format. See also $$attribution_locale.
*/
- { "forward_decode", DT_BOOL, R_NONE, OPT_FORWARD_DECODE, 1 },
+ { "forward_decode", DT_BOOL, R_NONE, UL &OPT_FORWARD_DECODE, 1 },
/*
** .pp
** Controls the decoding of complex MIME messages into \fCtext/plain\fP when
{ "forw_decode", DT_SYNONYM, R_NONE, UL "forward_decode", 0 },
/*
*/
- { "forward_decrypt", DT_BOOL, R_NONE, OPT_FORWARD_DECRYPT, 1 },
+ { "forward_decrypt", DT_BOOL, R_NONE, UL &OPT_FORWARD_DECRYPT, 1 },
/*
** .pp
** Controls the handling of encrypted messages when forwarding a message.
{ "forw_decrypt", DT_SYNONYM, R_NONE, UL "forward_decrypt", 0 },
/*
*/
- { "forward_edit", DT_QUAD, R_NONE, OPT_FORWARD_EDIT, MUTT_YES },
+ { "forward_edit", DT_QUAD, R_NONE, UL &OPT_FORWARD_EDIT, MUTT_YES },
/*
** .pp
** This quadoption controls whether or not the user is automatically
{ "forw_format", DT_SYNONYM, R_NONE, UL "forward_format", 0 },
/*
*/
- { "forward_quote", DT_BOOL, R_NONE, OPT_FORWARD_QUOTE, 0 },
+ { "forward_quote", DT_BOOL, R_NONE, UL &OPT_FORWARD_QUOTE, 0 },
/*
** .pp
** When \fIset\fP, forwarded messages included in the main body of the
{ "forw_quote", DT_SYNONYM, R_NONE, UL "forward_quote", 0 },
/*
*/
- { "forward_references", DT_BOOL, R_NONE, OPT_FORWARD_REFERENCES, 0 },
+ { "forward_references", DT_BOOL, R_NONE, UL &OPT_FORWARD_REFERENCES, 0 },
/*
** .pp
** When \fIset\fP, forwarded messages set the ``In-Reply-To:'' and
{ "hdr_format", DT_SYNONYM, R_NONE, UL "index_format", 0 },
/*
*/
- { "hdrs", DT_BOOL, R_NONE, OPT_HDRS, 1 },
+ { "hdrs", DT_BOOL, R_NONE, UL &OPT_HDRS, 1 },
/*
** .pp
** When \fIunset\fP, the header fields normally added by the ``$my_hdr''
** composing a new message or replying in order to take effect. If \fIset\fP,
** the user defined header fields are added to every new message.
*/
- { "header", DT_BOOL, R_NONE, OPT_HEADER, 0 },
+ { "header", DT_BOOL, R_NONE, UL &OPT_HEADER, 0 },
/*
** .pp
** When \fIset\fP, this variable causes NeoMutt to include the header
** This variable specifies the header cache backend.
*/
#if defined(HAVE_QDBM) || defined(HAVE_TC) || defined(HAVE_KC)
- { "header_cache_compress", DT_BOOL, R_NONE, OPT_HEADER_CACHE_COMPRESS, 1 },
+ { "header_cache_compress", DT_BOOL, R_NONE, UL &OPT_HEADER_CACHE_COMPRESS, 1 },
/*
** .pp
** When NeoMutt is compiled with qdbm, tokyocabinet or kyotocabinet
*/
#endif /* HAVE_GDBM || HAVE_BDB */
#endif /* USE_HCACHE */
- { "header_color_partial", DT_BOOL, R_PAGER_FLOW, OPT_HEADER_COLOR_PARTIAL, 0 },
+ { "header_color_partial", DT_BOOL, R_PAGER_FLOW, UL &OPT_HEADER_COLOR_PARTIAL, 0 },
/*
** .pp
** When \fIset\fP, color header regexes behave like color body regexes:
** .pp
** See ``$color'' for more details.
*/
- { "help", DT_BOOL, R_REFLOW, OPT_HELP, 1 },
+ { "help", DT_BOOL, R_REFLOW, UL &OPT_HELP, 1 },
/*
** .pp
** When \fIset\fP, help lines describing the bindings for the major functions
** running. Since this variable is primarily aimed at new users, neither
** of these should present a major problem.
*/
- { "hidden_host", DT_BOOL, R_NONE, OPT_HIDDEN_HOST, 0 },
+ { "hidden_host", DT_BOOL, R_NONE, UL &OPT_HIDDEN_HOST, 0 },
/*
** .pp
** When \fIset\fP, NeoMutt will skip the host name part of $$hostname variable
** affect the generation of Message-IDs, and it will not lead to the
** cut-off of first-level domains.
*/
- { "hide_limited", DT_BOOL, R_TREE|R_INDEX, OPT_HIDE_LIMITED, 0 },
+ { "hide_limited", DT_BOOL, R_TREE|R_INDEX, UL &OPT_HIDE_LIMITED, 0 },
/*
** .pp
** When \fIset\fP, NeoMutt will not show the presence of messages that are hidden
** by limiting, in the thread tree.
*/
- { "hide_missing", DT_BOOL, R_TREE|R_INDEX, OPT_HIDE_MISSING, 1 },
+ { "hide_missing", DT_BOOL, R_TREE|R_INDEX, UL &OPT_HIDE_MISSING, 1 },
/*
** .pp
** When \fIset\fP, NeoMutt will not show the presence of missing messages in the
** thread tree.
*/
- { "hide_thread_subject", DT_BOOL, R_TREE|R_INDEX, OPT_HIDE_THREAD_SUBJECT, 1 },
+ { "hide_thread_subject", DT_BOOL, R_TREE|R_INDEX, UL &OPT_HIDE_THREAD_SUBJECT, 1 },
/*
** .pp
** When \fIset\fP, NeoMutt will not show the subject of messages in the thread
** tree that have the same subject as their parent or closest previously
** displayed sibling.
*/
- { "hide_top_limited", DT_BOOL, R_TREE|R_INDEX, OPT_HIDE_TOP_LIMITED, 0 },
+ { "hide_top_limited", DT_BOOL, R_TREE|R_INDEX, UL &OPT_HIDE_TOP_LIMITED, 0 },
/*
** .pp
** When \fIset\fP, NeoMutt will not show the presence of messages that are hidden
** by limiting, at the top of threads in the thread tree. Note that when
** $$hide_limited is \fIset\fP, this option will have no effect.
*/
- { "hide_top_missing", DT_BOOL, R_TREE|R_INDEX, OPT_HIDE_TOP_MISSING, 1 },
+ { "hide_top_missing", DT_BOOL, R_TREE|R_INDEX, UL &OPT_HIDE_TOP_MISSING, 1 },
/*
** .pp
** When \fIset\fP, NeoMutt will not show the presence of missing messages at the
** .pp
** Also see $$save_history.
*/
- { "history_remove_dups", DT_BOOL, R_NONE, OPT_HISTORY_REMOVE_DUPS, 0 },
+ { "history_remove_dups", DT_BOOL, R_NONE, UL &OPT_HISTORY_REMOVE_DUPS, 0 },
/*
** .pp
** When \fIset\fP, all of the string history will be scanned for duplicates
** when a new entry is added. Duplicate entries in the $$history_file will
** also be removed when it is periodically compacted.
*/
- { "honor_disposition", DT_BOOL, R_NONE, OPT_HONOR_DISPOSITION, 0 },
+ { "honor_disposition", DT_BOOL, R_NONE, UL &OPT_HONOR_DISPOSITION, 0 },
/*
** .pp
** When \fIset\fP, NeoMutt will not display attachments with a
** If \fIunset\fP, NeoMutt will render all MIME parts it can
** properly transform to plain text.
*/
- { "honor_followup_to", DT_QUAD, R_NONE, OPT_HONOR_FOLLOWUP_TO, MUTT_YES },
+ { "honor_followup_to", DT_QUAD, R_NONE, UL &OPT_HONOR_FOLLOWUP_TO, MUTT_YES },
/*
** .pp
** This variable controls whether or not a Mail-Followup-To header is
** Also see $$use_domain and $$hidden_host.
*/
#ifdef HAVE_LIBIDN
- { "idn_decode", DT_BOOL, R_MENU, OPT_IDN_DECODE, 1 },
+ { "idn_decode", DT_BOOL, R_MENU, UL &OPT_IDN_DECODE, 1 },
/*
** .pp
** When \fIset\fP, NeoMutt will show you international domain names decoded.
** Note: You can use IDNs for addresses even if this is \fIunset\fP.
** This variable only affects decoding. (IDN only)
*/
- { "idn_encode", DT_BOOL, R_MENU, OPT_IDN_ENCODE, 1 },
+ { "idn_encode", DT_BOOL, R_MENU, UL &OPT_IDN_ENCODE, 1 },
/*
** .pp
** When \fIset\fP, NeoMutt will encode international domain names using
** UTF-8 encoded domains. (IDN only)
*/
#endif /* HAVE_LIBIDN */
- { "ignore_linear_white_space", DT_BOOL, R_NONE, OPT_IGNORE_LINEAR_WHITE_SPACE, 0 },
+ { "ignore_linear_white_space", DT_BOOL, R_NONE, UL &OPT_IGNORE_LINEAR_WHITE_SPACE, 0 },
/*
** .pp
** This option replaces linear-white-space between encoded-word
** and text to a single space to prevent the display of MIME-encoded
** ``Subject:'' field from being divided into multiple lines.
*/
- { "ignore_list_reply_to", DT_BOOL, R_NONE, OPT_IGNORE_LIST_REPLY_TO, 0 },
+ { "ignore_list_reply_to", DT_BOOL, R_NONE, UL &OPT_IGNORE_LIST_REPLY_TO, 0 },
/*
** .pp
** Affects the behavior of the \fC<reply>\fP function when replying to
** the previous methods are unavailable. If a method is available but
** authentication fails, NeoMutt will not connect to the IMAP server.
*/
- { "imap_check_subscribed", DT_BOOL, R_NONE, OPT_IMAP_CHECK_SUBSCRIBED, 0 },
+ { "imap_check_subscribed", DT_BOOL, R_NONE, UL &OPT_IMAP_CHECK_SUBSCRIBED, 0 },
/*
** .pp
** When \fIset\fP, NeoMutt will fetch the set of subscribed folders from
** and not contain the colon, e.g. ``X-BOGOSITY X-SPAM-STATUS'' for the
** ``X-Bogosity:'' and ``X-Spam-Status:'' header fields.
*/
- { "imap_idle", DT_BOOL, R_NONE, OPT_IMAP_IDLE, 0 },
+ { "imap_idle", DT_BOOL, R_NONE, UL &OPT_IMAP_IDLE, 0 },
/*
** .pp
** When \fIset\fP, NeoMutt will attempt to use the IMAP IDLE extension
** violated every now and then. Reduce this number if you find yourself
** getting disconnected from your IMAP server due to inactivity.
*/
- { "imap_list_subscribed", DT_BOOL, R_NONE, OPT_IMAP_LIST_SUBSCRIBED, 0 },
+ { "imap_list_subscribed", DT_BOOL, R_NONE, UL &OPT_IMAP_LIST_SUBSCRIBED, 0 },
/*
** .pp
** This variable configures whether IMAP folder browsing will look for
** fairly secure machine, because the superuser can read your neomuttrc even
** if you are the only one who can read the file.
*/
- { "imap_passive", DT_BOOL, R_NONE, OPT_IMAP_PASSIVE, 1 },
+ { "imap_passive", DT_BOOL, R_NONE, UL &OPT_IMAP_PASSIVE, 1 },
/*
** .pp
** When \fIset\fP, NeoMutt will not open new IMAP connections to check for new
** user/password pairs on NeoMutt invocation, or if opening the connection
** is slow.
*/
- { "imap_peek", DT_BOOL, R_NONE, OPT_IMAP_PEEK, 1 },
+ { "imap_peek", DT_BOOL, R_NONE, UL &OPT_IMAP_PEEK, 1 },
/*
** .pp
** When \fIset\fP, NeoMutt will avoid implicitly marking your mail as read whenever
** for new mail, before timing out and closing the connection. Set
** to 0 to disable timing out.
*/
- { "imap_servernoise", DT_BOOL, R_NONE, OPT_IMAP_SERVERNOISE, 1 },
+ { "imap_servernoise", DT_BOOL, R_NONE, UL &OPT_IMAP_SERVERNOISE, 1 },
/*
** .pp
** When \fIset\fP, NeoMutt will display warning messages from the IMAP
** This variable defaults to your user name on the local machine.
*/
#endif
- { "implicit_autoview", DT_BOOL,R_NONE, OPT_IMPLICIT_AUTOVIEW, 0 },
+ { "implicit_autoview", DT_BOOL,R_NONE, UL &OPT_IMPLICIT_AUTOVIEW, 0 },
/*
** .pp
** If set to ``yes'', NeoMutt will look for a mailcap entry with the
** use the viewer defined in that entry to convert the body part to text
** form.
*/
- { "include", DT_QUAD, R_NONE, OPT_INCLUDE, MUTT_ASKYES },
+ { "include", DT_QUAD, R_NONE, UL &OPT_INCLUDE, MUTT_ASKYES },
/*
** .pp
** Controls whether or not a copy of the message(s) you are replying to
** is included in your reply.
*/
- { "include_onlyfirst", DT_BOOL, R_NONE, OPT_INCLUDE_ONLYFIRST, 0 },
+ { "include_onlyfirst", DT_BOOL, R_NONE, UL &OPT_INCLUDE_ONLYFIRST, 0 },
/*
** .pp
** Controls whether or not NeoMutt includes only the first attachment
** .pp
** How to invoke ispell (GNU's spell-checking software).
*/
- { "keep_flagged", DT_BOOL, R_NONE, OPT_KEEP_FLAGGED, 0 },
+ { "keep_flagged", DT_BOOL, R_NONE, UL &OPT_KEEP_FLAGGED, 0 },
/*
** .pp
** If \fIset\fP, read messages marked as flagged will not be moved
** This variable configures how often (in seconds) NeoMutt should look for
** new mail. Also see the $$timeout variable.
*/
- { "mail_check_recent",DT_BOOL, R_NONE, OPT_MAIL_CHECK_RECENT, 1 },
+ { "mail_check_recent",DT_BOOL, R_NONE, UL &OPT_MAIL_CHECK_RECENT, 1 },
/*
** .pp
** When \fIset\fP, NeoMutt will only notify you about new mail that has been received
** When \fI$$mark_old\fP is set, NeoMutt does not consider the mailbox to contain new
** mail if only old messages exist.
*/
- { "mail_check_stats", DT_BOOL, R_NONE, OPT_MAIL_CHECK_STATS, 0 },
+ { "mail_check_stats", DT_BOOL, R_NONE, UL &OPT_MAIL_CHECK_STATS, 0 },
/*
** .pp
** When \fIset\fP, NeoMutt will periodically calculate message
** This variable specifies which files to consult when attempting to
** display MIME bodies not directly supported by NeoMutt.
*/
- { "mailcap_sanitize", DT_BOOL, R_NONE, OPT_MAILCAP_SANITIZE, 1 },
+ { "mailcap_sanitize", DT_BOOL, R_NONE, UL &OPT_MAILCAP_SANITIZE, 1 },
/*
** .pp
** If \fIset\fP, NeoMutt will restrict possible characters in mailcap % expandos
** DOING!\fP
*/
#ifdef USE_HCACHE
- { "maildir_header_cache_verify", DT_BOOL, R_NONE, OPT_MAILDIR_HEADER_CACHE_VERIFY, 1 },
+ { "maildir_header_cache_verify", DT_BOOL, R_NONE, UL &OPT_MAILDIR_HEADER_CACHE_VERIFY, 1 },
/*
** .pp
** Check for Maildir unaware programs other than NeoMutt having modified maildir
** folders).
*/
#endif
- { "maildir_trash", DT_BOOL, R_NONE, OPT_MAILDIR_TRASH, 0 },
+ { "maildir_trash", DT_BOOL, R_NONE, UL &OPT_MAILDIR_TRASH, 0 },
/*
** .pp
** If \fIset\fP, messages marked as deleted will be saved with the maildir
** to maildir-style mailboxes. Setting it will have no effect on other
** mailbox types.
*/
- { "maildir_check_cur", DT_BOOL, R_NONE, OPT_MAILDIR_CHECK_CUR, 0 },
+ { "maildir_check_cur", DT_BOOL, R_NONE, UL &OPT_MAILDIR_CHECK_CUR, 0 },
/*
** .pp
** If \fIset\fP, NeoMutt will poll both the new and cur directories of
** automatically generated with \fI<mark-message>a\fP will be composed
** from this prefix and the letter \fIa\fP.
*/
- { "mark_old", DT_BOOL, R_BOTH, OPT_MARK_OLD, 1 },
+ { "mark_old", DT_BOOL, R_BOTH, UL &OPT_MARK_OLD, 1 },
/*
** .pp
** Controls whether or not NeoMutt marks \fInew\fP \fBunread\fP
** will show up with an ``O'' next to them in the index menu,
** indicating that they are old.
*/
- { "markers", DT_BOOL, R_PAGER_FLOW, OPT_MARKERS, 1 },
+ { "markers", DT_BOOL, R_PAGER_FLOW, UL &OPT_MARKERS, 1 },
/*
** .pp
** Controls the display of wrapped lines in the internal pager. If set, a
** This variable controls the number of lines of context that are given
** when scrolling through menus. (Similar to $$pager_context.)
*/
- { "menu_move_off", DT_BOOL, R_NONE, OPT_MENU_MOVE_OFF, 1 },
+ { "menu_move_off", DT_BOOL, R_NONE, UL &OPT_MENU_MOVE_OFF, 1 },
/*
** .pp
** When \fIunset\fP, the bottom entry of menus will never scroll up past
** the bottom of the screen, unless there are less entries than lines.
** When \fIset\fP, the bottom entry may move off the bottom.
*/
- { "menu_scroll", DT_BOOL, R_NONE, OPT_MENU_SCROLL, 0 },
+ { "menu_scroll", DT_BOOL, R_NONE, UL &OPT_MENU_SCROLL, 0 },
/*
** .pp
** When \fIset\fP, menus will be scrolled up or down one line when you
** (useful for slow links to avoid many redraws).
*/
#if defined(USE_IMAP) || defined(USE_POP)
- { "message_cache_clean", DT_BOOL, R_NONE, OPT_MESSAGE_CACHE_CLEAN, 0 },
+ { "message_cache_clean", DT_BOOL, R_NONE, UL &OPT_MESSAGE_CACHE_CLEAN, 0 },
/*
** .pp
** If \fIset\fP, NeoMutt will clean out obsolete entries from the message cache when
{ "msg_format", DT_SYNONYM, R_NONE, UL "message_format", 0 },
/*
*/
- { "meta_key", DT_BOOL, R_NONE, OPT_META_KEY, 0 },
+ { "meta_key", DT_BOOL, R_NONE, UL &OPT_META_KEY, 0 },
/*
** .pp
** If \fIset\fP, forces NeoMutt to interpret keystrokes with the high bit (bit 8)
** high bit from \fC0xf8\fP is \fC0x78\fP, which is the ASCII character
** ``x''.
*/
- { "metoo", DT_BOOL, R_NONE, OPT_METOO, 0 },
+ { "metoo", DT_BOOL, R_NONE, UL &OPT_METOO, 0 },
/*
** .pp
** If \fIunset\fP, NeoMutt will remove your address (see the ``$alternates''
** command) from the list of recipients when replying to a message.
*/
- { "mh_purge", DT_BOOL, R_NONE, OPT_MH_PURGE, 0 },
+ { "mh_purge", DT_BOOL, R_NONE, UL &OPT_MH_PURGE, 0 },
/*
** .pp
** When \fIunset\fP, NeoMutt will mimic mh's behavior and rename deleted messages
** .pp
** The name of the MH sequence used for unseen messages.
*/
- { "mime_forward", DT_QUAD, R_NONE, OPT_MIME_FORWARD, MUTT_NO },
+ { "mime_forward", DT_QUAD, R_NONE, UL &OPT_MIME_FORWARD, MUTT_NO },
/*
** .pp
** When \fIset\fP, the message you are forwarding will be attached as a
** .pp
** Also see $$forward_decode and $$mime_forward_decode.
*/
- { "mime_forward_decode", DT_BOOL, R_NONE, OPT_MIME_FORWARD_DECODE, 0 },
+ { "mime_forward_decode", DT_BOOL, R_NONE, UL &OPT_MIME_FORWARD_DECODE, 0 },
/*
** .pp
** Controls the decoding of complex MIME messages into \fCtext/plain\fP when
{ "mime_fwd", DT_SYNONYM, R_NONE, UL "mime_forward", 0 },
/*
*/
- { "mime_forward_rest", DT_QUAD, R_NONE, OPT_MIME_FORWARD_REST, MUTT_YES },
+ { "mime_forward_rest", DT_QUAD, R_NONE, UL &OPT_MIME_FORWARD_REST, MUTT_YES },
/*
** .pp
** When forwarding multiple attachments of a MIME message from the attachment
** be attached to the newly composed message if this option is \fIset\fP.
*/
#ifdef USE_NNTP
- { "mime_subject", DT_BOOL, R_NONE, OPT_MIME_SUBJECT, 1 },
+ { "mime_subject", DT_BOOL, R_NONE, UL &OPT_MIME_SUBJECT, 1 },
/*
** .pp
** If \fIunset\fP, 8-bit ``subject:'' line in article header will not be
** Suggested values are ``xdg-mime query filetype'' or
** ``file -bi''.
*/
- { "mime_type_query_first", DT_BOOL, R_NONE, OPT_MIME_TYPE_QUERY_FIRST, 0 },
+ { "mime_type_query_first", DT_BOOL, R_NONE, UL &OPT_MIME_TYPE_QUERY_FIRST, 0 },
/*
** .pp
** When \fIset\fP, the $$mime_type_query_command will be run before the
** mixmaster chain.
*/
#endif
- { "move", DT_QUAD, R_NONE, OPT_MOVE, MUTT_NO },
+ { "move", DT_QUAD, R_NONE, UL &OPT_MOVE, MUTT_NO },
/*
** .pp
** Controls whether or not NeoMutt will move read messages
** from your spool mailbox to your $$mbox mailbox, or as a result of
** a ``$mbox-hook'' command.
*/
- { "narrow_tree", DT_BOOL, R_TREE|R_INDEX, OPT_NARROW_TREE, 0 },
+ { "narrow_tree", DT_BOOL, R_TREE|R_INDEX, UL &OPT_NARROW_TREE, 0 },
/*
** .pp
** This variable, when \fIset\fP, makes the thread tree narrower, allowing
** number, oldest articles will be ignored. Also controls how many
** articles headers will be saved in cache when you quit newsgroup.
*/
- { "nntp_listgroup", DT_BOOL, R_NONE, OPT_NNTP_LISTGROUP, 1 },
+ { "nntp_listgroup", DT_BOOL, R_NONE, UL &OPT_NNTP_LISTGROUP, 1 },
/*
** .pp
** This variable controls whether or not existence of each article is
** checked when newsgroup is entered.
*/
- { "nntp_load_description", DT_BOOL, R_NONE, OPT_NNTP_LOAD_DESCRIPTION, 1 },
+ { "nntp_load_description", DT_BOOL, R_NONE, UL &OPT_NNTP_LOAD_DESCRIPTION, 1 },
/*
** .pp
** This variable controls whether or not descriptions for each newsgroup
** .pp
** This variable specifies the default query type (threads or messages) used in notmuch queries.
*/
- { "nm_record", DT_BOOL, R_NONE, OPT_NM_RECORD, 0 },
+ { "nm_record", DT_BOOL, R_NONE, UL &OPT_NM_RECORD, 0 },
/*
** .pp
** This variable specifies if the NeoMutt record should indexed by notmuch.
** is less than $$pager_index_lines, then the index will only use as
** many lines as it needs.
*/
- { "pager_stop", DT_BOOL, R_NONE, OPT_PAGER_STOP, 0 },
+ { "pager_stop", DT_BOOL, R_NONE, UL &OPT_PAGER_STOP, 0 },
/*
** .pp
** When \fIset\fP, the internal-pager will \fBnot\fP move to the next message
** when you are at the end of a message and invoke the \fC<next-page>\fP
** function.
*/
- { "pgp_auto_decode", DT_BOOL, R_NONE, OPT_PGP_AUTO_DECODE, 0 },
+ { "pgp_auto_decode", DT_BOOL, R_NONE, UL &OPT_PGP_AUTO_DECODE, 0 },
/*
** .pp
** If \fIset\fP, NeoMutt will automatically attempt to decrypt traditional PGP
** check the message for traditional pgp.
*/
{ "pgp_create_traditional", DT_SYNONYM, R_NONE, UL "pgp_autoinline", 0 },
- { "pgp_autoinline", DT_BOOL, R_NONE, OPT_PGP_AUTOINLINE, 0 },
+ { "pgp_autoinline", DT_BOOL, R_NONE, UL &OPT_PGP_AUTOINLINE, 0 },
/*
** .pp
** This option controls whether NeoMutt generates old-style inline
** \fBdeprecated\fP.
** (PGP only)
*/
- { "pgp_check_exit", DT_BOOL, R_NONE, OPT_PGP_CHECK_EXIT, 1 },
+ { "pgp_check_exit", DT_BOOL, R_NONE, UL &OPT_PGP_CHECK_EXIT, 1 },
/*
** .pp
** If \fIset\fP, NeoMutt will check the exit code of the PGP subprocess when
** even for bad signatures.
** (PGP only)
*/
- { "pgp_ignore_subkeys", DT_BOOL, R_NONE, OPT_PGP_IGNORE_SUBKEYS, 1 },
+ { "pgp_ignore_subkeys", DT_BOOL, R_NONE, UL &OPT_PGP_IGNORE_SUBKEYS, 1 },
/*
** .pp
** Setting this variable will cause NeoMutt to ignore OpenPGP subkeys. Instead,
** possible \fCprintf(3)\fP-like sequences.
** (PGP only)
*/
- { "pgp_long_ids", DT_BOOL, R_NONE, OPT_PGP_LONG_IDS, 1 },
+ { "pgp_long_ids", DT_BOOL, R_NONE, UL &OPT_PGP_LONG_IDS, 1 },
/*
** .pp
** If \fIset\fP, use 64 bit PGP key IDs, if \fIunset\fP use the normal 32 bit key IDs.
** in the key selection menu and a few other places.
** (PGP only)
*/
- { "pgp_mime_auto", DT_QUAD, R_NONE, OPT_PGP_MIME_AUTO, MUTT_ASKYES },
+ { "pgp_mime_auto", DT_QUAD, R_NONE, UL &OPT_PGP_MIME_AUTO, MUTT_ASKYES },
/*
** .pp
** This option controls whether NeoMutt will prompt you for
** (PGP only)
*/
{ "pgp_auto_traditional", DT_SYNONYM, R_NONE, UL "pgp_replyinline", 0 },
- { "pgp_replyinline", DT_BOOL, R_NONE, OPT_PGP_REPLYINLINE, 0 },
+ { "pgp_replyinline", DT_BOOL, R_NONE, UL &OPT_PGP_REPLYINLINE, 0 },
/*
** .pp
** Setting this variable will cause NeoMutt to always attempt to
** (PGP only)
**
*/
- { "pgp_retainable_sigs", DT_BOOL, R_NONE, OPT_PGP_RETAINABLE_SIGS, 0 },
+ { "pgp_retainable_sigs", DT_BOOL, R_NONE, UL &OPT_PGP_RETAINABLE_SIGS, 0 },
/*
** .pp
** If \fIset\fP, signed and encrypted messages will consist of nested
** removed, while the inner \fCmultipart/signed\fP part is retained.
** (PGP only)
*/
- { "pgp_self_encrypt", DT_BOOL, R_NONE, OPT_PGP_SELF_ENCRYPT, 0 },
+ { "pgp_self_encrypt", DT_BOOL, R_NONE, UL &OPT_PGP_SELF_ENCRYPT, 0 },
/*
** .pp
** When \fIset\fP, PGP encrypted messages will also be encrypted
** It should be in keyid or fingerprint form (e.g. 0x00112233).
** (PGP only)
*/
- { "pgp_show_unusable", DT_BOOL, R_NONE, OPT_PGP_SHOW_UNUSABLE, 1 },
+ { "pgp_show_unusable", DT_BOOL, R_NONE, UL &OPT_PGP_SHOW_UNUSABLE, 1 },
/*
** .pp
** If \fIset\fP, NeoMutt will display non-usable keys on the PGP key selection
** ``reverse-''.
** (PGP only)
*/
- { "pgp_strict_enc", DT_BOOL, R_NONE, OPT_PGP_STRICT_ENC, 1 },
+ { "pgp_strict_enc", DT_BOOL, R_NONE, UL &OPT_PGP_STRICT_ENC, 1 },
/*
** .pp
** If \fIset\fP, NeoMutt will automatically encode PGP/MIME signed messages as
** not used.
** (PGP only)
*/
- { "pgp_use_gpg_agent", DT_BOOL, R_NONE, OPT_PGP_USE_GPG_AGENT, 0 },
+ { "pgp_use_gpg_agent", DT_BOOL, R_NONE, UL &OPT_PGP_USE_GPG_AGENT, 0 },
/*
** .pp
** If \fIset\fP, NeoMutt will use a possibly-running \fCgpg-agent(1)\fP process.
** possible \fCprintf(3)\fP-like sequences.
** (PGP only)
*/
- { "pipe_decode", DT_BOOL, R_NONE, OPT_PIPE_DECODE, 0 },
+ { "pipe_decode", DT_BOOL, R_NONE, UL &OPT_PIPE_DECODE, 0 },
/*
** .pp
** Used in connection with the \fC<pipe-message>\fP command. When \fIunset\fP,
** The separator to add between messages when piping a list of tagged
** messages to an external Unix command.
*/
- { "pipe_split", DT_BOOL, R_NONE, OPT_PIPE_SPLIT, 0 },
+ { "pipe_split", DT_BOOL, R_NONE, UL &OPT_PIPE_SPLIT, 0 },
/*
** .pp
** Used in connection with the \fC<pipe-message>\fP function following
** and the $$pipe_sep separator is added after each message.
*/
#ifdef USE_POP
- { "pop_auth_try_all", DT_BOOL, R_NONE, OPT_POP_AUTH_TRY_ALL, 1 },
+ { "pop_auth_try_all", DT_BOOL, R_NONE, UL &OPT_POP_AUTH_TRY_ALL, 1 },
/*
** .pp
** If \fIset\fP, NeoMutt will try all available authentication methods.
** This variable configures how often (in seconds) NeoMutt should look for
** new mail in the currently selected mailbox if it is a POP mailbox.
*/
- { "pop_delete", DT_QUAD, R_NONE, OPT_POP_DELETE, MUTT_ASKNO },
+ { "pop_delete", DT_QUAD, R_NONE, UL &OPT_POP_DELETE, MUTT_ASKNO },
/*
** .pp
** If \fIset\fP, NeoMutt will delete successfully downloaded messages from the POP
** .pp
** where ``[...]'' denotes an optional part.
*/
- { "pop_last", DT_BOOL, R_NONE, OPT_POP_LAST, 0 },
+ { "pop_last", DT_BOOL, R_NONE, UL &OPT_POP_LAST, 0 },
/*
** .pp
** If this variable is \fIset\fP, NeoMutt will try to use the ``\fCLAST\fP'' POP command
** fairly secure machine, because the superuser can read your neomuttrc
** even if you are the only one who can read the file.
*/
- { "pop_reconnect", DT_QUAD, R_NONE, OPT_POP_RECONNECT, MUTT_ASKYES },
+ { "pop_reconnect", DT_QUAD, R_NONE, UL &OPT_POP_RECONNECT, MUTT_ASKYES },
/*
** .pp
** Controls whether or not NeoMutt will try to reconnect to the POP server if
/*
*/
#ifdef USE_NNTP
- { "post_moderated", DT_QUAD, R_NONE, OPT_POST_MODERATED, MUTT_ASKYES },
+ { "post_moderated", DT_QUAD, R_NONE, UL &OPT_POST_MODERATED, MUTT_ASKYES },
/*
** .pp
** If set to \fIyes\fP, NeoMutt will post article to newsgroup that have
** posting will not have an effect.
*/
#endif
- { "postpone", DT_QUAD, R_NONE, OPT_POSTPONE, MUTT_ASKYES },
+ { "postpone", DT_QUAD, R_NONE, UL &OPT_POSTPONE, MUTT_ASKYES },
/*
** .pp
** Controls whether or not messages are saved in the $$postponed
** .pp
** Also see the $$postpone variable.
*/
- { "postpone_encrypt", DT_BOOL, R_NONE, OPT_POSTPONE_ENCRYPT, 0 },
+ { "postpone_encrypt", DT_BOOL, R_NONE, UL &OPT_POSTPONE_ENCRYPT, 0 },
/*
** .pp
** When \fIset\fP, postponed messages that are marked for encryption will be
** remote machine without having to enter a password.
*/
#endif /* USE_SOCKET */
- { "print", DT_QUAD, R_NONE, OPT_PRINT, MUTT_ASKNO },
+ { "print", DT_QUAD, R_NONE, UL &OPT_PRINT, MUTT_ASKNO },
/*
** .pp
** Controls whether or not NeoMutt really prints messages.
{ "print_cmd", DT_SYNONYM, R_NONE, UL "print_command", 0 },
/*
*/
- { "print_decode", DT_BOOL, R_NONE, OPT_PRINT_DECODE, 1 },
+ { "print_decode", DT_BOOL, R_NONE, UL &OPT_PRINT_DECODE, 1 },
/*
** .pp
** Used in connection with the \fC<print-message>\fP command. If this
** some advanced printer filter which is able to properly format
** e-mail messages for printing.
*/
- { "print_split", DT_BOOL, R_NONE, OPT_PRINT_SPLIT, 0 },
+ { "print_split", DT_BOOL, R_NONE, UL &OPT_PRINT_SPLIT, 0 },
/*
** .pp
** Used in connection with the \fC<print-message>\fP command. If this option
** Those who use the \fCenscript\fP(1) program's mail-printing mode will
** most likely want to \fIset\fP this option.
*/
- { "prompt_after", DT_BOOL, R_NONE, OPT_PROMPT_AFTER, 1 },
+ { "prompt_after", DT_BOOL, R_NONE, UL &OPT_PROMPT_AFTER, 1 },
/*
** .pp
** If you use an \fIexternal\fP $$pager, setting this variable will
** .pp
** * = can be optionally printed if nonzero, see the $$status_format documentation.
*/
- { "quit", DT_QUAD, R_NONE, OPT_QUIT, MUTT_YES },
+ { "quit", DT_QUAD, R_NONE, UL &OPT_QUIT, MUTT_YES },
/*
** .pp
** This variable controls whether ``quit'' and ``exit'' actually quit
** Also see the $$write_inc, $$net_inc and $$time_inc variables and the
** ``$tuning'' section of the manual for performance considerations.
*/
- { "read_only", DT_BOOL, R_NONE, OPT_READ_ONLY, 0 },
+ { "read_only", DT_BOOL, R_NONE, UL &OPT_READ_ONLY, 0 },
/*
** .pp
** If \fIset\fP, all folders are opened in read-only mode.
** variable will \fInot\fP be used when the user has set a real name
** in the $$from variable.
*/
- { "recall", DT_QUAD, R_NONE, OPT_RECALL, MUTT_ASKYES },
+ { "recall", DT_QUAD, R_NONE, UL &OPT_RECALL, MUTT_ASKYES },
/*
** .pp
** Controls whether or not NeoMutt recalls postponed messages
** The value of \fI$$record\fP is overridden by the $$force_name and
** $$save_name variables, and the ``$fcc-hook'' command.
*/
- { "reflow_space_quotes", DT_BOOL, R_NONE, OPT_REFLOW_SPACE_QUOTES, 1 },
+ { "reflow_space_quotes", DT_BOOL, R_NONE, UL &OPT_REFLOW_SPACE_QUOTES, 1 },
/*
** .pp
** This option controls how quotes from format=flowed messages are displayed
** \fBNote:\fP If $$reflow_text is \fIunset\fP, this option has no effect.
** Also, this option does not affect replies when $$text_flowed is \fIset\fP.
*/
- { "reflow_text", DT_BOOL, R_NONE, OPT_REFLOW_TEXT, 1 },
+ { "reflow_text", DT_BOOL, R_NONE, UL &OPT_REFLOW_TEXT, 1 },
/*
** .pp
** When \fIset\fP, NeoMutt will reformat paragraphs in text/plain
** and replying. The default value corresponds to the English "Re:" and
** the German "Aw:".
*/
- { "reply_self", DT_BOOL, R_NONE, OPT_REPLY_SELF, 0 },
+ { "reply_self", DT_BOOL, R_NONE, UL &OPT_REPLY_SELF, 0 },
/*
** .pp
** If \fIunset\fP and you are replying to a message sent by you, NeoMutt will
** .pp
** Also see the ``$alternates'' command.
*/
- { "reply_to", DT_QUAD, R_NONE, OPT_REPLY_TO, MUTT_ASKYES },
+ { "reply_to", DT_QUAD, R_NONE, UL &OPT_REPLY_TO, MUTT_ASKYES },
/*
** .pp
** If \fIset\fP, when replying to a message, NeoMutt will use the address listed
** header field to the list address and you want to send a private
** message to the author of a message.
*/
- { "reply_with_xorig", DT_BOOL, R_NONE, OPT_REPLY_WITH_XORIG, 0 },
+ { "reply_with_xorig", DT_BOOL, R_NONE, UL &OPT_REPLY_WITH_XORIG, 0 },
/*
** .pp
** This variable provides a toggle. When active, the From: header will be
** Assuming `fast_reply' is disabled, this option will prompt the user with a
** prefilled From: header.
*/
- { "resolve", DT_BOOL, R_NONE, OPT_RESOLVE, 1 },
+ { "resolve", DT_BOOL, R_NONE, UL &OPT_RESOLVE, 1 },
/*
** .pp
** When \fIset\fP, the cursor will be automatically advanced to the next
** (possibly undeleted) message whenever a command that modifies the
** current message is executed.
*/
- { "resume_draft_files", DT_BOOL, R_NONE, OPT_RESUME_DRAFT_FILES, 0 },
+ { "resume_draft_files", DT_BOOL, R_NONE, UL &OPT_RESUME_DRAFT_FILES, 0 },
/*
** .pp
** If \fIset\fP, draft files (specified by \fC-H\fP on the command
** evaluated; no alias expansion takes place; user-defined headers
** and signatures are not added to the message.
*/
- { "resume_edited_draft_files", DT_BOOL, R_NONE, OPT_RESUME_EDITED_DRAFT_FILES, 1 },
+ { "resume_edited_draft_files", DT_BOOL, R_NONE, UL &OPT_RESUME_EDITED_DRAFT_FILES, 1 },
/*
** .pp
** If \fIset\fP, draft files previously edited (via \fC-E -H\fP on
** user-defined headers, and other processing effects from being
** made multiple times to the draft file.
*/
- { "reverse_alias", DT_BOOL, R_BOTH, OPT_REVERSE_ALIAS, 0 },
+ { "reverse_alias", DT_BOOL, R_BOTH, UL &OPT_REVERSE_ALIAS, 0 },
/*
** .pp
** This variable controls whether or not NeoMutt will display the ``personal''
** ``abd30425@somewhere.net.'' This is useful when the person's e-mail
** address is not human friendly.
*/
- { "reverse_name", DT_BOOL, R_BOTH, OPT_REVERSE_NAME, 0 },
+ { "reverse_name", DT_BOOL, R_BOTH, UL &OPT_REVERSE_NAME, 0 },
/*
** .pp
** It may sometimes arrive that you receive mail to a certain machine,
** .pp
** Also see the ``$alternates'' command.
*/
- { "reverse_realname", DT_BOOL, R_BOTH, OPT_REVERSE_REALNAME, 1 },
+ { "reverse_realname", DT_BOOL, R_BOTH, UL &OPT_REVERSE_REALNAME, 1 },
/*
** .pp
** This variable fine-tunes the behavior of the $$reverse_name feature.
** possibly including eventual real names. When it is \fIunset\fP, NeoMutt will
** override any such real names with the setting of the $$realname variable.
*/
- { "rfc2047_parameters", DT_BOOL, R_NONE, OPT_RFC2047_PARAMETERS, 0 },
+ { "rfc2047_parameters", DT_BOOL, R_NONE, UL &OPT_RFC2047_PARAMETERS, 0 },
/*
** .pp
** When this variable is \fIset\fP, NeoMutt will decode RFC2047-encoded MIME
** that NeoMutt \fIgenerates\fP this kind of encoding. Instead, NeoMutt will
** unconditionally use the encoding specified in RFC2231.
*/
- { "save_address", DT_BOOL, R_NONE, OPT_SAVE_ADDRESS, 0 },
+ { "save_address", DT_BOOL, R_NONE, UL &OPT_SAVE_ADDRESS, 0 },
/*
** .pp
** If \fIset\fP, NeoMutt will take the sender's full address when choosing a
** default folder for saving a mail. If $$save_name or $$force_name
** is \fIset\fP too, the selection of the Fcc folder will be changed as well.
*/
- { "save_empty", DT_BOOL, R_NONE, OPT_SAVE_EMPTY, 1 },
+ { "save_empty", DT_BOOL, R_NONE, UL &OPT_SAVE_EMPTY, 1 },
/*
** .pp
** When \fIunset\fP, mailboxes which contain no saved messages will be removed
** This variable controls the size of the history (per category) saved in the
** $$history_file file.
*/
- { "save_name", DT_BOOL, R_NONE, OPT_SAVE_NAME, 0 },
+ { "save_name", DT_BOOL, R_NONE, UL &OPT_SAVE_NAME, 0 },
/*
** .pp
** This variable controls how copies of outgoing messages are saved.
** .pp
** Also see the $$force_name variable.
*/
- { "score", DT_BOOL, R_NONE, OPT_SCORE, 1 },
+ { "score", DT_BOOL, R_NONE, UL &OPT_SCORE, 1 },
/*
** .pp
** When this variable is \fIunset\fP, scoring is turned off. This can
** shell from \fC/etc/passwd\fP is used.
*/
#ifdef USE_NNTP
- { "save_unsubscribed", DT_BOOL, R_NONE, OPT_SAVE_UNSUBSCRIBED, 0 },
+ { "save_unsubscribed", DT_BOOL, R_NONE, UL &OPT_SAVE_UNSUBSCRIBED, 0 },
/*
** .pp
** When \fIset\fP, info about unsubscribed newsgroups will be saved into
** ``newsrc'' file and into cache.
*/
- { "show_new_news", DT_BOOL, R_NONE, OPT_SHOW_NEW_NEWS, 1 },
+ { "show_new_news", DT_BOOL, R_NONE, UL &OPT_SHOW_NEW_NEWS, 1 },
/*
** .pp
** If \fIset\fP, news server will be asked for new newsgroups on entering
** Also controls whether or not number of new articles of subscribed
** newsgroups will be then checked.
*/
- { "show_only_unread", DT_BOOL, R_NONE, OPT_SHOW_ONLY_UNREAD, 0 },
+ { "show_only_unread", DT_BOOL, R_NONE, UL &OPT_SHOW_ONLY_UNREAD, 0 },
/*
** .pp
** If \fIset\fP, only subscribed newsgroups that contain unread articles
** visible) and the other NeoMutt panels. ASCII and Unicode line-drawing
** characters are supported.
*/
- { "sidebar_folder_indent", DT_BOOL, R_SIDEBAR, OPT_SIDEBAR_FOLDER_INDENT, 0 },
+ { "sidebar_folder_indent", DT_BOOL, R_SIDEBAR, UL &OPT_SIDEBAR_FOLDER_INDENT, 0 },
/*
** .pp
** Set this to indent mailboxes in the sidebar.
** .pp
** \fBSee also:\fP $$sidebar_short_path, $$sidebar_folder_indent, $$sidebar_delim_chars.
*/
- { "sidebar_new_mail_only", DT_BOOL, R_SIDEBAR, OPT_SIDEBAR_NEW_MAIL_ONLY, 0 },
+ { "sidebar_new_mail_only", DT_BOOL, R_SIDEBAR, UL &OPT_SIDEBAR_NEW_MAIL_ONLY, 0 },
/*
** .pp
** When set, the sidebar will only display mailboxes containing new, or
** .pp
** \fBSee also:\fP $sidebar_whitelist.
*/
- { "sidebar_next_new_wrap", DT_BOOL, R_NONE, OPT_SIDEBAR_NEXT_NEW_WRAP, 0 },
+ { "sidebar_next_new_wrap", DT_BOOL, R_NONE, UL &OPT_SIDEBAR_NEXT_NEW_WRAP, 0 },
/*
** .pp
** When set, the \fC<sidebar-next-new>\fP command will not stop and the end of
** \fC<sidebar-prev-new>\fP command is similarly affected, wrapping around to
** the end of the list.
*/
- { "sidebar_on_right", DT_BOOL, R_BOTH|R_REFLOW, OPT_SIDEBAR_ON_RIGHT, 0 },
+ { "sidebar_on_right", DT_BOOL, R_BOTH|R_REFLOW, UL &OPT_SIDEBAR_ON_RIGHT, 0 },
/*
** .pp
** When set, the sidebar will appear on the right-hand side of the screen.
*/
- { "sidebar_short_path", DT_BOOL, R_SIDEBAR, OPT_SIDEBAR_SHORT_PATH, 0 },
+ { "sidebar_short_path", DT_BOOL, R_SIDEBAR, UL &OPT_SIDEBAR_SHORT_PATH, 0 },
/*
** .pp
** By default the sidebar will show the mailbox's path, relative to the
** You may optionally use the ``reverse-'' prefix to specify reverse sorting
** order (example: ``\fCset sort_browser=reverse-date\fP'').
*/
- { "sidebar_component_depth", DT_NUMBER, R_SIDEBAR, UL &SidebarComponentDepth, UL 0 },
+ { "sidebar_component_depth", DT_NUMBER, R_SIDEBAR, UL &SidebarComponentDepth, 0 },
/*
** .pp
** By default the sidebar will show the mailbox's path, relative to the
** .pp
** \fBSee also:\fP $$sidebar_short_path
*/
- { "sidebar_visible", DT_BOOL, R_REFLOW, OPT_SIDEBAR_VISIBLE, 0 },
+ { "sidebar_visible", DT_BOOL, R_REFLOW, UL &OPT_SIDEBAR_VISIBLE, 0 },
/*
** .pp
** This specifies whether or not to show sidebar. The sidebar shows a list of
** Chinese characters.
*/
#endif
- { "sig_dashes", DT_BOOL, R_NONE, OPT_SIG_DASHES, 1 },
+ { "sig_dashes", DT_BOOL, R_NONE, UL &OPT_SIG_DASHES, 1 },
/*
** .pp
** If \fIset\fP, a line containing ``-- '' (note the trailing space) will be inserted before your
** detect your signature. For example, NeoMutt has the ability to highlight
** the signature in a different color in the built-in pager.
*/
- { "sig_on_top", DT_BOOL, R_NONE, OPT_SIG_ON_TOP, 0 },
+ { "sig_on_top", DT_BOOL, R_NONE, UL &OPT_SIG_ON_TOP, 0 },
/*
** .pp
** If \fIset\fP, the signature will be included before any quoted or forwarded
** messages from the current folder. The default is to pause one second, so
** a value of zero for this option suppresses the pause.
*/
- { "smart_wrap", DT_BOOL, R_PAGER_FLOW, OPT_SMART_WRAP, 1 },
+ { "smart_wrap", DT_BOOL, R_PAGER_FLOW, UL &OPT_SMART_WRAP, 1 },
/*
** .pp
** Controls the display of lines longer than the screen width in the
** a line quoted text if it also matches $$smileys. This mostly
** happens at the beginning of a line.
*/
- { "smime_ask_cert_label", DT_BOOL, R_NONE, OPT_SMIME_ASK_CERT_LABEL, 1 },
+ { "smime_ask_cert_label", DT_BOOL, R_NONE, UL &OPT_SMIME_ASK_CERT_LABEL, 1 },
/*
** .pp
** This flag controls whether you want to be asked to enter a label
** alongside the documentation.
** (S/MIME only)
*/
- { "smime_decrypt_use_default_key", DT_BOOL, R_NONE, OPT_SMIME_DECRYPT_USE_DEFAULT_KEY, 1 },
+ { "smime_decrypt_use_default_key", DT_BOOL, R_NONE, UL &OPT_SMIME_DECRYPT_USE_DEFAULT_KEY, 1 },
/*
** .pp
** If \fIset\fP (default) this tells NeoMutt to use the default key for decryption. Otherwise,
** possible \fCprintf(3)\fP-like sequences.
** (S/MIME only)
*/
- { "smime_is_default", DT_BOOL, R_NONE, OPT_SMIME_IS_DEFAULT, 0 },
+ { "smime_is_default", DT_BOOL, R_NONE, UL &OPT_SMIME_IS_DEFAULT, 0 },
/*
** .pp
** The default behavior of NeoMutt is to use PGP on all auto-sign/encryption
** possible \fCprintf(3)\fP-like sequences.
** (S/MIME only)
*/
- { "smime_self_encrypt", DT_BOOL, R_NONE, OPT_SMIME_SELF_ENCRYPT, 0 },
+ { "smime_self_encrypt", DT_BOOL, R_NONE, UL &OPT_SMIME_SELF_ENCRYPT, 0 },
/*
** .pp
** When \fIset\fP, S/MIME encrypted messages will also be encrypted
** You may optionally use the ``reverse-'' prefix to specify reverse sorting
** order (example: ``\fCset sort_browser=reverse-date\fP'').
*/
- { "sort_re", DT_BOOL, R_INDEX|R_RESORT|R_RESORT_INIT, OPT_SORT_RE, 1 },
+ { "sort_re", DT_BOOL, R_INDEX|R_RESORT|R_RESORT_INIT, UL &OPT_SORT_RE, 1 },
/*
** .pp
** This variable is only useful when sorting by mailboxes in sidebar. By default,
** The file containing a client certificate and its associated private
** key.
*/
- { "ssl_force_tls", DT_BOOL, R_NONE, OPT_SSL_FORCE_TLS, 0 },
+ { "ssl_force_tls", DT_BOOL, R_NONE, UL &OPT_SSL_FORCE_TLS, 0 },
/*
** .pp
** If this variable is \fIset\fP, NeoMutt will require that all connections
** the default from the GNUTLS library. (GnuTLS only)
*/
#endif /* USE_SSL_GNUTLS */
- { "ssl_starttls", DT_QUAD, R_NONE, OPT_SSL_STARTTLS, MUTT_YES },
+ { "ssl_starttls", DT_QUAD, R_NONE, UL &OPT_SSL_STARTTLS, MUTT_YES },
/*
** .pp
** If \fIset\fP (the default), NeoMutt will attempt to use \fCSTARTTLS\fP on servers
** use \fCSTARTTLS\fP regardless of the server's capabilities.
*/
#ifdef USE_SSL_OPENSSL
- { "ssl_use_sslv2", DT_BOOL, R_NONE, OPT_SSL_USE_SSLV2, 0 },
+ { "ssl_use_sslv2", DT_BOOL, R_NONE, UL &OPT_SSL_USE_SSLV2, 0 },
/*
** .pp
** This variable specifies whether to attempt to use SSLv2 in the
** (OpenSSL only)
*/
#endif /* defined USE_SSL_OPENSSL */
- { "ssl_use_sslv3", DT_BOOL, R_NONE, OPT_SSL_USE_SSLV3, 0 },
+ { "ssl_use_sslv3", DT_BOOL, R_NONE, UL &OPT_SSL_USE_SSLV3, 0 },
/*
** .pp
** This variable specifies whether to attempt to use SSLv3 in the
** SSL authentication process. Note that SSLv2 and SSLv3 are now
** considered fundamentally insecure and are no longer recommended.
*/
- { "ssl_use_tlsv1", DT_BOOL, R_NONE, OPT_SSL_USE_TLSV1, 1 },
+ { "ssl_use_tlsv1", DT_BOOL, R_NONE, UL &OPT_SSL_USE_TLSV1, 1 },
/*
** .pp
** This variable specifies whether to attempt to use TLSv1.0 in the
** SSL authentication process.
*/
- { "ssl_use_tlsv1_1", DT_BOOL, R_NONE, OPT_SSL_USE_TLSV1_1, 1 },
+ { "ssl_use_tlsv1_1", DT_BOOL, R_NONE, UL &OPT_SSL_USE_TLSV1_1, 1 },
/*
** .pp
** This variable specifies whether to attempt to use TLSv1.1 in the
** SSL authentication process.
*/
- { "ssl_use_tlsv1_2", DT_BOOL, R_NONE, OPT_SSL_USE_TLSV1_2, 1 },
+ { "ssl_use_tlsv1_2", DT_BOOL, R_NONE, UL &OPT_SSL_USE_TLSV1_2, 1 },
/*
** .pp
** This variable specifies whether to attempt to use TLSv1.2 in the
** SSL authentication process.
*/
#ifdef USE_SSL_OPENSSL
- { "ssl_usesystemcerts", DT_BOOL, R_NONE, OPT_SSL_USESYSTEMCERTS, 1 },
+ { "ssl_usesystemcerts", DT_BOOL, R_NONE, UL &OPT_SSL_USESYSTEMCERTS, 1 },
/*
** .pp
** If set to \fIyes\fP, NeoMutt will use CA certificates in the
** is signed by a trusted CA. (OpenSSL only)
*/
#endif
- { "ssl_verify_dates", DT_BOOL, R_NONE, OPT_SSL_VERIFY_DATES, 1 },
+ { "ssl_verify_dates", DT_BOOL, R_NONE, UL &OPT_SSL_VERIFY_DATES, 1 },
/*
** .pp
** If \fIset\fP (the default), NeoMutt will not automatically accept a server
** only unset this for particular known hosts, using the
** \fC$<account-hook>\fP function.
*/
- { "ssl_verify_host", DT_BOOL, R_NONE, OPT_SSL_VERIFY_HOST, 1 },
+ { "ssl_verify_host", DT_BOOL, R_NONE, UL &OPT_SSL_VERIFY_HOST, 1 },
/*
** .pp
** If \fIset\fP (the default), NeoMutt will not automatically accept a server
*/
#ifdef USE_SSL_OPENSSL
#ifdef HAVE_SSL_PARTIAL_CHAIN
- { "ssl_verify_partial_chains", DT_BOOL, R_NONE, OPT_SSL_VERIFY_PARTIAL_CHAINS, 0 },
+ { "ssl_verify_partial_chains", DT_BOOL, R_NONE, UL &OPT_SSL_VERIFY_PARTIAL_CHAINS, 0 },
/*
** .pp
** This option should not be changed from the default unless you understand
** will replace any dots in the expansion by underscores. This might be helpful
** with IMAP folders that don't like dots in folder names.
*/
- { "status_on_top", DT_BOOL, R_REFLOW, OPT_STATUS_ON_TOP, 0 },
+ { "status_on_top", DT_BOOL, R_REFLOW, UL &OPT_STATUS_ON_TOP, 0 },
/*
** .pp
** Setting this variable causes the ``status bar'' to be displayed on
** the first line of the screen rather than near the bottom. If $$help
** is \fIset\fP, too it'll be placed at the bottom.
*/
- { "strict_threads", DT_BOOL, R_RESORT|R_RESORT_INIT|R_INDEX, OPT_STRICT_THREADS, 0 },
+ { "strict_threads", DT_BOOL, R_RESORT|R_RESORT_INIT|R_INDEX, UL &OPT_STRICT_THREADS, 0 },
/*
** .pp
** If \fIset\fP, threading will only make use of the ``In-Reply-To'' and
** $$sort_re for a less drastic way of controlling this
** behavior.
*/
- { "suspend", DT_BOOL, R_NONE, OPT_SUSPEND, 1 },
+ { "suspend", DT_BOOL, R_NONE, UL &OPT_SUSPEND, 1 },
/*
** .pp
** When \fIunset\fP, NeoMutt won't stop when the user presses the terminal's
** \fIsusp\fP key, usually ``^Z''. This is useful if you run NeoMutt
** inside an xterm using a command like ``\fCxterm -e neomutt\fP''.
*/
- { "text_flowed", DT_BOOL, R_NONE, OPT_TEXT_FLOWED, 0 },
+ { "text_flowed", DT_BOOL, R_NONE, UL &OPT_TEXT_FLOWED, 0 },
/*
** .pp
** When \fIset\fP, NeoMutt will generate ``format=flowed'' bodies with a content type
** .pp
** Note that $$indent_string is ignored when this option is \fIset\fP.
*/
- { "thorough_search", DT_BOOL, R_NONE, OPT_THOROUGH_SEARCH, 1 },
+ { "thorough_search", DT_BOOL, R_NONE, UL &OPT_THOROUGH_SEARCH, 1 },
/*
** .pp
** Affects the \fC~b\fP and \fC~h\fP search operations described in
** raw message received (for example quoted-printable encoded or with encoded
** headers) which may lead to incorrect search results.
*/
- { "thread_received", DT_BOOL, R_RESORT|R_RESORT_INIT|R_INDEX, OPT_THREAD_RECEIVED, 0 },
+ { "thread_received", DT_BOOL, R_RESORT|R_RESORT_INIT|R_INDEX, UL &OPT_THREAD_RECEIVED, 0 },
/*
** .pp
** When \fIset\fP, NeoMutt uses the date received rather than the date sent
** to thread messages by subject.
*/
- { "tilde", DT_BOOL, R_PAGER, OPT_TILDE, 0 },
+ { "tilde", DT_BOOL, R_PAGER, UL &OPT_TILDE, 0 },
/*
** .pp
** When \fIset\fP, the internal-pager will pad blank lines to the bottom of the
** This string is identical in formatting to the one used by
** ``$$status_format''.
*/
- { "ts_enabled", DT_BOOL, R_BOTH, OPT_TS_ENABLED, 0 },
+ { "ts_enabled", DT_BOOL, R_BOTH, UL &OPT_TS_ENABLED, 0 },
/* The default must be off to force in the validity checking. */
/*
** .pp
** tunnel commands per connection.
*/
#endif
- { "uncollapse_jump", DT_BOOL, R_NONE, OPT_UNCOLLAPSE_JUMP, 0 },
+ { "uncollapse_jump", DT_BOOL, R_NONE, UL &OPT_UNCOLLAPSE_JUMP, 0 },
/*
** .pp
** When \fIset\fP, NeoMutt will jump to the next unread message, if any,
** when the current thread is \fIun\fPcollapsed.
*/
- { "uncollapse_new", DT_BOOL, R_NONE, OPT_UNCOLLAPSE_NEW, 1 },
+ { "uncollapse_new", DT_BOOL, R_NONE, UL &OPT_UNCOLLAPSE_NEW, 1 },
/*
** .pp
** When \fIset\fP, NeoMutt will automatically uncollapse any collapsed thread
** remain collapsed. the presence of the new message will still affect
** index sorting, though.
*/
- { "use_8bitmime", DT_BOOL, R_NONE, OPT_USE_8BITMIME, 0 },
+ { "use_8bitmime", DT_BOOL, R_NONE, UL &OPT_USE_8BITMIME, 0 },
/*
** .pp
** \fBWarning:\fP do not set this variable unless you are using a version
** When \fIset\fP, NeoMutt will invoke $$sendmail with the \fC-B8BITMIME\fP
** flag when sending 8-bit messages to enable ESMTP negotiation.
*/
- { "use_domain", DT_BOOL, R_NONE, OPT_USE_DOMAIN, 1 },
+ { "use_domain", DT_BOOL, R_NONE, UL &OPT_USE_DOMAIN, 1 },
/*
** .pp
** When \fIset\fP, NeoMutt will qualify all local addresses (ones without the
** ``@host'' portion) with the value of $$hostname. If \fIunset\fP, no
** addresses will be qualified.
*/
- { "use_envelope_from", DT_BOOL, R_NONE, OPT_USE_ENVELOPE_FROM, 0 },
+ { "use_envelope_from", DT_BOOL, R_NONE, UL &OPT_USE_ENVELOPE_FROM, 0 },
/*
** .pp
** When \fIset\fP, NeoMutt will set the \fIenvelope\fP sender of the message.
{ "envelope_from", DT_SYNONYM, R_NONE, UL "use_envelope_from", 0 },
/*
*/
- { "use_from", DT_BOOL, R_NONE, OPT_USE_FROM, 1 },
+ { "use_from", DT_BOOL, R_NONE, UL &OPT_USE_FROM, 1 },
/*
** .pp
** When \fIset\fP, NeoMutt will generate the ``From:'' header field when
** command.
*/
#ifdef HAVE_GETADDRINFO
- { "use_ipv6", DT_BOOL, R_NONE, OPT_USE_IPV6, 1 },
+ { "use_ipv6", DT_BOOL, R_NONE, UL &OPT_USE_IPV6, 1 },
/*
** .pp
** When \fIset\fP, NeoMutt will look for IPv6 addresses of hosts it tries to
** Normally, the default should work.
*/
#endif /* HAVE_GETADDRINFO */
- { "user_agent", DT_BOOL, R_NONE, OPT_USER_AGENT, 1 },
+ { "user_agent", DT_BOOL, R_NONE, UL &OPT_USER_AGENT, 1 },
/*
** .pp
** When \fIset\fP, NeoMutt will add a ``User-Agent:'' header to outgoing
** folders to your personal taste. This string uses many of the same
** expandos as $$folder_format.
*/
- { "virtual_spoolfile", DT_BOOL, R_NONE, OPT_VIRTUAL_SPOOLFILE, 0 },
+ { "virtual_spoolfile", DT_BOOL, R_NONE, UL &OPT_VIRTUAL_SPOOLFILE, 0 },
/*
** .pp
** When \fIset\fP, NeoMutt will use the first defined virtual mailbox (see
** virtual-mailboxes) as a spool file.
*/
#endif
- { "wait_key", DT_BOOL, R_NONE, OPT_WAIT_KEY, 1 },
+ { "wait_key", DT_BOOL, R_NONE, UL &OPT_WAIT_KEY, 1 },
/*
** .pp
** Controls whether NeoMutt will ask you to press a key after an external command
** When \fIset\fP, NeoMutt will always ask for a key. When \fIunset\fP, NeoMutt will wait
** for a key only if the external command returned a non-zero status.
*/
- { "weed", DT_BOOL, R_NONE, OPT_WEED, 1 },
+ { "weed", DT_BOOL, R_NONE, UL &OPT_WEED, 1 },
/*
** .pp
** When \fIset\fP, NeoMutt will weed headers when displaying, forwarding,
** recommends a line length of 78 (the default), so \fBplease only change
** this setting when you know what you're doing\fP.
*/
- { "wrap_search", DT_BOOL, R_NONE, OPT_WRAP_SEARCH, 1 },
+ { "wrap_search", DT_BOOL, R_NONE, UL &OPT_WRAP_SEARCH, 1 },
/*
** .pp
** Controls whether searches wrap around the end.
** .pp
** (DEPRECATED) Equivalent to setting $$wrap with a negative value.
*/
- { "write_bcc", DT_BOOL, R_NONE, OPT_WRITE_BCC, 1 },
+ { "write_bcc", DT_BOOL, R_NONE, UL &OPT_WRITE_BCC, 1 },
/*
** .pp
** Controls whether NeoMutt writes out the ``Bcc:'' header when preparing
/*
*/
#ifdef USE_NNTP
- { "x_comment_to", DT_BOOL, R_NONE, OPT_X_COMMENT_TO, 0 },
+ { "x_comment_to", DT_BOOL, R_NONE, UL &OPT_X_COMMENT_TO, 0 },
/*
** .pp
** If \fIset\fP, NeoMutt will add ``X-Comment-To:'' field (that contains full
** name of original article author) to article that followuped to newsgroup.
*/
#endif
- { "collapse_all", DT_BOOL, R_NONE, OPT_COLLAPSE_ALL, 0 },
+ { "collapse_all", DT_BOOL, R_NONE, UL &OPT_COLLAPSE_ALL, 0 },
/*
** .pp
** When \fIset\fP, NeoMutt will collapse all threads when entering a folder.
*/
/*--*/
- { "pgp_encrypt_self", DT_QUAD, R_NONE, OPT_PGP_ENCRYPT_SELF, MUTT_NO },
- { "smime_encrypt_self", DT_QUAD, R_NONE, OPT_SMIME_ENCRYPT_SELF, MUTT_NO },
+ { "pgp_encrypt_self", DT_QUAD, R_NONE, UL &OPT_PGP_ENCRYPT_SELF, MUTT_NO },
+ { "smime_encrypt_self", DT_QUAD, R_NONE, UL &OPT_SMIME_ENCRYPT_SELF, MUTT_NO },
{ NULL, 0, 0, 0, 0 },
};
if (map->op != OP_MACRO)
return map->op;
- if (option(OPT_IGNORE_MACRO_EVENTS))
+ if (OPT_IGNORE_MACRO_EVENTS)
{
mutt_error(_("Macros are currently disabled."));
return -1;
(void) mutt_rand32();
umask(077);
- memset(Options, 0, sizeof(Options));
- memset(QuadOptions, 0, sizeof(QuadOptions));
-
/* Init envlist */
{
char **srcp, **dstp;
if (!isatty(0) || !STAILQ_EMPTY(&queries) || !STAILQ_EMPTY(&alias_queries) ||
dump_variables || batch_mode)
{
- set_option(OPT_NO_CURSES);
+ OPT_NO_CURSES = true;
sendflags = SENDBATCH;
}
/* This must come before mutt_init() because curses needs to be started
before calling the init_pair() function to set the color scheme. */
- if (!option(OPT_NO_CURSES))
+ if (!OPT_NO_CURSES)
{
start_curses();
return rc;
}
- if (!option(OPT_NO_CURSES))
+ if (!OPT_NO_CURSES)
{
NORMAL_COLOR;
clear();
}
/* Create the Folder directory if it doesn't exist. */
- if (!option(OPT_NO_CURSES) && Folder)
+ if (!OPT_NO_CURSES && Folder)
{
struct stat sb;
char fpath[_POSIX_PATH_MAX];
if (sendflags & SENDPOSTPONED)
{
- if (!option(OPT_NO_CURSES))
+ if (!OPT_NO_CURSES)
mutt_flushinp();
ci_send_message(SENDPOSTPONED, NULL, NULL, NULL, NULL);
mutt_free_windows();
int rv = 0;
char expanded_infile[_POSIX_PATH_MAX];
- if (!option(OPT_NO_CURSES))
+ if (!OPT_NO_CURSES)
mutt_flushinp();
if (!msg)
{
if (url_parse_mailto(msg->env, &bodytext, argv[i]) < 0)
{
- if (!option(OPT_NO_CURSES))
+ if (!OPT_NO_CURSES)
mutt_endwin(NULL);
fputs(_("Failed to parse mailto: link\n"), stderr);
exit(1);
msg->env->to = mutt_addr_parse_list(msg->env->to, argv[i]);
}
- if (!draft_file && option(OPT_AUTOEDIT) && !msg->env->to && !msg->env->cc)
+ if (!draft_file && OPT_AUTOEDIT && !msg->env->to && !msg->env->cc)
{
- if (!option(OPT_NO_CURSES))
+ if (!OPT_NO_CURSES)
mutt_endwin(NULL);
fputs(_("No recipients specified.\n"), stderr);
exit(1);
fin = fopen(expanded_infile, "r");
if (!fin)
{
- if (!option(OPT_NO_CURSES))
+ if (!OPT_NO_CURSES)
mutt_endwin(NULL);
perror(expanded_infile);
exit(1);
fout = mutt_file_fopen(tempfile, "w");
if (!fout)
{
- if (!option(OPT_NO_CURSES))
+ if (!OPT_NO_CURSES)
mutt_endwin(NULL);
perror(tempfile);
mutt_file_fclose(&fin);
fin = fopen(tempfile, "r");
if (!fin)
{
- if (!option(OPT_NO_CURSES))
+ if (!OPT_NO_CURSES)
mutt_endwin(NULL);
perror(tempfile);
FREE(&tempfile);
{
if (mutt_str_strncasecmp("X-Mutt-Resume-Draft:", np->data, 20) == 0)
{
- if (option(OPT_RESUME_EDITED_DRAFT_FILES))
- set_option(OPT_RESUME_DRAFT_FILES);
+ if (OPT_RESUME_EDITED_DRAFT_FILES)
+ OPT_RESUME_DRAFT_FILES = true;
STAILQ_REMOVE(&msg->env->userhdrs, np, ListNode, entries);
FREE(&np->data);
msg->content = a = mutt_make_file_attach(np->data);
if (!a)
{
- if (!option(OPT_NO_CURSES))
+ if (!OPT_NO_CURSES)
mutt_endwin(NULL);
fprintf(stderr, _("%s: unable to attach file.\n"), np->data);
mutt_list_free(&attach);
{
if (truncate(expanded_infile, 0) == -1)
{
- if (!option(OPT_NO_CURSES))
+ if (!OPT_NO_CURSES)
mutt_endwin(NULL);
perror(expanded_infile);
exit(1);
fout = mutt_file_fopen(expanded_infile, "a");
if (!fout)
{
- if (!option(OPT_NO_CURSES))
+ if (!OPT_NO_CURSES)
mutt_endwin(NULL);
perror(expanded_infile);
exit(1);
}
mutt_write_rfc822_header(fout, msg->env, msg->content, -1, 0);
- if (option(OPT_RESUME_EDITED_DRAFT_FILES))
+ if (OPT_RESUME_EDITED_DRAFT_FILES)
fprintf(fout, "X-Mutt-Resume-Draft: 1\n");
fputc('\n', fout);
if ((mutt_write_mime_body(msg->content, fout) == -1))
{
- if (!option(OPT_NO_CURSES))
+ if (!OPT_NO_CURSES)
mutt_endwin(NULL);
mutt_file_fclose(&fout);
exit(1);
}
mutt_free_windows();
- if (!option(OPT_NO_CURSES))
+ if (!OPT_NO_CURSES)
mutt_endwin(NULL);
if (rv)
#ifdef USE_NNTP
if (flags & MUTT_NEWS)
{
- set_option(OPT_NEWS);
+ OPT_NEWS = true;
CurrentNewsSrv = nntp_select_server(NewsServer, false);
if (!CurrentNewsSrv)
{
}
#ifdef USE_NNTP
- if (option(OPT_NEWS))
+ if (OPT_NEWS)
{
- unset_option(OPT_NEWS);
+ OPT_NEWS = false;
nntp_expand_path(folder, sizeof(folder), &CurrentNewsSrv->conn->account);
}
else
mutt_folder_hook(folder);
mutt_startup_shutdown_hook(MUTT_STARTUPHOOK);
- Context = mx_open_mailbox(
- folder, ((flags & MUTT_RO) || option(OPT_READ_ONLY)) ? MUTT_READONLY : 0, NULL);
+ Context = mx_open_mailbox(folder, ((flags & MUTT_RO) || OPT_READ_ONLY) ? MUTT_READONLY : 0, NULL);
if (Context || !explicit_folder)
{
#ifdef USE_SIDEBAR
* When $mbox_check_recent is set, existing new mail is ignored, so do not
* reset the atime to mtime-1 to signal new mail.
*/
- if (!option(OPT_MAIL_CHECK_RECENT) && utimebuf.actime >= utimebuf.modtime &&
- mbox_has_new(ctx))
+ if (!OPT_MAIL_CHECK_RECENT && utimebuf.actime >= utimebuf.modtime && mbox_has_new(ctx))
{
utimebuf.actime = utimebuf.modtime - 1;
}
unlink(tempfile); /* remove partial copy of the mailbox */
mutt_sig_unblock();
- if (option(OPT_CHECK_MBOX_SIZE))
+ if (OPT_CHECK_MBOX_SIZE)
{
tmp = mutt_find_mailbox(ctx->path);
if (tmp && tmp->new == false)
switch (*s)
{
case MUTT_TREE_LLCORNER:
- if (option(OPT_ASCII_CHARS))
+ if (OPT_ASCII_CHARS)
addch('`');
#ifdef WACS_LLCORNER
else
#endif
break;
case MUTT_TREE_ULCORNER:
- if (option(OPT_ASCII_CHARS))
+ if (OPT_ASCII_CHARS)
addch(',');
#ifdef WACS_ULCORNER
else
#endif
break;
case MUTT_TREE_LTEE:
- if (option(OPT_ASCII_CHARS))
+ if (OPT_ASCII_CHARS)
addch('|');
#ifdef WACS_LTEE
else
#endif
break;
case MUTT_TREE_HLINE:
- if (option(OPT_ASCII_CHARS))
+ if (OPT_ASCII_CHARS)
addch('-');
#ifdef WACS_HLINE
else
#endif
break;
case MUTT_TREE_VLINE:
- if (option(OPT_ASCII_CHARS))
+ if (OPT_ASCII_CHARS)
addch('|');
#ifdef WACS_VLINE
else
#endif
break;
case MUTT_TREE_TTEE:
- if (option(OPT_ASCII_CHARS))
+ if (OPT_ASCII_CHARS)
addch('-');
#ifdef WACS_TTEE
else
#endif
break;
case MUTT_TREE_BTEE:
- if (option(OPT_ASCII_CHARS))
+ if (OPT_ASCII_CHARS)
addch('-');
#ifdef WACS_BTEE
else
static void menu_pad_string(struct Menu *menu, char *buf, size_t buflen)
{
char *scratch = mutt_str_strdup(buf);
- int shift = option(OPT_ARROW_CURSOR) ? 3 : 0;
+ int shift = OPT_ARROW_CURSOR ? 3 : 0;
int cols = menu->indexwin->cols - shift;
mutt_simple_format(buf, buflen, cols, cols, FMT_LEFT, ' ', scratch,
move(0, 0);
clrtobot();
- if (option(OPT_HELP))
+ if (OPT_HELP)
{
SETCOLOR(MT_COLOR_STATUS);
mutt_window_move(menu->helpwin, 0, 0);
if (i == menu->current)
{
SETCOLOR(MT_COLOR_INDICATOR);
- if (option(OPT_ARROW_CURSOR))
+ if (OPT_ARROW_CURSOR)
{
addstr("->");
ATTRSET(attr);
else
do_color = false;
}
- else if (option(OPT_ARROW_CURSOR))
+ else if (OPT_ARROW_CURSOR)
addstr(" ");
print_enriched_string(i, attr, (unsigned char *) buf, do_color);
mutt_window_move(menu->indexwin, menu->oldcurrent + menu->offset - menu->top, 0);
ATTRSET(old_color);
- if (option(OPT_ARROW_CURSOR))
+ if (OPT_ARROW_CURSOR)
{
/* clear the pointer */
addstr(" ");
menu_pad_string(menu, buf, sizeof(buf));
SETCOLOR(MT_COLOR_INDICATOR);
- if (option(OPT_ARROW_CURSOR))
+ if (OPT_ARROW_CURSOR)
{
addstr("->");
ATTRSET(attr);
{
if (menu->dialog)
{
- if (option(OPT_MSG_ERR))
+ if (OPT_MSG_ERR)
{
mutt_sleep(1);
- unset_option(OPT_MSG_ERR);
+ OPT_MSG_ERR = false;
}
if (*ErrorBuf)
int c = MIN(MenuContext, menu->pagelen / 2);
int old_top = menu->top;
- if (!option(OPT_MENU_MOVE_OFF) && menu->max <= menu->pagelen) /* less entries than lines */
+ if (!OPT_MENU_MOVE_OFF && menu->max <= menu->pagelen) /* less entries than lines */
{
if (menu->top != 0)
{
}
else
{
- if (option(OPT_MENU_SCROLL) || (menu->pagelen <= 0) || (c < MenuContext))
+ if (OPT_MENU_SCROLL || (menu->pagelen <= 0) || (c < MenuContext))
{
if (menu->current < menu->top + c)
menu->top = menu->current - c;
}
}
- if (!option(OPT_MENU_MOVE_OFF)) /* make entries stick to bottom */
+ if (!OPT_MENU_MOVE_OFF) /* make entries stick to bottom */
menu->top = MIN(menu->top, menu->max - menu->pagelen);
menu->top = MAX(menu->top, 0);
int c = MIN(MenuContext, menu->pagelen / 2);
if (menu->top + 1 < menu->max - c &&
- (option(OPT_MENU_MOVE_OFF) ||
+ (OPT_MENU_MOVE_OFF ||
(menu->max > menu->pagelen && menu->top < menu->max - menu->pagelen)))
{
menu->top++;
menu->top += jumplen;
/* jumped too long? */
- if ((neg || !option(OPT_MENU_MOVE_OFF)) && DIRECTION * menu->top > tmp)
+ if ((neg || !OPT_MENU_MOVE_OFF) && DIRECTION * menu->top > tmp)
menu->top = tmp;
/* need to move the cursor? */
r += search_dir;
}
- if (option(OPT_WRAP_SEARCH) && wrap++ == 0)
+ if (OPT_WRAP_SEARCH && wrap++ == 0)
{
r = search_dir == 1 ? 0 : menu->max - 1;
goto search_next;
while (true)
{
- if (option(OPT_MENU_CALLER))
+ if (OPT_MENU_CALLER)
{
- unset_option(OPT_MENU_CALLER);
+ OPT_MENU_CALLER = false;
return OP_NULL;
}
menu->oldcurrent = menu->current;
/* move the cursor out of the way */
- if (option(OPT_ARROW_CURSOR))
+ if (OPT_ARROW_CURSOR)
mutt_window_move(menu->indexwin, menu->current - menu->top + menu->offset, 2);
- else if (option(OPT_BRAILLE_FRIENDLY))
+ else if (OPT_BRAILLE_FRIENDLY)
mutt_window_move(menu->indexwin, menu->current - menu->top + menu->offset, 0);
else
mutt_window_move(menu->indexwin, menu->current - menu->top + menu->offset,
i = -1;
}
}
- else if (menu->tagged && option(OPT_AUTO_TAG))
+ else if (menu->tagged && OPT_AUTO_TAG)
menu->tagprefix = true;
mutt_curs_set(1);
case OP_TAG:
if (menu->tag && !menu->dialog)
{
- if (menu->tagprefix && !option(OPT_AUTO_TAG))
+ if (menu->tagprefix && !OPT_AUTO_TAG)
{
for (i = 0; i < menu->max; i++)
menu->tagged += menu->tag(menu, i, 0);
{
int j = menu->tag(menu, menu->current, -1);
menu->tagged += j;
- if (j && option(OPT_RESOLVE) && menu->current < menu->max - 1)
+ if (j && OPT_RESOLVE && menu->current < menu->max - 1)
{
menu->current++;
menu->redraw |= REDRAW_MOTION_RESYNCH;
/* when $mail_check_recent is set and the .mh_sequences file hasn't changed
* since the last mailbox visit, there is no "new mail" */
- if (option(OPT_MAIL_CHECK_RECENT) && mh_sequences_changed(mailbox) <= 0)
+ if (OPT_MAIL_CHECK_RECENT && mh_sequences_changed(mailbox) <= 0)
{
rc = false;
check_new = false;
{
/* if the first unseen message we encounter was in the mailbox during the
last visit, don't notify about it */
- if (!option(OPT_MAIL_CHECK_RECENT) || mh_already_notified(mailbox, i) == 0)
+ if (!OPT_MAIL_CHECK_RECENT || mh_already_notified(mailbox, i) == 0)
{
mailbox->new = true;
rc = true;
break;
case 'T': /* trashed */
- if (!h->flagged || !option(OPT_FLAG_SAFE))
+ if (!h->flagged || !OPT_FLAG_SAFE)
{
h->trash = true;
h->deleted = true;
if (subdir)
{
snprintf(buf, sizeof(buf), "%s/%s", ctx->path, subdir);
- is_old = option(OPT_MARK_OLD) ? (mutt_str_strcmp("cur", subdir) == 0) : false;
+ is_old = OPT_MARK_OLD ? (mutt_str_strcmp("cur", subdir) == 0) : false;
}
else
mutt_str_strfcpy(buf, ctx->path, sizeof(buf));
snprintf(fn, sizeof(fn), "%s/%s", ctx->path, p->h->path);
#ifdef USE_HCACHE
- if (option(OPT_MAILDIR_HEADER_CACHE_VERIFY))
+ if (OPT_MAILDIR_HEADER_CACHE_VERIFY)
{
ret = stat(fn, &lastchanged);
}
char path[_POSIX_PATH_MAX], tmp[_POSIX_PATH_MAX];
struct Header *h = ctx->hdrs[msgno];
- if (h->deleted && (ctx->magic != MUTT_MAILDIR || !option(OPT_MAILDIR_TRASH)))
+ if (h->deleted && (ctx->magic != MUTT_MAILDIR || !OPT_MAILDIR_TRASH))
{
snprintf(path, sizeof(path), "%s/%s", ctx->path, h->path);
- if (ctx->magic == MUTT_MAILDIR || (option(OPT_MH_PURGE) && ctx->magic == MUTT_MH))
+ if (ctx->magic == MUTT_MAILDIR || (OPT_MH_PURGE && ctx->magic == MUTT_MH))
{
#ifdef USE_HCACHE
if (hc)
}
}
else if (h->changed || h->attach_del || h->xlabel_changed ||
- (ctx->magic == MUTT_MAILDIR &&
- (option(OPT_MAILDIR_TRASH) || h->trash) && (h->deleted != h->trash)))
+ (ctx->magic == MUTT_MAILDIR && (OPT_MAILDIR_TRASH || h->trash) &&
+ (h->deleted != h->trash)))
{
if (ctx->magic == MUTT_MAILDIR)
{
/* XXX seems like this check belongs in mx_check_mailbox()
* rather than here.
*/
- if (!option(OPT_CHECK_NEW))
+ if (!OPT_CHECK_NEW)
return 0;
snprintf(buf, sizeof(buf), "%s/new", ctx->path);
int i;
struct MhData *data = mh_data(ctx);
- if (!option(OPT_CHECK_NEW))
+ if (!OPT_CHECK_NEW)
return 0;
mutt_str_strfcpy(buf, ctx->path, sizeof(buf));
{
for (i = 0, j = 0; i < ctx->msgcount; i++)
{
- if (!ctx->hdrs[i]->deleted || (ctx->magic == MUTT_MAILDIR && option(OPT_MAILDIR_TRASH)))
+ if (!ctx->hdrs[i]->deleted || (ctx->magic == MUTT_MAILDIR && OPT_MAILDIR_TRASH))
ctx->hdrs[i]->index = j++;
}
}
#include <stdbool.h>
#include <stddef.h>
#include <stdio.h>
+#include "where.h"
struct ListHead;
struct Mapping;
MUTT_ASKYES
};
-/**
- * enum QuadOptionVars - Index of all QuadOptions
- */
-enum QuadOptionVars
-{
- OPT_ABORT_UNMODIFIED,
- OPT_BOUNCE,
- OPT_COPY,
- OPT_DELETE,
- OPT_FORWARD_EDIT,
- OPT_FCC_ATTACH,
- OPT_INCLUDE,
- OPT_HONOR_FOLLOWUP_TO,
- OPT_MIME_FORWARD,
- OPT_MIME_FORWARD_REST,
- OPT_MOVE,
- OPT_PGP_MIME_AUTO, /* ask to revert to PGP/MIME when inline fails */
- OPT_SMIME_ENCRYPT_SELF,
- OPT_PGP_ENCRYPT_SELF,
+/* Quad-options */
+WHERE unsigned char OPT_ABORT_UNMODIFIED;
+WHERE unsigned char OPT_BOUNCE;
+WHERE unsigned char OPT_COPY;
+WHERE unsigned char OPT_DELETE;
+WHERE unsigned char OPT_FORWARD_EDIT;
+WHERE unsigned char OPT_FCC_ATTACH;
+WHERE unsigned char OPT_INCLUDE;
+WHERE unsigned char OPT_HONOR_FOLLOWUP_TO;
+WHERE unsigned char OPT_MIME_FORWARD;
+WHERE unsigned char OPT_MIME_FORWARD_REST;
+WHERE unsigned char OPT_MOVE;
+WHERE unsigned char OPT_PGP_MIME_AUTO; /* ask to revert to PGP/MIME when inline fails */
+WHERE unsigned char OPT_SMIME_ENCRYPT_SELF;
+WHERE unsigned char OPT_PGP_ENCRYPT_SELF;
#ifdef USE_POP
- OPT_POP_DELETE,
- OPT_POP_RECONNECT,
+WHERE unsigned char OPT_POP_DELETE;
+WHERE unsigned char OPT_POP_RECONNECT;
#endif
- OPT_POSTPONE,
- OPT_PRINT,
- OPT_QUIT,
- OPT_REPLY_TO,
- OPT_RECALL,
+WHERE unsigned char OPT_POSTPONE;
+WHERE unsigned char OPT_PRINT;
+WHERE unsigned char OPT_QUIT;
+WHERE unsigned char OPT_REPLY_TO;
+WHERE unsigned char OPT_RECALL;
#ifdef USE_SSL
- OPT_SSL_STARTTLS,
+WHERE unsigned char OPT_SSL_STARTTLS;
#endif
- OPT_ABORT_NOSUBJECT,
- OPT_CRYPT_VERIFY_SIG, /* verify PGP signatures */
+WHERE unsigned char OPT_ABORT_NOSUBJECT;
+WHERE unsigned char OPT_CRYPT_VERIFY_SIG; /* verify PGP signatures */
#ifdef USE_NNTP
- OPT_POST_MODERATED,
- OPT_CATCHUP_NEWSGROUP,
- OPT_FOLLOWUP_TO_POSTER,
+WHERE unsigned char OPT_POST_MODERATED;
+WHERE unsigned char OPT_CATCHUP_NEWSGROUP;
+WHERE unsigned char OPT_FOLLOWUP_TO_POSTER;
#endif
- OPT_ABORT_NOATTACH, /* forgotten attachment detector */
- /* THIS MUST BE THE LAST VALUE. */
- OPT_QUAD_MAX,
-};
+WHERE unsigned char OPT_ABORT_NOATTACH; /* forgotten attachment detector */
/* flags to ci_send_message() */
#define SENDREPLY (1 << 0)
else if ((account->type == MUTT_ACCT_TYPE_NNTP) && NntpUser)
mutt_str_strfcpy(account->user, NntpUser, sizeof(account->user));
#endif
- else if (option(OPT_NO_CURSES))
+ else if (OPT_NO_CURSES)
return -1;
/* prompt (defaults to unix username), copy into account->user */
else
else if ((account->type == MUTT_ACCT_TYPE_NNTP) && NntpPass)
mutt_str_strfcpy(account->pass, NntpPass, sizeof(account->pass));
#endif
- else if (option(OPT_NO_CURSES))
+ else if (OPT_NO_CURSES)
return -1;
else
{
#define BEEP() \
do \
{ \
- if (option(OPT_BEEP)) \
+ if (OPT_BEEP) \
beep(); \
} while (0)
#ifdef HAVE_LIBIDN
is_idn_encoded = check_idn(local_domain);
- if (is_idn_encoded && option(OPT_IDN_DECODE))
+ if (is_idn_encoded && OPT_IDN_DECODE)
{
if (idna_to_unicode_8z8z(local_domain, &tmp, IDNA_ALLOW_UNASSIGNED) != IDNA_SUCCESS)
goto cleanup;
* produce a non-matching domain! Thus we only want to do the
* idna_to_ascii_8z() if the original domain was IDNA encoded.
*/
- if (is_idn_encoded && option(OPT_IDN_DECODE))
+ if (is_idn_encoded && OPT_IDN_DECODE)
{
if (idna_to_ascii_8z(reversed_domain, &tmp, IDNA_ALLOW_UNASSIGNED) != IDNA_SUCCESS)
{
goto cleanup;
#ifdef HAVE_LIBIDN
- if (option(OPT_IDN_ENCODE))
+ if (OPT_IDN_ENCODE)
{
if (idna_to_ascii_8z(intl_domain, &tmp, IDNA_ALLOW_UNASSIGNED) != IDNA_SUCCESS)
goto cleanup;
}
return 1;
case DT_QUAD:
- lua_pushinteger(l, quadoption(opt.data));
+ lua_pushinteger(l, opt.data);
return 1;
case DT_REGEX:
case DT_MAGIC:
lua_pushinteger(l, (signed short) *((unsigned long *) opt.data));
return 1;
case DT_BOOL:
- lua_pushboolean(l, option(opt.data));
+ lua_pushboolean(l, opt.data);
return 1;
default:
luaL_error(l, "NeoMutt parameter type %d unknown for %s", opt.type, param);
switch (sig)
{
case SIGTSTP: /* user requested a suspend */
- if (!option(OPT_SUSPEND))
+ if (!OPT_SUSPEND)
break;
IsEndwin = isendwin();
curs_set(1);
if (a && a->mailbox)
{
mutt_str_strfcpy(d, a->mailbox, dsize);
- if (!option(OPT_SAVE_ADDRESS))
+ if (!OPT_SAVE_ADDRESS)
{
char *p = NULL;
prefix[0] = '\0';
buflen--; /* save room for the terminal \0 */
- wlen = ((flags & MUTT_FORMAT_ARROWCURSOR) && option(OPT_ARROW_CURSOR)) ? 3 : 0;
+ wlen = ((flags & MUTT_FORMAT_ARROWCURSOR) && OPT_ARROW_CURSOR) ? 3 : 0;
col += wlen;
if ((flags & MUTT_FORMAT_NOFILTER) == 0)
col -= wlen; /* reset to passed in value */
wptr = buf; /* reset write ptr */
- wlen = ((flags & MUTT_FORMAT_ARROWCURSOR) && option(OPT_ARROW_CURSOR)) ? 3 : 0;
+ wlen = ((flags & MUTT_FORMAT_ARROWCURSOR) && OPT_ARROW_CURSOR) ? 3 : 0;
pid = mutt_create_filter(command->data, NULL, &filter, NULL);
if (pid != -1)
{
}
else if (soft && pad < 0)
{
- int offset =
- ((flags & MUTT_FORMAT_ARROWCURSOR) && option(OPT_ARROW_CURSOR)) ? 3 : 0;
+ int offset = ((flags & MUTT_FORMAT_ARROWCURSOR) && OPT_ARROW_CURSOR) ? 3 : 0;
int avail_cols = (cols > offset) ? (cols - offset) : 0;
/* \0-terminate buf for length computation in mutt_wstr_trunc() */
*wptr = 0;
if (magic > 0 && !mx_access(s, W_OK))
{
- if (option(OPT_CONFIRMAPPEND))
+ if (OPT_CONFIRMAPPEND)
{
snprintf(tmp, sizeof(tmp), _("Append messages to %s?"), s);
rc = mutt_yesorno(tmp, MUTT_YES);
/* pathname does not exist */
if (errno == ENOENT)
{
- if (option(OPT_CONFIRMCREATE))
+ if (OPT_CONFIRMCREATE)
{
snprintf(tmp, sizeof(tmp), _("Create %s?"), s);
rc = mutt_yesorno(tmp, MUTT_YES);
}
mutt_file_fclose(&f);
- if (!option(OPT_CHECK_MBOX_SIZE))
+ if (!OPT_CHECK_MBOX_SIZE)
{
/* need to restore the times here, the file was not really accessed,
* only the type was accessed. This is important, because detection
* mutt_refresh() will think we are in the middle of a macro. so set a
* flag to indicate that we should really refresh the screen.
*/
- set_option(OPT_FORCE_REFRESH);
+ OPT_FORCE_REFRESH = true;
if (!ctx->quiet)
mutt_message(_("Reading %s..."), ctx->path);
{
/* avoid unnecessary work since the mailbox is completely unthreaded
to begin with */
- unset_option(OPT_SORT_SUBTHREADS);
- unset_option(OPT_NEED_RESCORE);
+ OPT_SORT_SUBTHREADS = false;
+ OPT_NEED_RESCORE = false;
mutt_sort_headers(ctx, 1);
}
if (!ctx->quiet)
FREE(&ctx);
}
- unset_option(OPT_FORCE_REFRESH);
+ OPT_FORCE_REFRESH = false;
return ctx;
}
struct stat st, stc;
int opt_confappend, rc;
- if (!Trash || !ctx->deleted || (ctx->magic == MUTT_MAILDIR && option(OPT_MAILDIR_TRASH)))
+ if (!Trash || !ctx->deleted || (ctx->magic == MUTT_MAILDIR && OPT_MAILDIR_TRASH))
return 0;
for (i = 0; i < ctx->msgcount; i++)
return 0; /* nothing to be done */
/* avoid the "append messages" prompt */
- opt_confappend = option(OPT_CONFIRMAPPEND);
+ opt_confappend = OPT_CONFIRMAPPEND;
if (opt_confappend)
- unset_option(OPT_CONFIRMAPPEND);
+ OPT_CONFIRMAPPEND = false;
rc = mutt_save_confirm(Trash, &st);
if (opt_confappend)
- set_option(OPT_CONFIRMAPPEND);
+ OPT_CONFIRMAPPEND = true;
if (rc != 0)
{
mutt_error(_("message(s) not deleted"));
for (i = 0; i < ctx->msgcount; i++)
{
if (!ctx->hdrs[i]->deleted && ctx->hdrs[i]->read &&
- !(ctx->hdrs[i]->flagged && option(OPT_KEEP_FLAGGED)))
+ !(ctx->hdrs[i]->flagged && OPT_KEEP_FLAGGED))
{
read_msgs++;
}
read_msgs = 0;
#endif
- if (read_msgs && quadoption(OPT_MOVE) != MUTT_NO)
+ if (read_msgs && OPT_MOVE != MUTT_NO)
{
char *p = NULL;
* There is no point in asking whether or not to purge if we are
* just marking messages as "trash".
*/
- if (ctx->deleted && !(ctx->magic == MUTT_MAILDIR && option(OPT_MAILDIR_TRASH)))
+ if (ctx->deleted && !(ctx->magic == MUTT_MAILDIR && OPT_MAILDIR_TRASH))
{
snprintf(buf, sizeof(buf),
ctx->deleted == 1 ? _("Purge %d deleted message?") :
}
}
- if (option(OPT_MARK_OLD))
+ if (OPT_MARK_OLD)
{
for (i = 0; i < ctx->msgcount; i++)
{
for (i = 0; i < ctx->msgcount; i++)
{
if (ctx->hdrs[i]->read && !ctx->hdrs[i]->deleted &&
- !(ctx->hdrs[i]->flagged && option(OPT_KEEP_FLAGGED)))
+ !(ctx->hdrs[i]->flagged && OPT_KEEP_FLAGGED))
{
ctx->hdrs[i]->tagged = true;
}
for (i = 0; i < ctx->msgcount; i++)
{
if (ctx->hdrs[i]->read && !ctx->hdrs[i]->deleted &&
- !(ctx->hdrs[i]->flagged && option(OPT_KEEP_FLAGGED)))
+ !(ctx->hdrs[i]->flagged && OPT_KEEP_FLAGGED))
{
if (mutt_append_message(&f, ctx, ctx->hdrs[i], 0, CH_UPDATE_LEN) == 0)
{
}
if (ctx->msgcount == ctx->deleted && (ctx->magic == MUTT_MMDF || ctx->magic == MUTT_MBOX) &&
- !mutt_is_spool(ctx->path) && !option(OPT_SAVE_EMPTY))
+ !mutt_is_spool(ctx->path) && !OPT_SAVE_EMPTY)
{
mutt_file_unlink_empty(ctx->path);
}
for (i = 0, j = 0; i < ctx->msgcount; i++)
{
if (!ctx->hdrs[i]->quasi_deleted &&
- ((committing && (!ctx->hdrs[i]->deleted ||
- (ctx->magic == MUTT_MAILDIR && option(OPT_MAILDIR_TRASH)))) ||
+ ((committing && (!ctx->hdrs[i]->deleted || (ctx->magic == MUTT_MAILDIR && OPT_MAILDIR_TRASH))) ||
(!committing && ctx->hdrs[i]->active)))
{
if (i != j)
else if (ctx->hdrs[j]->changed)
ctx->changed = true;
- if (!committing || (ctx->magic == MUTT_MAILDIR && option(OPT_MAILDIR_TRASH)))
+ if (!committing || (ctx->magic == MUTT_MAILDIR && OPT_MAILDIR_TRASH))
{
if (ctx->hdrs[j]->deleted)
ctx->deleted++;
mutt_sleep(0);
if (ctx->msgcount == ctx->deleted && (ctx->magic == MUTT_MBOX || ctx->magic == MUTT_MMDF) &&
- !mutt_is_spool(ctx->path) && !option(OPT_SAVE_EMPTY))
+ !mutt_is_spool(ctx->path) && !OPT_SAVE_EMPTY)
{
unlink(ctx->path);
mx_fastclose_mailbox(ctx);
if (h2)
{
h2->superseded = true;
- if (option(OPT_SCORE))
+ if (OPT_SCORE)
mutt_score_message(ctx, h2, 1);
}
}
mutt_hash_insert(ctx->subj_hash, h->env->real_subj, h);
mutt_label_hash_add(ctx, h);
- if (option(OPT_SCORE))
+ if (OPT_SCORE)
mutt_score_message(ctx, h, 0);
if (h->changed)
if (!WithCrypto)
return;
- if (option(OPT_CRYPT_TIMESTAMP))
+ if (OPT_CRYPT_TIMESTAMP)
{
t = time(NULL);
strftime(p, sizeof(p), _(" (current time: %c)"), localtime(&t));
if ((WithCrypto & APPLICATION_PGP))
tmp_pgp_pbody = msg->content;
- if (option(OPT_CRYPT_USE_PKA) && (msg->security & SIGN))
+ if (OPT_CRYPT_USE_PKA && (msg->security & SIGN))
{
/* Set sender (necessary for e.g. PKA). */
const char *mailbox = NULL;
}
if ((WithCrypto & APPLICATION_PGP) && (msg->security & APPLICATION_PGP) &&
- (!(flags & ENCRYPT) || option(OPT_PGP_RETAINABLE_SIGS)))
+ (!(flags & ENCRYPT) || OPT_PGP_RETAINABLE_SIGS))
{
tmp_pbody = crypt_pgp_sign_message(msg->content);
if (!tmp_pbody)
a->encoding = ENC7BIT;
convert_to_7bit(a->parts);
}
- else if ((WithCrypto & APPLICATION_PGP) && option(OPT_PGP_STRICT_ENC))
+ else if ((WithCrypto & APPLICATION_PGP) && OPT_PGP_STRICT_ENC)
convert_to_7bit(a->parts);
}
else if (a->type == TYPEMESSAGE &&
else if (a->encoding == ENCBINARY)
a->encoding = ENCBASE64;
else if (a->content && a->encoding != ENCBASE64 &&
- (a->content->from || (a->content->space && option(OPT_PGP_STRICT_ENC))))
+ (a->content->from || (a->content->space && OPT_PGP_STRICT_ENC)))
{
a->encoding = ENCQUOTEDPRINTABLE;
}
}
if ((WithCrypto & APPLICATION_PGP))
- set_option(OPT_DONT_HANDLE_PGP_KEYS);
+ OPT_DONT_HANDLE_PGP_KEYS = true;
if (!h)
{
mutt_file_unlink(tempfname);
if ((WithCrypto & APPLICATION_PGP))
- unset_option(OPT_DONT_HANDLE_PGP_KEYS);
+ OPT_DONT_HANDLE_PGP_KEYS = false;
}
/**
return 0;
if ((WithCrypto & APPLICATION_PGP))
- set_option(OPT_PGP_CHECK_TRUST);
+ OPT_PGP_CHECK_TRUST = true;
last = mutt_addr_append(&adrlist, msg->env->to, false);
last = mutt_addr_append(last ? &last : &adrlist, msg->env->cc, false);
mutt_addr_free(&adrlist);
return -1;
}
- unset_option(OPT_PGP_CHECK_TRUST);
- if (option(OPT_PGP_SELF_ENCRYPT) || (quadoption(OPT_PGP_ENCRYPT_SELF) == MUTT_YES))
+ OPT_PGP_CHECK_TRUST = false;
+ if (OPT_PGP_SELF_ENCRYPT || (OPT_PGP_ENCRYPT_SELF == MUTT_YES))
self_encrypt = PgpSelfEncryptAs;
}
if ((WithCrypto & APPLICATION_SMIME) && (msg->security & APPLICATION_SMIME))
mutt_addr_free(&adrlist);
return -1;
}
- if (option(OPT_SMIME_SELF_ENCRYPT) || (quadoption(OPT_SMIME_ENCRYPT_SELF) == MUTT_YES))
+ if (OPT_SMIME_SELF_ENCRYPT || (OPT_SMIME_ENCRYPT_SELF == MUTT_YES))
self_encrypt = SmimeSelfEncryptAs;
}
}
if (!WithCrypto)
return;
- if (!(option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT) && (msg->security & OPPENCRYPT)))
+ if (!(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT && (msg->security & OPPENCRYPT)))
return;
crypt_get_keys(msg, &pgpkeylist, 1);
if (k->kobj && k->kobj->subkeys)
{
s = k->kobj->subkeys->keyid;
- if ((!option(OPT_PGP_LONG_IDS)) && (strlen(s) == 16))
+ if ((!OPT_PGP_LONG_IDS) && (strlen(s) == 16))
/* Return only the short keyID. */
s += 8;
}
return NULL;
}
- if (option(OPT_CRYPT_USE_PKA))
+ if (OPT_CRYPT_USE_PKA)
{
err = set_pka_sig_notation(ctx);
if (err)
return NULL;
}
- if (option(OPT_CRYPT_USE_PKA))
+ if (OPT_CRYPT_USE_PKA)
{
err = set_pka_sig_notation(ctx);
if (err)
state_puts("\n", s);
}
- if (option(OPT_CRYPT_USE_PKA))
+ if (OPT_CRYPT_USE_PKA)
{
if (sig->pka_trust == 1 && sig->pka_address)
{
key_table = NULL;
for (k = keys; k; k = k->next)
{
- if (!option(OPT_PGP_SHOW_UNUSABLE) && (k->flags & KEYFLAG_CANTUSE))
+ if (!OPT_PGP_SHOW_UNUSABLE && (k->flags & KEYFLAG_CANTUSE))
{
unusable = true;
continue;
case OP_GENERIC_SELECT_ENTRY:
/* FIXME make error reporting more verbose - this should be
easy because gpgme provides more information */
- if (option(OPT_PGP_CHECK_TRUST))
+ if (OPT_PGP_CHECK_TRUST)
{
if (!crypt_key_is_valid(key_table[menu->current]))
{
}
}
- if (option(OPT_PGP_CHECK_TRUST) &&
- (!crypt_id_is_valid(key_table[menu->current]) ||
- !crypt_id_is_strong(key_table[menu->current])))
+ if (OPT_PGP_CHECK_TRUST && (!crypt_id_is_valid(key_table[menu->current]) ||
+ !crypt_id_is_strong(key_table[menu->current])))
{
const char *warn_s = NULL;
char buf2[LONG_STRING];
{
crypt_hook_val = crypt_hook->data;
r = MUTT_YES;
- if (!oppenc_mode && option(OPT_CRYPT_CONFIRMHOOK))
+ if (!oppenc_mode && OPT_CRYPT_CONFIRMHOOK)
{
snprintf(buf, sizeof(buf), _("Use keyID = \"%s\" for %s?"),
crypt_hook_val, p->mailbox);
char buf[LONG_STRING];
struct stat sb;
- unset_option(OPT_PGP_CHECK_TRUST);
+ OPT_PGP_CHECK_TRUST = false;
key = crypt_ask_for_key(_("Please enter the key ID: "), NULL, 0, APPLICATION_PGP, NULL);
if (!key)
* NOTE: "Signing" and "Clearing" only adjust the sign bit, so we have different
* letter choices for those.
*/
- if (option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT) && (msg->security & OPPENCRYPT))
+ if (OPT_CRYPT_OPPORTUNISTIC_ENCRYPT && (msg->security & OPPENCRYPT))
{
if (is_smime)
{
* Opportunistic encryption option is set, but is toggled off
* for this message.
*/
- else if (option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT))
+ else if (OPT_CRYPT_OPPORTUNISTIC_ENCRYPT)
{
if (is_smime)
{
#ifdef CRYPT_BACKEND_CLASSIC_PGP
if (
#ifdef CRYPT_BACKEND_GPGME
- (!option(OPT_CRYPT_USE_GPGME))
+ (!OPT_CRYPT_USE_GPGME)
#else
1
#endif
#ifdef CRYPT_BACKEND_CLASSIC_SMIME
if (
#ifdef CRYPT_BACKEND_GPGME
- (!option(OPT_CRYPT_USE_GPGME))
+ (!OPT_CRYPT_USE_GPGME)
#else
1
#endif
crypto_module_register(&crypt_mod_smime_classic);
#endif
- if (option(OPT_CRYPT_USE_GPGME))
+ if (OPT_CRYPT_USE_GPGME)
{
#ifdef CRYPT_BACKEND_GPGME
crypto_module_register(&crypt_mod_pgp_gpgme);
else
return NULL;
- if (!(is_uid || is_fpr || (*is_subkey && option(OPT_PGP_IGNORE_SUBKEYS))))
+ if (!(is_uid || is_fpr || (*is_subkey && OPT_PGP_IGNORE_SUBKEYS)))
memset(&tmp, 0, sizeof(tmp));
break;
break;
}
- if (!is_uid && !(*is_subkey && option(OPT_PGP_IGNORE_SUBKEYS)))
+ if (!is_uid && !(*is_subkey && OPT_PGP_IGNORE_SUBKEYS))
tmp.flags |= flags;
break;
{
mutt_debug(2, "key len: %s\n", p);
- if (!(*is_subkey && option(OPT_PGP_IGNORE_SUBKEYS)) &&
- mutt_str_atos(p, &tmp.keylen) < 0)
+ if (!(*is_subkey && OPT_PGP_IGNORE_SUBKEYS) && mutt_str_atos(p, &tmp.keylen) < 0)
{
goto bail;
}
{
mutt_debug(2, "pubkey algorithm: %s\n", p);
- if (!(*is_subkey && option(OPT_PGP_IGNORE_SUBKEYS)))
+ if (!(*is_subkey && OPT_PGP_IGNORE_SUBKEYS))
{
int x = 0;
if (mutt_str_atoi(p, &x) < 0)
{
mutt_debug(2, "key id: %s\n", p);
- if (!(*is_subkey && option(OPT_PGP_IGNORE_SUBKEYS)))
+ if (!(*is_subkey && OPT_PGP_IGNORE_SUBKEYS))
mutt_str_replace(&tmp.keyid, p);
break;
}
}
/* ignore user IDs on subkeys */
- if (!is_uid && (*is_subkey && option(OPT_PGP_IGNORE_SUBKEYS)))
+ if (!is_uid && (*is_subkey && OPT_PGP_IGNORE_SUBKEYS))
break;
mutt_debug(2, "user ID: %s\n", NONULL(p));
}
}
- if (!is_uid && (!*is_subkey || !option(OPT_PGP_IGNORE_SUBKEYS) ||
+ if (!is_uid && (!*is_subkey || !OPT_PGP_IGNORE_SUBKEYS ||
!((flags & KEYFLAG_DISABLED) || (flags & KEYFLAG_REVOKED) ||
(flags & KEYFLAG_EXPIRED))))
tmp.flags |= flags;
}
/* merge temp key back into real key */
- if (!(is_uid || is_fpr || (*is_subkey && option(OPT_PGP_IGNORE_SUBKEYS))))
+ if (!(is_uid || is_fpr || (*is_subkey && OPT_PGP_IGNORE_SUBKEYS)))
k = mutt_mem_malloc(sizeof(*k));
memcpy(k, &tmp, sizeof(*k));
/* fixup parentship of uids after merging the temp key into
char *tty = NULL;
/* GnuPG 2.1 no longer exports GPG_AGENT_INFO */
- if (!option(OPT_PGP_USE_GPG_AGENT))
+ if (!OPT_PGP_USE_GPG_AGENT)
return false;
tty = ttyname(0);
static struct PgpKeyInfo *key_parent(struct PgpKeyInfo *k)
{
- if ((k->flags & KEYFLAG_SUBKEY) && k->parent && option(OPT_PGP_IGNORE_SUBKEYS))
+ if ((k->flags & KEYFLAG_SUBKEY) && k->parent && OPT_PGP_IGNORE_SUBKEYS)
k = k->parent;
return k;
char *pgp_this_keyid(struct PgpKeyInfo *k)
{
- if (option(OPT_PGP_LONG_IDS))
+ if (OPT_PGP_LONG_IDS)
return k->keyid;
else
return (k->keyid + 8);
}
mutt_endwin(NULL);
- set_option(OPT_DONT_HANDLE_PGP_KEYS);
+ OPT_DONT_HANDLE_PGP_KEYS = true;
for (; top; top = top->next)
{
break;
}
- unset_option(OPT_DONT_HANDLE_PGP_KEYS);
+ OPT_DONT_HANDLE_PGP_KEYS = false;
}
static struct Body *pgp_decrypt_part(struct Body *a, struct State *s,
fputs(buffer, stdout);
}
- if (mutt_wait_filter(thepid) && option(OPT_PGP_CHECK_EXIT))
+ if (mutt_wait_filter(thepid) && OPT_PGP_CHECK_EXIT)
empty = true;
mutt_file_fclose(&pgperr);
{
keyID = crypt_hook->data;
r = MUTT_YES;
- if (!oppenc_mode && option(OPT_CRYPT_CONFIRMHOOK))
+ if (!oppenc_mode && OPT_CRYPT_CONFIRMHOOK)
{
snprintf(buf, sizeof(buf), _("Use keyID = \"%s\" for %s?"), keyID, p->mailbox);
r = mutt_yesorno(buf, MUTT_YES);
}
mutt_file_fclose(&pgpin);
- if (mutt_wait_filter(thepid) && option(OPT_PGP_CHECK_EXIT))
+ if (mutt_wait_filter(thepid) && OPT_PGP_CHECK_EXIT)
empty = 1;
unlink(pgpinfile);
fprintf(pgpin, "%s\n", PgpPass);
mutt_file_fclose(&pgpin);
- if (mutt_wait_filter(thepid) && option(OPT_PGP_CHECK_EXIT))
+ if (mutt_wait_filter(thepid) && OPT_PGP_CHECK_EXIT)
empty = true;
mutt_file_unlink(pgpinfile);
return msg->security;
/* If autoinline and no crypto options set, then set inline. */
- if (option(OPT_PGP_AUTOINLINE) &&
+ if (OPT_PGP_AUTOINLINE &&
!((msg->security & APPLICATION_PGP) && (msg->security & (SIGN | ENCRYPT))))
{
msg->security |= INLINE;
* NOTE: "Signing" and "Clearing" only adjust the sign bit, so we have different
* letter choices for those.
*/
- if (option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT) && (msg->security & OPPENCRYPT))
+ if (OPT_CRYPT_OPPORTUNISTIC_ENCRYPT && (msg->security & OPPENCRYPT))
{
if (msg->security & (ENCRYPT | SIGN))
{
* Opportunistic encryption option is set, but is toggled off
* for this message.
*/
- else if (option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT))
+ else if (OPT_CRYPT_OPPORTUNISTIC_ENCRYPT)
{
/* When the message is not selected for signing or encryption, the toggle
* between PGP/MIME and Traditional doesn't make sense.
break;
case 'a': /* sign (a)s */
- unset_option(OPT_PGP_CHECK_TRUST);
+ OPT_PGP_CHECK_TRUST = false;
p = pgp_ask_for_key(_("Sign as: "), NULL, 0, PGP_SECRING);
if (p)
for (i = 0, kp = keys; kp; kp = kp->next)
{
- if (!option(OPT_PGP_SHOW_UNUSABLE) && (kp->flags & KEYFLAG_CANTUSE))
+ if (!OPT_PGP_SHOW_UNUSABLE && (kp->flags & KEYFLAG_CANTUSE))
{
unusable = true;
continue;
for (a = kp->address; a; a = a->next)
{
- if (!option(OPT_PGP_SHOW_UNUSABLE) && (a->flags & KEYFLAG_CANTUSE))
+ if (!OPT_PGP_SHOW_UNUSABLE && (a->flags & KEYFLAG_CANTUSE))
{
unusable = true;
continue;
/* XXX make error reporting more verbose */
- if (option(OPT_PGP_CHECK_TRUST))
+ if (OPT_PGP_CHECK_TRUST)
if (!pgp_key_is_valid(KeyTable[menu->current]->parent))
{
mutt_error(_("This key can't be used: expired/disabled/revoked."));
break;
}
- if (option(OPT_PGP_CHECK_TRUST) && (!pgp_id_is_valid(KeyTable[menu->current]) ||
- !pgp_id_is_strong(KeyTable[menu->current])))
+ if (OPT_PGP_CHECK_TRUST && (!pgp_id_is_valid(KeyTable[menu->current]) ||
+ !pgp_id_is_strong(KeyTable[menu->current])))
{
char *str = "";
char buf2[LONG_STRING];
struct stat sb;
pid_t thepid;
struct PgpKeyInfo *key = NULL;
- unset_option(OPT_PGP_CHECK_TRUST);
+ OPT_PGP_CHECK_TRUST = false;
key = pgp_ask_for_key(_("Please enter the key ID: "), NULL, 0, PGP_PUBRING);
struct Address *t = NULL;
bool found = false;
- if (option(OPT_SMIME_DECRYPT_USE_DEFAULT_KEY) && SmimeDefaultKey && *SmimeDefaultKey)
+ if (OPT_SMIME_DECRYPT_USE_DEFAULT_KEY && SmimeDefaultKey && *SmimeDefaultKey)
{
snprintf(SmimeKeyToUse, sizeof(SmimeKeyToUse), "%s/%s", NONULL(SmimeKeys), SmimeDefaultKey);
mutt_file_unlink(tmpfname);
buf[0] = '\0';
- if (option(OPT_SMIME_ASK_CERT_LABEL))
+ if (OPT_SMIME_ASK_CERT_LABEL)
{
if ((mutt_get_field(_("Label for certificate: "), buf, sizeof(buf), 0) != 0) ||
(buf[0] == 0))
* NOTE: "Signing" and "Clearing" only adjust the sign bit, so we have different
* letter choices for those.
*/
- if (option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT) && (msg->security & OPPENCRYPT))
+ if (OPT_CRYPT_OPPORTUNISTIC_ENCRYPT && (msg->security & OPPENCRYPT))
{
/* L10N: S/MIME options (opportunistic encryption is on) */
prompt = _("S/MIME (s)ign, encrypt (w)ith, sign (a)s, (c)lear, or (o)ppenc "
* Opportunistic encryption option is set, but is toggled off
* for this message.
*/
- else if (option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT))
+ else if (OPT_CRYPT_OPPORTUNISTIC_ENCRYPT)
{
/* L10N: S/MIME options (opportunistic encryption is off) */
prompt = _("S/MIME (e)ncrypt, (s)ign, encrypt (w)ith, sign (a)s, (b)oth, "
if (!nntp_data->nserv || !nntp_data->nserv->cacheable ||
!nntp_data->nserv->conn || !nntp_data->group ||
- !(nntp_data->newsrc_ent || nntp_data->subscribed || option(OPT_SAVE_UNSUBSCRIBED)))
+ !(nntp_data->newsrc_ent || nntp_data->subscribed || OPT_SAVE_UNSUBSCRIBED))
return NULL;
mutt_account_tourl(&nntp_data->nserv->conn->account, &url);
nntp_data->group = group;
nntp_data->bcache = NULL;
}
- else if (nntp_data->newsrc_ent || nntp_data->subscribed || option(OPT_SAVE_UNSUBSCRIBED))
+ else if (nntp_data->newsrc_ent || nntp_data->subscribed || OPT_SAVE_UNSUBSCRIBED)
continue;
nntp_delete_group_cache(nntp_data);
return;
/* article isn't read but cached, it's old */
- if (option(OPT_MARK_OLD))
+ if (OPT_MARK_OLD)
hdr->old = true;
}
return NULL;
nntp_data->subscribed = false;
- if (!option(OPT_SAVE_UNSUBSCRIBED))
+ if (!OPT_SAVE_UNSUBSCRIBED)
{
nntp_data->newsrc_len = 0;
FREE(&nntp_data->newsrc_ent);
#ifdef USE_SSL
/* Attempt STARTTLS if available and desired. */
- if (nserv->use_tls != 1 && (nserv->hasSTARTTLS || option(OPT_SSL_FORCE_TLS)))
+ if (nserv->use_tls != 1 && (nserv->hasSTARTTLS || OPT_SSL_FORCE_TLS))
{
if (nserv->use_tls == 0)
nserv->use_tls =
- option(OPT_SSL_FORCE_TLS) ||
+ OPT_SSL_FORCE_TLS ||
query_quadoption(OPT_SSL_STARTTLS,
_("Secure connection with TLS?")) == MUTT_YES ?
2 :
#endif
/* fetch list of articles */
- if (option(OPT_NNTP_LISTGROUP) && nntp_data->nserv->hasLISTGROUP && !nntp_data->deleted)
+ if (OPT_NNTP_LISTGROUP && nntp_data->nserv->hasLISTGROUP && !nntp_data->deleted)
{
if (!ctx->quiet)
mutt_message(_("Fetching list of articles..."));
/* fallback to fetch overview */
else if (nntp_data->nserv->hasOVER || nntp_data->nserv->hasXOVER)
- if (option(OPT_NNTP_LISTGROUP) && nntp_data->nserv->hasLISTGROUP)
+ if (OPT_NNTP_LISTGROUP && nntp_data->nserv->hasLISTGROUP)
break;
else
continue;
first_over = current + 1;
}
- if (!option(OPT_NNTP_LISTGROUP) || !nntp_data->nserv->hasLISTGROUP)
+ if (!OPT_NNTP_LISTGROUP || !nntp_data->nserv->hasLISTGROUP)
current = first_over;
/* fetch overview information */
}
mutt_bit_unset(ctx->rights, MUTT_ACL_INSERT);
- if (!nntp_data->newsrc_ent && !nntp_data->subscribed && !option(OPT_SAVE_UNSUBSCRIBED))
+ if (!nntp_data->newsrc_ent && !nntp_data->subscribed && !OPT_SAVE_UNSUBSCRIBED)
ctx->readonly = true;
/* select newsgroup */
nntp_data->deleted = true;
nntp_active_save_cache(nserv);
}
- if (nntp_data->newsrc_ent && !nntp_data->subscribed && !option(OPT_SAVE_UNSUBSCRIBED))
+ if (nntp_data->newsrc_ent && !nntp_data->subscribed && !OPT_SAVE_UNSUBSCRIBED)
{
FREE(&nntp_data->newsrc_ent);
nntp_data->newsrc_len = 0;
nntp_data->deleted = false;
/* get description if empty */
- if (option(OPT_NNTP_LOAD_DESCRIPTION) && !nntp_data->desc)
+ if (OPT_NNTP_LOAD_DESCRIPTION && !nntp_data->desc)
{
if (get_description(nntp_data, NULL, NULL) < 0)
{
time(&nserv->check_time);
ctx->data = nntp_data;
- if (!nntp_data->bcache && (nntp_data->newsrc_ent || nntp_data->subscribed ||
- option(OPT_SAVE_UNSUBSCRIBED)))
+ if (!nntp_data->bcache &&
+ (nntp_data->newsrc_ent || nntp_data->subscribed || OPT_SAVE_UNSUBSCRIBED))
nntp_data->bcache = mutt_bcache_open(&nserv->conn->account, nntp_data->group);
/* strip off extra articles if adding context is greater than $nntp_context */
}
}
- if (option(OPT_NNTP_LOAD_DESCRIPTION))
+ if (OPT_NNTP_LOAD_DESCRIPTION)
rc = get_description(&nntp_data, "*", _("Loading descriptions..."));
nntp_active_save_cache(nserv);
return -1;
/* check subscribed newsgroups for new articles */
- if (option(OPT_SHOW_NEW_NEWS))
+ if (OPT_SHOW_NEW_NEWS)
{
mutt_message(_("Checking for new messages..."));
for (i = 0; i < nserv->groups_num; i++)
}
/* loading descriptions */
- if (option(OPT_NNTP_LOAD_DESCRIPTION))
+ if (OPT_NNTP_LOAD_DESCRIPTION)
{
unsigned int count = 0;
struct Progress progress;
#ifndef _MUTT_OPTIONS_H_
#define _MUTT_OPTIONS_H_
-/**
- * enum GlobalBool - boolean vars
- */
-enum GlobalBool
-{
- OPT_ALLOW_8BIT,
- OPT_ALLOW_ANSI,
- OPT_ARROW_CURSOR,
- OPT_ASCII_CHARS,
- OPT_ASKBCC,
- OPT_ASKCC,
- OPT_ASK_FOLLOW_UP,
- OPT_ASK_X_COMMENT_TO,
- OPT_ATTACH_SPLIT,
- OPT_AUTOEDIT,
- OPT_AUTO_TAG,
- OPT_BEEP,
- OPT_BEEP_NEW,
- OPT_BOUNCE_DELIVERED,
- OPT_BRAILLE_FRIENDLY,
- OPT_CHANGE_FOLDER_NEXT,
- OPT_CHECK_MBOX_SIZE,
- OPT_CHECK_NEW,
- OPT_COLLAPSE_ALL,
- OPT_COLLAPSE_UNREAD,
- OPT_COLLAPSE_FLAGGED,
- OPT_CONFIRMAPPEND,
- OPT_CONFIRMCREATE,
- OPT_DELETE_UNTAG,
- OPT_DIGEST_COLLAPSE,
- OPT_DUPLICATE_THREADS,
- OPT_EDIT_HEADERS,
- OPT_ENCODE_FROM,
- OPT_USE_ENVELOPE_FROM,
- OPT_FAST_REPLY,
- OPT_FCC_CLEAR,
- OPT_FLAG_SAFE,
- OPT_FOLLOWUP_TO,
- OPT_FORCE_NAME,
- OPT_FORWARD_DECODE,
- OPT_FORWARD_QUOTE,
- OPT_FORWARD_REFERENCES,
+#include <stdbool.h>
+#include "where.h"
+
+WHERE bool OPT_ALLOW_8BIT;
+WHERE bool OPT_ALLOW_ANSI;
+WHERE bool OPT_ARROW_CURSOR;
+WHERE bool OPT_ASCII_CHARS;
+WHERE bool OPT_ASKBCC;
+WHERE bool OPT_ASKCC;
+WHERE bool OPT_ASK_FOLLOW_UP;
+WHERE bool OPT_ASK_X_COMMENT_TO;
+WHERE bool OPT_ATTACH_SPLIT;
+WHERE bool OPT_AUTOEDIT;
+WHERE bool OPT_AUTO_TAG;
+WHERE bool OPT_BEEP;
+WHERE bool OPT_BEEP_NEW;
+WHERE bool OPT_BOUNCE_DELIVERED;
+WHERE bool OPT_BRAILLE_FRIENDLY;
+WHERE bool OPT_CHANGE_FOLDER_NEXT;
+WHERE bool OPT_CHECK_MBOX_SIZE;
+WHERE bool OPT_CHECK_NEW;
+WHERE bool OPT_COLLAPSE_ALL;
+WHERE bool OPT_COLLAPSE_UNREAD;
+WHERE bool OPT_COLLAPSE_FLAGGED;
+WHERE bool OPT_CONFIRMAPPEND;
+WHERE bool OPT_CONFIRMCREATE;
+WHERE bool OPT_DELETE_UNTAG;
+WHERE bool OPT_DIGEST_COLLAPSE;
+WHERE bool OPT_DUPLICATE_THREADS;
+WHERE bool OPT_EDIT_HEADERS;
+WHERE bool OPT_ENCODE_FROM;
+WHERE bool OPT_USE_ENVELOPE_FROM;
+WHERE bool OPT_FAST_REPLY;
+WHERE bool OPT_FCC_CLEAR;
+WHERE bool OPT_FLAG_SAFE;
+WHERE bool OPT_FOLLOWUP_TO;
+WHERE bool OPT_FORCE_NAME;
+WHERE bool OPT_FORWARD_DECODE;
+WHERE bool OPT_FORWARD_QUOTE;
+WHERE bool OPT_FORWARD_REFERENCES;
#ifdef USE_HCACHE
- OPT_MAILDIR_HEADER_CACHE_VERIFY,
+WHERE bool OPT_MAILDIR_HEADER_CACHE_VERIFY;
#if defined(HAVE_QDBM) || defined(HAVE_TC) || defined(HAVE_KC)
- OPT_HEADER_CACHE_COMPRESS,
+WHERE bool OPT_HEADER_CACHE_COMPRESS;
#endif /* HAVE_QDBM */
#endif
- OPT_HDRS,
- OPT_HEADER,
- OPT_HEADER_COLOR_PARTIAL,
- OPT_HELP,
- OPT_HIDDEN_HOST,
- OPT_HIDE_LIMITED,
- OPT_HIDE_MISSING,
- OPT_HIDE_THREAD_SUBJECT,
- OPT_HIDE_TOP_LIMITED,
- OPT_HIDE_TOP_MISSING,
- OPT_HISTORY_REMOVE_DUPS,
- OPT_HONOR_DISPOSITION,
- OPT_IGNORE_LINEAR_WHITE_SPACE,
- OPT_IGNORE_LIST_REPLY_TO,
+WHERE bool OPT_HDRS;
+WHERE bool OPT_HEADER;
+WHERE bool OPT_HEADER_COLOR_PARTIAL;
+WHERE bool OPT_HELP;
+WHERE bool OPT_HIDDEN_HOST;
+WHERE bool OPT_HIDE_LIMITED;
+WHERE bool OPT_HIDE_MISSING;
+WHERE bool OPT_HIDE_THREAD_SUBJECT;
+WHERE bool OPT_HIDE_TOP_LIMITED;
+WHERE bool OPT_HIDE_TOP_MISSING;
+WHERE bool OPT_HISTORY_REMOVE_DUPS;
+WHERE bool OPT_HONOR_DISPOSITION;
+WHERE bool OPT_IGNORE_LINEAR_WHITE_SPACE;
+WHERE bool OPT_IGNORE_LIST_REPLY_TO;
#ifdef USE_IMAP
- OPT_IMAP_CHECK_SUBSCRIBED,
- OPT_IMAP_IDLE,
- OPT_IMAP_LIST_SUBSCRIBED,
- OPT_IMAP_PASSIVE,
- OPT_IMAP_PEEK,
- OPT_IMAP_SERVERNOISE,
+WHERE bool OPT_IMAP_CHECK_SUBSCRIBED;
+WHERE bool OPT_IMAP_IDLE;
+WHERE bool OPT_IMAP_LIST_SUBSCRIBED;
+WHERE bool OPT_IMAP_PASSIVE;
+WHERE bool OPT_IMAP_PEEK;
+WHERE bool OPT_IMAP_SERVERNOISE;
#endif
#ifdef USE_SSL
#ifndef USE_SSL_GNUTLS
- OPT_SSL_USESYSTEMCERTS,
- OPT_SSL_USE_SSLV2,
+WHERE bool OPT_SSL_USESYSTEMCERTS;
+WHERE bool OPT_SSL_USE_SSLV2;
#endif /* USE_SSL_GNUTLS */
- OPT_SSL_USE_SSLV3,
- OPT_SSL_USE_TLSV1,
- OPT_SSL_USE_TLSV1_1,
- OPT_SSL_USE_TLSV1_2,
- OPT_SSL_FORCE_TLS,
- OPT_SSL_VERIFY_DATES,
- OPT_SSL_VERIFY_HOST,
+WHERE bool OPT_SSL_USE_SSLV3;
+WHERE bool OPT_SSL_USE_TLSV1;
+WHERE bool OPT_SSL_USE_TLSV1_1;
+WHERE bool OPT_SSL_USE_TLSV1_2;
+WHERE bool OPT_SSL_FORCE_TLS;
+WHERE bool OPT_SSL_VERIFY_DATES;
+WHERE bool OPT_SSL_VERIFY_HOST;
#if defined(USE_SSL_OPENSSL) && defined(HAVE_SSL_PARTIAL_CHAIN)
- OPT_SSL_VERIFY_PARTIAL_CHAINS,
+WHERE bool OPT_SSL_VERIFY_PARTIAL_CHAINS;
#endif /* USE_SSL_OPENSSL */
#endif /* defined(USE_SSL) */
- OPT_IMPLICIT_AUTOVIEW,
- OPT_INCLUDE_ONLYFIRST,
- OPT_KEEP_FLAGGED,
- OPT_MAILCAP_SANITIZE,
- OPT_MAIL_CHECK_RECENT,
- OPT_MAIL_CHECK_STATS,
- OPT_MAILDIR_TRASH,
- OPT_MAILDIR_CHECK_CUR,
- OPT_MARKERS,
- OPT_MARK_OLD,
- OPT_MENU_SCROLL, /**< scroll menu instead of implicit next-page */
- OPT_MENU_MOVE_OFF, /**< allow menu to scroll past last entry */
+WHERE bool OPT_IMPLICIT_AUTOVIEW;
+WHERE bool OPT_INCLUDE_ONLYFIRST;
+WHERE bool OPT_KEEP_FLAGGED;
+WHERE bool OPT_MAILCAP_SANITIZE;
+WHERE bool OPT_MAIL_CHECK_RECENT;
+WHERE bool OPT_MAIL_CHECK_STATS;
+WHERE bool OPT_MAILDIR_TRASH;
+WHERE bool OPT_MAILDIR_CHECK_CUR;
+WHERE bool OPT_MARKERS;
+WHERE bool OPT_MARK_OLD;
+WHERE bool OPT_MENU_SCROLL; /**< scroll menu instead of implicit next-page */
+WHERE bool OPT_MENU_MOVE_OFF; /**< allow menu to scroll past last entry */
#if defined(USE_IMAP) || defined(USE_POP)
- OPT_MESSAGE_CACHE_CLEAN,
+WHERE bool OPT_MESSAGE_CACHE_CLEAN;
#endif
- OPT_META_KEY, /**< interpret ALT-x as ESC-x */
- OPT_METOO,
- OPT_MH_PURGE,
- OPT_MIME_FORWARD_DECODE,
- OPT_MIME_TYPE_QUERY_FIRST,
+WHERE bool OPT_META_KEY; /**< interpret ALT-x as ESC-x */
+WHERE bool OPT_METOO;
+WHERE bool OPT_MH_PURGE;
+WHERE bool OPT_MIME_FORWARD_DECODE;
+WHERE bool OPT_MIME_TYPE_QUERY_FIRST;
#ifdef USE_NNTP
- OPT_MIME_SUBJECT, /**< encode subject line with RFC2047 */
+WHERE bool OPT_MIME_SUBJECT; /**< encode subject line with RFC2047 */
#endif
- OPT_NARROW_TREE,
- OPT_PAGER_STOP,
- OPT_PIPE_DECODE,
- OPT_PIPE_SPLIT,
+WHERE bool OPT_NARROW_TREE;
+WHERE bool OPT_PAGER_STOP;
+WHERE bool OPT_PIPE_DECODE;
+WHERE bool OPT_PIPE_SPLIT;
#ifdef USE_POP
- OPT_POP_AUTH_TRY_ALL,
- OPT_POP_LAST,
+WHERE bool OPT_POP_AUTH_TRY_ALL;
+WHERE bool OPT_POP_LAST;
#endif
- OPT_POSTPONE_ENCRYPT,
- OPT_PRINT_DECODE,
- OPT_PRINT_SPLIT,
- OPT_PROMPT_AFTER,
- OPT_READ_ONLY,
- OPT_REFLOW_SPACE_QUOTES,
- OPT_REFLOW_TEXT,
- OPT_REPLY_SELF,
- OPT_REPLY_WITH_XORIG,
- OPT_RESOLVE,
- OPT_RESUME_DRAFT_FILES,
- OPT_RESUME_EDITED_DRAFT_FILES,
- OPT_REVERSE_ALIAS,
- OPT_REVERSE_NAME,
- OPT_REVERSE_REALNAME,
- OPT_RFC2047_PARAMETERS,
- OPT_SAVE_ADDRESS,
- OPT_SAVE_EMPTY,
- OPT_SAVE_NAME,
- OPT_SCORE,
+WHERE bool OPT_POSTPONE_ENCRYPT;
+WHERE bool OPT_PRINT_DECODE;
+WHERE bool OPT_PRINT_SPLIT;
+WHERE bool OPT_PROMPT_AFTER;
+WHERE bool OPT_READ_ONLY;
+WHERE bool OPT_REFLOW_SPACE_QUOTES;
+WHERE bool OPT_REFLOW_TEXT;
+WHERE bool OPT_REPLY_SELF;
+WHERE bool OPT_REPLY_WITH_XORIG;
+WHERE bool OPT_RESOLVE;
+WHERE bool OPT_RESUME_DRAFT_FILES;
+WHERE bool OPT_RESUME_EDITED_DRAFT_FILES;
+WHERE bool OPT_REVERSE_ALIAS;
+WHERE bool OPT_REVERSE_NAME;
+WHERE bool OPT_REVERSE_REALNAME;
+WHERE bool OPT_RFC2047_PARAMETERS;
+WHERE bool OPT_SAVE_ADDRESS;
+WHERE bool OPT_SAVE_EMPTY;
+WHERE bool OPT_SAVE_NAME;
+WHERE bool OPT_SCORE;
#ifdef USE_SIDEBAR
- OPT_SIDEBAR_VISIBLE,
- OPT_SIDEBAR_FOLDER_INDENT,
- OPT_SIDEBAR_NEW_MAIL_ONLY,
- OPT_SIDEBAR_NEXT_NEW_WRAP,
- OPT_SIDEBAR_SHORT_PATH,
- OPT_SIDEBAR_ON_RIGHT,
+WHERE bool OPT_SIDEBAR_VISIBLE;
+WHERE bool OPT_SIDEBAR_FOLDER_INDENT;
+WHERE bool OPT_SIDEBAR_NEW_MAIL_ONLY;
+WHERE bool OPT_SIDEBAR_NEXT_NEW_WRAP;
+WHERE bool OPT_SIDEBAR_SHORT_PATH;
+WHERE bool OPT_SIDEBAR_ON_RIGHT;
#endif
- OPT_SIG_DASHES,
- OPT_SIG_ON_TOP,
- OPT_SORT_RE,
- OPT_STATUS_ON_TOP,
- OPT_STRICT_THREADS,
- OPT_SUSPEND,
- OPT_TEXT_FLOWED,
- OPT_THOROUGH_SEARCH,
- OPT_THREAD_RECEIVED,
- OPT_TILDE,
- OPT_TS_ENABLED,
- OPT_UNCOLLAPSE_JUMP,
- OPT_UNCOLLAPSE_NEW,
- OPT_USE_8BITMIME,
- OPT_USE_DOMAIN,
- OPT_USE_FROM,
- OPT_PGP_USE_GPG_AGENT,
+WHERE bool OPT_SIG_DASHES;
+WHERE bool OPT_SIG_ON_TOP;
+WHERE bool OPT_SORT_RE;
+WHERE bool OPT_STATUS_ON_TOP;
+WHERE bool OPT_STRICT_THREADS;
+WHERE bool OPT_SUSPEND;
+WHERE bool OPT_TEXT_FLOWED;
+WHERE bool OPT_THOROUGH_SEARCH;
+WHERE bool OPT_THREAD_RECEIVED;
+WHERE bool OPT_TILDE;
+WHERE bool OPT_TS_ENABLED;
+WHERE bool OPT_UNCOLLAPSE_JUMP;
+WHERE bool OPT_UNCOLLAPSE_NEW;
+WHERE bool OPT_USE_8BITMIME;
+WHERE bool OPT_USE_DOMAIN;
+WHERE bool OPT_USE_FROM;
+WHERE bool OPT_PGP_USE_GPG_AGENT;
#ifdef HAVE_LIBIDN
- OPT_IDN_DECODE,
- OPT_IDN_ENCODE,
+WHERE bool OPT_IDN_DECODE;
+WHERE bool OPT_IDN_ENCODE;
#endif
#ifdef HAVE_GETADDRINFO
- OPT_USE_IPV6,
+WHERE bool OPT_USE_IPV6;
#endif
- OPT_WAIT_KEY,
- OPT_WEED,
- OPT_SMART_WRAP,
- OPT_WRAP_SEARCH,
- OPT_WRITE_BCC, /**< write out a bcc header? */
- OPT_USER_AGENT,
+WHERE bool OPT_WAIT_KEY;
+WHERE bool OPT_WEED;
+WHERE bool OPT_SMART_WRAP;
+WHERE bool OPT_WRAP_SEARCH;
+WHERE bool OPT_WRITE_BCC; /**< write out a bcc header? */
+WHERE bool OPT_USER_AGENT;
- OPT_CRYPT_USE_GPGME,
- OPT_CRYPT_USE_PKA,
+WHERE bool OPT_CRYPT_USE_GPGME;
+WHERE bool OPT_CRYPT_USE_PKA;
- /* PGP options */
+/* PGP options */
- OPT_CRYPT_AUTOSIGN,
- OPT_CRYPT_AUTOENCRYPT,
- OPT_CRYPT_AUTOPGP,
- OPT_CRYPT_AUTOSMIME,
- OPT_CRYPT_CONFIRMHOOK,
- OPT_CRYPT_OPPORTUNISTIC_ENCRYPT,
- OPT_CRYPT_REPLYENCRYPT,
- OPT_CRYPT_REPLYSIGN,
- OPT_CRYPT_REPLYSIGNENCRYPTED,
- OPT_CRYPT_TIMESTAMP,
- OPT_SMIME_IS_DEFAULT,
- OPT_SMIME_SELF_ENCRYPT,
- OPT_SMIME_ASK_CERT_LABEL,
- OPT_SMIME_DECRYPT_USE_DEFAULT_KEY,
- OPT_PGP_IGNORE_SUBKEYS,
- OPT_PGP_CHECK_EXIT,
- OPT_PGP_LONG_IDS,
- OPT_PGP_AUTO_DECODE,
- OPT_PGP_RETAINABLE_SIGS,
- OPT_PGP_SELF_ENCRYPT,
- OPT_PGP_STRICT_ENC,
- OPT_FORWARD_DECRYPT,
- OPT_PGP_SHOW_UNUSABLE,
- OPT_PGP_AUTOINLINE,
- OPT_PGP_REPLYINLINE,
+WHERE bool OPT_CRYPT_AUTOSIGN;
+WHERE bool OPT_CRYPT_AUTOENCRYPT;
+WHERE bool OPT_CRYPT_AUTOPGP;
+WHERE bool OPT_CRYPT_AUTOSMIME;
+WHERE bool OPT_CRYPT_CONFIRMHOOK;
+WHERE bool OPT_CRYPT_OPPORTUNISTIC_ENCRYPT;
+WHERE bool OPT_CRYPT_REPLYENCRYPT;
+WHERE bool OPT_CRYPT_REPLYSIGN;
+WHERE bool OPT_CRYPT_REPLYSIGNENCRYPTED;
+WHERE bool OPT_CRYPT_TIMESTAMP;
+WHERE bool OPT_SMIME_IS_DEFAULT;
+WHERE bool OPT_SMIME_SELF_ENCRYPT;
+WHERE bool OPT_SMIME_ASK_CERT_LABEL;
+WHERE bool OPT_SMIME_DECRYPT_USE_DEFAULT_KEY;
+WHERE bool OPT_PGP_IGNORE_SUBKEYS;
+WHERE bool OPT_PGP_CHECK_EXIT;
+WHERE bool OPT_PGP_LONG_IDS;
+WHERE bool OPT_PGP_AUTO_DECODE;
+WHERE bool OPT_PGP_RETAINABLE_SIGS;
+WHERE bool OPT_PGP_SELF_ENCRYPT;
+WHERE bool OPT_PGP_STRICT_ENC;
+WHERE bool OPT_FORWARD_DECRYPT;
+WHERE bool OPT_PGP_SHOW_UNUSABLE;
+WHERE bool OPT_PGP_AUTOINLINE;
+WHERE bool OPT_PGP_REPLYINLINE;
/* news options */
#ifdef USE_NNTP
- OPT_SHOW_NEW_NEWS,
- OPT_SHOW_ONLY_UNREAD,
- OPT_SAVE_UNSUBSCRIBED,
- OPT_NNTP_LISTGROUP,
- OPT_NNTP_LOAD_DESCRIPTION,
- OPT_X_COMMENT_TO,
+WHERE bool OPT_SHOW_NEW_NEWS;
+WHERE bool OPT_SHOW_ONLY_UNREAD;
+WHERE bool OPT_SAVE_UNSUBSCRIBED;
+WHERE bool OPT_NNTP_LISTGROUP;
+WHERE bool OPT_NNTP_LOAD_DESCRIPTION;
+WHERE bool OPT_X_COMMENT_TO;
#endif
- /* pseudo options */
+/* pseudo options */
- OPT_AUX_SORT, /**< (pseudo) using auxiliary sort function */
- OPT_FORCE_REFRESH, /**< (pseudo) refresh even during macros */
- OPT_NO_CURSES, /**< (pseudo) when sending in batch mode */
- OPT_SEARCH_REVERSE, /**< (pseudo) used by ci_search_command */
- OPT_MSG_ERR, /**< (pseudo) used by mutt_error/mutt_message */
- OPT_SEARCH_INVALID, /**< (pseudo) used to invalidate the search pat */
- OPT_NEED_RESORT, /**< (pseudo) used to force a re-sort */
- OPT_RESORT_INIT, /**< (pseudo) used to force the next resort to be from scratch */
- OPT_VIEW_ATTACH, /**< (pseudo) signals that we are viewing attachments */
- OPT_SORT_SUBTHREADS, /**< (pseudo) used when $sort_aux changes */
- OPT_NEED_RESCORE, /**< (pseudo) set when the `score' command is used */
- OPT_ATTACH_MSG, /**< (pseudo) used by attach-message */
- OPT_HIDE_READ, /**< (pseudo) whether or not hide read messages */
- OPT_KEEP_QUIET, /**< (pseudo) shut up the message and refresh
- * functions while we are executing an
- * external program. */
- OPT_MENU_CALLER, /**< (pseudo) tell menu to give caller a take */
- OPT_REDRAW_TREE, /**< (pseudo) redraw the thread tree */
- OPT_PGP_CHECK_TRUST, /**< (pseudo) used by pgp_select_key () */
- OPT_DONT_HANDLE_PGP_KEYS, /**< (pseudo) used to extract PGP keys */
- OPT_IGNORE_MACRO_EVENTS, /**< (pseudo) don't process macro/push/exec events while set */
+WHERE bool OPT_AUX_SORT; /**< (pseudo) using auxiliary sort function */
+WHERE bool OPT_FORCE_REFRESH; /**< (pseudo) refresh even during macros */
+WHERE bool OPT_NO_CURSES; /**< (pseudo) when sending in batch mode */
+WHERE bool OPT_SEARCH_REVERSE; /**< (pseudo) used by ci_search_command */
+WHERE bool OPT_MSG_ERR; /**< (pseudo) used by mutt_error/mutt_message */
+WHERE bool OPT_SEARCH_INVALID; /**< (pseudo) used to invalidate the search pat */
+WHERE bool OPT_NEED_RESORT; /**< (pseudo) used to force a re-sort */
+WHERE bool OPT_RESORT_INIT; /**< (pseudo) used to force the next resort to be from scratch */
+WHERE bool OPT_VIEW_ATTACH; /**< (pseudo) signals that we are viewing attachments */
+WHERE bool OPT_SORT_SUBTHREADS; /**< (pseudo) used when $sort_aux changes */
+WHERE bool OPT_NEED_RESCORE; /**< (pseudo) set when the `score' command is used */
+WHERE bool OPT_ATTACH_MSG; /**< (pseudo) used by attach-message */
+WHERE bool OPT_HIDE_READ; /**< (pseudo) whether or not hide read messages */
+WHERE bool OPT_KEEP_QUIET; /**< (pseudo) shut up the message and refresh functions while we are executing an external program. */
+WHERE bool OPT_MENU_CALLER; /**< (pseudo) tell menu to give caller a take */
+WHERE bool OPT_REDRAW_TREE; /**< (pseudo) redraw the thread tree */
+WHERE bool OPT_PGP_CHECK_TRUST; /**< (pseudo) used by pgp_select_key () */
+WHERE bool OPT_DONT_HANDLE_PGP_KEYS; /**< (pseudo) used to extract PGP keys */
+WHERE bool OPT_IGNORE_MACRO_EVENTS; /**< (pseudo) don't process macro/push/exec events while set */
#ifdef USE_NNTP
- OPT_NEWS, /**< (pseudo) used to change reader mode */
- OPT_NEWS_SEND, /**< (pseudo) used to change behavior when posting */
+WHERE bool OPT_NEWS; /**< (pseudo) used to change reader mode */
+WHERE bool OPT_NEWS_SEND; /**< (pseudo) used to change behavior when posting */
#endif
#ifdef USE_NOTMUCH
- OPT_VIRTUAL_SPOOLFILE,
- OPT_NM_RECORD,
+WHERE bool OPT_VIRTUAL_SPOOLFILE;
+WHERE bool OPT_NM_RECORD;
#endif
- OPT_GLOBAL_MAX
-};
#define mutt_bit_set(v, n) v[n / 8] |= (1 << (n % 8))
#define mutt_bit_unset(v, n) v[n / 8] &= ~(1 << (n % 8))
#define mutt_bit_toggle(v, n) v[n / 8] ^= (1 << (n % 8))
#define mutt_bit_isset(v, n) (v[n / 8] & (1 << (n % 8)))
-/* bit vector for boolean variables */
-#ifdef MAIN_C
-unsigned char Options[(OPT_GLOBAL_MAX + 7) / 8];
-#else
-extern unsigned char Options[];
-#endif
-
-#define set_option(x) mutt_bit_set(Options, x)
-#define unset_option(x) mutt_bit_unset(Options, x)
-#define toggle_option(x) mutt_bit_toggle(Options, x)
-#define option(x) mutt_bit_isset(Options, x)
-
#endif /* _MUTT_OPTIONS_H_ */
}
#define CHECK_ATTACH \
- if (option(OPT_ATTACH_MSG)) \
+ if (OPT_ATTACH_MSG) \
{ \
mutt_flushinp(); \
mutt_error(_(Function_not_permitted_in_attach_message_mode)); \
if (line_info[n].continuation)
{
- if (!cnt && option(OPT_MARKERS))
+ if (!cnt && OPT_MARKERS)
{
SETCOLOR(MT_COLOR_MARKERS);
addch('+');
if (n > 0 && (buf[0] == ' ' || buf[0] == '\t'))
{
line_info[n].type = line_info[n - 1].type; /* wrapped line */
- if (!option(OPT_HEADER_COLOR_PARTIAL))
+ if (!OPT_HEADER_COLOR_PARTIAL)
{
(line_info[n].syntax)[0].color = (line_info[n - 1].syntax)[0].color;
line_info[n].is_cont_hdr = 1;
* same color. Otherwise, we handle the header patterns just
* like body patterns (further below).
*/
- if (!option(OPT_HEADER_COLOR_PARTIAL))
+ if (!OPT_HEADER_COLOR_PARTIAL)
{
STAILQ_FOREACH(color_line, &ColorHdrList, entries)
{
/* body patterns */
if (line_info[n].type == MT_COLOR_NORMAL || line_info[n].type == MT_COLOR_QUOTED ||
- (line_info[n].type == MT_COLOR_HDEFAULT && option(OPT_HEADER_COLOR_PARTIAL)))
+ (line_info[n].type == MT_COLOR_HDEFAULT && OPT_HEADER_COLOR_PARTIAL))
{
size_t nl;
x++;
/* Character Attributes */
- if (option(OPT_ALLOW_ANSI) && a != NULL && buf[x] == 'm')
+ if (OPT_ALLOW_ANSI && a != NULL && buf[x] == 'm')
{
if (pos == x)
{
int *pcol, int *pspecial, struct MuttWindow *pager_window)
{
int space = -1; /* index of the last space or TAB */
- int col = option(OPT_MARKERS) ? (*line_info)[n].continuation : 0;
+ int col = OPT_MARKERS ? (*line_info)[n].continuation : 0;
size_t k;
int ch, vch, last_special = -1, special = 0, t;
wchar_t wc;
buf_ptr = buf + cnt;
/* move the break point only if smart_wrap is set */
- if (option(OPT_SMART_WRAP))
+ if (OPT_SMART_WRAP)
{
if ((cnt < b_read) && (ch != -1) && !ISHEADER((*line_info)[n].type) &&
!ISSPACE(buf[cnt]))
memcpy(rd->index_window, MuttIndexWindow, sizeof(struct MuttWindow));
rd->index_window->rows = rd->indexlen > 0 ? rd->indexlen - 1 : 0;
- if (option(OPT_STATUS_ON_TOP))
+ if (OPT_STATUS_ON_TOP)
{
memcpy(rd->index_status_window, MuttStatusWindow, sizeof(struct MuttWindow));
}
}
- if (option(OPT_HELP))
+ if (OPT_HELP)
{
SETCOLOR(MT_COLOR_STATUS);
mutt_window_move(MuttHelpWindow, 0, 0);
while (rd->lines < rd->pager_window->rows)
{
mutt_window_clrtoeol(rd->pager_window);
- if (option(OPT_TILDE))
+ if (OPT_TILDE)
addch('~');
rd->lines++;
mutt_window_move(rd->pager_window, rd->lines, 0);
mutt_draw_statusline(rd->pager_status_window->cols, bn, sizeof(bn));
}
NORMAL_COLOR;
- if (option(OPT_TS_ENABLED) && TSSupported && rd->index)
+ if (OPT_TS_ENABLED && TSSupported && rd->index)
{
menu_status_line(buffer, sizeof(buffer), rd->index, NONULL(TSStatusFormat));
mutt_ts_status(buffer);
pager_menu_redraw(pager_menu);
- if (option(OPT_BRAILLE_FRIENDLY))
+ if (OPT_BRAILLE_FRIENDLY)
{
if (braille_line != -1)
{
bool do_new_mail = false;
- if (Context && !option(OPT_ATTACH_MSG))
+ if (Context && !OPT_ATTACH_MSG)
{
oldcount = Context ? Context->msgcount : 0;
/* check for new mail */
}
pager_menu->redraw = REDRAW_FULL;
- set_option(OPT_SEARCH_INVALID);
+ OPT_SEARCH_INVALID = true;
}
}
if (mutt_buffy_notify() || do_new_mail)
{
- if (option(OPT_BEEP_NEW))
+ if (OPT_BEEP_NEW)
beep();
if (NewMailCommand)
{
if (query_quadoption(OPT_QUIT, _("Quit NeoMutt?")) == MUTT_YES)
{
/* avoid prompting again in the index menu */
- set_quadoption(OPT_QUIT, MUTT_YES);
+ OPT_QUIT = MUTT_YES;
ch = -1;
}
break;
{
rd.topline = up_n_lines(PagerContext, rd.line_info, rd.curline, rd.hide_quoted);
}
- else if (option(OPT_PAGER_STOP))
+ else if (OPT_PAGER_STOP)
{
/* emulate "less -q" and don't go on to the next message. */
mutt_error(_("Bottom of message is shown."));
rd.topline = up_n_lines(rd.pager_window->rows / 2, rd.line_info,
rd.curline, rd.hide_quoted);
}
- else if (option(OPT_PAGER_STOP))
+ else if (OPT_PAGER_STOP)
{
/* emulate "less -q" and don't go on to the next message. */
mutt_error(_("Bottom of message is shown."));
if (i < rd.last_line)
rd.topline = i;
- else if (wrapped || !option(OPT_WRAP_SEARCH))
+ else if (wrapped || !OPT_WRAP_SEARCH)
mutt_error(_("Not found."));
else
{
if (i >= 0)
rd.topline = i;
- else if (wrapped || !option(OPT_WRAP_SEARCH))
+ else if (wrapped || !OPT_WRAP_SEARCH)
mutt_error(_("Not found."));
else
{
CHECK_MODE(IsHeader(extra))
if (mutt_select_sort((ch == OP_SORT_REVERSE)) == 0)
{
- set_option(OPT_NEED_RESORT);
+ OPT_NEED_RESORT = true;
ch = -1;
rc = OP_DISPLAY_MESSAGE;
}
mutt_set_flag(Context, extra->hdr, MUTT_DELETE, 1);
mutt_set_flag(Context, extra->hdr, MUTT_PURGE, (ch == OP_PURGE_MESSAGE));
- if (option(OPT_DELETE_UNTAG))
+ if (OPT_DELETE_UNTAG)
mutt_set_flag(Context, extra->hdr, MUTT_TAG, 0);
pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX;
- if (option(OPT_RESOLVE))
+ if (OPT_RESOLVE)
{
ch = -1;
rc = OP_MAIN_NEXT_UNDELETED;
if (mutt_change_flag(extra->hdr, (ch == OP_MAIN_SET_FLAG)) == 0)
pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX;
- if (extra->hdr->deleted && option(OPT_RESOLVE))
+ if (extra->hdr->deleted && OPT_RESOLVE)
{
ch = -1;
rc = OP_MAIN_NEXT_UNDELETED;
break;
}
- if (option(OPT_DELETE_UNTAG))
+ if (OPT_DELETE_UNTAG)
mutt_thread_set_flag(extra->hdr, MUTT_TAG, 0, subthread);
- if (option(OPT_RESOLVE))
+ if (OPT_RESOLVE)
{
rc = OP_MAIN_NEXT_UNDELETED;
ch = -1;
}
- if (!option(OPT_RESOLVE) && PagerIndexLines)
+ if (!OPT_RESOLVE && PagerIndexLines)
pager_menu->redraw = REDRAW_FULL;
else
pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX;
mutt_enter_command();
- if (option(OPT_NEED_RESORT))
+ if (OPT_NEED_RESORT)
{
- unset_option(OPT_NEED_RESORT);
+ OPT_NEED_RESORT = false;
CHECK_MODE(IsHeader(extra));
- set_option(OPT_NEED_RESORT);
+ OPT_NEED_RESORT = true;
}
if (old_PagerIndexLines != PagerIndexLines)
mutt_set_flag(Context, extra->hdr, MUTT_FLAG, !extra->hdr->flagged);
pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX;
- if (option(OPT_RESOLVE))
+ if (OPT_RESOLVE)
{
ch = -1;
rc = OP_MAIN_NEXT_UNDELETED;
(ch == OP_DECRYPT_SAVE) || (ch == OP_DECRYPT_COPY) || 0) == 0 &&
(ch == OP_SAVE || ch == OP_DECODE_SAVE || ch == OP_DECRYPT_SAVE))
{
- if (option(OPT_RESOLVE))
+ if (OPT_RESOLVE)
{
ch = -1;
rc = OP_MAIN_NEXT_UNDELETED;
}
pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX;
- if (option(OPT_RESOLVE))
+ if (OPT_RESOLVE)
{
ch = -1;
rc = OP_NEXT_ENTRY;
first = 0;
Context->msgnotreadyet = -1;
pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX;
- if (option(OPT_RESOLVE))
+ if (OPT_RESOLVE)
{
ch = -1;
rc = OP_MAIN_NEXT_UNDELETED;
mutt_set_flag(Context, extra->hdr, MUTT_DELETE, 0);
mutt_set_flag(Context, extra->hdr, MUTT_PURGE, 0);
pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX;
- if (option(OPT_RESOLVE))
+ if (OPT_RESOLVE)
{
ch = -1;
rc = OP_NEXT_ENTRY;
ch == OP_UNDELETE_THREAD ? 0 : 1);
if (r != -1)
{
- if (option(OPT_RESOLVE))
+ if (OPT_RESOLVE)
{
rc = (ch == OP_DELETE_THREAD) ? OP_MAIN_NEXT_THREAD : OP_MAIN_NEXT_SUBTHREAD;
ch = -1;
}
- if (!option(OPT_RESOLVE) && PagerIndexLines)
+ if (!OPT_RESOLVE && PagerIndexLines)
pager_menu->redraw = REDRAW_FULL;
else
pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX;
break;
case OP_SIDEBAR_TOGGLE_VISIBLE:
- toggle_option(OPT_SIDEBAR_VISIBLE);
+ OPT_SIDEBAR_VISIBLE = !OPT_SIDEBAR_VISIBLE;
mutt_reflow_windows();
break;
#endif
hdr->replied = true;
break;
case 'O':
- hdr->old = option(OPT_MARK_OLD) ? true : false;
+ hdr->old = OPT_MARK_OLD ? true : false;
break;
case 'R':
hdr->read = true;
/* restore the original line */
line[strlen(line)] = ':';
- if (!(weed && option(OPT_WEED) && mutt_matches_ignore(line)))
+ if (!(weed && OPT_WEED && mutt_matches_ignore(line)))
{
struct ListNode *np = mutt_list_insert_tail(&e->userhdrs, mutt_str_strdup(line));
if (do_2047)
msg = mx_open_message(ctx, msgno);
if (msg)
{
- if (option(OPT_THOROUGH_SEARCH))
+ if (OPT_THOROUGH_SEARCH)
{
/* decode the header / body */
memset(&s, 0, sizeof(s));
mx_close_message(ctx, &msg);
- if (option(OPT_THOROUGH_SEARCH))
+ if (OPT_THOROUGH_SEARCH)
{
mutt_file_fclose(&fp);
#ifdef USE_FMEMOPEN
return -1;
if (op == OP_SEARCH || op == OP_SEARCH_NEXT)
- unset_option(OPT_SEARCH_REVERSE);
+ OPT_SEARCH_REVERSE = false;
else
- set_option(OPT_SEARCH_REVERSE);
+ OPT_SEARCH_REVERSE = true;
/* compare the *expanded* version of the search pattern in case
$simple_search has changed while we were searching */
{
struct Buffer err;
mutt_buffer_init(&err);
- set_option(OPT_SEARCH_INVALID);
+ OPT_SEARCH_INVALID = true;
mutt_str_strfcpy(LastSearch, buf, sizeof(LastSearch));
mutt_message(_("Compiling search pattern..."));
mutt_pattern_free(&SearchPattern);
}
}
- if (option(OPT_SEARCH_INVALID))
+ if (OPT_SEARCH_INVALID)
{
for (int i = 0; i < Context->msgcount; i++)
Context->hdrs[i]->searched = false;
if (Context->magic == MUTT_IMAP && imap_search(Context, SearchPattern) < 0)
return -1;
#endif
- unset_option(OPT_SEARCH_INVALID);
+ OPT_SEARCH_INVALID = false;
}
- incr = (option(OPT_SEARCH_REVERSE)) ? -1 : 1;
+ incr = (OPT_SEARCH_REVERSE) ? -1 : 1;
if (op == OP_SEARCH_OPPOSITE)
incr = -incr;
if (i > Context->vcount - 1)
{
i = 0;
- if (option(OPT_WRAP_SEARCH))
+ if (OPT_WRAP_SEARCH)
msg = _("Search wrapped to top.");
else
{
else if (i < 0)
{
i = Context->vcount - 1;
- if (option(OPT_WRAP_SEARCH))
+ if (OPT_WRAP_SEARCH)
msg = _("Search wrapped to bottom.");
else
{
{
if (bcached)
ctx->hdrs[i]->read = true;
- else if (option(OPT_MARK_OLD))
+ else if (OPT_MARK_OLD)
ctx->hdrs[i]->old = true;
}
else
* clean up cache, i.e. wipe messages deleted outside
* the availability of our cache
*/
- if (option(OPT_MESSAGE_CACHE_CLEAN))
+ if (OPT_MESSAGE_CACHE_CLEAN)
mutt_bcache_list(pop_data->bcache, msg_cache_check, (void *) ctx);
mutt_clear_error();
sscanf(buffer, "+OK %d %d", &msgs, &bytes);
/* only get unread messages */
- if (msgs > 0 && option(OPT_POP_LAST))
+ if (msgs > 0 && OPT_POP_LAST)
{
mutt_str_strfcpy(buffer, "LAST\r\n", sizeof(buffer));
ret = pop_query(pop_data, buffer, sizeof(buffer));
if (ret != POP_A_UNAVAIL)
attempts++;
if (ret == POP_A_SUCCESS || ret == POP_A_SOCKET ||
- (ret == POP_A_FAILURE && !option(OPT_POP_AUTH_TRY_ALL)))
+ (ret == POP_A_FAILURE && !OPT_POP_AUTH_TRY_ALL))
{
comma = NULL;
break;
if (ret != POP_A_UNAVAIL)
attempts++;
if (ret == POP_A_SUCCESS || ret == POP_A_SOCKET ||
- (ret == POP_A_FAILURE && !option(OPT_POP_AUTH_TRY_ALL)))
+ (ret == POP_A_FAILURE && !OPT_POP_AUTH_TRY_ALL))
{
break;
}
#ifdef USE_SSL
/* Attempt STLS if available and desired. */
- if (!pop_data->conn->ssf && (pop_data->cmd_stls || option(OPT_SSL_FORCE_TLS)))
+ if (!pop_data->conn->ssf && (pop_data->cmd_stls || OPT_SSL_FORCE_TLS))
{
- if (option(OPT_SSL_FORCE_TLS))
+ if (OPT_SSL_FORCE_TLS)
pop_data->use_stls = 2;
if (pop_data->use_stls == 0)
{
}
}
- if (option(OPT_SSL_FORCE_TLS) && !pop_data->conn->ssf)
+ if (OPT_SSL_FORCE_TLS && !pop_data->conn->ssf)
{
mutt_error(_("Encrypted connection unavailable"));
mutt_sleep(1);
if (LastModify < st.st_mtime)
{
#ifdef USE_NNTP
- int optnews = option(OPT_NEWS);
+ int optnews = OPT_NEWS;
#endif
LastModify = st.st_mtime;
return (PostCount = 0);
#ifdef USE_NNTP
if (optnews)
- unset_option(OPT_NEWS);
+ OPT_NEWS = false;
#endif
if (mx_open_mailbox(Postponed, MUTT_NOSORT | MUTT_QUIET, &ctx) == NULL)
PostCount = 0;
mx_fastclose_mailbox(&ctx);
#ifdef USE_NNTP
if (optnews)
- set_option(OPT_NEWS);
+ OPT_NEWS = true;
#endif
}
mutt_set_flag(PostContext, PostContext->hdrs[menu->current],
MUTT_DELETE, (i == OP_DELETE) ? 1 : 0);
PostCount = PostContext->msgcount - PostContext->deleted;
- if (option(OPT_RESOLVE) && menu->current < menu->max - 1)
+ if (OPT_RESOLVE && menu->current < menu->max - 1)
{
menu->oldcurrent = menu->current;
menu->current++;
PostCount = PostContext->msgcount - PostContext->deleted;
/* avoid the "purge deleted messages" prompt */
- opt_delete = quadoption(OPT_DELETE);
- set_quadoption(OPT_DELETE, MUTT_YES);
+ opt_delete = OPT_DELETE;
+ OPT_DELETE = MUTT_YES;
mx_close_mailbox(PostContext, NULL);
- set_quadoption(OPT_DELETE, opt_delete);
+ OPT_DELETE = opt_delete;
FREE(&PostContext);
FREE(&np);
}
- if (option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT))
+ if (OPT_CRYPT_OPPORTUNISTIC_ENCRYPT)
crypt_opportunistic_encrypt(hdr);
return code;
/* Theoretically, both could be set. Take the one the user wants to set by default. */
if ((newhdr->security & APPLICATION_PGP) && (newhdr->security & APPLICATION_SMIME))
{
- if (option(OPT_SMIME_IS_DEFAULT))
+ if (OPT_SMIME_IS_DEFAULT)
newhdr->security &= ~APPLICATION_PGP;
else
newhdr->security &= ~APPLICATION_SMIME;
FILE *mutt_open_read(const char *path, pid_t *thepid);
-void set_quadoption(int opt, int flag);
int query_quadoption(int opt, const char *prompt);
-int quadoption(int opt);
char *mutt_extract_message_id(const char *s, const char **saveptr);
}
if (!tag || top->tagged)
{
- if (!option(OPT_ATTACH_SPLIT))
+ if (!OPT_ATTACH_SPLIT)
{
if (!buf[0])
{
menu->redraw |= REDRAW_MOTION;
}
- if (!option(OPT_ATTACH_SPLIT) && (rc == 0))
+ if (!OPT_ATTACH_SPLIT && (rc == 0))
mutt_message(_("Attachment saved."));
}
}
if (!tag || top->tagged)
{
- if (!filter && !option(OPT_ATTACH_SPLIT))
+ if (!filter && !OPT_ATTACH_SPLIT)
pipe_attachment(fp, top, state);
else
query_pipe_attachment(command, fp, top, filter);
mutt_expand_path(buf, sizeof(buf));
- if (!filter && !option(OPT_ATTACH_SPLIT))
+ if (!filter && !OPT_ATTACH_SPLIT)
{
mutt_endwin(NULL);
thepid = mutt_create_filter(buf, &state.fpout, NULL, NULL);
pipe_attachment_list(buf, actx, fp, tag, top, filter, &state);
mutt_file_fclose(&state.fpout);
- if (mutt_wait_filter(thepid) != 0 || option(OPT_WAIT_KEY))
+ if (mutt_wait_filter(thepid) != 0 || OPT_WAIT_KEY)
mutt_any_key_to_continue(NULL);
}
else
if (!tag || top->tagged)
{
snprintf(type, sizeof(type), "%s/%s", TYPE(top), top->subtype);
- if (!option(OPT_ATTACH_SPLIT) && !rfc1524_mailcap_lookup(top, type, NULL, MUTT_PRINT))
+ if (!OPT_ATTACH_SPLIT && !rfc1524_mailcap_lookup(top, type, NULL, MUTT_PRINT))
{
if ((mutt_str_strcasecmp("text/plain", top->subtype) == 0) ||
(mutt_str_strcasecmp("application/postscript", top->subtype) == 0))
_("Print attachment?")) != MUTT_YES)
return;
- if (!option(OPT_ATTACH_SPLIT))
+ if (!OPT_ATTACH_SPLIT)
{
if (!can_print(actx, top, tag))
return;
thepid = mutt_create_filter(NONULL(PrintCommand), &state.fpout, NULL, NULL);
print_attachment_list(actx, fp, tag, top, &state);
mutt_file_fclose(&state.fpout);
- if (mutt_wait_filter(thepid) != 0 || option(OPT_WAIT_KEY))
+ if (mutt_wait_filter(thepid) != 0 || OPT_WAIT_KEY)
mutt_any_key_to_continue(NULL);
}
else
switch (op)
{
case OP_DISPLAY_HEADERS:
- toggle_option(OPT_WEED);
+ OPT_WEED = !OPT_WEED;
/* fallthrough */
case OP_VIEW_ATTACH:
{
actx->idx[i]->content->tagged = false;
- /*OR an inner container is of type 'multipart/digest' */
+ /* OR an inner container is of type 'multipart/digest' */
actx->idx[i]->content->collapsed =
- (option(OPT_DIGEST_COLLAPSE) &&
+ (OPT_DIGEST_COLLAPSE &&
(digest ||
((actx->idx[i]->content->type == TYPEMULTIPART) &&
(mutt_str_strcasecmp(actx->idx[i]->content->subtype, "digest") == 0))));
while ((rindex < actx->idxlen) && (actx->idx[rindex]->level > curlevel))
{
- if (option(OPT_DIGEST_COLLAPSE) && actx->idx[rindex]->content->type == TYPEMULTIPART &&
+ if (OPT_DIGEST_COLLAPSE && actx->idx[rindex]->content->type == TYPEMULTIPART &&
!mutt_str_strcasecmp(actx->idx[rindex]->content->subtype, "digest"))
{
actx->idx[rindex]->content->collapsed = true;
N_("Function not permitted in attach-message mode.");
#define CHECK_ATTACH \
- if (option(OPT_ATTACH_MSG)) \
+ if (OPT_ATTACH_MSG) \
{ \
mutt_flushinp(); \
mutt_error(_(Function_not_permitted)); \
mutt_save_attachment_list(actx, CURATTACH->fp, menu->tagprefix,
CURATTACH->content, hdr, menu);
- if (!menu->tagprefix && option(OPT_RESOLVE) && menu->current < menu->max - 1)
+ if (!menu->tagprefix && OPT_RESOLVE && menu->current < menu->max - 1)
menu->current++;
menu->redraw = REDRAW_MOTION_RESYNCH | REDRAW_FULL;
if (CURATTACH->parent_type == TYPEMULTIPART)
{
CURATTACH->content->deleted = true;
- if (option(OPT_RESOLVE) && menu->current < menu->max - 1)
+ if (OPT_RESOLVE && menu->current < menu->max - 1)
{
menu->current++;
menu->redraw = REDRAW_MOTION_RESYNCH;
if (!menu->tagprefix)
{
CURATTACH->content->deleted = false;
- if (option(OPT_RESOLVE) && menu->current < menu->max - 1)
+ if (OPT_RESOLVE && menu->current < menu->max - 1)
{
menu->current++;
menu->redraw = REDRAW_MOTION_RESYNCH;
int chflags = CH_DECODE;
char prefix2[SHORT_STRING];
- if (option(OPT_WEED))
+ if (OPT_WEED)
chflags |= CH_WEED | CH_REORDER;
if (quote)
{
if (prefix)
mutt_str_strfcpy(prefix2, prefix, sizeof(prefix2));
- else if (!option(OPT_TEXT_FLOWED))
+ else if (!OPT_TEXT_FLOWED)
mutt_make_string_flags(prefix2, sizeof(prefix2), NONULL(IndentString),
Context, hdr, 0);
else
/* prepare the prefix here since we'll need it later. */
- if (option(OPT_FORWARD_QUOTE))
+ if (OPT_FORWARD_QUOTE)
{
- if (!option(OPT_TEXT_FLOWED))
+ if (!OPT_TEXT_FLOWED)
mutt_make_string_flags(prefix, sizeof(prefix), NONULL(IndentString),
Context, parent_hdr, 0);
else
mutt_str_strfcpy(prefix, ">", sizeof(prefix));
}
- include_header(option(OPT_FORWARD_QUOTE), parent_fp, parent_hdr, tmpfp, prefix);
+ include_header(OPT_FORWARD_QUOTE, parent_fp, parent_hdr, tmpfp, prefix);
/*
* Now, we have prepared the first part of the message body: The
memset(&st, 0, sizeof(st));
- if (option(OPT_FORWARD_QUOTE))
+ if (OPT_FORWARD_QUOTE)
st.prefix = prefix;
st.flags = MUTT_CHARCONV;
- if (option(OPT_WEED))
+ if (OPT_WEED)
st.flags |= MUTT_WEED;
st.fpout = tmpfp;
return;
}
- if (option(OPT_FORWARD_QUOTE))
+ if (OPT_FORWARD_QUOTE)
{
chflags |= CH_PREFIX;
cmflags |= MUTT_CM_PREFIX;
}
- if (option(OPT_FORWARD_DECODE))
+ if (OPT_FORWARD_DECODE)
{
cmflags |= MUTT_CM_DECODE | MUTT_CM_CHARCONV;
- if (option(OPT_WEED))
+ if (OPT_WEED)
{
chflags |= CH_WEED | CH_REORDER;
cmflags |= MUTT_CM_WEED;
mutt_make_attribution(Context, cur, tmpfp);
- if (!option(OPT_HEADER))
+ if (!OPT_HEADER)
cmflags |= MUTT_CM_NOHEADER;
- if (option(OPT_WEED))
+ if (OPT_WEED)
{
chflags |= CH_WEED;
cmflags |= MUTT_CM_WEED;
#ifdef USE_NNTP
if (flags & SENDNEWS)
- set_option(OPT_NEWS_SEND);
+ OPT_NEWS_SEND = true;
else
- unset_option(OPT_NEWS_SEND);
+ OPT_NEWS_SEND = false;
#endif
if (!check_all_msg(actx, cur, false))
memset(&st, 0, sizeof(struct State));
st.fpout = tmpfp;
- if (!option(OPT_TEXT_FLOWED))
+ if (!OPT_TEXT_FLOWED)
mutt_make_string_flags(prefix, sizeof(prefix), NONULL(IndentString),
Context, parent_hdr, 0);
else
st.prefix = prefix;
st.flags = MUTT_CHARCONV;
- if (option(OPT_WEED))
+ if (OPT_WEED)
st.flags |= MUTT_WEED;
- if (option(OPT_HEADER))
+ if (OPT_HEADER)
include_header(1, parent_fp, parent_hdr, tmpfp, prefix);
if (cur)
(np == STAILQ_FIRST(chain)) ? " -l " : ",", cd_quoted);
}
- if (!option(OPT_NO_CURSES))
+ if (!OPT_NO_CURSES)
mutt_endwin(NULL);
i = mutt_system(cmd);
if (i != 0)
{
fprintf(stderr, _("Error sending message, child exited %d.\n"), i);
- if (!option(OPT_NO_CURSES))
+ if (!OPT_NO_CURSES)
{
mutt_any_key_to_continue(NULL);
mutt_error(_("Error sending message."));
mutt_str_strfcpy(type2, type, sizeof(type2));
- if (option(OPT_MAILCAP_SANITIZE))
+ if (OPT_MAILCAP_SANITIZE)
mutt_file_sanitize_filename(type2, 0);
while (x < clen - 1 && command[x] && y < sizeof(buf) - 1)
pvalue2 = mutt_param_get(param, a->parameter);
mutt_str_strfcpy(pvalue, NONULL(pvalue2), sizeof(pvalue));
- if (option(OPT_MAILCAP_SANITIZE))
+ if (OPT_MAILCAP_SANITIZE)
mutt_file_sanitize_filename(pvalue, 0);
y += mutt_file_quote_filename(buf + y, sizeof(buf) - y, pvalue);
if (!p)
{
/* no encoded words */
- if (option(OPT_IGNORE_LINEAR_WHITE_SPACE))
+ if (OPT_IGNORE_LINEAR_WHITE_SPACE)
{
n = mutt_str_strlen(s);
if (found_encoded && (m = mutt_str_lws_len(s, n)) != 0)
n = (size_t)(p - s);
/* ignore spaces between encoded word
* and linear-white-space between encoded word and *text */
- if (option(OPT_IGNORE_LINEAR_WHITE_SPACE))
+ if (OPT_IGNORE_LINEAR_WHITE_SPACE)
{
if (found_encoded && (m = mutt_str_lws_len(s, n)) != 0)
{
* Internet Gateways. So we actually decode it.
*/
- if (option(OPT_RFC2047_PARAMETERS) && p->value && strstr(p->value, "=?"))
+ if (OPT_RFC2047_PARAMETERS && p->value && strstr(p->value, "=?"))
rfc2047_decode(&p->value);
else if (AssumedCharset && *AssumedCharset)
convert_nonmime_string(&p->value);
/* Allow quote spacing in the pager even for OPT_TEXT_FLOWED,
* but obviously not when replying.
*/
- if (option(OPT_TEXT_FLOWED) && (s->flags & MUTT_REPLYING))
+ if (OPT_TEXT_FLOWED && (s->flags & MUTT_REPLYING))
return 0;
- return option(OPT_REFLOW_SPACE_QUOTES);
+ return OPT_REFLOW_SPACE_QUOTES;
}
/**
return false;
/* The prefix will add its own space */
- if (!option(OPT_TEXT_FLOWED) && !ql && s->prefix)
+ if (!OPT_TEXT_FLOWED && !ql && s->prefix)
return false;
return true;
/* use given prefix only for format=fixed replies to format=flowed,
* for format=flowed replies to format=flowed, use '>' indentation
*/
- if (option(OPT_TEXT_FLOWED))
+ if (OPT_TEXT_FLOWED)
ql++;
else
{
static int quote_width(struct State *s, int ql)
{
int width = mutt_window_wrap_cols(MuttIndexWindow, ReflowWrap);
- if (option(OPT_TEXT_FLOWED) && (s->flags & MUTT_REPLYING))
+ if (OPT_TEXT_FLOWED && (s->flags & MUTT_REPLYING))
{
/* When replying, force a wrap at FLOWED_MAX to comply with RFC3676
* guidelines */
{
mutt_debug(4, "f=f: break line at %lu, %lu spaces left\n", fst->width, fst->spaces);
/* only honor trailing spaces for format=flowed replies */
- if (option(OPT_TEXT_FLOWED))
+ if (OPT_TEXT_FLOWED)
for (; fst->spaces; fst->spaces--)
state_putc(' ', s);
state_putc('\n', s);
void mutt_check_rescore(struct Context *ctx)
{
- if (option(OPT_NEED_RESCORE) && option(OPT_SCORE))
+ if (OPT_NEED_RESCORE && OPT_SCORE)
{
if ((Sort & SORT_MASK) == SORT_SCORE || (SortAux & SORT_MASK) == SORT_SCORE)
{
- set_option(OPT_NEED_RESORT);
+ OPT_NEED_RESORT = true;
if ((Sort & SORT_MASK) == SORT_THREADS)
- set_option(OPT_SORT_SUBTHREADS);
+ OPT_SORT_SUBTHREADS = true;
}
/* must redraw the index since the user might have %N in it */
ctx->hdrs[i]->pair = 0;
}
}
- unset_option(OPT_NEED_RESCORE);
+ OPT_NEED_RESCORE = false;
}
int mutt_parse_score(struct Buffer *buf, struct Buffer *s, unsigned long data,
mutt_str_strfcpy(err->data, _("Error: score: invalid number"), err->dsize);
return -1;
}
- set_option(OPT_NEED_RESCORE);
+ OPT_NEED_RESCORE = true;
return 0;
}
}
}
}
- set_option(OPT_NEED_RESCORE);
+ OPT_NEED_RESCORE = true;
return 0;
}
if (Signature && (tmpfp = mutt_open_read(Signature, &thepid)))
{
- if (option(OPT_SIG_DASHES))
+ if (OPT_SIG_DASHES)
fputs("\n-- \n", f);
mutt_file_copy_stream(tmpfp, f);
mutt_file_fclose(&tmpfp);
char buf[HUGE_STRING];
#ifdef USE_NNTP
- if (option(OPT_NEWS_SEND))
+ if (OPT_NEWS_SEND)
{
if (en->newsgroups)
mutt_str_strfcpy(buf, en->newsgroups, sizeof(buf));
mutt_str_strfcpy(buf, en->followup_to, sizeof(buf));
else
buf[0] = 0;
- if (option(OPT_ASK_FOLLOW_UP) &&
- mutt_get_field("Followup-To: ", buf, sizeof(buf), 0) != 0)
+ if (OPT_ASK_FOLLOW_UP && mutt_get_field("Followup-To: ", buf, sizeof(buf), 0) != 0)
{
return -1;
}
mutt_str_strfcpy(buf, en->x_comment_to, sizeof(buf));
else
buf[0] = 0;
- if (option(OPT_X_COMMENT_TO) && option(OPT_ASK_X_COMMENT_TO) &&
+ if (OPT_X_COMMENT_TO && OPT_ASK_X_COMMENT_TO &&
mutt_get_field("X-Comment-To: ", buf, sizeof(buf), 0) != 0)
{
return -1;
{
if (edit_address(&en->to, _("To: ")) == -1 || en->to == NULL)
return -1;
- if (option(OPT_ASKCC) && edit_address(&en->cc, _("Cc: ")) == -1)
+ if (OPT_ASKCC && edit_address(&en->cc, _("Cc: ")) == -1)
return -1;
- if (option(OPT_ASKBCC) && edit_address(&en->bcc, _("Bcc: ")) == -1)
+ if (OPT_ASKBCC && edit_address(&en->bcc, _("Bcc: ")) == -1)
return -1;
- if (option(OPT_REPLY_WITH_XORIG) &&
- (flags & (SENDREPLY | SENDLISTREPLY | SENDGROUPREPLY)) &&
+ if (OPT_REPLY_WITH_XORIG && (flags & (SENDREPLY | SENDLISTREPLY | SENDGROUPREPLY)) &&
(edit_address(&en->from, "From: ") == -1))
return -1;
}
if (en->subject)
{
- if (option(OPT_FAST_REPLY))
+ if (OPT_FAST_REPLY)
return 0;
else
mutt_str_strfcpy(buf, en->subject, sizeof(buf));
mutt_parse_mime_message(ctx, cur);
mutt_message_hook(ctx, cur, MUTT_MESSAGEHOOK);
- if (WithCrypto && (cur->security & ENCRYPT) && option(OPT_FORWARD_DECODE))
+ if (WithCrypto && (cur->security & ENCRYPT) && OPT_FORWARD_DECODE)
{
/* make sure we have the user's passphrase before proceeding... */
if (!crypt_valid_passphrase(cur->security))
mutt_forward_intro(ctx, cur, out);
- if (option(OPT_FORWARD_DECODE))
+ if (OPT_FORWARD_DECODE)
{
cmflags |= MUTT_CM_DECODE | MUTT_CM_CHARCONV;
- if (option(OPT_WEED))
+ if (OPT_WEED)
{
chflags |= CH_WEED | CH_REORDER;
cmflags |= MUTT_CM_WEED;
}
}
- if (option(OPT_FORWARD_QUOTE))
+ if (OPT_FORWARD_QUOTE)
cmflags |= MUTT_CM_PREFIX;
/* wrapping headers for forwarding is considered a display
mutt_make_attribution(ctx, cur, out);
- if (!option(OPT_HEADER))
+ if (!OPT_HEADER)
cmflags |= MUTT_CM_NOHEADER;
- if (option(OPT_WEED))
+ if (OPT_WEED)
{
chflags |= CH_WEED | CH_REORDER;
cmflags |= MUTT_CM_WEED;
if (flags & SENDLISTREPLY)
return 0;
- if (!option(OPT_REPLY_SELF) && mutt_addr_is_user(env->from))
+ if (!OPT_REPLY_SELF && mutt_addr_is_user(env->from))
{
/* mail is from the user, assume replying to recipients */
mutt_addr_append(to, env->to, true);
{
if ((mutt_addr_cmp(env->from, env->reply_to) && !env->reply_to->next &&
!env->reply_to->personal) ||
- (option(OPT_IGNORE_LIST_REPLY_TO) && mutt_is_mail_list(env->reply_to) &&
+ (OPT_IGNORE_LIST_REPLY_TO && mutt_is_mail_list(env->reply_to) &&
(mutt_addr_search(env->reply_to, env->to) ||
mutt_addr_search(env->reply_to, env->cc))))
{
mutt_addr_append(to, env->from, false);
}
else if (!(mutt_addr_cmp(env->from, env->reply_to) && !env->reply_to->next) &&
- quadoption(OPT_REPLY_TO) != MUTT_YES)
+ OPT_REPLY_TO != MUTT_YES)
{
/* There are quite a few mailing lists which set the Reply-To:
* header field to the list address, which makes it quite impossible
void mutt_fix_reply_recipients(struct Envelope *env)
{
- if (!option(OPT_METOO))
+ if (!OPT_METOO)
{
/* the order is important here. do the CC: first so that if the
* the user is the only recipient, it ends up on the TO: field
*/
env->cc = remove_user(env->cc, (env->to == NULL));
- env->to = remove_user(env->to, (env->cc == NULL) || option(OPT_REPLY_SELF));
+ env->to = remove_user(env->to, (env->cc == NULL) || OPT_REPLY_SELF);
}
/* the CC field can get cluttered, especially with lists */
add_message_id(&env->in_reply_to, curenv);
#ifdef USE_NNTP
- if (option(OPT_NEWS_SEND) && option(OPT_X_COMMENT_TO) && curenv->from)
+ if (OPT_NEWS_SEND && OPT_X_COMMENT_TO && curenv->from)
env->x_comment_to = mutt_str_strdup(mutt_get_name(curenv->from));
#endif
}
else if (flags & SENDFORWARD)
{
mutt_make_forward_subject(env, ctx, cur);
- if (option(OPT_FORWARD_REFERENCES))
+ if (OPT_FORWARD_REFERENCES)
make_reference_headers(tag ? NULL : curenv, env, ctx);
}
* it hasn't already been set
*/
- if (!option(OPT_FOLLOWUP_TO))
+ if (!OPT_FOLLOWUP_TO)
return;
#ifdef USE_NNTP
- if (option(OPT_NEWS_SEND))
+ if (OPT_NEWS_SEND)
{
if (!e->followup_to && e->newsgroups && (strrchr(e->newsgroups, ',')))
e->followup_to = mutt_str_strdup(e->newsgroups);
/* when $reverse_realname is not set, clear the personal name so that it
* may be set vi a reply- or send-hook.
*/
- if (!option(OPT_REVERSE_REALNAME))
+ if (!OPT_REVERSE_REALNAME)
FREE(&tmp->personal);
}
return tmp;
if (From)
adr = mutt_addr_copy(From);
- else if (option(OPT_USE_DOMAIN))
+ else if (OPT_USE_DOMAIN)
{
adr = mutt_addr_new();
adr->mailbox =
return -1;
#ifdef USE_SMTP
- old_write_bcc = option(OPT_WRITE_BCC);
+ old_write_bcc = OPT_WRITE_BCC;
if (SmtpUrl)
- unset_option(OPT_WRITE_BCC);
+ OPT_WRITE_BCC = false;
#endif
#ifdef MIXMASTER
mutt_write_rfc822_header(tempfp, msg->env, msg->content, 0, !STAILQ_EMPTY(&msg->chain));
#endif
#ifdef USE_SMTP
if (old_write_bcc)
- set_option(OPT_WRITE_BCC);
+ OPT_WRITE_BCC = true;
#endif
fputc('\n', tempfp); /* tie off the header. */
#ifdef USE_SMTP
#ifdef USE_NNTP
- if (!option(OPT_NEWS_SEND))
+ if (!OPT_NEWS_SEND)
#endif
if (SmtpUrl)
return mutt_smtp_send(msg->env->from, msg->env->to, msg->env->cc, msg->env->bcc,
* so fix that here */
if (!(msg->security & (APPLICATION_SMIME | APPLICATION_PGP)))
{
- if ((WithCrypto & APPLICATION_SMIME) && option(OPT_SMIME_IS_DEFAULT))
+ if ((WithCrypto & APPLICATION_SMIME) && OPT_SMIME_IS_DEFAULT)
msg->security |= APPLICATION_SMIME;
else if (WithCrypto & APPLICATION_PGP)
msg->security |= APPLICATION_PGP;
msg->security |= APPLICATION_SMIME;
}
- if (option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT))
+ if (OPT_CRYPT_OPPORTUNISTIC_ENCRYPT)
{
msg->security |= OPPENCRYPT;
crypt_opportunistic_encrypt(msg);
#ifdef USE_NNTP
if (flags & SENDNEWS)
- set_option(OPT_NEWS_SEND);
+ OPT_NEWS_SEND = true;
else
- unset_option(OPT_NEWS_SEND);
+ OPT_NEWS_SEND = false;
#endif
- if (!flags && !msg && quadoption(OPT_RECALL) != MUTT_NO && mutt_num_postponed(1))
+ if (!flags && !msg && OPT_RECALL != MUTT_NO && mutt_num_postponed(1))
{
/* If the user is composing a new message, check to see if there
* are any postponed messages first.
if (msg->env->newsgroups)
{
flags |= SENDNEWS;
- set_option(OPT_NEWS_SEND);
+ OPT_NEWS_SEND = true;
}
else
{
flags &= ~SENDNEWS;
- unset_option(OPT_NEWS_SEND);
+ OPT_NEWS_SEND = false;
}
#endif
}
}
/* this is handled here so that the user can match ~f in send-hook */
- if (cur && option(OPT_REVERSE_NAME) && !(flags & (SENDPOSTPONED | SENDRESEND)))
+ if (cur && OPT_REVERSE_NAME && !(flags & (SENDPOSTPONED | SENDRESEND)))
{
/* we shouldn't have to worry about freeing `msg->env->from' before
* setting it here since this code will only execute when doing some
msg->env->from->mailbox);
msg->env->from = set_reverse_name(cur->env);
}
- if (cur && option(OPT_REPLY_WITH_XORIG) &&
- !(flags & (SENDPOSTPONED | SENDRESEND | SENDFORWARD)))
+ if (cur && OPT_REPLY_WITH_XORIG && !(flags & (SENDPOSTPONED | SENDRESEND | SENDFORWARD)))
{
/* We shouldn't have to worry about freeing `msg->env->from' before
* setting it here since this code will only execute when doing some
}
if (!(flags & (SENDPOSTPONED | SENDRESEND)) &&
- !((flags & SENDDRAFTFILE) && option(OPT_RESUME_DRAFT_FILES)))
+ !((flags & SENDDRAFTFILE) && OPT_RESUME_DRAFT_FILES))
{
if ((flags & (SENDREPLY | SENDFORWARD)) && ctx &&
envelope_defaults(msg->env, ctx, cur, flags) == -1)
goto cleanup;
}
- if (option(OPT_HDRS))
+ if (OPT_HDRS)
process_user_recips(msg->env);
/* Expand aliases and remove duplicates/crossrefs */
msg->env->newsgroups = mutt_str_strdup(((struct NntpData *) ctx->data)->group);
#endif
- if (!(flags & (SENDMAILX | SENDBATCH)) &&
- !(option(OPT_AUTOEDIT) && option(OPT_EDIT_HEADERS)) &&
- !((flags & SENDREPLY) && option(OPT_FAST_REPLY)))
+ if (!(flags & (SENDMAILX | SENDBATCH)) && !(OPT_AUTOEDIT && OPT_EDIT_HEADERS) &&
+ !((flags & SENDREPLY) && OPT_FAST_REPLY))
{
if (edit_envelope(msg->env, flags) == -1)
goto cleanup;
if (!(flags & SENDKEY))
{
- if (option(OPT_TEXT_FLOWED) && msg->content->type == TYPETEXT &&
+ if (OPT_TEXT_FLOWED && msg->content->type == TYPETEXT &&
(mutt_str_strcasecmp(msg->content->subtype, "plain") == 0))
{
mutt_param_set("format", "flowed", &msg->content->parameter);
if (killfrom)
{
mutt_addr_free(&msg->env->from);
- if (option(OPT_USE_FROM) && !(flags & (SENDPOSTPONED | SENDRESEND)))
+ if (OPT_USE_FROM && !(flags & (SENDPOSTPONED | SENDRESEND)))
msg->env->from = mutt_default_from();
killfrom = false;
}
- if (option(OPT_HDRS))
+ if (OPT_HDRS)
process_user_header(msg->env);
if (flags & SENDBATCH)
mutt_file_copy_stream(stdin, tempfp);
- if (option(OPT_SIG_ON_TOP) && !(flags & (SENDMAILX | SENDKEY | SENDBATCH)) &&
+ if (OPT_SIG_ON_TOP && !(flags & (SENDMAILX | SENDKEY | SENDBATCH)) &&
Editor && (mutt_str_strcmp(Editor, "builtin") != 0))
{
append_signature(tempfp);
goto cleanup;
}
- if (!option(OPT_SIG_ON_TOP) && !(flags & (SENDMAILX | SENDKEY | SENDBATCH)) &&
+ if (!OPT_SIG_ON_TOP && !(flags & (SENDMAILX | SENDKEY | SENDBATCH)) &&
Editor && (mutt_str_strcmp(Editor, "builtin") != 0))
{
append_signature(tempfp);
* recipients.
*/
if (!(flags & SENDKEY) &&
- ((flags & SENDFORWARD) == 0 || (option(OPT_EDIT_HEADERS) && option(OPT_AUTOEDIT)) ||
+ ((flags & SENDFORWARD) == 0 || (OPT_EDIT_HEADERS && OPT_AUTOEDIT) ||
query_quadoption(OPT_FORWARD_EDIT, _("Edit forwarded message?")) == MUTT_YES))
{
/* If the this isn't a text message, look for a mailcap edit command */
}
else if (!Editor || (mutt_str_strcmp("builtin", Editor) == 0))
mutt_builtin_editor(msg->content->filename, msg, cur);
- else if (option(OPT_EDIT_HEADERS))
+ else if (OPT_EDIT_HEADERS)
{
mutt_env_to_local(msg->env);
mutt_edit_headers(Editor, msg->content->filename, msg, fcc, sizeof(fcc));
* performed. If it has already been performed, the format=flowed
* parameter will be present.
*/
- if (option(OPT_TEXT_FLOWED) && msg->content->type == TYPETEXT &&
+ if (OPT_TEXT_FLOWED && msg->content->type == TYPETEXT &&
(mutt_str_strcasecmp("plain", msg->content->subtype) == 0))
{
char *p = mutt_param_get("format", msg->content->parameter);
if (WithCrypto && (msg->security == 0) &&
!(flags & (SENDBATCH | SENDMAILX | SENDPOSTPONED | SENDRESEND)))
{
- if (option(OPT_CRYPT_AUTOSIGN))
+ if (OPT_CRYPT_AUTOSIGN)
msg->security |= SIGN;
- if (option(OPT_CRYPT_AUTOENCRYPT))
+ if (OPT_CRYPT_AUTOENCRYPT)
msg->security |= ENCRYPT;
- if (option(OPT_CRYPT_REPLYENCRYPT) && cur && (cur->security & ENCRYPT))
+ if (OPT_CRYPT_REPLYENCRYPT && cur && (cur->security & ENCRYPT))
msg->security |= ENCRYPT;
- if (option(OPT_CRYPT_REPLYSIGN) && cur && (cur->security & SIGN))
+ if (OPT_CRYPT_REPLYSIGN && cur && (cur->security & SIGN))
msg->security |= SIGN;
- if (option(OPT_CRYPT_REPLYSIGNENCRYPTED) && cur && (cur->security & ENCRYPT))
+ if (OPT_CRYPT_REPLYSIGNENCRYPTED && cur && (cur->security & ENCRYPT))
msg->security |= SIGN;
if ((WithCrypto & APPLICATION_PGP) &&
- ((msg->security & (ENCRYPT | SIGN)) || option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT)))
+ ((msg->security & (ENCRYPT | SIGN)) || OPT_CRYPT_OPPORTUNISTIC_ENCRYPT))
{
- if (option(OPT_PGP_AUTOINLINE))
+ if (OPT_PGP_AUTOINLINE)
msg->security |= INLINE;
- if (option(OPT_PGP_REPLYINLINE) && cur && (cur->security & INLINE))
+ if (OPT_PGP_REPLYINLINE && cur && (cur->security & INLINE))
msg->security |= INLINE;
}
- if (msg->security || option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT))
+ if (msg->security || OPT_CRYPT_OPPORTUNISTIC_ENCRYPT)
{
/*
* When replying / forwarding, use the original message's
*/
if (cur)
{
- if ((WithCrypto & APPLICATION_PGP) && option(OPT_CRYPT_AUTOPGP) &&
+ if ((WithCrypto & APPLICATION_PGP) && OPT_CRYPT_AUTOPGP &&
(cur->security & APPLICATION_PGP))
{
msg->security |= APPLICATION_PGP;
}
- else if ((WithCrypto & APPLICATION_SMIME) && option(OPT_CRYPT_AUTOSMIME) &&
+ else if ((WithCrypto & APPLICATION_SMIME) && OPT_CRYPT_AUTOSMIME &&
(cur->security & APPLICATION_SMIME))
{
msg->security |= APPLICATION_SMIME;
*/
if (!(msg->security & (APPLICATION_SMIME | APPLICATION_PGP)))
{
- if ((WithCrypto & APPLICATION_SMIME) && option(OPT_CRYPT_AUTOSMIME) &&
- option(OPT_SMIME_IS_DEFAULT))
+ if ((WithCrypto & APPLICATION_SMIME) && OPT_CRYPT_AUTOSMIME && OPT_SMIME_IS_DEFAULT)
{
msg->security |= APPLICATION_SMIME;
}
- else if ((WithCrypto & APPLICATION_PGP) && option(OPT_CRYPT_AUTOPGP))
+ else if ((WithCrypto & APPLICATION_PGP) && OPT_CRYPT_AUTOPGP)
{
msg->security |= APPLICATION_PGP;
}
- else if ((WithCrypto & APPLICATION_SMIME) && option(OPT_CRYPT_AUTOSMIME))
+ else if ((WithCrypto & APPLICATION_SMIME) && OPT_CRYPT_AUTOSMIME)
{
msg->security |= APPLICATION_SMIME;
}
}
/* opportunistic encrypt relies on SMIME or PGP already being selected */
- if (option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT))
+ if (OPT_CRYPT_OPPORTUNISTIC_ENCRYPT)
{
/* If something has already enabled encryption, e.g. OPT_CRYPT_AUTOENCRYPT
* or OPT_CRYPT_REPLYENCRYPT, then don't enable opportunistic encrypt for
/* specify a default fcc. if we are in batchmode, only save a copy of
* the message if the value of $copy is yes or ask-yes */
- if (!fcc[0] && !(flags & (SENDPOSTPONEDFCC)) &&
- (!(flags & SENDBATCH) || (quadoption(OPT_COPY) & 0x1)))
+ if (!fcc[0] && !(flags & (SENDPOSTPONEDFCC)) && (!(flags & SENDBATCH) || (OPT_COPY & 0x1)))
{
/* set the default FCC */
if (!msg->env->from)
if (msg->content->next)
msg->content = mutt_make_multipart(msg->content);
- if (WithCrypto && option(OPT_POSTPONE_ENCRYPT) && (msg->security & ENCRYPT))
+ if (WithCrypto && OPT_POSTPONE_ENCRYPT && (msg->security & ENCRYPT))
{
char *encrypt_as = NULL;
_("No subject, abort sending?"))) != MUTT_NO)
{
/* if the abort is automatic, print an error message */
- if (quadoption(OPT_ABORT_NOSUBJECT) == MUTT_YES)
+ if (OPT_ABORT_NOSUBJECT == MUTT_YES)
mutt_error(_("No subject specified."));
goto main_loop;
}
}
#endif
- if (quadoption(OPT_ABORT_NOATTACH) != MUTT_NO && !msg->content->next &&
+ if (OPT_ABORT_NOATTACH != MUTT_NO && !msg->content->next &&
search_attach_keyword(msg->content->filename) &&
query_quadoption(OPT_ABORT_NOATTACH,
_("No attachments, cancel sending?")) != MUTT_NO)
{
/* if the abort is automatic, print an error message */
- if (quadoption(OPT_ABORT_NOATTACH) == MUTT_YES)
+ if (OPT_ABORT_NOATTACH == MUTT_YES)
{
mutt_error(_(
"Message contains text matching \"$attach_keyword\". Not sending."));
free_clear_content = true;
}
- if (!option(OPT_NO_CURSES) && !(flags & SENDMAILX))
+ if (!OPT_NO_CURSES && !(flags & SENDMAILX))
mutt_message(_("Sending message..."));
mutt_prepare_envelope(msg->env, 1);
struct Body *save_sig = NULL;
struct Body *save_parts = NULL;
- if (WithCrypto && (msg->security & (ENCRYPT | SIGN)) && option(OPT_FCC_CLEAR))
+ if (WithCrypto && (msg->security & (ENCRYPT | SIGN)) && OPT_FCC_CLEAR)
msg->content = clear_content;
/* check to see if the user wants copies of all attachments */
goto cleanup;
}
}
- else if (!option(OPT_NO_CURSES) && !(flags & SENDMAILX))
+ else if (!OPT_NO_CURSES && !(flags & SENDMAILX))
{
mutt_message(i != 0 ? _("Sending in background.") :
(flags & SENDNEWS) ? _("Article posted.") : /* USE_NNTP */
_("Mail sent."));
#ifdef USE_NOTMUCH
- if (option(OPT_NM_RECORD))
+ if (OPT_NM_RECORD)
nm_record_message(ctx, finalpath, cur);
#endif
}
{
char *chsname = mutt_get_body_charset(send_charset, sizeof(send_charset), b);
if ((info->lobin && (mutt_str_strncasecmp(chsname, "iso-2022", 8) != 0)) ||
- info->linemax > 990 || (info->from && option(OPT_ENCODE_FROM)))
+ info->linemax > 990 || (info->from && OPT_ENCODE_FROM))
{
b->encoding = ENCQUOTEDPRINTABLE;
}
else if (info->hibin)
{
- b->encoding = option(OPT_ALLOW_8BIT) ? ENC8BIT : ENCQUOTEDPRINTABLE;
+ b->encoding = OPT_ALLOW_8BIT ? ENC8BIT : ENCQUOTEDPRINTABLE;
}
else
{
{
if (info->lobin || info->hibin)
{
- if (option(OPT_ALLOW_8BIT) && !info->lobin)
+ if (OPT_ALLOW_8BIT && !info->lobin)
b->encoding = ENC8BIT;
else
mutt_message_to_7bit(b, NULL);
if (WithCrypto)
{
- if ((option(OPT_MIME_FORWARD_DECODE) || option(OPT_FORWARD_DECRYPT)) &&
- (hdr->security & ENCRYPT))
+ if ((OPT_MIME_FORWARD_DECODE || OPT_FORWARD_DECRYPT) && (hdr->security & ENCRYPT))
{
if (!crypt_valid_passphrase(hdr->security))
return NULL;
cmflags = 0;
/* If we are attaching a message, ignore OPT_MIME_FORWARD_DECODE */
- if (!attach_msg && option(OPT_MIME_FORWARD_DECODE))
+ if (!attach_msg && OPT_MIME_FORWARD_DECODE)
{
chflags |= CH_MIME | CH_TXTPLAIN;
cmflags = MUTT_CM_DECODE | MUTT_CM_CHARCONV;
if ((WithCrypto & APPLICATION_SMIME))
pgp &= ~SMIMEENCRYPT;
}
- else if (WithCrypto && option(OPT_FORWARD_DECRYPT) && (hdr->security & ENCRYPT))
+ else if (WithCrypto && OPT_FORWARD_DECRYPT && (hdr->security & ENCRYPT))
{
if ((WithCrypto & APPLICATION_PGP) && mutt_is_multipart_encrypted(hdr->content))
{
att = mutt_new_body();
att->filename = mutt_str_strdup(path);
- if (MimeTypeQueryCommand && *MimeTypeQueryCommand && option(OPT_MIME_TYPE_QUERY_FIRST))
+ if (MimeTypeQueryCommand && *MimeTypeQueryCommand && OPT_MIME_TYPE_QUERY_FIRST)
run_mime_type_query(att);
/* Attempt to determine the appropriate content-type based on the filename
if (!att->subtype)
mutt_lookup_mime_type(att, path);
- if (!att->subtype && MimeTypeQueryCommand && *MimeTypeQueryCommand &&
- !option(OPT_MIME_TYPE_QUERY_FIRST))
+ if (!att->subtype && MimeTypeQueryCommand && *MimeTypeQueryCommand && !OPT_MIME_TYPE_QUERY_FIRST)
{
run_mime_type_query(att);
}
char *v = mutt_str_strdup(value);
bool display = (flags & CH_DISPLAY);
- if (!display || option(OPT_WEED))
+ if (!display || OPT_WEED)
v = unfold_header(v);
/* when not displaying, use sane wrap value */
}
else if (mode > 0)
#ifdef USE_NNTP
- if (!option(OPT_NEWS_SEND))
+ if (!OPT_NEWS_SEND)
#endif
fputs("To: \n", fp);
}
else if (mode > 0)
#ifdef USE_NNTP
- if (!option(OPT_NEWS_SEND))
+ if (!OPT_NEWS_SEND)
#endif
fputs("Cc: \n", fp);
if (env->bcc)
{
- if (mode != 0 || option(OPT_WRITE_BCC))
+ if (mode != 0 || OPT_WRITE_BCC)
{
fputs("Bcc: ", fp);
mutt_write_address_list(env->bcc, fp, 5, 0);
}
else if (mode > 0)
#ifdef USE_NNTP
- if (!option(OPT_NEWS_SEND))
+ if (!OPT_NEWS_SEND)
#endif
fputs("Bcc: \n", fp);
#ifdef USE_NNTP
if (env->newsgroups)
fprintf(fp, "Newsgroups: %s\n", env->newsgroups);
- else if (mode == 1 && option(OPT_NEWS_SEND))
+ else if (mode == 1 && OPT_NEWS_SEND)
fputs("Newsgroups: \n", fp);
if (env->followup_to)
fprintf(fp, "Followup-To: %s\n", env->followup_to);
- else if (mode == 1 && option(OPT_NEWS_SEND))
+ else if (mode == 1 && OPT_NEWS_SEND)
fputs("Followup-To: \n", fp);
if (env->x_comment_to)
fprintf(fp, "X-Comment-To: %s\n", env->x_comment_to);
- else if (mode == 1 && option(OPT_NEWS_SEND) && option(OPT_X_COMMENT_TO))
+ else if (mode == 1 && OPT_NEWS_SEND && OPT_X_COMMENT_TO)
fputs("X-Comment-To: \n", fp);
#endif
if (env->mail_followup_to)
#ifdef USE_NNTP
- if (!option(OPT_NEWS_SEND))
+ if (!OPT_NEWS_SEND)
#endif
{
fputs("Mail-Followup-To: ", fp);
}
}
- if (mode == 0 && !privacy && option(OPT_USER_AGENT) && !has_agent)
+ if (mode == 0 && !privacy && OPT_USER_AGENT && !has_agent)
{
/* Add a vanity header */
fprintf(fp, "User-Agent: NeoMutt/%s%s\n", PACKAGE_VERSION, GitVer);
{
p = Hostname;
- if (may_hide_host && option(OPT_HIDDEN_HOST))
+ if (may_hide_host && OPT_HIDDEN_HOST)
{
p = strchr(Hostname, '.');
if (p)
int i;
#ifdef USE_NNTP
- if (option(OPT_NEWS_SEND))
+ if (OPT_NEWS_SEND)
{
char cmd[LONG_STRING];
}
#ifdef USE_NNTP
- if (!option(OPT_NEWS_SEND))
+ if (!OPT_NEWS_SEND)
{
#endif
/* If Sendmail contained a "--", we save the recipients to append to
}
}
- if (eightbit && option(OPT_USE_8BITMIME))
+ if (eightbit && OPT_USE_8BITMIME)
args = add_option(args, &argslen, &argsmax, "-B8BITMIME");
- if (option(OPT_USE_ENVELOPE_FROM))
+ if (OPT_USE_ENVELOPE_FROM)
{
if (EnvelopeFromAddress)
{
* and is set up to prompt using ncurses pinentry. If we
* mutt_endwin() it leaves other users staring at a blank screen.
* So instead, just force a hard redraw on the next refresh. */
- if (!option(OPT_NO_CURSES))
+ if (!OPT_NO_CURSES)
mutt_need_hard_redraw();
- i = send_msg(path, args, msg, option(OPT_NO_CURSES) ? NULL : &childout);
+ i = send_msg(path, args, msg, OPT_NO_CURSES ? NULL : &childout);
if (i != (EX_OK & 0xff))
{
if (i != S_BKG)
if (env->subject)
#ifdef USE_NNTP
- if (!option(OPT_NEWS_SEND) || option(OPT_MIME_SUBJECT))
+ if (!OPT_NEWS_SEND || OPT_MIME_SUBJECT)
#endif
{
rfc2047_encode_string32(&env->subject);
int ch_flags = CH_XMIT | CH_NONEWLINE | CH_NOQFROM;
char *msgid_str = NULL;
- if (!option(OPT_BOUNCE_DELIVERED))
+ if (!OPT_BOUNCE_DELIVERED)
ch_flags |= CH_WEED_DELIVERED;
fseeko(fp, h->offset, SEEK_SET);
rfc822_write_address(resent_from, sizeof(resent_from), from, 0);
#ifdef USE_NNTP
- unset_option(OPT_NEWS_SEND);
+ OPT_NEWS_SEND = false;
#endif
/*
*/
static void update_entries_visibility(void)
{
- short new_only = option(OPT_SIDEBAR_NEW_MAIL_ONLY);
+ short new_only = OPT_SIDEBAR_NEW_MAIL_ONLY;
struct SbEntry *sbe = NULL;
for (int i = 0; i < EntryCount; i++)
{
entry++;
if (entry == EntryCount)
{
- if (option(OPT_SIDEBAR_NEXT_NEW_WRAP))
+ if (OPT_SIDEBAR_NEXT_NEW_WRAP)
entry = 0;
else
return false;
entry--;
if (entry < 0)
{
- if (option(OPT_SIDEBAR_NEXT_NEW_WRAP))
+ if (OPT_SIDEBAR_NEXT_NEW_WRAP)
entry = EntryCount - 1;
else
return false;
/* If OPTSIDEBARNEMAILONLY is set, some entries may be hidden so we
* need to scan for the framing interval */
- if (option(OPT_SIDEBAR_NEW_MAIL_ONLY))
+ if (OPT_SIDEBAR_NEW_MAIL_ONLY)
{
TopIndex = BotIndex = -1;
while (BotIndex < HilIndex)
altchar = SB_DIV_USER; /* User config */
}
- if (option(OPT_ASCII_CHARS) && (altchar != SB_DIV_ASCII))
+ if (OPT_ASCII_CHARS && (altchar != SB_DIV_ASCII))
{
/* $ascii_chars overrides Unicode divider chars */
if (altchar == SB_DIV_UTF8)
SETCOLOR(MT_COLOR_DIVIDER);
- int col = option(OPT_SIDEBAR_ON_RIGHT) ? 0 : (SidebarWidth - delim_len);
+ int col = OPT_SIDEBAR_ON_RIGHT ? 0 : (SidebarWidth - delim_len);
for (int i = 0; i < num_rows; i++)
{
/* Fill the remaining rows with blank space */
NORMAL_COLOR;
- if (!option(OPT_SIDEBAR_ON_RIGHT))
+ if (!OPT_SIDEBAR_ON_RIGHT)
div_width = 0;
for (int r = 0; r < num_rows; r++)
{
}
int col = 0;
- if (option(OPT_SIDEBAR_ON_RIGHT))
+ if (OPT_SIDEBAR_ON_RIGHT)
col = div_width;
mutt_window_move(MuttSidebarWindow, row, col);
/* calculate depth of current folder and generate its display name with indented spaces */
int sidebar_folder_depth = 0;
char *sidebar_folder_name = NULL;
- if (option(OPT_SIDEBAR_SHORT_PATH))
+ if (OPT_SIDEBAR_SHORT_PATH)
{
/* disregard a trailing separator, so strlen() - 2 */
sidebar_folder_name = b->path;
{
sidebar_folder_name = b->desc;
}
- else if (maildir_is_prefix && option(OPT_SIDEBAR_FOLDER_INDENT))
+ else if (maildir_is_prefix && OPT_SIDEBAR_FOLDER_INDENT)
{
const char *tmp_folder_name = NULL;
int lastsep = 0;
}
if (sidebar_folder_depth > 0)
{
- if (option(OPT_SIDEBAR_SHORT_PATH))
+ if (OPT_SIDEBAR_SHORT_PATH)
tmp_folder_name += lastsep; /* basename */
int sfn_len = mutt_str_strlen(tmp_folder_name) +
sidebar_folder_depth * mutt_str_strlen(SidebarIndentString) + 1;
*/
void mutt_sb_draw(void)
{
- if (!option(OPT_SIDEBAR_VISIBLE))
+ if (!OPT_SIDEBAR_VISIBLE)
return;
#ifdef USE_SLANG_CURSES
*/
void mutt_sb_change_mailbox(int op)
{
- if (!option(OPT_SIDEBAR_VISIBLE))
+ if (!OPT_SIDEBAR_VISIBLE)
return;
if (HilIndex < 0) /* It'll get reset on the next draw */
*/
const char *mutt_sb_get_highlight(void)
{
- if (!option(OPT_SIDEBAR_VISIBLE))
+ if (!OPT_SIDEBAR_VISIBLE)
return NULL;
if (!EntryCount || HilIndex < 0)
--- /dev/null
+/**
+ * @file
+ * Signal handling
+ *
+ * @authors
+ * Copyright (C) 1996-2000,2012 Michael R. Elkins <me@mutt.org>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <errno.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "mutt/mutt.h"
+#include "globals.h"
+#include "mutt_curses.h"
+#include "options.h"
+
+static sigset_t Sigset;
+static sigset_t SigsetSys;
+static struct sigaction SysOldInt;
+static struct sigaction SysOldQuit;
+static int IsEndwin = 0;
+
+/**
+ * exit_handler - Attempt to catch "ordinary" signals and shut down gracefully
+ */
+static void exit_handler(int sig)
+{
+ curs_set(1);
+ endwin(); /* just to be safe */
+
+/*
+ * if sys_siglist is not defined, HAVE_DECL_SYS_SIGLIST will be set to 0
+ * so we must check it with #if and not #ifdef
+ */
+#if HAVE_DECL_SYS_SIGLIST
+ printf(_("%s... Exiting.\n"), sys_siglist[sig]);
+#elif (defined(__sun__) && defined(__svr4__))
+ printf(_("Caught %s... Exiting.\n"), _sys_siglist[sig]);
+#elif (defined(__alpha) && defined(__osf__))
+ printf(_("Caught %s... Exiting.\n"), __sys_siglist[sig]);
+#else
+ printf(_("Caught signal %d... Exiting.\n"), sig);
+#endif
+ exit(0);
+}
+
+static void chld_handler(int sig)
+{
+ /* empty */
+}
+
+static void sighandler(int sig)
+{
+ int save_errno = errno;
+
+ switch (sig)
+ {
+ case SIGTSTP: /* user requested a suspend */
+ if (!OPT_SUSPEND)
+ break;
+ IsEndwin = isendwin();
+ curs_set(1);
+ if (!IsEndwin)
+ endwin();
+ kill(0, SIGSTOP);
+
+ case SIGCONT:
+ if (!IsEndwin)
+ refresh();
+ mutt_curs_set(-1);
+#if defined(USE_SLANG_CURSES) || defined(HAVE_RESIZETERM)
+ /* We don't receive SIGWINCH when suspended; however, no harm is done by
+ * just assuming we received one, and triggering the 'resize' anyway. */
+ SigWinch = 1;
+#endif
+ break;
+
+#if defined(USE_SLANG_CURSES) || defined(HAVE_RESIZETERM)
+ case SIGWINCH:
+ SigWinch = 1;
+ break;
+#endif
+
+ case SIGINT:
+ SigInt = 1;
+ break;
+ }
+ errno = save_errno;
+}
+
+#ifdef USE_SLANG_CURSES
+static int mutt_intr_hook(void)
+{
+ return -1;
+}
+#endif /* USE_SLANG_CURSES */
+
+void mutt_signal_init(void)
+{
+ struct sigaction act;
+
+ sigemptyset(&act.sa_mask);
+ act.sa_flags = 0;
+ act.sa_handler = SIG_IGN;
+ sigaction(SIGPIPE, &act, NULL);
+
+ act.sa_handler = exit_handler;
+ sigaction(SIGTERM, &act, NULL);
+ sigaction(SIGHUP, &act, NULL);
+ sigaction(SIGQUIT, &act, NULL);
+
+ /* we want to avoid race conditions */
+ sigaddset(&act.sa_mask, SIGTSTP);
+
+ act.sa_handler = sighandler;
+
+ /* we want SIGALRM to abort the current syscall, so we do this before
+ * setting the SA_RESTART flag below. currently this is only used to
+ * timeout on a connect() call in a reasonable amount of time.
+ */
+ sigaction(SIGALRM, &act, NULL);
+
+/* we also don't want to mess with interrupted system calls */
+#ifdef SA_RESTART
+ act.sa_flags = SA_RESTART;
+#endif
+
+ sigaction(SIGCONT, &act, NULL);
+ sigaction(SIGTSTP, &act, NULL);
+ sigaction(SIGINT, &act, NULL);
+#if defined(USE_SLANG_CURSES) || defined(HAVE_RESIZETERM)
+ sigaction(SIGWINCH, &act, NULL);
+#endif
+
+ /* POSIX doesn't allow us to ignore SIGCHLD,
+ * so we just install a dummy handler for it
+ */
+ act.sa_handler = chld_handler;
+ /* don't need to block any other signals here */
+ sigemptyset(&act.sa_mask);
+ /* we don't want to mess with stopped children */
+ act.sa_flags |= SA_NOCLDSTOP;
+ sigaction(SIGCHLD, &act, NULL);
+
+#ifdef USE_SLANG_CURSES
+ /* This bit of code is required because of the implementation of
+ * SLcurses_wgetch(). If a signal is received (like SIGWINCH) when we
+ * are in blocking mode, SLsys_getkey() will not return an error unless
+ * a handler function is defined and it returns -1. This is needed so
+ * that if the user resizes the screen while at a prompt, it will just
+ * abort and go back to the main-menu.
+ */
+ SLang_getkey_intr_hook = mutt_intr_hook;
+#endif
+}
+
+/**
+ * mutt_block_signals - Block signals during critical ops
+ *
+ * signals which are important to block while doing critical ops
+ */
+void mutt_block_signals(void)
+{
+ if (!OPT_SIGNALS_BLOCKED)
+ {
+ sigemptyset(&Sigset);
+ sigaddset(&Sigset, SIGTERM);
+ sigaddset(&Sigset, SIGHUP);
+ sigaddset(&Sigset, SIGTSTP);
+ sigaddset(&Sigset, SIGINT);
+#if defined(USE_SLANG_CURSES) || defined(HAVE_RESIZETERM)
+ sigaddset(&Sigset, SIGWINCH);
+#endif
+ sigprocmask(SIG_BLOCK, &Sigset, 0);
+ OPT_SIGNALS_BLOCKED = true;
+ }
+}
+
+/**
+ * mutt_unblock_signals - restore the previous signal mask
+ */
+void mutt_unblock_signals(void)
+{
+ if (OPT_SIGNALS_BLOCKED)
+ {
+ sigprocmask(SIG_UNBLOCK, &Sigset, 0);
+ OPT_SIGNALS_BLOCKED = false;
+ }
+}
+
+void mutt_block_signals_system(void)
+{
+ struct sigaction sa;
+
+ if (!OPT_SYS_SIGNALS_BLOCKED)
+ {
+ /* POSIX: ignore SIGINT and SIGQUIT & block SIGCHLD before exec */
+ sa.sa_handler = SIG_IGN;
+ sa.sa_flags = 0;
+ sigemptyset(&sa.sa_mask);
+ sigaction(SIGINT, &sa, &SysOldInt);
+ sigaction(SIGQUIT, &sa, &SysOldQuit);
+
+ sigemptyset(&SigsetSys);
+ sigaddset(&SigsetSys, SIGCHLD);
+ sigprocmask(SIG_BLOCK, &SigsetSys, 0);
+ OPT_SYS_SIGNALS_BLOCKED = true;
+ }
+}
+
+void mutt_unblock_signals_system(int catch)
+{
+ if (OPT_SYS_SIGNALS_BLOCKED)
+ {
+ sigprocmask(SIG_UNBLOCK, &SigsetSys, NULL);
+ if (catch)
+ {
+ sigaction(SIGQUIT, &SysOldQuit, NULL);
+ sigaction(SIGINT, &SysOldInt, NULL);
+ }
+ else
+ {
+ struct sigaction sa;
+
+ sa.sa_handler = SIG_DFL;
+ sigemptyset(&sa.sa_mask);
+ sa.sa_flags = 0;
+ sigaction(SIGQUIT, &sa, NULL);
+ sigaction(SIGINT, &sa, NULL);
+ }
+
+ OPT_SYS_SIGNALS_BLOCKED = false;
+ }
+}
+
+void mutt_allow_interrupt(int disposition)
+{
+ struct sigaction sa;
+
+ memset(&sa, 0, sizeof(sa));
+ sa.sa_handler = sighandler;
+#ifdef SA_RESTART
+ if (disposition == 0)
+ sa.sa_flags |= SA_RESTART;
+#endif
+ sigaction(SIGINT, &sa, NULL);
+}
if (conn->account.flags & MUTT_ACCT_USER)
Esmtp = 1;
#ifdef USE_SSL
- if (option(OPT_SSL_FORCE_TLS) || quadoption(OPT_SSL_STARTTLS) != MUTT_NO)
+ if (OPT_SSL_FORCE_TLS || OPT_SSL_STARTTLS != MUTT_NO)
Esmtp = 1;
#endif
}
return SMTP_AUTH_UNAVAIL;
}
- if (!option(OPT_NO_CURSES))
+ if (!OPT_NO_CURSES)
mutt_message(_("Authenticating (%s)..."), mech);
bufsize = ((len * 2) > LONG_STRING) ? (len * 2) : LONG_STRING;
#ifdef USE_SSL
if (conn->ssf)
rc = MUTT_NO;
- else if (option(OPT_SSL_FORCE_TLS))
+ else if (OPT_SSL_FORCE_TLS)
rc = MUTT_YES;
else if (mutt_bit_isset(Capabilities, STARTTLS) &&
(rc = query_quadoption(OPT_SSL_STARTTLS,
{
/* If the items compared equal by the main sort
* and we're not already doing an 'aux' sort... */
- if ((retval == 0) && AuxSort && !option(OPT_AUX_SORT))
+ if ((retval == 0) && AuxSort && !OPT_AUX_SORT)
{
- set_option(OPT_AUX_SORT);
+ OPT_AUX_SORT = true;
retval = AuxSort(a, b);
- unset_option(OPT_AUX_SORT);
+ OPT_AUX_SORT = false;
}
/* If the items still match, use their index positions
* to maintain a stable sort order */
if (a)
{
- if (option(OPT_REVERSE_ALIAS) && (ali = alias_reverse_lookup(a)) && ali->personal)
+ if (OPT_REVERSE_ALIAS && (ali = alias_reverse_lookup(a)) && ali->personal)
return ali->personal;
else if (a->personal)
return a->personal;
struct MuttThread *thread = NULL, *top = NULL;
sort_t *sortfunc = NULL;
- unset_option(OPT_NEED_RESORT);
+ OPT_NEED_RESORT = false;
if (!ctx)
return;
if (!ctx->quiet)
mutt_message(_("Sorting mailbox..."));
- if (option(OPT_NEED_RESCORE) && option(OPT_SCORE))
+ if (OPT_NEED_RESCORE && OPT_SCORE)
{
for (int i = 0; i < ctx->msgcount; i++)
mutt_score_message(ctx, ctx->hdrs[i], 1);
}
- unset_option(OPT_NEED_RESCORE);
+ OPT_NEED_RESCORE = false;
- if (option(OPT_RESORT_INIT))
+ if (OPT_RESORT_INIT)
{
- unset_option(OPT_RESORT_INIT);
+ OPT_RESORT_INIT = false;
init = 1;
}
AuxSort = NULL;
/* if $sort_aux changed after the mailbox is sorted, then all the
subthreads need to be resorted */
- if (option(OPT_SORT_SUBTHREADS))
+ if (OPT_SORT_SUBTHREADS)
{
int i = Sort;
Sort = SortAux;
if (ctx->tree)
ctx->tree = mutt_sort_subthreads(ctx->tree, 1);
Sort = i;
- unset_option(OPT_SORT_SUBTHREADS);
+ OPT_SORT_SUBTHREADS = false;
}
mutt_sort_threads(ctx, init);
}
if (Context)
{
- i = option(OPT_ATTACH_MSG) ?
- 3 :
- ((Context->readonly || Context->dontwrite) ?
- 2 :
- (Context->changed ||
- /* deleted doesn't necessarily mean changed in IMAP */
- (Context->magic != MUTT_IMAP && Context->deleted)) ?
- 1 :
- 0);
+ i = OPT_ATTACH_MSG ? 3 : ((Context->readonly || Context->dontwrite) ?
+ 2 :
+ (Context->changed ||
+ /* deleted doesn't necessarily mean changed in IMAP */
+ (Context->magic != MUTT_IMAP && Context->deleted)) ?
+ 1 :
+ 0);
}
if (!StatusChars || !StatusChars->len)
struct MuttThread *tmp = NULL, *tree = hdr->thread;
/* if the user disabled subject hiding, display it */
- if (!option(OPT_HIDE_THREAD_SUBJECT))
+ if (!OPT_HIDE_THREAD_SUBJECT)
return 1;
/* if our subject is different from our parent's, display it */
static void calculate_visibility(struct Context *ctx, int *max_depth)
{
struct MuttThread *tmp = NULL, *tree = ctx->tree;
- int hide_top_missing = option(OPT_HIDE_TOP_MISSING) && !option(OPT_HIDE_MISSING);
- int hide_top_limited = option(OPT_HIDE_TOP_LIMITED) && !option(OPT_HIDE_LIMITED);
+ int hide_top_missing = OPT_HIDE_TOP_MISSING && !OPT_HIDE_MISSING;
+ int hide_top_limited = OPT_HIDE_TOP_LIMITED && !OPT_HIDE_LIMITED;
int depth = 0;
/* we walk each level backwards to make it easier to compute next_subtree_visible */
else
{
tree->visible = false;
- tree->deep = !option(OPT_HIDE_LIMITED);
+ tree->deep = !OPT_HIDE_LIMITED;
}
}
else
{
tree->visible = false;
- tree->deep = !option(OPT_HIDE_MISSING);
+ tree->deep = !OPT_HIDE_MISSING;
}
tree->next_subtree_visible =
tree->next && (tree->next->next_subtree_visible || tree->next->subtree_visible);
char *pfx = NULL, *mypfx = NULL, *arrow = NULL, *myarrow = NULL, *new_tree = NULL;
char corner = (Sort & SORT_REVERSE) ? MUTT_TREE_ULCORNER : MUTT_TREE_LLCORNER;
char vtee = (Sort & SORT_REVERSE) ? MUTT_TREE_BTEE : MUTT_TREE_TTEE;
- int depth = 0, start_depth = 0, max_depth = 0, width = option(OPT_NARROW_TREE) ? 1 : 2;
+ int depth = 0, start_depth = 0, max_depth = 0, width = OPT_NARROW_TREE ? 1 : 2;
struct MuttThread *nextdisp = NULL, *pseudo = NULL, *parent = NULL, *tree = ctx->tree;
/* Do the visibility calculations and free the old thread chars.
myarrow = arrow + (depth - start_depth - (start_depth ? 0 : 1)) * width;
if (depth && start_depth == depth)
myarrow[0] = nextdisp ? MUTT_TREE_LTEE : corner;
- else if (parent->message && !option(OPT_HIDE_LIMITED))
+ else if (parent->message && !OPT_HIDE_LIMITED)
myarrow[0] = MUTT_TREE_HIDDEN;
- else if (!parent->message && !option(OPT_HIDE_MISSING))
+ else if (!parent->message && !OPT_HIDE_MISSING)
myarrow[0] = MUTT_TREE_MISSING;
else
myarrow[0] = vtee;
if (dateptr)
{
- thisdate = option(OPT_THREAD_RECEIVED) ? cur->message->received :
- cur->message->date_sent;
+ thisdate = OPT_THREAD_RECEIVED ? cur->message->received : cur->message->date_sent;
if (!*dateptr || thisdate < *dateptr)
*dateptr = thisdate;
}
env = cur->message->env;
- if (env->real_subj && ((env->real_subj != env->subject) || (!option(OPT_SORT_RE))))
+ if (env->real_subj && ((env->real_subj != env->subject) || (!OPT_SORT_RE)))
{
struct ListNode *np;
STAILQ_FOREACH(np, subjects, entries)
!tmp->fake_thread && /* don't match pseudo threads */
tmp->message->subject_changed && /* only match interesting replies */
!is_descendant(tmp, cur) && /* don't match in the same thread */
- (date >= (option(OPT_THREAD_RECEIVED) ? tmp->message->received :
- tmp->message->date_sent)) &&
- (!last || (option(OPT_THREAD_RECEIVED) ?
+ (date >= (OPT_THREAD_RECEIVED ? tmp->message->received : tmp->message->date_sent)) &&
+ (!last || (OPT_THREAD_RECEIVED ?
(last->message->received < tmp->message->received) :
(last->message->date_sent < tmp->message->date_sent))) &&
tmp->message->env->real_subj &&
if (!cur->thread)
{
- if ((!init || option(OPT_DUPLICATE_THREADS)) && cur->env->message_id)
+ if ((!init || OPT_DUPLICATE_THREADS) && cur->env->message_id)
thread = mutt_hash_find(ctx->thread_hash, cur->env->message_id);
else
thread = NULL;
}
else
{
- new = (option(OPT_DUPLICATE_THREADS) ? thread : NULL);
+ new = (OPT_DUPLICATE_THREADS ? thread : NULL);
thread = mutt_mem_calloc(1, sizeof(struct MuttThread));
thread->message = cur;
check_subjects(ctx, init);
- if (!option(OPT_STRICT_THREADS))
+ if (!OPT_STRICT_THREADS)
pseudo_threads(ctx);
if (ctx->tree)