else if ((account->type == MUTT_ACCT_TYPE_NNTP) && NntpUser)
strfcpy(account->user, NntpUser, sizeof(account->user));
#endif
- else if (option(OPTNOCURSES))
+ else if (option(OPT_NO_CURSES))
return -1;
/* prompt (defaults to unix username), copy into account->user */
else
else if ((account->type == MUTT_ACCT_TYPE_NNTP) && NntpPass)
strfcpy(account->pass, NntpPass, sizeof(account->pass));
#endif
- else if (option(OPTNOCURSES))
+ else if (option(OPT_NO_CURSES))
return -1;
else
{
{
AliasTable[menu->current]->self->del = (op == OP_DELETE);
menu->redraw |= REDRAW_CURRENT;
- if (option(OPTRESOLVE) && menu->current < menu->max - 1)
+ if (option(OPT_RESOLVE) && menu->current < menu->max - 1)
{
menu->current++;
menu->redraw |= REDRAW_INDEX;
last->next = NULL;
}
- if (option(OPTUSEDOMAIN) && (fqdn = mutt_fqdn(1)))
+ if (option(OPT_USE_DOMAIN) && (fqdn = mutt_fqdn(1)))
{
/* now qualify all local addresses */
rfc822_qualify(head, fqdn);
_("---Command: %-30.30s Attachment: %s"), command, type);
}
- if ((mutt_wait_filter(thepid) || (entry->needsterminal && option(OPTWAITKEY))) && !use_pager)
+ if ((mutt_wait_filter(thepid) || (entry->needsterminal && option(OPT_WAIT_KEY))) && !use_pager)
mutt_any_key_to_continue(NULL);
if (tempfd != -1)
else
{
/* interactive command */
- if (mutt_system(command) || (entry->needsterminal && option(OPTWAITKEY)))
+ if (mutt_system(command) || (entry->needsterminal && option(OPT_WAIT_KEY)))
mutt_any_key_to_continue(NULL);
}
}
else
{
/* Use built-in handler */
- set_option(OPTVIEWATTACH); /* disable the "use 'v' to view this part"
+ set_option(OPT_VIEW_ATTACH); /* 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(OPTVIEWATTACH);
+ unset_option(OPT_VIEW_ATTACH);
goto return_error;
}
- unset_option(OPTVIEWATTACH);
+ unset_option(OPT_VIEW_ATTACH);
}
if (a->description)
if (mutt_wait_filter(thepid) != 0)
rv = 0;
- if (rv == 0 || option(OPTWAITKEY))
+ if (rv == 0 || option(OPT_WAIT_KEY))
mutt_any_key_to_continue(NULL);
return rv;
}
mutt_copy_stream(ifp, fpout);
safe_fclose(&fpout);
safe_fclose(&ifp);
- if (mutt_wait_filter(thepid) || option(OPTWAITKEY))
+ if (mutt_wait_filter(thepid) || option(OPT_WAIT_KEY))
mutt_any_key_to_continue(NULL);
}
else
{
- if (mutt_system(command) || option(OPTWAITKEY))
+ if (mutt_system(command) || option(OPT_WAIT_KEY))
mutt_any_key_to_continue(NULL);
}
safe_fclose(&fpout);
safe_fclose(&ifp);
- if (mutt_wait_filter(thepid) != 0 || option(OPTWAITKEY))
+ if (mutt_wait_filter(thepid) != 0 || option(OPT_WAIT_KEY))
mutt_any_key_to_continue(NULL);
rc = 1;
}
#ifdef USE_NNTP
case SORT_SIZE:
case SORT_DATE:
- if (option(OPTNEWS))
+ if (option(OPT_NEWS))
return;
#endif
default:
snprintf(tmp, sizeof(tmp), "%%%sd", fmt);
snprintf(dest, destlen, tmp, Context->new);
}
- else if (option(OPTMARKOLD) &&
+ else if (option(OPT_MARK_OLD) &&
folder->ff->nd->last_cached >= folder->ff->nd->first_message &&
folder->ff->nd->last_cached <= folder->ff->nd->last_message)
{
(state->entry)[state->entrylen].imap = false;
#endif
#ifdef USE_NNTP
- if (option(OPTNEWS))
+ if (option(OPT_NEWS))
(state->entry)[state->entrylen].nd = (struct NntpData *) data;
#endif
(state->entrylen)++;
char *d, const char *prefix)
{
#ifdef USE_NNTP
- if (option(OPTNEWS))
+ if (option(OPT_NEWS))
{
struct NntpServer *nserv = CurrentNewsSrv;
char buffer[LONG_STRING];
#ifdef USE_NNTP
- if (option(OPTNEWS))
+ if (option(OPT_NEWS))
{
struct NntpServer *nserv = CurrentNewsSrv;
struct NntpData *nntp_data = nserv->groups_list[i];
if (nntp_data &&
(nntp_data->new || (nntp_data->subscribed &&
- (nntp_data->unread || !option(OPTSHOWONLYUNREAD)))))
+ (nntp_data->unread || !option(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(OPTNEWS))
+ if (option(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(OPTNEWS))
+ if (option(OPT_NEWS))
mutt_expando_format(s, slen, 0, MuttIndexWindow->cols, NONULL(GroupFormat), newsgroup_format_str,
(unsigned long) &folder, MUTT_FORMAT_ARROWCURSOR);
else
menu->tagged = 0;
#ifdef USE_NNTP
- if (option(OPTNEWS))
+ if (option(OPT_NEWS))
{
if (buffy)
snprintf(title, titlelen, _("Subscribed newsgroups"));
memset(&state, 0, sizeof(struct BrowserState));
#ifdef USE_NNTP
- if (option(OPTNEWS))
+ if (option(OPT_NEWS))
{
if (*f)
strfcpy(prefix, f, sizeof(prefix));
menu->help = mutt_compile_help(helpstr, sizeof(helpstr), MENU_FOLDER,
#ifdef USE_NNTP
- option(OPTNEWS) ? FolderNewsHelp :
+ option(OPT_NEWS) ? FolderNewsHelp :
#endif
FolderHelp);
mutt_push_current_menu(menu);
}
}
- if (buffy || option(OPTNEWS)) /* USE_NNTP */
+ if (buffy || option(OPT_NEWS)) /* USE_NNTP */
{
strfcpy(f, state.entry[menu->current].name, flen);
mutt_expand_path(f, flen);
#ifdef USE_IMAP
case OP_BROWSER_TOGGLE_LSUB:
- if (option(OPTIMAPLSUB))
- unset_option(OPTIMAPLSUB);
+ if (option(OPT_IMAP_LSUB))
+ unset_option(OPT_IMAP_LSUB);
else
- set_option(OPTIMAPLSUB);
+ set_option(OPT_IMAP_LSUB);
mutt_unget_event(0, OP_CHECK_NEW);
break;
case OP_CHANGE_DIRECTORY:
#ifdef USE_NNTP
- if (option(OPTNEWS))
+ if (option(OPT_NEWS))
break;
#endif
#ifdef USE_NNTP
case OP_CATCHUP:
case OP_UNCATCHUP:
- if (option(OPTNEWS))
+ if (option(OPT_NEWS))
{
struct FolderFile *ff = &state.entry[menu->current];
int rc;
break;
case OP_LOAD_ACTIVE:
- if (option(OPTNEWS))
+ if (option(OPT_NEWS))
{
struct NntpServer *nserv = CurrentNewsSrv;
unsigned int j;
#ifdef USE_NNTP
case OP_SUBSCRIBE_PATTERN:
case OP_UNSUBSCRIBE_PATTERN:
- if (option(OPTNEWS))
+ if (option(OPT_NEWS))
{
struct NntpServer *nserv = CurrentNewsSrv;
regex_t *rx = safe_malloc(sizeof(regex_t));
/* 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(OPTMAILCHECKRECENT))
+ if (check_new && option(OPT_MAIL_CHECK_RECENT))
{
if (stat(path, &sb) == 0 && sb.st_mtime < mailbox->last_visited)
{
mailbox->msg_unread++;
if (check_new)
{
- if (option(OPTMAILCHECKRECENT))
+ if (option(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(OPTMAILDIRCHECKCUR);
+ check_new = !rc && option(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(OPTCHECKMBOXSIZE))
+ if (option(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(OPTMAILCHECKRECENT) || sb->st_mtime > mailbox->last_visited)
+ if (!option(OPT_MAIL_CHECK_RECENT) || sb->st_mtime > mailbox->last_visited)
{
rc = 1;
mailbox->new = true;
}
}
- else if (option(OPTCHECKMBOXSIZE))
+ else if (option(OPT_CHECK_MBOX_SIZE))
{
/* some other program has deleted mail from the folder */
mailbox->size = (off_t) sb->st_size;
#endif
}
}
- else if (option(OPTCHECKMBOXSIZE) && Context && Context->path)
+ else if (option(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(OPTCHECKMBOXSIZE))
+ if (option(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(OPTCHECKMBOXSIZE) && stat((*b)->path, &sb) == 0 &&
+ if (option(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 */
if (!force && (t - BuffyTime < BuffyTimeout))
return BuffyCount;
- if (option(OPTMAILCHECKSTATS) && (t - BuffyStatsTime >= BuffyCheckStatsInterval))
+ if (option(OPT_MAIL_CHECK_STATS) && (t - BuffyStatsTime >= BuffyCheckStatsInterval))
{
check_stats = true;
BuffyStatsTime = t;
struct Buffy *next;
bool new; /**< mailbox has new mail */
- /* These next three are only set when OPTMAILCHECKSTATS is set */
+ /* These next three are only set when OPT_MAIL_CHECK_STATS is set */
int msg_count; /**< total number of messages */
int msg_unread; /**< number of unread messages */
int msg_flagged; /**< number of flagged messages */
if ((fg == COLOR_DEFAULT) && (bg == COLOR_DEFAULT))
return A_NORMAL;
#ifdef HAVE_USE_DEFAULT_COLORS
- if (!option(OPTNOCURSES) && has_colors() &&
+ if (!option(OPT_NO_CURSES) && has_colors() &&
((fg == COLOR_DEFAULT) || (bg == COLOR_DEFAULT)) && use_default_colors() != OK)
{
mutt_error(_("default colors not supported."));
{
s += 5;
*col = strtol(s, &eptr, 10);
- if (!*s || *eptr || *col < 0 || (*col >= COLORS && !option(OPTNOCURSES) && has_colors()))
+ if (!*s || *eptr || *col < 0 || (*col >= COLORS && !option(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(OPTNOCURSES) || /* we're parsing an uncolor command, and have no colors */
+ option(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())
do_uncolor(buf, s, &ColorIndexTagList, &do_cache, parse_uncolor);
#endif
- if (do_cache && !option(OPTNOCURSES))
+ if (do_cache && !option(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(OPTNOCURSES) && has_colors()
+ if (!option(OPT_NO_CURSES) && has_colors()
/* delay use_default_colors() until needed, since it initializes things */
&& (fg == COLOR_DEFAULT || bg == COLOR_DEFAULT) && use_default_colors() != OK)
{
{
bool dry_run = false;
- if (option(OPTNOCURSES) || !has_colors())
+ if (option(OPT_NO_CURSES) || !has_colors())
dry_run = true;
return _mutt_parse_color(buff, s, err, parse_color_pair, dry_run);
bool dry_run = false;
#ifdef HAVE_COLOR
- if (option(OPTNOCURSES) || has_colors())
+ if (option(OPT_NO_CURSES) || has_colors())
dry_run = true;
#else
- if (option(OPTNOCURSES))
+ if (option(OPT_NO_CURSES))
dry_run = true;
#endif
fputs("\n\n", fpout);
}
- chflags = (option(OPTWEED) ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE | CH_FROM | CH_DISPLAY;
+ chflags = (option(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 = mutt_system(buf)) == -1)
mutt_error(_("Error running \"%s\"!"), buf);
unlink(tempfile);
- if (!option(OPTNOCURSES))
+ if (!option(OPT_NO_CURSES))
keypad(stdscr, true);
if (r != -1)
mutt_set_flag(Context, cur, MUTT_READ, 1);
- if (r != -1 && option(OPTPROMPTAFTER))
+ if (r != -1 && option(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(OPTWEED))
+ if (option(OPT_WEED))
{
*chflags |= CH_WEED;
*cmflags |= MUTT_CM_WEED;
return 1;
}
- set_option(OPTKEEPQUIET);
+ set_option(OPT_KEEP_QUIET);
pipe_msg(h, fpout, decode, print);
safe_fclose(&fpout);
rc = mutt_wait_filter(thepid);
- unset_option(OPTKEEPQUIET);
+ unset_option(OPT_KEEP_QUIET);
}
else
{ /* handle tagged messages */
mutt_perror(_("Can't create filter process"));
return 1;
}
- set_option(OPTKEEPQUIET);
+ set_option(OPT_KEEP_QUIET);
pipe_msg(Context->hdrs[Context->v2r[i]], fpout, decode, print);
/* add the message separator */
if (sep)
safe_fclose(&fpout);
if (mutt_wait_filter(thepid) != 0)
rc = 1;
- unset_option(OPTKEEPQUIET);
+ unset_option(OPT_KEEP_QUIET);
}
}
}
mutt_perror(_("Can't create filter process"));
return 1;
}
- set_option(OPTKEEPQUIET);
+ set_option(OPT_KEEP_QUIET);
for (i = 0; i < Context->vcount; i++)
{
if (Context->hdrs[Context->v2r[i]]->tagged)
safe_fclose(&fpout);
if (mutt_wait_filter(thepid) != 0)
rc = 1;
- unset_option(OPTKEEPQUIET);
+ unset_option(OPT_KEEP_QUIET);
}
}
- if (rc || option(OPTWAITKEY))
+ if (rc || option(OPT_WAIT_KEY))
mutt_any_key_to_continue(NULL);
return rc;
}
return;
mutt_expand_path(buffer, sizeof(buffer));
- _mutt_pipe_message(h, buffer, option(OPTPIPEDECODE), 0, option(OPTPIPESPLIT), PipeSep);
+ _mutt_pipe_message(h, buffer, option(OPT_PIPE_DECODE), 0, option(OPT_PIPE_SPLIT), PipeSep);
}
void mutt_print_message(struct Header *h)
h ? _("Print message?") : _("Print tagged messages?")) != MUTT_YES)
return;
- if (_mutt_pipe_message(h, PrintCmd, option(OPTPRINTDECODE), 1,
- option(OPTPRINTSPLIT), "\f") == 0)
+ if (_mutt_pipe_message(h, PrintCmd, option(OPT_PRINT_DECODE), 1,
+ option(OPT_PRINT_SPLIT), "\f") == 0)
mutt_message(h ? _("Message printed") : _("Messages printed"));
else
mutt_message(h ? _("Message could not be printed") :
mutt_window_clearline(MuttMessageWindow, 0);
mutt_endwin(NULL);
fflush(stdout);
- if (mutt_system(buf) != 0 || option(OPTWAITKEY))
+ if (mutt_system(buf) != 0 || option(OPT_WAIT_KEY))
mutt_any_key_to_continue(NULL);
mutt_buffy_check(true);
}
{
*chflags |= CH_DECODE; /* then decode RFC2047 headers, */
- if (option(OPTWEED))
+ if (option(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(OPTDELETEUNTAG))
+ if (option(OPT_DELETE_UNTAG))
mutt_set_flag(Context, h, MUTT_TAG, 0);
}
mutt_debug(2, "mutt_complete: completing %s\n", s);
#ifdef USE_NNTP
- if (option(OPTNEWS))
+ if (option(OPT_NEWS))
{
struct NntpServer *nserv = CurrentNewsSrv;
unsigned int n = 0;
addstr(_(" (S/MIME)"));
}
- if (option(OPTCRYPTOPPORTUNISTICENCRYPT) && (msg->security & OPPENCRYPT))
+ if (option(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(OPTNEWSSEND))
+ if (!option(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(OPTXCOMMENTTO))
+ if (option(OPT_XCOMMENT_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(OPTNEWSSEND))
+ if (option(OPT_NEWS_SEND))
news++;
#endif
while (loop)
{
#ifdef USE_NNTP
- unset_option(OPTNEWS); /* for any case */
+ unset_option(OPT_NEWS); /* for any case */
#endif
switch (op = mutt_menu_loop(menu))
{
break;
#endif
edit_address_list(HDR_TO, &msg->env->to);
- if (option(OPTCRYPTOPPORTUNISTICENCRYPT))
+ if (option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT))
{
crypt_opportunistic_encrypt(msg);
redraw_crypt_lines(msg);
break;
#endif
edit_address_list(HDR_BCC, &msg->env->bcc);
- if (option(OPTCRYPTOPPORTUNISTICENCRYPT))
+ if (option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT))
{
crypt_opportunistic_encrypt(msg);
redraw_crypt_lines(msg);
break;
#endif
edit_address_list(HDR_CC, &msg->env->cc);
- if (option(OPTCRYPTOPPORTUNISTICENCRYPT))
+ if (option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT))
{
crypt_opportunistic_encrypt(msg);
redraw_crypt_lines(msg);
}
break;
case OP_COMPOSE_EDIT_X_COMMENT_TO:
- if (news && option(OPTXCOMMENTTO))
+ if (news && option(OPT_XCOMMENT_TO))
{
if (msg->env->x_comment_to)
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_strcmp("builtin", Editor) != 0) && !option(OPTEDITHDRS))
+ if (Editor && (mutt_strcmp("builtin", Editor) != 0) && !option(OPT_EDIT_HDRS))
{
mutt_edit_file(Editor, msg->content->filename);
mutt_update_encoding(msg->content);
case OP_COMPOSE_EDIT_HEADERS:
if ((mutt_strcmp("builtin", Editor) != 0) &&
(op == OP_COMPOSE_EDIT_HEADERS ||
- (op == OP_COMPOSE_EDIT_MESSAGE && option(OPTEDITHDRS))))
+ (op == OP_COMPOSE_EDIT_MESSAGE && option(OPT_EDIT_HDRS))))
{
char *tag = NULL, *err = NULL;
mutt_env_to_local(msg->env);
mutt_error(_("Bad IDN in \"%s\": '%s'"), tag, err);
FREE(&err);
}
- if (option(OPTCRYPTOPPORTUNISTICENCRYPT))
+ if (option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT))
crypt_opportunistic_encrypt(msg);
}
else
prompt = _("Open mailbox to attach message from");
#ifdef USE_NNTP
- unset_option(OPTNEWS);
+ unset_option(OPT_NEWS);
if (op == OP_COMPOSE_ATTACH_NEWS_MESSAGE)
{
if (!(CurrentNewsSrv = nntp_select_server(NewsServer, 0)))
break;
prompt = _("Open newsgroup to attach message from");
- set_option(OPTNEWS);
+ set_option(OPT_NEWS);
}
#endif
break;
#ifdef USE_NNTP
- if (option(OPTNEWS))
+ if (option(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(OPTNEWS))
+ if (!mx_is_nntp(fname) && !option(OPT_NEWS))
#endif
/* check to make sure the file exists and is readable */
if (access(fname, R_OK) == -1)
oldSortAux = SortAux;
Context = ctx;
- set_option(OPTATTACHMSG);
+ set_option(OPT_ATTACH_MSG);
mutt_message(_("Tag the messages you want to attach!"));
close = mutt_index_menu();
- unset_option(OPTATTACHMSG);
+ unset_option(OPT_ATTACH_MSG);
if (!Context)
{
if (!ctx->append)
{
/* If the file was removed, remove the compressed folder too */
- if ((access(ctx->path, F_OK) != 0) && !option(OPTSAVEEMPTY))
+ if ((access(ctx->path, F_OK) != 0) && !option(OPT_SAVE_EMPTY))
{
remove(ctx->realpath);
}
{
/* Add some fake headers based on notmuch data */
char *folder = nm_header_get_folder(h);
- if (folder && !(option(OPTWEED) && mutt_matches_ignore("folder")))
+ if (folder && !(option(OPT_WEED) && mutt_matches_ignore("folder")))
{
char buf[LONG_STRING];
strfcpy(buf, folder, sizeof(buf));
fputc('\n', out);
}
char *tags = nm_header_get_tags(h);
- if (tags && !(option(OPTWEED) && mutt_matches_ignore("tags")))
+ if (tags && !(option(OPT_WEED) && mutt_matches_ignore("tags")))
{
fputs("Tags: ", out);
fputs(tags, out);
if (flags & MUTT_CM_PREFIX)
{
- if (option(OPTTEXTFLOWED))
+ if (option(OPT_TEXT_FLOWED))
strfcpy(prefix, ">", sizeof(prefix));
else
_mutt_make_string(prefix, sizeof(prefix), NONULL(Prefix), Context, hdr, 0);
*/
/* These are used for macros and exec/push commands.
- * They can be temporarily ignored by setting OPTIGNOREMACROEVENTS
+ * They can be temporarily ignored by setting OPT_IGNORE_MACRO_EVENTS
*/
static size_t MacroBufferCount = 0;
static size_t MacroBufferLen = 0;
static struct Event *MacroEvents;
/* These are used in all other "normal" situations, and are not
- * ignored when setting OPTIGNOREMACROEVENTS
+ * ignored when setting OPT_IGNORE_MACRO_EVENTS
*/
static size_t UngetCount = 0;
static size_t UngetLen = 0;
void mutt_refresh(void)
{
/* don't refresh when we are waiting for a child. */
- if (option(OPTKEEPQUIET))
+ if (option(OPT_KEEP_QUIET))
return;
/* don't refresh in the middle of macros unless necessary */
- if (MacroBufferCount && !option(OPTFORCEREFRESH) && !option(OPTIGNOREMACROEVENTS))
+ if (MacroBufferCount && !option(OPT_FORCE_REFRESH) && !option(OPT_IGNORE_MACRO_EVENTS))
return;
/* else */
if (UngetCount)
return UngetKeyEvents[--UngetCount];
- if (!option(OPTIGNOREMACROEVENTS) && MacroBufferCount)
+ if (!option(OPT_IGNORE_MACRO_EVENTS) && MacroBufferCount)
return MacroEvents[--MacroBufferCount];
SigInt = 0;
return timeout;
}
- if ((ch & 0x80) && option(OPTMETAKEY))
+ if ((ch & 0x80) && option(OPT_METAKEY))
{
/* send ALT-x as ESC-x */
ch &= ~0x80;
{
int rc;
- set_option(OPTIGNOREMACROEVENTS);
+ set_option(OPT_IGNORE_MACRO_EVENTS);
rc = mutt_get_field(msg, buf, buflen, flags);
- unset_option(OPTIGNOREMACROEVENTS);
+ unset_option(OPT_IGNORE_MACRO_EVENTS);
return rc;
}
void mutt_clear_error(void)
{
Errorbuf[0] = 0;
- if (!option(OPTNOCURSES))
+ if (!option(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(OPTKEEPQUIET))
+ if (!option(OPT_KEEP_QUIET))
{
if (error)
BEEP();
}
if (error)
- set_option(OPTMSGERR);
+ set_option(OPT_MSG_ERR);
else
- unset_option(OPTMSGERR);
+ unset_option(OPT_MSG_ERR);
}
void mutt_curses_error(const char *fmt, ...)
if (!progress)
return;
- if (option(OPTNOCURSES))
+ if (option(OPT_NO_CURSES))
return;
memset(progress, 0, sizeof(struct Progress));
struct timeval tv = { 0, 0 };
unsigned int now = 0;
- if (option(OPTNOCURSES))
+ if (option(OPT_NO_CURSES))
return;
if (!progress->inc)
void mutt_reflow_windows(void)
{
- if (option(OPTNOCURSES))
+ if (option(OPT_NO_CURSES))
return;
mutt_debug(2, "In mutt_reflow_windows\n");
MuttStatusWindow->rows = 1;
MuttStatusWindow->cols = COLS;
- MuttStatusWindow->row_offset = option(OPTSTATUSONTOP) ? 0 : LINES - 2;
+ MuttStatusWindow->row_offset = option(OPT_STATUS_ON_TOP) ? 0 : LINES - 2;
MuttStatusWindow->col_offset = 0;
memcpy(MuttHelpWindow, MuttStatusWindow, sizeof(struct MuttWindow));
- if (!option(OPTHELP))
+ if (!option(OPT_HELP))
MuttHelpWindow->rows = 0;
else
- MuttHelpWindow->row_offset = option(OPTSTATUSONTOP) ? LINES - 2 : 0;
+ MuttHelpWindow->row_offset = option(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(OPTSTATUSONTOP) ? MuttStatusWindow->rows : MuttHelpWindow->rows;
+ option(OPT_STATUS_ON_TOP) ? MuttStatusWindow->rows : MuttHelpWindow->rows;
#ifdef USE_SIDEBAR
- if (option(OPTSIDEBAR))
+ if (option(OPT_SIDEBAR))
{
memcpy(MuttSidebarWindow, MuttIndexWindow, sizeof(struct MuttWindow));
MuttSidebarWindow->cols = SidebarWidth;
MuttIndexWindow->cols -= SidebarWidth;
- if (option(OPTSIDEBARONRIGHT))
+ if (option(OPT_SIDEBAR_ON_RIGHT))
{
MuttSidebarWindow->col_offset = COLS - SidebarWidth;
}
MuttMessageWindow->rows = mw_rows;
MuttMessageWindow->row_offset = LINES - mw_rows;
- MuttStatusWindow->row_offset = option(OPTSTATUSONTOP) ? 0 : LINES - mw_rows - 1;
+ MuttStatusWindow->row_offset = option(OPT_STATUS_ON_TOP) ? 0 : LINES - mw_rows - 1;
- if (option(OPTHELP))
- MuttHelpWindow->row_offset = option(OPTSTATUSONTOP) ? LINES - mw_rows - 1 : 0;
+ if (option(OPT_HELP))
+ MuttHelpWindow->row_offset = option(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(OPTSIDEBAR))
+ if (option(OPT_SIDEBAR))
MuttSidebarWindow->rows = MuttIndexWindow->rows;
#endif
void mutt_show_error(void)
{
- if (option(OPTKEEPQUIET))
+ if (option(OPT_KEEP_QUIET))
return;
- SETCOLOR(option(OPTMSGERR) ? MT_COLOR_ERROR : MT_COLOR_MESSAGE);
+ SETCOLOR(option(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(OPTNOCURSES))
+ if (!option(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(OPTATTACHMSG)) \
+ if (option(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(OPTCOLLAPSEUNREAD) || !UNREAD(header)) && \
- (option(OPTCOLLAPSEFLAGGED) || !FLAGGED(header)))
+ ((option(OPT_COLLAPSE_UNREAD) || !UNREAD(header)) && \
+ (option(OPT_COLLAPSE_FLAGGED) || !FLAGGED(header)))
/* de facto standard escapes for tsl/fsl */
static char *tsl = "\033]0;";
* @param toggle toggle collapsed state
*
* This function is called by the OP_MAIN_COLLAPSE_ALL command and on folder
- * enter if the OPTCOLLAPSEALL option is set. In the first case, the @a toggle
+ * enter if the OPT_COLLAPSE_ALL option is set. In the first case, the @a toggle
* parameter is 1 to actually toggle collapsed/uncollapsed state on all
* threads. In the second case, the @a toggle parameter is 0, actually turning
* this function into a one-way collapse.
}
/* save the list of new messages */
- if (option(OPTUNCOLLAPSENEW) && oldcount && check != MUTT_REOPENED &&
+ if (option(OPT_UNCOLLAPSE_NEW) && oldcount && check != MUTT_REOPENED &&
((Sort & SORT_MASK) == SORT_THREADS))
{
save_new = safe_malloc(sizeof(struct Header *) * (ctx->msgcount - oldcount));
mutt_sort_headers(ctx, (check == MUTT_REOPENED));
/* uncollapse threads with new mail */
- if (option(OPTUNCOLLAPSENEW) && ((Sort & SORT_MASK) == SORT_THREADS))
+ if (option(OPT_UNCOLLAPSE_NEW) && ((Sort & SORT_MASK) == SORT_THREADS))
{
if (check == MUTT_REOPENED)
{
int *oldcount, int *index_hint, int flags)
{
#ifdef USE_NNTP
- if (option(OPTNEWS))
+ if (option(OPT_NEWS))
{
- unset_option(OPTNEWS);
+ unset_option(OPT_NEWS);
nntp_expand_path(buf, bufsz, &CurrentNewsSrv->conn->account);
}
else
update_index(menu, Context, check, *oldcount, *index_hint);
FREE(&new_last_folder);
- set_option(OPTSEARCHINVALID);
+ set_option(OPT_SEARCH_INVALID);
menu->redraw |= REDRAW_INDEX | REDRAW_STATUS;
return 0;
}
mutt_folder_hook(buf);
if ((Context = mx_open_mailbox(
- buf, (option(OPTREADONLY) || op == OP_MAIN_CHANGE_FOLDER_READONLY) ? MUTT_READONLY : 0,
+ buf, (option(OPT_READONLY) || op == OP_MAIN_CHANGE_FOLDER_READONLY) ? MUTT_READONLY : 0,
NULL)) != NULL)
{
menu->current = ci_first_message();
else
menu->current = 0;
- if (((Sort & SORT_MASK) == SORT_THREADS) && option(OPTCOLLAPSEALL))
+ if (((Sort & SORT_MASK) == SORT_THREADS) && option(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(OPTSEARCHINVALID);
+ set_option(OPT_SEARCH_INVALID);
return 0;
}
mutt_draw_statusline(MuttStatusWindow->cols, buf, sizeof(buf));
NORMAL_COLOR;
menu->redraw &= ~REDRAW_STATUS;
- if (option(OPTTSENABLED) && TSSupported)
+ if (option(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(OPTATTACHMSG);
+ int attach_msg = option(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(OPTCOLLAPSEALL))
+ if (((Sort & SORT_MASK) == SORT_THREADS) && option(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(OPTNEEDRESORT) && Context && Context->msgcount && menu->current >= 0)
+ if (option(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(OPTREDRAWTREE) && Context && Context->msgcount && (Sort & SORT_MASK) == SORT_THREADS)
+ if (option(OPT_REDRAW_TREE) && Context && Context->msgcount && (Sort & SORT_MASK) == SORT_THREADS)
{
mutt_draw_tree(Context);
menu->redraw |= REDRAW_STATUS;
- unset_option(OPTREDRAWTREE);
+ unset_option(OPT_REDRAW_TREE);
}
if (Context)
menu->redraw = REDRAW_FULL;
}
- set_option(OPTSEARCHINVALID);
+ set_option(OPT_SEARCH_INVALID);
}
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(OPTBEEPNEW))
+ if (option(OPT_BEEP_NEW))
beep();
if (NewMailCmd)
{
menu->redraw = REDRAW_FULL;
menu->max = Context->vcount;
- set_option(OPTSEARCHINVALID);
+ set_option(OPT_SEARCH_INVALID);
}
}
if (mutt_buffy_notify())
{
menu->redraw |= REDRAW_STATUS;
- if (option(OPTBEEPNEW))
+ if (option(OPT_BEEP_NEW))
beep();
if (NewMailCmd)
{
else
menu->oldcurrent = -1;
- if (option(OPTARROWCURSOR))
+ if (option(OPT_ARROW_CURSOR))
mutt_window_move(MuttIndexWindow, menu->current - menu->top + menu->offset, 2);
- else if (option(OPTBRAILLEFRIENDLY))
+ else if (option(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(OPTAUTOTAG) && Context && Context->tagged)
+ else if (option(OPT_AUTO_TAG) && Context && Context->tagged)
tag = true;
mutt_clear_error();
}
#ifdef USE_NNTP
- unset_option(OPTNEWS); /* for any case */
+ unset_option(OPT_NEWS); /* for any case */
#endif
#ifdef USE_NOTMUCH
{
snprintf(buf2, sizeof(buf2), "!~R!~D~s%s",
Context->pattern ? Context->pattern : ".*");
- set_option(OPTHIDEREAD);
+ set_option(OPT_HIDE_READ);
}
else
{
strfcpy(buf2, Context->pattern + 8, sizeof(buf2));
if (!*buf2 || (strncmp(buf2, ".*", 2) == 0))
snprintf(buf2, sizeof(buf2), "~A");
- unset_option(OPTHIDEREAD);
+ unset_option(OPT_HIDE_READ);
}
FREE(&Context->pattern);
Context->pattern = safe_strdup(buf2);
update_index(menu, Context, check, oldcount, index_hint);
menu->redraw = REDRAW_FULL; /* new mail arrived? */
- set_option(OPTSEARCHINVALID);
+ set_option(OPT_SEARCH_INVALID);
}
}
break;
if (Context && Context->msgcount)
{
resort_index(menu);
- set_option(OPTSEARCHINVALID);
+ set_option(OPT_SEARCH_INVALID);
}
if (menu->menu == MENU_PAGER)
{
CHECK_MSGCOUNT;
CHECK_VISIBLE;
- if (tag && !option(OPTAUTOTAG))
+ if (tag && !option(OPT_AUTO_TAG))
{
for (j = 0; j < Context->vcount; j++)
mutt_set_flag(Context, Context->hdrs[Context->v2r[j]], MUTT_TAG, 0);
Context->last_tag);
menu->redraw |= REDRAW_STATUS;
- if (option(OPTRESOLVE) && menu->current < Context->vcount - 1)
+ if (option(OPT_RESOLVE) && menu->current < Context->vcount - 1)
{
menu->current++;
menu->redraw |= REDRAW_MOTION_RESYNCH;
{
if (mx_close_mailbox(Context, &index_hint) != 0)
{
- set_option(OPTSEARCHINVALID);
+ set_option(OPT_SEARCH_INVALID);
menu->redraw = REDRAW_FULL;
break;
}
}
imap_logout_all();
mutt_message(_("Logged out of IMAP servers."));
- set_option(OPTSEARCHINVALID);
+ set_option(OPT_SEARCH_INVALID);
menu->redraw = REDRAW_FULL;
break;
#endif
break;
}
}
- set_option(OPTSEARCHINVALID);
+ set_option(OPT_SEARCH_INVALID);
}
else if (check == MUTT_NEW_MAIL || check == MUTT_REOPENED)
update_index(menu, Context, check, oc, index_hint);
op = OP_DISPLAY_MESSAGE;
continue;
}
- if (option(OPTRESOLVE))
+ if (option(OPT_RESOLVE))
{
if ((menu->current = ci_next_undeleted(menu->current)) == -1)
{
#ifdef USE_NNTP
case OP_MAIN_CHANGE_GROUP:
case OP_MAIN_CHANGE_GROUP_READONLY:
- unset_option(OPTNEWS);
+ unset_option(OPT_NEWS);
#endif
- if (attach_msg || option(OPTREADONLY) ||
+ if (attach_msg || option(OPT_READONLY) ||
#ifdef USE_NNTP
op == OP_MAIN_CHANGE_GROUP_READONLY ||
#endif
#ifdef USE_NNTP
if (op == OP_MAIN_CHANGE_GROUP || op == OP_MAIN_CHANGE_GROUP_READONLY)
{
- set_option(OPTNEWS);
+ set_option(OPT_NEWS);
CurrentNewsSrv = nntp_select_server(NewsServer, 0);
if (!CurrentNewsSrv)
break;
* again while reading the message.
*/
if (op == OP_DISPLAY_HEADERS)
- toggle_option(OPTWEED);
+ toggle_option(OPT_WEED);
- unset_option(OPTNEEDRESORT);
+ unset_option(OPT_NEED_RESORT);
if ((Sort & SORT_MASK) == SORT_THREADS && CURHDR->collapsed)
{
mutt_uncollapse_thread(Context, CURHDR);
mutt_set_virtual(Context);
- if (option(OPTUNCOLLAPSEJUMP))
+ if (option(OPT_UNCOLLAPSE_JUMP))
menu->current = mutt_thread_next_unread(Context, CURHDR);
}
- if (option(OPTPGPAUTODEC) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
+ if (option(OPT_PGP_AUTO_DEC) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw);
int hint = Context->hdrs[Context->v2r[menu->current]]->index;
if ((op = mutt_display_message(CURHDR)) < 0)
{
- unset_option(OPTNEEDRESORT);
+ unset_option(OPT_NEED_RESORT);
break;
}
menu->redraw |= REDRAW_STATUS;
if (tag)
menu->redraw |= REDRAW_INDEX;
- else if (option(OPTRESOLVE))
+ else if (option(OPT_RESOLVE))
{
if ((menu->current = ci_next_undeleted(menu->current)) == -1)
{
else
{
mutt_set_flag(Context, CURHDR, MUTT_FLAG, !CURHDR->flagged);
- if (option(OPTRESOLVE))
+ if (option(OPT_RESOLVE))
{
if ((menu->current = ci_next_undeleted(menu->current)) == -1)
{
else
mutt_set_flag(Context, CURHDR, MUTT_READ, 1);
- if (option(OPTRESOLVE))
+ if (option(OPT_RESOLVE))
{
if ((menu->current = ci_next_undeleted(menu->current)) == -1)
{
menu->redraw |= REDRAW_STATUS;
if (tag)
menu->redraw |= REDRAW_INDEX;
- else if (option(OPTRESOLVE))
+ else if (option(OPT_RESOLVE))
{
if ((menu->current = ci_next_undeleted(menu->current)) == -1)
{
{
menu->current = mutt_uncollapse_thread(Context, CURHDR);
mutt_set_virtual(Context);
- if (option(OPTUNCOLLAPSEJUMP))
+ if (option(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(OPTDELETEUNTAG))
+ if (option(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(OPTDELETEUNTAG))
+ if (option(OPT_DELETE_UNTAG))
mutt_set_flag(Context, CURHDR, MUTT_TAG, 0);
- if (option(OPTRESOLVE))
+ if (option(OPT_RESOLVE))
{
if ((menu->current = ci_next_undeleted(menu->current)) == -1)
{
break;
}
- if (option(OPTDELETEUNTAG))
+ if (option(OPT_DELETE_UNTAG))
mutt_thread_set_flag(CURHDR, MUTT_TAG, 0, subthread);
- if (option(OPTRESOLVE))
+ if (option(OPT_RESOLVE))
if ((menu->current = ci_next_undeleted(menu->current)) == -1)
menu->current = menu->oldcurrent;
menu->redraw |= REDRAW_INDEX | REDRAW_STATUS;
/* L10N: CHECK_ACL */
CHECK_ACL(MUTT_ACL_INSERT, _("Cannot edit message"));
- if (option(OPTPGPAUTODEC) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
+ if (option(OPT_PGP_AUTO_DEC) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw);
mutt_edit_message(Context, tag ? NULL : CURHDR);
menu->redraw = REDRAW_FULL;
CHECK_MSGCOUNT;
CHECK_VISIBLE;
CHECK_ATTACH;
- if (option(OPTPGPAUTODEC) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
+ if (option(OPT_PGP_AUTO_DEC) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw);
ci_send_message(SENDFORWARD, NULL, NULL, Context, tag ? NULL : CURHDR);
menu->redraw = REDRAW_FULL;
CHECK_MSGCOUNT;
CHECK_VISIBLE;
CHECK_ATTACH;
- if (option(OPTPGPAUTODEC) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
+ if (option(OPT_PGP_AUTO_DEC) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw);
ci_send_message(SENDREPLY | SENDGROUPREPLY, NULL, NULL, Context, tag ? NULL : CURHDR);
menu->redraw = REDRAW_FULL;
CHECK_ATTACH;
CHECK_MSGCOUNT;
CHECK_VISIBLE;
- if (option(OPTPGPAUTODEC) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
+ if (option(OPT_PGP_AUTO_DEC) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw);
ci_send_message(SENDREPLY | SENDLISTREPLY, NULL, NULL, Context, tag ? NULL : CURHDR);
menu->redraw = REDRAW_FULL;
/* 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(OPTIMAPPEEK))
+ if (Context->magic == MUTT_IMAP && !option(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(OPTIMAPPEEK))
+ if (Context->magic == MUTT_IMAP && !option(OPT_IMAP_PEEK))
{
menu->redraw |= (tag ? REDRAW_INDEX : REDRAW_CURRENT) | REDRAW_STATUS;
}
if (rc != -1)
{
- if (option(OPTRESOLVE))
+ if (option(OPT_RESOLVE))
{
if ((menu->current = (op == OP_MAIN_READ_THREAD ?
mutt_next_thread(CURHDR) :
CHECK_ATTACH;
CHECK_MSGCOUNT;
CHECK_VISIBLE;
- if (option(OPTPGPAUTODEC) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
+ if (option(OPT_PGP_AUTO_DEC) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw);
ci_send_message(SENDREPLY, NULL, NULL, Context, tag ? NULL : CURHDR);
menu->redraw = REDRAW_FULL;
if (rc != -1)
{
- if (option(OPTRESOLVE))
+ if (option(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(OPTRESOLVE) && menu->current < Context->vcount - 1)
+ if (option(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(OPTRESOLVE))
+ if (option(OPT_RESOLVE))
{
if (op == OP_UNDELETE_THREAD)
menu->current = mutt_next_thread(CURHDR);
break;
case OP_SIDEBAR_TOGGLE_VISIBLE:
- toggle_option(OPTSIDEBAR);
+ toggle_option(OPT_SIDEBAR);
mutt_reflow_windows();
break;
addch('\n');
}
- if ((!e->cc && option(OPTASKCC)) || force)
+ if ((!e->cc && option(OPT_ASK_CC)) || force)
{
addstr("Cc: ");
tmp[0] = 0;
addch('\n');
}
- if (option(OPTASKBCC) || force)
+ if (option(OPT_ASK_BCC) || force)
{
addstr("Bcc: ");
tmp[0] = 0;
buf = NULL;
bufmax = buflen = 0;
- if (option(OPTEDITHDRS))
+ if (option(OPT_EDIT_HDRS))
{
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(OPTDELETEUNTAG))
+ if (option(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(OPTFLAGSAFE)))
+ if (!h->deleted && !ctx->readonly && (!h->flagged || !option(OPT_FLAG_SAFE)))
{
h->deleted = true;
update = true;
snprintf(type, sizeof(type), "%s/%s", TYPE(b), b->subtype);
- if (option(OPTIMPLICITAUTOVIEW))
+ if (option(OPT_IMPLICIT_AUTOVIEW))
{
/* $implicit_autoview is essentially the same as "auto_view *" */
is_av = 1;
if (choice)
{
- if (s->flags & MUTT_DISPLAY && !option(OPTWEED))
+ if (s->flags & MUTT_DISPLAY && !option(OPT_WEED))
{
fseeko(s->fpin, choice->hdr_offset, SEEK_SET);
mutt_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(OPTWEED))) ?
+ ((s->flags & (MUTT_DISPLAY | MUTT_PRINTING)) && option(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(OPTWEED))
+ if (!option(OPT_WEED))
{
fseeko(s->fpin, p->hdr_offset, SEEK_SET);
mutt_copy_bytes(s->fpin, s->fpout, p->offset - p->hdr_offset);
NONULL(p->subtype));
}
- if ((s->flags & MUTT_REPLYING) && (option(OPTINCLUDEONLYFIRST)) && (s->flags & MUTT_FIRSTDONE))
+ if ((s->flags & MUTT_REPLYING) && (option(OPT_INCLUDE_ONLY_FIRST)) && (s->flags & MUTT_FIRSTDONE))
break;
}
}
mutt_copy_hdr(s->fpin, s->fpout, ftello(s->fpin), b->parts->offset,
- (option(OPTWEED) ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE, NULL);
+ (option(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(OPTWEED) ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE | CH_DISPLAY,
+ (option(OPT_WEED) ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE | CH_DISPLAY,
NULL);
}
}
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(OPTWEED) ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE | CH_DISPLAY,
+ (option(OPT_WEED) ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE | CH_DISPLAY,
NULL);
}
}
while ((buf = mutt_read_line(buf, &sz, s->fpin, NULL, 0)))
{
- if ((mutt_strcmp(buf, "-- ") != 0) && option(OPTTEXTFLOWED))
+ if ((mutt_strcmp(buf, "-- ") != 0) && option(OPT_TEXT_FLOWED))
{
l = mutt_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(OPTREFLOWTEXT) &&
+ else if (option(OPT_REFLOW_TEXT) &&
(ascii_strcasecmp("flowed", mutt_get_parameter("format", b->parameter)) == 0))
handler = rfc3676_handler;
else
}
else if (WithCrypto && b->type == TYPEAPPLICATION)
{
- if (option(OPTDONTHANDLEPGPKEYS) && (ascii_strcasecmp("pgp-keys", b->subtype) == 0))
+ if (option(OPT_DONT_HANDLE_PGP_KEYS) && (ascii_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(OPTHONORDISP) || (b->disposition != DISPATTACH || option(OPTVIEWATTACH))) &&
+ if ((!option(OPT_HONOR_DISP) || (b->disposition != DISPATTACH || option(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(OPTVIEWATTACH) &&
- option(OPTHONORDISP) && (plaintext || handler)))
+ (b->disposition == DISPATTACH && !option(OPT_VIEW_ATTACH) &&
+ option(OPT_HONOR_DISP) && (plaintext || handler)))
{
state_mark_attach(s);
- if (option(OPTHONORDISP) && b->disposition == DISPATTACH)
+ if (option(OPT_HONOR_DISP) && b->disposition == DISPATTACH)
fputs(_("[-- This is an attachment "), s->fpout);
else
state_printf(s, _("[-- %s/%s is unsupported "), TYPE(b), b->subtype);
- if (!option(OPTVIEWATTACH))
+ if (!option(OPT_VIEW_ATTACH))
{
char keystroke[SHORT_STRING];
printfresult =
snprintf(kcdbpath, sizeof(kcdbpath), "%s#type=kct#opts=%s#rcomp=lex",
- path, option(OPTHCACHECOMPRESS) ? "lc" : "l");
+ path, option(OPT_HCACHE_COMPRESS) ? "lc" : "l");
if ((printfresult < 0) || (printfresult >= sizeof(kcdbpath)))
{
return NULL;
{
int flags = VL_OWRITER | VL_OCREAT;
- if (option(OPTHCACHECOMPRESS))
+ if (option(OPT_HCACHE_COMPRESS))
flags |= VL_OZCOMP;
return vlopen(path, flags, VL_CMPLEX);
TCBDB *db = tcbdbnew();
if (!db)
return NULL;
- if (option(OPTHCACHECOMPRESS))
+ if (option(OPT_HCACHE_COMPRESS))
tcbdbtune(db, 0, 0, 0, -1, -1, BDBTDEFLATE);
if (tcbdbopen(db, path, BDBOWRITER | BDBOCREAT))
return db;
if (!optional)
{
make_from_addr(hdr->env, buf2, sizeof(buf2), 1);
- if (!option(OPTSAVEADDRESS) && (p = strpbrk(buf2, "%@")))
+ if (!option(OPT_SAVE_ADDRESS) && (p = strpbrk(buf2, "%@")))
*p = 0;
mutt_format_s(dest, destlen, prefix, buf2);
}
we can simply compare strings as we don't generate References for
multiple Message-Ids in IRT anyways */
#ifdef USE_NNTP
- if (!option(OPTNEWSSEND))
+ if (!option(OPT_NEWS_SEND))
#endif
if (msg->env->in_reply_to &&
(!n->in_reply_to ||
else
{
n += col - MuttIndexWindow->cols;
- if (option(OPTMARKERS))
+ if (option(OPT_MARKERS))
n++;
}
col = pad(f, n, col_b);
if ((f = fopen(HistFile, "r")) == NULL)
return;
- if (option(OPTHISTREMOVEDUPS))
+ if (option(OPT_HIST_REMOVE_DUPS))
for (hclass = 0; hclass < HC_LAST; hclass++)
dup_hashes[hclass] = hash_create(MAX(10, SaveHist * 2), MUTT_HASH_STRDUP_KEYS);
if (hclass >= HC_LAST)
continue;
*p = '\0';
- if (option(OPTHISTREMOVEDUPS) && (dup_hash_inc(dup_hashes[hclass], linebuf + read) > 1))
+ if (option(OPT_HIST_REMOVE_DUPS) && (dup_hash_inc(dup_hashes[hclass], linebuf + read) > 1))
{
regen_file = true;
continue;
if (hclass >= HC_LAST)
continue;
*p = '\0';
- if (option(OPTHISTREMOVEDUPS) &&
+ if (option(OPT_HIST_REMOVE_DUPS) &&
(dup_hash_dec(dup_hashes[hclass], linebuf + read) > 0))
continue;
*p = '|';
safe_fclose(&tmp);
unlink(tmpfname);
}
- if (option(OPTHISTREMOVEDUPS))
+ if (option(OPT_HIST_REMOVE_DUPS))
for (hclass = 0; hclass < HC_LAST; hclass++)
hash_destroy(&dup_hashes[hclass], NULL);
}
*/
if (*s != ' ' && (!h->hist[prev] || (mutt_strcmp(h->hist[prev], s) != 0)))
{
- if (option(OPTHISTREMOVEDUPS))
+ if (option(OPT_HIST_REMOVE_DUPS))
remove_history_dups(hclass, s);
if (save && SaveHist)
save_history(hclass, s);
if (addr_hook(path, pathlen, MUTT_FCCHOOK, NULL, hdr) != 0)
{
- if ((option(OPTSAVENAME) || option(OPTFORCENAME)) && (env->to || env->cc || env->bcc))
+ if ((option(OPT_SAVE_NAME) || option(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_concat_path(path, NONULL(Maildir), buf, pathlen);
- if (!option(OPTFORCENAME) && mx_access(path, W_OK) != 0)
+ if (!option(OPT_FORCE_NAME) && mx_access(path, W_OK) != 0)
strfcpy(path, NONULL(Outbox), pathlen);
}
else
return -1;
}
- save_lsub = option(OPTIMAPCHECKSUBSCRIBED);
- unset_option(OPTIMAPCHECKSUBSCRIBED);
- strfcpy(list_cmd, option(OPTIMAPLSUB) ? "LSUB" : "LIST", sizeof(list_cmd));
+ save_lsub = option(OPT_IMAP_CHECK_SUBSCRIBED);
+ unset_option(OPT_IMAP_CHECK_SUBSCRIBED);
+ strfcpy(list_cmd, option(OPT_IMAP_LSUB) ? "LSUB" : "LIST", sizeof(list_cmd));
if (!(idata = imap_conn_find(&(mx.account), 0)))
goto fail;
mutt_clear_error();
if (save_lsub)
- set_option(OPTIMAPCHECKSUBSCRIBED);
+ set_option(OPT_IMAP_CHECK_SUBSCRIBED);
FREE(&mx.mbox);
return 0;
fail:
if (save_lsub)
- set_option(OPTIMAPCHECKSUBSCRIBED);
+ set_option(OPT_IMAP_CHECK_SUBSCRIBED);
FREE(&mx.mbox);
return -1;
}
return;
}
- if (!option(OPTIMAPCHECKSUBSCRIBED))
+ if (!option(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(OPTMAILCHECKRECENT))
+ if (option(OPT_MAIL_CHECK_RECENT))
{
if (olduv && olduv == status->uidvalidity)
{
return -1;
}
- else if (option(OPTIMAPSERVERNOISE) && (ascii_strncasecmp("NO", s, 2) == 0))
+ else if (option(OPT_IMAP_SERVER_NOISE) && (ascii_strncasecmp("NO", s, 2) == 0))
{
mutt_debug(2, "Handling untagged NO\n");
if (imap_parse_path(path, &mx))
return -1;
- if (!(idata = imap_conn_find(&mx.account, option(OPTIMAPPASSIVE) ? MUTT_IMAP_CONN_NONEW : 0)))
+ if (!(idata = imap_conn_find(&mx.account, option(OPT_IMAP_PASSIVE) ? MUTT_IMAP_CONN_NONEW : 0)))
{
FREE(&mx.mbox);
return -1;
if (!ctx || !ctx->data)
{
- if (!(idata = imap_conn_find(&mx->account, option(OPTIMAPPASSIVE) ? MUTT_IMAP_CONN_NONEW : 0)))
+ if (!(idata = imap_conn_find(&mx->account, option(OPT_IMAP_PASSIVE) ? MUTT_IMAP_CONN_NONEW : 0)))
{
FREE(&mx->mbox);
return -1;
/* get root delimiter, '/' as default */
idata->delim = '/';
imap_exec(idata, "LIST \"\" \"\"", IMAP_CMD_QUEUE);
- if (option(OPTIMAPCHECKSUBSCRIBED))
+ if (option(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(OPTSSLFORCETLS) || mutt_bit_isset(idata->capabilities, STARTTLS)))
+ (option(OPT_SSL_FORCE_TLS) || mutt_bit_isset(idata->capabilities, STARTTLS)))
{
int rc;
- if (option(OPTSSLFORCETLS))
+ if (option(OPT_SSL_FORCE_TLS))
rc = MUTT_YES;
else if ((rc = query_quadoption(OPT_SSLSTARTTLS,
_("Secure connection with TLS?"))) == MUTT_ABORT)
}
}
- if (option(OPTSSLFORCETLS) && !idata->conn->ssf)
+ if (option(OPT_SSL_FORCE_TLS) && !idata->conn->ssf)
{
mutt_error(_("Encrypted connection unavailable"));
mutt_sleep(1);
return -1;
snprintf(buf, sizeof(buf), _("Create %s?"), mailbox);
- if (option(OPTCONFIRMCREATE) && mutt_yesorno(buf, 1) != MUTT_YES)
+ if (option(OPT_CONFIRM_CREATE) && mutt_yesorno(buf, 1) != MUTT_YES)
return -1;
if (imap_create_mailbox(idata, mailbox) < 0)
idata->state = IMAP_AUTHENTICATED;
}
- if (option(OPTMESSAGECACHECLEAN))
+ if (option(OPT_MESSAGE_CACHE_CLEAN))
imap_cache_clean(idata);
rc = 0;
int result = 0;
/* try IDLE first, unless force is set */
- if (!force && option(OPTIMAPIDLE) && mutt_bit_isset(idata->capabilities, IDLE) &&
+ if (!force && option(OPT_IMAP_IDLE) && mutt_bit_isset(idata->capabilities, IDLE) &&
(idata->state != IMAP_IDLE || time(NULL) >= idata->lastread + ImapKeepalive))
{
if (imap_cmd_idle(idata) < 0)
mutt_debug(1, "imap_get_mailbox: Error parsing %s\n", path);
return -1;
}
- if (!(*hidata = imap_conn_find(&(mx.account), option(OPTIMAPPASSIVE) ? MUTT_IMAP_CONN_NONEW : 0)) ||
+ if (!(*hidata = imap_conn_find(&(mx.account), option(OPT_IMAP_PASSIVE) ? MUTT_IMAP_CONN_NONEW : 0)) ||
(*hidata)->state < IMAP_AUTHENTICATED)
{
FREE(&mx.mbox);
if (!*buf)
strfcpy(buf, "INBOX", sizeof(buf));
- if (option(OPTIMAPCHECKSUBSCRIBED))
+ if (option(OPT_IMAP_CHECK_SUBSCRIBED))
{
mutt_buffer_init(&token);
mutt_buffer_init(&err);
list[0] = '\0';
/* fire off command */
- snprintf(buf, sizeof(buf), "%s \"\" \"%s%%\"", option(OPTIMAPLSUB) ? "LSUB" : "LIST", list);
+ snprintf(buf, sizeof(buf), "%s \"\" \"%s%%\"", option(OPT_IMAP_LSUB) ? "LSUB" : "LIST", list);
imap_cmd_start(idata, buf);
break;
mutt_debug(3, "imap_fast_trash: server suggests TRYCREATE\n");
snprintf(prompt, sizeof(prompt), _("Create %s?"), mbox);
- if (option(OPTCONFIRMCREATE) && mutt_yesorno(prompt, 1) != MUTT_YES)
+ if (option(OPT_CONFIRM_CREATE) && mutt_yesorno(prompt, 1) != MUTT_YES)
{
mutt_clear_error();
goto out;
else if (ascii_strncasecmp("old", s, 3) == 0)
{
s += 3;
- hd->old = option(OPTMARKOLD) ? true : false;
+ hd->old = option(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(OPTIMAPPEEK) ? "BODY.PEEK[]" : "BODY[]") :
+ (option(OPT_IMAP_PEEK) ? "BODY.PEEK[]" : "BODY[]") :
"RFC822"));
imap_cmd_start(idata, buf);
break;
mutt_debug(3, "imap_copy_messages: server suggests TRYCREATE\n");
snprintf(prompt, sizeof(prompt), _("Create %s?"), mbox);
- if (option(OPTCONFIRMCREATE) && mutt_yesorno(prompt, 1) != MUTT_YES)
+ if (option(OPT_CONFIRM_CREATE) && mutt_yesorno(prompt, 1) != MUTT_YES)
{
mutt_clear_error();
goto out;
{
mutt_set_flag(ctx, ctx->hdrs[n], MUTT_DELETE, 1);
mutt_set_flag(ctx, ctx->hdrs[n], MUTT_PURGE, 1);
- if (option(OPTDELETEUNTAG))
+ if (option(OPT_DELETE_UNTAG))
mutt_set_flag(ctx, ctx->hdrs[n], MUTT_TAG, 0);
}
}
{
mutt_set_flag(ctx, h, MUTT_DELETE, 1);
mutt_set_flag(ctx, h, MUTT_PURGE, 1);
- if (option(OPTDELETEUNTAG))
+ if (option(OPT_DELETE_UNTAG))
mutt_set_flag(ctx, h, MUTT_TAG, 0);
}
}
sigset_t oldmask;
int rc;
- short imap_passive = option(OPTIMAPPASSIVE);
+ short imap_passive = option(OPT_IMAP_PASSIVE);
- set_option(OPTIMAPPASSIVE);
- set_option(OPTKEEPQUIET);
+ set_option(OPT_IMAP_PASSIVE);
+ set_option(OPT_KEEP_QUIET);
sigprocmask(SIG_SETMASK, NULL, &oldmask);
sigaction(SIGALRM, &oldalrm, NULL);
sigprocmask(SIG_SETMASK, &oldmask, NULL);
- unset_option(OPTKEEPQUIET);
+ unset_option(OPT_KEEP_QUIET);
if (!imap_passive)
- unset_option(OPTIMAPPASSIVE);
+ unset_option(OPT_IMAP_PASSIVE);
return rc;
}
tmp->name = safe_strdup(buf->data);
/* give the main addressbook code a chance */
if (CurrentMenu == MENU_ALIAS)
- set_option(OPTMENUCALLER);
+ set_option(OPT_MENU_CALLER);
}
else
{
mutt_set_menu_redraw(MENU_PAGER, REDRAW_FLOW);
}
if (p->flags & R_RESORT_SUB)
- set_option(OPTSORTSUBTHREADS);
+ set_option(OPT_SORT_SUBTHREADS);
if (p->flags & R_RESORT)
- set_option(OPTNEEDRESORT);
+ set_option(OPT_NEED_RESORT);
if (p->flags & R_RESORT_INIT)
- set_option(OPTRESORTINIT);
+ set_option(OPT_RESORT_INIT);
if (p->flags & R_TREE)
- set_option(OPTREDRAWTREE);
+ set_option(OPT_REDRAW_TREE);
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(OPTSORTSUBTHREADS);
- set_option(OPTNEEDRESORT);
- set_option(OPTRESORTINIT);
- set_option(OPTREDRAWTREE);
+ set_option(OPT_SORT_SUBTHREADS);
+ set_option(OPT_NEED_RESORT);
+ set_option(OPT_RESORT_INIT);
+ set_option(OPT_REDRAW_TREE);
return 0;
}
else
break;
}
- if (option(OPTATTACHMSG) &&
+ if (option(OPT_ATTACH_MSG) &&
(mutt_strcmp(MuttVars[idx].option, "reply_regexp") == 0))
{
snprintf(err->data, err->dsize,
mutt_set_menu_redraw(MENU_PAGER, REDRAW_FLOW);
}
if (MuttVars[idx].flags & R_RESORT_SUB)
- set_option(OPTSORTSUBTHREADS);
+ set_option(OPT_SORT_SUBTHREADS);
if (MuttVars[idx].flags & R_RESORT)
- set_option(OPTNEEDRESORT);
+ set_option(OPT_NEED_RESORT);
if (MuttVars[idx].flags & R_RESORT_INIT)
- set_option(OPTRESORTINIT);
+ set_option(OPT_RESORT_INIT);
if (MuttVars[idx].flags & R_TREE)
- set_option(OPTREDRAWTREE);
+ set_option(OPT_REDRAW_TREE);
if (MuttVars[idx].flags & R_REFLOW)
mutt_reflow_windows();
#ifdef USE_SIDEBAR
/* Do we have a locale definition? */
if (((p = getenv("LC_ALL")) != NULL && p[0]) || ((p = getenv("LANG")) != NULL && p[0]) ||
((p = getenv("LC_CTYPE")) != NULL && p[0]))
- set_option(OPTLOCALES);
+ set_option(OPT_LOCALES);
#endif
#ifdef HAVE_GETSID
/* Unset suspend by default if we're the session leader */
if (getsid(0) == getpid())
- unset_option(OPTSUSPEND);
+ unset_option(OPT_SUSPEND);
#endif
mutt_init_history();
{
if (config->data)
{
- if (!option(OPTNOCURSES))
+ if (!option(OPT_NO_CURSES))
endwin();
if (source_rc(config->data, &err) != 0)
{
if (execute_commands(commands) != 0)
need_pause = 1;
- if (need_pause && !option(OPTNOCURSES))
+ if (need_pause && !option(OPT_NO_CURSES))
{
if (mutt_any_key_to_continue(NULL) == -1)
mutt_exit(1);
mutt_read_histfile();
#ifdef USE_NOTMUCH
- if (option(OPTVIRTSPOOLFILE))
+ if (option(OPT_VIRT_SPOOL_FILE))
{
/* Find the first virtual folder and open it */
for (struct Buffy *b = Incoming; b; b = b->next)
** .dt %t .dd character which indicates if the alias is tagged for inclusion
** .de
*/
- { "allow_8bit", DT_BOOL, R_NONE, OPTALLOW8BIT, 1 },
+ { "allow_8bit", DT_BOOL, R_NONE, 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, OPTALLOWANSI, 0 },
+ { "allow_ansi", DT_BOOL, R_NONE, 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, OPTARROWCURSOR, 0 },
+ { "arrow_cursor", DT_BOOL, R_MENU, 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, OPTASCIICHARS, 0 },
+ { "ascii_chars", DT_BOOL, R_BOTH, OPT_ASCII_CHARS, 0 },
/*
** .pp
** If \fIset\fP, Mutt will use plain ASCII characters when displaying thread
** and attachment trees, instead of the default \fIACS\fP characters.
*/
- { "askbcc", DT_BOOL, R_NONE, OPTASKBCC, 0 },
+ { "askbcc", DT_BOOL, R_NONE, OPT_ASK_BCC, 0 },
/*
** .pp
** If \fIset\fP, Mutt will prompt you for blind-carbon-copy (Bcc) recipients
** before editing an outgoing message.
*/
- { "askcc", DT_BOOL, R_NONE, OPTASKCC, 0 },
+ { "askcc", DT_BOOL, R_NONE, OPT_ASK_CC, 0 },
/*
** .pp
** If \fIset\fP, Mutt 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, OPTASKFOLLOWUP, 0 },
+ { "ask_follow_up", DT_BOOL, R_NONE, OPT_ASK_FOLLOWUP, 0 },
/*
** .pp
** If set, Mutt will prompt you for follow-up groups before editing
** the body of an outgoing message.
*/
- { "ask_x_comment_to", DT_BOOL, R_NONE, OPTASKXCOMMENTTO, 0 },
+ { "ask_x_comment_to", DT_BOOL, R_NONE, OPT_ASK_XCOMMENTTO, 0 },
/*
** .pp
** If set, Mutt 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, OPTATTACHSPLIT, 1 },
+ { "attach_split", DT_BOOL, R_NONE, 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, OPTAUTOTAG, 0 },
+ { "auto_tag", DT_BOOL, R_NONE, 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, OPTAUTOEDIT, 0 },
+ { "autoedit", DT_BOOL, R_NONE, OPT_AUTO_EDIT, 0 },
/*
** .pp
** When \fIset\fP along with $$edit_headers, Mutt will skip the initial
** .pp
** Also see $$fast_reply.
*/
- { "beep", DT_BOOL, R_NONE, OPTBEEP, 1 },
+ { "beep", DT_BOOL, R_NONE, OPT_BEEP, 1 },
/*
** .pp
** When this variable is \fIset\fP, mutt will beep when an error occurs.
*/
- { "beep_new", DT_BOOL, R_NONE, OPTBEEPNEW, 0 },
+ { "beep_new", DT_BOOL, R_NONE, OPT_BEEP_NEW, 0 },
/*
** .pp
** When this variable is \fIset\fP, mutt will beep whenever it prints a message
** 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, OPTBOUNCEDELIVERED, 1 },
+ { "bounce_delivered", DT_BOOL, R_NONE, OPT_BOUNCE_DELIVERED, 1 },
/*
** .pp
** When this variable is \fIset\fP, mutt will include Delivered-To headers when
** bouncing messages. Postfix users may wish to \fIunset\fP this variable.
*/
- { "braille_friendly", DT_BOOL, R_NONE, OPTBRAILLEFRIENDLY, 0 },
+ { "braille_friendly", DT_BOOL, R_NONE, OPT_BRAILLE_FRIENDLY, 0 },
/*
** .pp
** When this variable is \fIset\fP, mutt will place the cursor at the beginning
** \fBNote:\fP It should only be set in case Mutt isn't able to determine the
** character set used correctly.
*/
- { "check_mbox_size", DT_BOOL, R_NONE, OPTCHECKMBOXSIZE, 0 },
+ { "check_mbox_size", DT_BOOL, R_NONE, OPT_CHECK_MBOX_SIZE, 0 },
/*
** .pp
** When this variable is \fIset\fP, mutt 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, OPTCHECKNEW, 1 },
+ { "check_new", DT_BOOL, R_NONE, 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, OPTCOLLAPSEUNREAD, 1 },
+ { "collapse_unread", DT_BOOL, R_NONE, OPT_COLLAPSE_UNREAD, 1 },
/*
** .pp
** When \fIunset\fP, Mutt will not collapse a thread if it contains any
** unread messages.
*/
- { "collapse_flagged", DT_BOOL, R_NONE, OPTCOLLAPSEFLAGGED, 1 },
+ { "collapse_flagged", DT_BOOL, R_NONE, OPT_COLLAPSE_FLAGGED, 1 },
/*
** .pp
** When \fIunset\fP, Mutt 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, OPTCONFIRMAPPEND, 1 },
+ { "confirmappend", DT_BOOL, R_NONE, OPT_CONFIRM_APPEND, 1 },
/*
** .pp
** When \fIset\fP, Mutt will prompt for confirmation when appending messages to
** an existing mailbox.
*/
- { "confirmcreate", DT_BOOL, R_NONE, OPTCONFIRMCREATE, 1 },
+ { "confirmcreate", DT_BOOL, R_NONE, OPT_CONFIRM_CREATE, 1 },
/*
** .pp
** When \fIset\fP, Mutt will prompt for confirmation when saving messages to a
** $$save_name, $$force_name and ``$fcc-hook''.
*/
{ "pgp_autoencrypt", DT_SYN, R_NONE, UL "crypt_autoencrypt", 0 },
- { "crypt_autoencrypt", DT_BOOL, R_NONE, OPTCRYPTAUTOENCRYPT, 0 },
+ { "crypt_autoencrypt", DT_BOOL, R_NONE, OPT_CRYPT_AUTO_ENCRYPT, 0 },
/*
** .pp
** Setting this variable will cause Mutt to always attempt to PGP
** settings can be overridden by use of the smime menu instead.
** (Crypto only)
*/
- { "crypt_autopgp", DT_BOOL, R_NONE, OPTCRYPTAUTOPGP, 1 },
+ { "crypt_autopgp", DT_BOOL, R_NONE, OPT_CRYPT_AUTO_PGP, 1 },
/*
** .pp
** This variable controls whether or not mutt may automatically enable
** $$crypt_autosign, $$crypt_replysign and $$smime_is_default.
*/
{ "pgp_autosign", DT_SYN, R_NONE, UL "crypt_autosign", 0 },
- { "crypt_autosign", DT_BOOL, R_NONE, OPTCRYPTAUTOSIGN, 0 },
+ { "crypt_autosign", DT_BOOL, R_NONE, OPT_CRYPT_AUTO_SIGN, 0 },
/*
** .pp
** Setting this variable will cause Mutt 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, OPTCRYPTAUTOSMIME, 1 },
+ { "crypt_autosmime", DT_BOOL, R_NONE, OPT_CRYPT_AUTO_SMIME, 1 },
/*
** .pp
** This variable controls whether or not mutt may automatically enable
** $$crypt_replyencrypt,
** $$crypt_autosign, $$crypt_replysign and $$smime_is_default.
*/
- { "crypt_confirmhook", DT_BOOL, R_NONE, OPTCRYPTCONFIRMHOOK, 1 },
+ { "crypt_confirmhook", DT_BOOL, R_NONE, OPT_CRYPT_CONFIRM_HOOK, 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, OPTCRYPTOPPORTUNISTICENCRYPT, 0 },
+ { "crypt_opportunistic_encrypt", DT_BOOL, R_NONE, OPT_CRYPT_OPPORTUNISTIC_ENCRYPT, 0 },
/*
** .pp
** Setting this variable will cause Mutt to automatically enable and
** (Crypto only)
*/
{ "pgp_replyencrypt", DT_SYN, R_NONE, UL "crypt_replyencrypt", 1 },
- { "crypt_replyencrypt", DT_BOOL, R_NONE, OPTCRYPTREPLYENCRYPT, 1 },
+ { "crypt_replyencrypt", DT_BOOL, R_NONE, OPT_CRYPT_REPLY_ENCRYPT, 1 },
/*
** .pp
** If \fIset\fP, automatically PGP or OpenSSL encrypt replies to messages which are
** (Crypto only)
*/
{ "pgp_replysign", DT_SYN, R_NONE, UL "crypt_replysign", 0 },
- { "crypt_replysign", DT_BOOL, R_NONE, OPTCRYPTREPLYSIGN, 0 },
+ { "crypt_replysign", DT_BOOL, R_NONE, OPT_CRYPT_REPLY_SIGN, 0 },
/*
** .pp
** If \fIset\fP, automatically PGP or OpenSSL sign replies to messages which are
** (Crypto only)
*/
{ "pgp_replysignencrypted", DT_SYN, R_NONE, UL "crypt_replysignencrypted", 0 },
- { "crypt_replysignencrypted", DT_BOOL, R_NONE, OPTCRYPTREPLYSIGNENCRYPTED, 0 },
+ { "crypt_replysignencrypted", DT_BOOL, R_NONE, OPT_CRYPT_REPLY_SIGN_ENCRYPTED, 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, OPTCRYPTTIMESTAMP, 1 },
+ { "crypt_timestamp", DT_BOOL, R_NONE, OPT_CRYPT_TIMESTAMP, 1 },
/*
** .pp
** If \fIset\fP, mutt will include a time stamp in the lines surrounding
** you may \fIunset\fP this setting.
** (Crypto only)
*/
- { "crypt_use_gpgme", DT_BOOL, R_NONE, OPTCRYPTUSEGPGME, 0 },
+ { "crypt_use_gpgme", DT_BOOL, R_NONE, 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, OPTCRYPTUSEPKA, 0 },
+ { "crypt_use_pka", DT_BOOL, R_NONE, OPT_CRYPT_USE_PKA, 0 },
/*
** .pp
** Controls whether mutt uses PKA
** 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, OPTDELETEUNTAG, 1 },
+ { "delete_untag", DT_BOOL, R_NONE, OPT_DELETE_UNTAG, 1 },
/*
** .pp
** If this option is \fIset\fP, mutt 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, OPTDIGESTCOLLAPSE, 1 },
+ { "digest_collapse", DT_BOOL, R_NONE, OPT_DIGEST_COLLAPSE, 1 },
/*
** .pp
** If this option is \fIset\fP, mutt'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, OPTDUPTHREADS, 1 },
+ { "duplicate_threads", DT_BOOL, R_RESORT|R_RESORT_INIT|R_INDEX, OPT_DUP_THREADS, 1 },
/*
** .pp
** This variable controls whether mutt, 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, OPTEDITHDRS, 0 },
+ { "edit_headers", DT_BOOL, R_NONE, OPT_EDIT_HDRS, 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, OPTENCODEFROM, 0 },
+ { "encode_from", DT_BOOL, R_NONE, OPT_ENCODE_FROM, 0 },
/*
** .pp
** When \fIset\fP, mutt will quoted-printable encode messages when
** .pp
** Escape character to use for functions in the built-in editor.
*/
- { "fast_reply", DT_BOOL, R_NONE, OPTFASTREPLY, 0 },
+ { "fast_reply", DT_BOOL, R_NONE, OPT_FAST_REPLY, 0 },
/*
** .pp
** When \fIset\fP, the initial prompt for recipients and subject are skipped
** 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, OPTFCCCLEAR, 0 },
+ { "fcc_clear", DT_BOOL, R_NONE, 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, OPTFLAGSAFE, 0 },
+ { "flag_safe", DT_BOOL, R_NONE, 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, OPTFOLLOWUPTO, 1 },
+ { "followup_to", DT_BOOL, R_NONE, OPT_FOLLOW_UP_TO, 1 },
/*
** .pp
** Controls whether or not the ``Mail-Followup-To:'' header field is
** message via mail.
*/
#endif
- { "force_name", DT_BOOL, R_NONE, OPTFORCENAME, 0 },
+ { "force_name", DT_BOOL, R_NONE, OPT_FORCE_NAME, 0 },
/*
** .pp
** This variable is similar to $$save_name, except that Mutt 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, OPTFORWDECODE, 1 },
+ { "forward_decode", DT_BOOL, R_NONE, OPT_FORW_DECODE, 1 },
/*
** .pp
** Controls the decoding of complex MIME messages into \fCtext/plain\fP when
{ "forw_decode", DT_SYN, R_NONE, UL "forward_decode", 0 },
/*
*/
- { "forward_decrypt", DT_BOOL, R_NONE, OPTFORWDECRYPT, 1 },
+ { "forward_decrypt", DT_BOOL, R_NONE, OPT_FORW_DECRYPT, 1 },
/*
** .pp
** Controls the handling of encrypted messages when forwarding a message.
{ "forw_format", DT_SYN, R_NONE, UL "forward_format", 0 },
/*
*/
- { "forward_quote", DT_BOOL, R_NONE, OPTFORWQUOTE, 0 },
+ { "forward_quote", DT_BOOL, R_NONE, OPT_FORW_QUOTE, 0 },
/*
** .pp
** When \fIset\fP, forwarded messages included in the main body of the
{ "forw_quote", DT_SYN, R_NONE, UL "forward_quote", 0 },
/*
*/
- { "forward_references", DT_BOOL, R_NONE, OPTFORWREF, 0 },
+ { "forward_references", DT_BOOL, R_NONE, OPT_FORW_REF, 0 },
/*
** .pp
** When \fIset\fP, forwarded messages set the ``In-Reply-To:'' and
{ "hdr_format", DT_SYN, R_NONE, UL "index_format", 0 },
/*
*/
- { "hdrs", DT_BOOL, R_NONE, OPTHDRS, 1 },
+ { "hdrs", DT_BOOL, R_NONE, 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, OPTHEADER, 0 },
+ { "header", DT_BOOL, R_NONE, OPT_HEADER, 0 },
/*
** .pp
** When \fIset\fP, this variable causes Mutt 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, OPTHCACHECOMPRESS, 1 },
+ { "header_cache_compress", DT_BOOL, R_NONE, OPT_HCACHE_COMPRESS, 1 },
/*
** .pp
** When mutt is compiled with qdbm, tokyocabinet or kyotocabinet
*/
#endif /* HAVE_GDBM || HAVE_BDB */
#endif /* USE_HCACHE */
- { "header_color_partial", DT_BOOL, R_PAGER_FLOW, OPTHEADERCOLORPARTIAL, 0 },
+ { "header_color_partial", DT_BOOL, R_PAGER_FLOW, OPT_HEADER_COLOR_PARTIAL, 0 },
/*
** .pp
** When \fIset\fP, color header regexps behave like color body regexps:
** .pp
** See ``$color'' for more details.
*/
- { "help", DT_BOOL, R_REFLOW, OPTHELP, 1 },
+ { "help", DT_BOOL, R_REFLOW, 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, OPTHIDDENHOST, 0 },
+ { "hidden_host", DT_BOOL, R_NONE, OPT_HIDDEN_HOST, 0 },
/*
** .pp
** When \fIset\fP, mutt 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, OPTHIDELIMITED, 0 },
+ { "hide_limited", DT_BOOL, R_TREE|R_INDEX, OPT_HIDE_LIMITED, 0 },
/*
** .pp
** When \fIset\fP, mutt will not show the presence of messages that are hidden
** by limiting, in the thread tree.
*/
- { "hide_missing", DT_BOOL, R_TREE|R_INDEX, OPTHIDEMISSING, 1 },
+ { "hide_missing", DT_BOOL, R_TREE|R_INDEX, OPT_HIDE_MISSING, 1 },
/*
** .pp
** When \fIset\fP, mutt will not show the presence of missing messages in the
** thread tree.
*/
- { "hide_thread_subject", DT_BOOL, R_TREE|R_INDEX, OPTHIDETHREADSUBJECT, 1 },
+ { "hide_thread_subject", DT_BOOL, R_TREE|R_INDEX, OPT_HIDE_THREAD_SUBJECT, 1 },
/*
** .pp
** When \fIset\fP, mutt 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, OPTHIDETOPLIMITED, 0 },
+ { "hide_top_limited", DT_BOOL, R_TREE|R_INDEX, OPT_HIDE_TOP_LIMITED, 0 },
/*
** .pp
** When \fIset\fP, mutt 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, OPTHIDETOPMISSING, 1 },
+ { "hide_top_missing", DT_BOOL, R_TREE|R_INDEX, OPT_HIDE_TOP_MISSING, 1 },
/*
** .pp
** When \fIset\fP, mutt will not show the presence of missing messages at the
** .pp
** Also see $$save_history.
*/
- { "history_remove_dups", DT_BOOL, R_NONE, OPTHISTREMOVEDUPS, 0 },
+ { "history_remove_dups", DT_BOOL, R_NONE, OPT_HIST_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, OPTHONORDISP, 0 },
+ { "honor_disposition", DT_BOOL, R_NONE, OPT_HONOR_DISP, 0 },
/*
** .pp
** When \fIset\fP, Mutt will not display attachments with a
** Also see $$use_domain and $$hidden_host.
*/
#ifdef HAVE_LIBIDN
- { "idn_decode", DT_BOOL, R_MENU, OPTIDNDECODE, 1 },
+ { "idn_decode", DT_BOOL, R_MENU, OPT_IDN_DECODE, 1 },
/*
** .pp
** When \fIset\fP, Mutt 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, OPTIDNENCODE, 1 },
+ { "idn_encode", DT_BOOL, R_MENU, OPT_IDN_ENCODE, 1 },
/*
** .pp
** When \fIset\fP, Mutt will encode international domain names using
** UTF-8 encoded domains. (IDN only)
*/
#endif /* HAVE_LIBIDN */
- { "ignore_linear_white_space", DT_BOOL, R_NONE, OPTIGNORELWS, 0 },
+ { "ignore_linear_white_space", DT_BOOL, R_NONE, OPT_IGNORE_LWS, 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, OPTIGNORELISTREPLYTO, 0 },
+ { "ignore_list_reply_to", DT_BOOL, R_NONE, 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, mutt will not connect to the IMAP server.
*/
- { "imap_check_subscribed", DT_BOOL, R_NONE, OPTIMAPCHECKSUBSCRIBED, 0 },
+ { "imap_check_subscribed", DT_BOOL, R_NONE, OPT_IMAP_CHECK_SUBSCRIBED, 0 },
/*
** .pp
** When \fIset\fP, mutt 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, OPTIMAPIDLE, 0 },
+ { "imap_idle", DT_BOOL, R_NONE, OPT_IMAP_IDLE, 0 },
/*
** .pp
** When \fIset\fP, mutt 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, OPTIMAPLSUB, 0 },
+ { "imap_list_subscribed", DT_BOOL, R_NONE, OPT_IMAP_LSUB, 0 },
/*
** .pp
** This variable configures whether IMAP folder browsing will look for
** fairly secure machine, because the superuser can read your muttrc even
** if you are the only one who can read the file.
*/
- { "imap_passive", DT_BOOL, R_NONE, OPTIMAPPASSIVE, 1 },
+ { "imap_passive", DT_BOOL, R_NONE, OPT_IMAP_PASSIVE, 1 },
/*
** .pp
** When \fIset\fP, mutt will not open new IMAP connections to check for new
** user/password pairs on mutt invocation, or if opening the connection
** is slow.
*/
- { "imap_peek", DT_BOOL, R_NONE, OPTIMAPPEEK, 1 },
+ { "imap_peek", DT_BOOL, R_NONE, OPT_IMAP_PEEK, 1 },
/*
** .pp
** When \fIset\fP, mutt will avoid implicitly marking your mail as read whenever
** .pp
** \fBNote:\fP Changes to this variable have no effect on open connections.
*/
- { "imap_servernoise", DT_BOOL, R_NONE, OPTIMAPSERVERNOISE, 1 },
+ { "imap_servernoise", DT_BOOL, R_NONE, OPT_IMAP_SERVER_NOISE, 1 },
/*
** .pp
** When \fIset\fP, mutt 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, OPTIMPLICITAUTOVIEW, 0 },
+ { "implicit_autoview", DT_BOOL,R_NONE, OPT_IMPLICIT_AUTOVIEW, 0 },
/*
** .pp
** If set to ``yes'', mutt will look for a mailcap entry with the
** 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, OPTINCLUDEONLYFIRST, 0 },
+ { "include_onlyfirst", DT_BOOL, R_NONE, OPT_INCLUDE_ONLY_FIRST, 0 },
/*
** .pp
** Controls whether or not Mutt includes only the first attachment
** .pp
** How to invoke ispell (GNU's spell-checking software).
*/
- { "keep_flagged", DT_BOOL, R_NONE, OPTKEEPFLAGGED, 0 },
+ { "keep_flagged", DT_BOOL, R_NONE, OPT_KEEP_FLAGGED, 0 },
/*
** .pp
** If \fIset\fP, read messages marked as flagged will not be moved
** from your spool mailbox to your $$mbox mailbox, or as a result of
** a ``$mbox-hook'' command.
*/
- { "keywords_legacy", DT_BOOL, R_NONE, OPTKEYWORDSLEGACY, 1 },
+ { "keywords_legacy", DT_BOOL, R_NONE, OPT_KEYWORDS_LEGACY, 1 },
/*
** .pp
** If \fIset\fP, keywords/labels/tags will be written to whatever
** ``$$keywords_standard'' are \fCfalse\fP, mutt will save keywords
** to legacy headers to ensure that it does not lose your labels.
*/
- { "keywords_standard", DT_BOOL, R_NONE, OPTKEYWORDSSTANDARD, 0 },
+ { "keywords_standard", DT_BOOL, R_NONE, OPT_KEYWORDS_STANDARD, 0 },
/*
** .pp
** If \fIset\fP, keywords/labels/tags will be written to the
** This variable configures how often (in seconds) mutt should look for
** new mail. Also see the $$timeout variable.
*/
- { "mail_check_recent",DT_BOOL, R_NONE, OPTMAILCHECKRECENT, 1 },
+ { "mail_check_recent",DT_BOOL, R_NONE, OPT_MAIL_CHECK_RECENT, 1 },
/*
** .pp
** When \fIset\fP, Mutt will only notify you about new mail that has been received
** When \fI$$mark_old\fP is set, Mutt does not consider the mailbox to contain new
** mail if only old messages exist.
*/
- { "mail_check_stats", DT_BOOL, R_NONE, OPTMAILCHECKSTATS, 0 },
+ { "mail_check_stats", DT_BOOL, R_NONE, OPT_MAIL_CHECK_STATS, 0 },
/*
** .pp
** When \fIset\fP, mutt will periodically calculate message
** This variable specifies which files to consult when attempting to
** display MIME bodies not directly supported by Mutt.
*/
- { "mailcap_sanitize", DT_BOOL, R_NONE, OPTMAILCAPSANITIZE, 1 },
+ { "mailcap_sanitize", DT_BOOL, R_NONE, OPT_MAILCAP_SANITIZE, 1 },
/*
** .pp
** If \fIset\fP, mutt will restrict possible characters in mailcap % expandos
** DOING!\fP
*/
#ifdef USE_HCACHE
- { "maildir_header_cache_verify", DT_BOOL, R_NONE, OPTHCACHEVERIFY, 1 },
+ { "maildir_header_cache_verify", DT_BOOL, R_NONE, OPT_HCACHE_VERIFY, 1 },
/*
** .pp
** Check for Maildir unaware programs other than mutt having modified maildir
** folders).
*/
#endif
- { "maildir_trash", DT_BOOL, R_NONE, OPTMAILDIRTRASH, 0 },
+ { "maildir_trash", DT_BOOL, R_NONE, 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, OPTMAILDIRCHECKCUR, 0 },
+ { "maildir_check_cur", DT_BOOL, R_NONE, OPT_MAILDIR_CHECK_CUR, 0 },
/*
** .pp
** If \fIset\fP, mutt 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, OPTMARKOLD, 1 },
+ { "mark_old", DT_BOOL, R_BOTH, OPT_MARK_OLD, 1 },
/*
** .pp
** Controls whether or not mutt 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, OPTMARKERS, 1 },
+ { "markers", DT_BOOL, R_PAGER_FLOW, 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, OPTMENUMOVEOFF, 1 },
+ { "menu_move_off", DT_BOOL, R_NONE, 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, OPTMENUSCROLL, 0 },
+ { "menu_scroll", DT_BOOL, R_NONE, 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, OPTMESSAGECACHECLEAN, 0 },
+ { "message_cache_clean", DT_BOOL, R_NONE, OPT_MESSAGE_CACHE_CLEAN, 0 },
/*
** .pp
** If \fIset\fP, mutt will clean out obsolete entries from the message cache when
{ "msg_format", DT_SYN, R_NONE, UL "message_format", 0 },
/*
*/
- { "meta_key", DT_BOOL, R_NONE, OPTMETAKEY, 0 },
+ { "meta_key", DT_BOOL, R_NONE, OPT_METAKEY, 0 },
/*
** .pp
** If \fIset\fP, forces Mutt 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, OPTMETOO, 0 },
+ { "metoo", DT_BOOL, R_NONE, OPT_ME_TOO, 0 },
/*
** .pp
** If \fIunset\fP, Mutt will remove your address (see the ``$alternates''
** command) from the list of recipients when replying to a message.
*/
- { "mh_purge", DT_BOOL, R_NONE, OPTMHPURGE, 0 },
+ { "mh_purge", DT_BOOL, R_NONE, OPT_MH_PURGE, 0 },
/*
** .pp
** When \fIunset\fP, mutt will mimic mh's behavior and rename deleted messages
** .pp
** Also see $$forward_decode and $$mime_forward_decode.
*/
- { "mime_forward_decode", DT_BOOL, R_NONE, OPTMIMEFORWDECODE, 0 },
+ { "mime_forward_decode", DT_BOOL, R_NONE, OPT_MIME_FORW_DECODE, 0 },
/*
** .pp
** Controls the decoding of complex MIME messages into \fCtext/plain\fP when
** be attached to the newly composed message if this option is \fIset\fP.
*/
#ifdef USE_NNTP
- { "mime_subject", DT_BOOL, R_NONE, OPTMIMESUBJECT, 1 },
+ { "mime_subject", DT_BOOL, R_NONE, OPT_MIME_SUBJECT, 1 },
/*
** .pp
** If \fIunset\fP, 8-bit ``subject:'' line in article header will not be
** 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, OPTNARROWTREE, 0 },
+ { "narrow_tree", DT_BOOL, R_TREE|R_INDEX, 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, OPTLISTGROUP, 1 },
+ { "nntp_listgroup", DT_BOOL, R_NONE, OPT_LIST_GROUP, 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, OPTLOADDESC, 1 },
+ { "nntp_load_description", DT_BOOL, R_NONE, OPT_LOAD_DESC, 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, OPTNOTMUCHRECORD, 0 },
+ { "nm_record", DT_BOOL, R_NONE, OPT_NOTMUCH_RECORD, 0 },
/*
** .pp
** This variable specifies if the mutt 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, OPTPAGERSTOP, 0 },
+ { "pager_stop", DT_BOOL, R_NONE, 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, OPTPGPAUTODEC, 0 },
+ { "pgp_auto_decode", DT_BOOL, R_NONE, OPT_PGP_AUTO_DEC, 0 },
/*
** .pp
** If \fIset\fP, mutt will automatically attempt to decrypt traditional PGP
** check the message for traditional pgp.
*/
{ "pgp_create_traditional", DT_SYN, R_NONE, UL "pgp_autoinline", 0 },
- { "pgp_autoinline", DT_BOOL, R_NONE, OPTPGPAUTOINLINE, 0 },
+ { "pgp_autoinline", DT_BOOL, R_NONE, OPT_PGP_AUTO_INLINE, 0 },
/*
** .pp
** This option controls whether Mutt generates old-style inline
** \fBdeprecated\fP.
** (PGP only)
*/
- { "pgp_check_exit", DT_BOOL, R_NONE, OPTPGPCHECKEXIT, 1 },
+ { "pgp_check_exit", DT_BOOL, R_NONE, OPT_PGP_CHECK_EXIT, 1 },
/*
** .pp
** If \fIset\fP, mutt will check the exit code of the PGP subprocess when
** even for bad signatures.
** (PGP only)
*/
- { "pgp_ignore_subkeys", DT_BOOL, R_NONE, OPTPGPIGNORESUB, 1 },
+ { "pgp_ignore_subkeys", DT_BOOL, R_NONE, OPT_PGP_IGNORE_SUB, 1 },
/*
** .pp
** Setting this variable will cause Mutt to ignore OpenPGP subkeys. Instead,
** possible \fCprintf(3)\fP-like sequences.
** (PGP only)
*/
- { "pgp_long_ids", DT_BOOL, R_NONE, OPTPGPLONGIDS, 1 },
+ { "pgp_long_ids", DT_BOOL, R_NONE, 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.
** (PGP only)
*/
{ "pgp_auto_traditional", DT_SYN, R_NONE, UL "pgp_replyinline", 0 },
- { "pgp_replyinline", DT_BOOL, R_NONE, OPTPGPREPLYINLINE, 0 },
+ { "pgp_replyinline", DT_BOOL, R_NONE, OPT_PGP_REPLY_INLINE, 0 },
/*
** .pp
** Setting this variable will cause Mutt to always attempt to
** (PGP only)
**
*/
- { "pgp_retainable_sigs", DT_BOOL, R_NONE, OPTPGPRETAINABLESIG, 0 },
+ { "pgp_retainable_sigs", DT_BOOL, R_NONE, OPT_PGP_RETAINABLE_SIG, 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, OPTPGPSELFENCRYPT, 0 },
+ { "pgp_self_encrypt", DT_BOOL, R_NONE, 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, OPTPGPSHOWUNUSABLE, 1 },
+ { "pgp_show_unusable", DT_BOOL, R_NONE, OPT_PGP_SHOW_UNUSABLE, 1 },
/*
** .pp
** If \fIset\fP, mutt will display non-usable keys on the PGP key selection
** ``reverse-''.
** (PGP only)
*/
- { "pgp_strict_enc", DT_BOOL, R_NONE, OPTPGPSTRICTENC, 1 },
+ { "pgp_strict_enc", DT_BOOL, R_NONE, OPT_PGP_STRICT_ENC, 1 },
/*
** .pp
** If \fIset\fP, Mutt will automatically encode PGP/MIME signed messages as
** not used.
** (PGP only)
*/
- { "pgp_use_gpg_agent", DT_BOOL, R_NONE, OPTUSEGPGAGENT, 0 },
+ { "pgp_use_gpg_agent", DT_BOOL, R_NONE, OPT_USE_GPG_AGENT, 0 },
/*
** .pp
** If \fIset\fP, mutt will use a possibly-running \fCgpg-agent(1)\fP process.
** possible \fCprintf(3)\fP-like sequences.
** (PGP only)
*/
- { "pipe_decode", DT_BOOL, R_NONE, OPTPIPEDECODE, 0 },
+ { "pipe_decode", DT_BOOL, R_NONE, 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, OPTPIPESPLIT, 0 },
+ { "pipe_split", DT_BOOL, R_NONE, 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, OPTPOPAUTHTRYALL, 1 },
+ { "pop_auth_try_all", DT_BOOL, R_NONE, OPT_POP_AUTH_TRY_ALL, 1 },
/*
** .pp
** If \fIset\fP, Mutt will try all available authentication methods.
** .pp
** where ``[...]'' denotes an optional part.
*/
- { "pop_last", DT_BOOL, R_NONE, OPTPOPLAST, 0 },
+ { "pop_last", DT_BOOL, R_NONE, OPT_POP_LAST, 0 },
/*
** .pp
** If this variable is \fIset\fP, mutt will try to use the ``\fCLAST\fP'' POP command
** .pp
** Also see the $$postpone variable.
*/
- { "postpone_encrypt", DT_BOOL, R_NONE, OPTPOSTPONEENCRYPT, 0 },
+ { "postpone_encrypt", DT_BOOL, R_NONE, OPT_POSTPONE_ENCRYPT, 0 },
/*
** .pp
** When \fIset\fP, postponed messages that are marked for encryption will be
{ "print_cmd", DT_SYN, R_NONE, UL "print_command", 0 },
/*
*/
- { "print_decode", DT_BOOL, R_NONE, OPTPRINTDECODE, 1 },
+ { "print_decode", DT_BOOL, R_NONE, 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, OPTPRINTSPLIT, 0 },
+ { "print_split", DT_BOOL, R_NONE, 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, OPTPROMPTAFTER, 1 },
+ { "prompt_after", DT_BOOL, R_NONE, OPT_PROMPT_AFTER, 1 },
/*
** .pp
** If you use an \fIexternal\fP $$pager, setting this variable will
** 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, OPTREADONLY, 0 },
+ { "read_only", DT_BOOL, R_NONE, OPT_READONLY, 0 },
/*
** .pp
** If \fIset\fP, all folders are opened in read-only mode.
** 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, OPTREFLOWSPACEQUOTES, 1 },
+ { "reflow_space_quotes", DT_BOOL, R_NONE, 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, OPTREFLOWTEXT, 1 },
+ { "reflow_text", DT_BOOL, R_NONE, OPT_REFLOW_TEXT, 1 },
/*
** .pp
** When \fIset\fP, Mutt 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, OPTREPLYSELF, 0 },
+ { "reply_self", DT_BOOL, R_NONE, OPT_REPLY_SELF, 0 },
/*
** .pp
** If \fIunset\fP and you are replying to a message sent by you, Mutt will
** 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, OPTREPLYWITHXORIG, 0 },
+ { "reply_with_xorig", DT_BOOL, R_NONE, 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, OPTRESOLVE, 1 },
+ { "resolve", DT_BOOL, R_NONE, 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, OPTRESUMEDRAFTFILES, 0 },
+ { "resume_draft_files", DT_BOOL, R_NONE, 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, OPTRESUMEEDITEDDRAFTFILES, 1 },
+ { "resume_edited_draft_files", DT_BOOL, R_NONE, 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, OPTREVALIAS, 0 },
+ { "reverse_alias", DT_BOOL, R_BOTH, OPT_REV_ALIAS, 0 },
/*
** .pp
** This variable controls whether or not Mutt 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, OPTREVNAME, 0 },
+ { "reverse_name", DT_BOOL, R_BOTH, OPT_REV_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, OPTREVREAL, 1 },
+ { "reverse_realname", DT_BOOL, R_BOTH, OPT_REV_REAL, 1 },
/*
** .pp
** This variable fine-tunes the behavior of the $$reverse_name feature.
** possibly including eventual real names. When it is \fIunset\fP, mutt will
** override any such real names with the setting of the $$realname variable.
*/
- { "rfc2047_parameters", DT_BOOL, R_NONE, OPTRFC2047PARAMS, 0 },
+ { "rfc2047_parameters", DT_BOOL, R_NONE, OPT_RFC2047_PARAMS, 0 },
/*
** .pp
** When this variable is \fIset\fP, Mutt will decode RFC2047-encoded MIME
** that mutt \fIgenerates\fP this kind of encoding. Instead, mutt will
** unconditionally use the encoding specified in RFC2231.
*/
- { "save_address", DT_BOOL, R_NONE, OPTSAVEADDRESS, 0 },
+ { "save_address", DT_BOOL, R_NONE, OPT_SAVE_ADDRESS, 0 },
/*
** .pp
** If \fIset\fP, mutt 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, OPTSAVEEMPTY, 1 },
+ { "save_empty", DT_BOOL, R_NONE, 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, OPTSAVENAME, 0 },
+ { "save_name", DT_BOOL, R_NONE, 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, OPTSCORE, 1 },
+ { "score", DT_BOOL, R_NONE, 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, OPTSAVEUNSUB, 0 },
+ { "save_unsubscribed", DT_BOOL, R_NONE, OPT_SAVE_UNSUB, 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, OPTSHOWNEWNEWS, 1 },
+ { "show_new_news", DT_BOOL, R_NONE, 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, OPTSHOWONLYUNREAD, 0 },
+ { "show_only_unread", DT_BOOL, R_NONE, OPT_SHOW_ONLY_UNREAD, 0 },
/*
** .pp
** If \fIset\fP, only subscribed newsgroups that contain unread articles
** visible) and the other Mutt panels. ASCII and Unicode line-drawing
** characters are supported.
*/
- { "sidebar_folder_indent", DT_BOOL, R_SIDEBAR, OPTSIDEBARFOLDERINDENT, 0 },
+ { "sidebar_folder_indent", DT_BOOL, R_SIDEBAR, 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, OPTSIDEBARNEWMAILONLY, 0 },
+ { "sidebar_new_mail_only", DT_BOOL, R_SIDEBAR, OPT_SIDEBAR_NEWMAIL_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, OPTSIDEBARNEXTNEWWRAP, 0 },
+ { "sidebar_next_new_wrap", DT_BOOL, R_NONE, 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, OPTSIDEBARONRIGHT, 0 },
+ { "sidebar_on_right", DT_BOOL, R_BOTH|R_REFLOW, 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, OPTSIDEBARSHORTPATH, 0 },
+ { "sidebar_short_path", DT_BOOL, R_SIDEBAR, 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_visible", DT_BOOL, R_REFLOW, OPTSIDEBAR, 0 },
+ { "sidebar_visible", DT_BOOL, R_REFLOW, OPT_SIDEBAR, 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, OPTSIGDASHES, 1 },
+ { "sig_dashes", DT_BOOL, R_NONE, 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, Mutt has the ability to highlight
** the signature in a different color in the built-in pager.
*/
- { "sig_on_top", DT_BOOL, R_NONE, OPTSIGONTOP, 0 },
+ { "sig_on_top", DT_BOOL, R_NONE, 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, OPTWRAP, 1 },
+ { "smart_wrap", DT_BOOL, R_PAGER_FLOW, OPT_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, OPTASKCERTLABEL, 1 },
+ { "smime_ask_cert_label", DT_BOOL, R_NONE, OPT_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, OPTSDEFAULTDECRYPTKEY, 1 },
+ { "smime_decrypt_use_default_key", DT_BOOL, R_NONE, OPT_SDEFAULT_DECRYPT_KEY, 1 },
/*
** .pp
** If \fIset\fP (default) this tells mutt to use the default key for decryption. Otherwise,
** possible \fCprintf(3)\fP-like sequences.
** (S/MIME only)
*/
- { "smime_is_default", DT_BOOL, R_NONE, OPTSMIMEISDEFAULT, 0 },
+ { "smime_is_default", DT_BOOL, R_NONE, OPT_SMIME_IS_DEFAULT, 0 },
/*
** .pp
** The default behavior of mutt 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, OPTSMIMESELFENCRYPT, 0 },
+ { "smime_self_encrypt", DT_BOOL, R_NONE, 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, OPTSORTRE, 1 },
+ { "sort_re", DT_BOOL, R_INDEX|R_RESORT|R_RESORT_INIT, 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, OPTSSLFORCETLS, 0 },
+ { "ssl_force_tls", DT_BOOL, R_NONE, OPT_SSL_FORCE_TLS, 0 },
/*
** .pp
** If this variable is \fIset\fP, Mutt will require that all connections
** use \fCSTARTTLS\fP regardless of the server's capabilities.
*/
# ifdef USE_SSL_OPENSSL
- { "ssl_use_sslv2", DT_BOOL, R_NONE, OPTSSLV2, 0 },
+ { "ssl_use_sslv2", DT_BOOL, R_NONE, OPT_SSLV2, 0 },
/*
** .pp
** This variable specifies whether to attempt to use SSLv2 in the
** considered fundamentally insecure and are no longer recommended.
*/
# endif /* defined USE_SSL_OPENSSL */
- { "ssl_use_sslv3", DT_BOOL, R_NONE, OPTSSLV3, 0 },
+ { "ssl_use_sslv3", DT_BOOL, R_NONE, OPT_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, OPTTLSV1, 1 },
+ { "ssl_use_tlsv1", DT_BOOL, R_NONE, OPT_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, OPTTLSV1_1, 1 },
+ { "ssl_use_tlsv1_1", DT_BOOL, R_NONE, OPT_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, OPTTLSV1_2, 1 },
+ { "ssl_use_tlsv1_2", DT_BOOL, R_NONE, OPT_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, OPTSSLSYSTEMCERTS, 1 },
+ { "ssl_usesystemcerts", DT_BOOL, R_NONE, OPT_SSL_SYSTEM_CERTS, 1 },
/*
** .pp
** If set to \fIyes\fP, mutt will use CA certificates in the
** is signed by a trusted CA.
*/
#endif
- { "ssl_verify_dates", DT_BOOL, R_NONE, OPTSSLVERIFYDATES, 1 },
+ { "ssl_verify_dates", DT_BOOL, R_NONE, OPT_SSL_VERIFY_DATES, 1 },
/*
** .pp
** If \fIset\fP (the default), mutt 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, OPTSSLVERIFYHOST, 1 },
+ { "ssl_verify_host", DT_BOOL, R_NONE, OPT_SSL_VERIFY_HOST, 1 },
/*
** .pp
** If \fIset\fP (the default), mutt will not automatically accept a server
*/
# ifdef USE_SSL_OPENSSL
# ifdef HAVE_SSL_PARTIAL_CHAIN
- { "ssl_verify_partial_chains", DT_BOOL, R_NONE, OPTSSLVERIFYPARTIAL, 0 },
+ { "ssl_verify_partial_chains", DT_BOOL, R_NONE, OPT_SSL_VERIFY_PARTIAL, 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, OPTSTATUSONTOP, 0 },
+ { "status_on_top", DT_BOOL, R_REFLOW, 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, OPTSTRICTTHREADS, 0 },
+ { "strict_threads", DT_BOOL, R_RESORT|R_RESORT_INIT|R_INDEX, 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, OPTSUSPEND, 1 },
+ { "suspend", DT_BOOL, R_NONE, OPT_SUSPEND, 1 },
/*
** .pp
** When \fIunset\fP, mutt won't stop when the user presses the terminal's
** \fIsusp\fP key, usually ``^Z''. This is useful if you run mutt
** inside an xterm using a command like ``\fCxterm -e mutt\fP''.
*/
- { "text_flowed", DT_BOOL, R_NONE, OPTTEXTFLOWED, 0 },
+ { "text_flowed", DT_BOOL, R_NONE, OPT_TEXT_FLOWED, 0 },
/*
** .pp
** When \fIset\fP, mutt 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, OPTTHOROUGHSRC, 1 },
+ { "thorough_search", DT_BOOL, R_NONE, OPT_THOROUGH_SRC, 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, OPTTHREADRECEIVED, 0 },
+ { "thread_received", DT_BOOL, R_RESORT|R_RESORT_INIT|R_INDEX, OPT_THREAD_RECEIVED, 0 },
/*
** .pp
** When \fIset\fP, mutt uses the date received rather than the date sent
** to thread messages by subject.
*/
- { "tilde", DT_BOOL, R_PAGER, OPTTILDE, 0 },
+ { "tilde", DT_BOOL, R_PAGER, 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, OPTTSENABLED, 0 },
+ { "ts_enabled", DT_BOOL, R_BOTH, 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, OPTUNCOLLAPSEJUMP, 0 },
+ { "uncollapse_jump", DT_BOOL, R_NONE, OPT_UNCOLLAPSE_JUMP, 0 },
/*
** .pp
** When \fIset\fP, Mutt will jump to the next unread message, if any,
** when the current thread is \fIun\fPcollapsed.
*/
- { "uncollapse_new", DT_BOOL, R_NONE, OPTUNCOLLAPSENEW, 1 },
+ { "uncollapse_new", DT_BOOL, R_NONE, OPT_UNCOLLAPSE_NEW, 1 },
/*
** .pp
** When \fIset\fP, Mutt 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, OPTUSE8BITMIME, 0 },
+ { "use_8bitmime", DT_BOOL, R_NONE, OPT_USE_8BIT_MIME, 0 },
/*
** .pp
** \fBWarning:\fP do not set this variable unless you are using a version
** When \fIset\fP, Mutt will invoke $$sendmail with the \fC-B8BITMIME\fP
** flag when sending 8-bit messages to enable ESMTP negotiation.
*/
- { "use_domain", DT_BOOL, R_NONE, OPTUSEDOMAIN, 1 },
+ { "use_domain", DT_BOOL, R_NONE, OPT_USE_DOMAIN, 1 },
/*
** .pp
** When \fIset\fP, Mutt 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, OPTENVFROM, 0 },
+ { "use_envelope_from", DT_BOOL, R_NONE, OPT_ENV_FROM, 0 },
/*
** .pp
** When \fIset\fP, mutt will set the \fIenvelope\fP sender of the message.
{ "envelope_from", DT_SYN, R_NONE, UL "use_envelope_from", 0 },
/*
*/
- { "use_from", DT_BOOL, R_NONE, OPTUSEFROM, 1 },
+ { "use_from", DT_BOOL, R_NONE, OPT_USE_FROM, 1 },
/*
** .pp
** When \fIset\fP, Mutt will generate the ``From:'' header field when
** command.
*/
#ifdef HAVE_GETADDRINFO
- { "use_ipv6", DT_BOOL, R_NONE, OPTUSEIPV6, 1 },
+ { "use_ipv6", DT_BOOL, R_NONE, OPT_USE_IPV6, 1 },
/*
** .pp
** When \fIset\fP, Mutt will look for IPv6 addresses of hosts it tries to
** Normally, the default should work.
*/
#endif /* HAVE_GETADDRINFO */
- { "user_agent", DT_BOOL, R_NONE, OPTXMAILER, 1 },
+ { "user_agent", DT_BOOL, R_NONE, OPT_XMAILER, 1 },
/*
** .pp
** When \fIset\fP, mutt 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, OPTVIRTSPOOLFILE, 0 },
+ { "virtual_spoolfile", DT_BOOL, R_NONE, OPT_VIRT_SPOOL_FILE, 0 },
/*
** .pp
** When \fIset\fP, mutt will use the first defined virtual mailbox (see
** virtual-mailboxes) as a spool file.
*/
#endif
- { "wait_key", DT_BOOL, R_NONE, OPTWAITKEY, 1 },
+ { "wait_key", DT_BOOL, R_NONE, OPT_WAIT_KEY, 1 },
/*
** .pp
** Controls whether Mutt will ask you to press a key after an external command
** When \fIset\fP, Mutt will always ask for a key. When \fIunset\fP, Mutt will wait
** for a key only if the external command returned a non-zero status.
*/
- { "weed", DT_BOOL, R_NONE, OPTWEED, 1 },
+ { "weed", DT_BOOL, R_NONE, OPT_WEED, 1 },
/*
** .pp
** When \fIset\fP, mutt 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, OPTWRAPSEARCH, 1 },
+ { "wrap_search", DT_BOOL, R_NONE, 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, OPTWRITEBCC, 1 },
+ { "write_bcc", DT_BOOL, R_NONE, OPT_WRITE_BCC, 1 },
/*
** .pp
** Controls whether mutt writes out the ``Bcc:'' header when preparing
** various kinds of conversion.
*/
#ifdef USE_NNTP
- { "x_comment_to", DT_BOOL, R_NONE, OPTXCOMMENTTO, 0 },
+ { "x_comment_to", DT_BOOL, R_NONE, OPT_XCOMMENT_TO, 0 },
/*
** .pp
** If \fIset\fP, Mutt 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, OPTCOLLAPSEALL, 0 },
+ { "collapse_all", DT_BOOL, R_NONE, OPT_COLLAPSE_ALL, 0 },
/*
** .pp
** When \fIset\fP, Mutt will collapse all threads when entering a folder.
if (map->op != OP_MACRO)
return map->op;
- if (option(OPTIGNOREMACROEVENTS))
+ if (option(OPT_IGNORE_MACRO_EVENTS))
{
mutt_error(_("Macros are currently disabled."));
return -1;
/* Check for a batch send. */
if (!isatty(0) || queries || alias_queries || dump_variables || batch_mode)
{
- set_option(OPTNOCURSES);
+ set_option(OPT_NO_CURSES);
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(OPTNOCURSES))
+ if (!option(OPT_NO_CURSES))
{
start_curses();
return rv;
}
- if (!option(OPTNOCURSES))
+ if (!option(OPT_NO_CURSES))
{
SETCOLOR(MT_COLOR_NORMAL);
clear();
}
/* Create the Maildir directory if it doesn't exist. */
- if (!option(OPTNOCURSES) && Maildir)
+ if (!option(OPT_NO_CURSES) && Maildir)
{
struct stat sb;
char fpath[_POSIX_PATH_MAX];
if (sendflags & SENDPOSTPONED)
{
- if (!option(OPTNOCURSES))
+ if (!option(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(OPTNOCURSES))
+ if (!option(OPT_NO_CURSES))
mutt_flushinp();
if (!msg)
{
if (url_parse_mailto(msg->env, &bodytext, argv[i]) < 0)
{
- if (!option(OPTNOCURSES))
+ if (!option(OPT_NO_CURSES))
mutt_endwin(NULL);
fputs(_("Failed to parse mailto: link\n"), stderr);
exit(1);
msg->env->to = rfc822_parse_adrlist(msg->env->to, argv[i]);
}
- if (!draftFile && option(OPTAUTOEDIT) && !msg->env->to && !msg->env->cc)
+ if (!draftFile && option(OPT_AUTO_EDIT) && !msg->env->to && !msg->env->cc)
{
- if (!option(OPTNOCURSES))
+ if (!option(OPT_NO_CURSES))
mutt_endwin(NULL);
fputs(_("No recipients specified.\n"), stderr);
exit(1);
mutt_expand_path(expanded_infile, sizeof(expanded_infile));
if ((fin = fopen(expanded_infile, "r")) == NULL)
{
- if (!option(OPTNOCURSES))
+ if (!option(OPT_NO_CURSES))
mutt_endwin(NULL);
perror(expanded_infile);
exit(1);
if ((fout = safe_fopen(tempfile, "w")) == NULL)
{
- if (!option(OPTNOCURSES))
+ if (!option(OPT_NO_CURSES))
mutt_endwin(NULL);
perror(tempfile);
safe_fclose(&fin);
if ((fin = fopen(tempfile, "r")) == NULL)
{
- if (!option(OPTNOCURSES))
+ if (!option(OPT_NO_CURSES))
mutt_endwin(NULL);
perror(tempfile);
FREE(&tempfile);
mutt_prepare_template(fin, NULL, msg, context_hdr, 0);
- /* Scan for mutt header to set OPTRESUMEDRAFTFILES */
+ /* Scan for mutt header to set OPT_RESUME_DRAFT_FILES */
for (last_uhp = &msg->env->userhdrs, uh = *last_uhp; uh; uh = *last_uhp)
{
if (ascii_strncasecmp("X-Mutt-Resume-Draft:", uh->data, 20) == 0)
{
- if (option(OPTRESUMEEDITEDDRAFTFILES))
- set_option(OPTRESUMEDRAFTFILES);
+ if (option(OPT_RESUME_EDITED_DRAFT_FILES))
+ set_option(OPT_RESUME_DRAFT_FILES);
*last_uhp = uh->next;
uh->next = NULL;
msg->content = a = mutt_make_file_attach(t->data);
if (!a)
{
- if (!option(OPTNOCURSES))
+ if (!option(OPT_NO_CURSES))
mutt_endwin(NULL);
fprintf(stderr, _("%s: unable to attach file.\n"), t->data);
mutt_free_list(&attach);
{
if (truncate(expanded_infile, 0) == -1)
{
- if (!option(OPTNOCURSES))
+ if (!option(OPT_NO_CURSES))
mutt_endwin(NULL);
perror(expanded_infile);
exit(1);
}
if ((fout = safe_fopen(expanded_infile, "a")) == NULL)
{
- if (!option(OPTNOCURSES))
+ if (!option(OPT_NO_CURSES))
mutt_endwin(NULL);
perror(expanded_infile);
exit(1);
}
mutt_write_rfc822_header(fout, msg->env, msg->content, -1, 0);
- if (option(OPTRESUMEEDITEDDRAFTFILES))
+ if (option(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(OPTNOCURSES))
+ if (!option(OPT_NO_CURSES))
mutt_endwin(NULL);
safe_fclose(&fout);
exit(1);
}
mutt_free_windows();
- if (!option(OPTNOCURSES))
+ if (!option(OPT_NO_CURSES))
mutt_endwin(NULL);
if (rv)
#ifdef USE_NNTP
if (flags & MUTT_NEWS)
{
- set_option(OPTNEWS);
+ set_option(OPT_NEWS);
if (!(CurrentNewsSrv = nntp_select_server(NewsServer, 0)))
{
mutt_endwin(Errorbuf);
}
#ifdef USE_NNTP
- if (option(OPTNEWS))
+ if (option(OPT_NEWS))
{
- unset_option(OPTNEWS);
+ unset_option(OPT_NEWS);
nntp_expand_path(folder, sizeof(folder), &CurrentNewsSrv->conn->account);
}
else
mutt_startup_shutdown_hook(MUTT_STARTUPHOOK);
if ((Context = mx_open_mailbox(
- folder, ((flags & MUTT_RO) || option(OPTREADONLY)) ? MUTT_READONLY : 0, NULL)) ||
+ folder, ((flags & MUTT_RO) || option(OPT_READONLY)) ? MUTT_READONLY : 0, NULL)) ||
!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(OPTMAILCHECKRECENT) && utimebuf.actime >= utimebuf.modtime && mbox_has_new(ctx))
+ if (!option(OPT_MAIL_CHECK_RECENT) && utimebuf.actime >= utimebuf.modtime && mbox_has_new(ctx))
utimebuf.actime = utimebuf.modtime - 1;
utime(ctx->path, &utimebuf);
unlink(tempfile); /* remove partial copy of the mailbox */
mutt_unblock_signals();
- if (option(OPTCHECKMBOXSIZE))
+ if (option(OPT_CHECK_MBOX_SIZE))
{
tmp = mutt_find_mailbox(ctx->path);
if (tmp && tmp->new == false)
switch (*s)
{
case MUTT_TREE_LLCORNER:
- if (option(OPTASCIICHARS))
+ if (option(OPT_ASCII_CHARS))
addch('`');
#ifdef WACS_LLCORNER
else
#endif
break;
case MUTT_TREE_ULCORNER:
- if (option(OPTASCIICHARS))
+ if (option(OPT_ASCII_CHARS))
addch(',');
#ifdef WACS_ULCORNER
else
#endif
break;
case MUTT_TREE_LTEE:
- if (option(OPTASCIICHARS))
+ if (option(OPT_ASCII_CHARS))
addch('|');
#ifdef WACS_LTEE
else
#endif
break;
case MUTT_TREE_HLINE:
- if (option(OPTASCIICHARS))
+ if (option(OPT_ASCII_CHARS))
addch('-');
#ifdef WACS_HLINE
else
#endif
break;
case MUTT_TREE_VLINE:
- if (option(OPTASCIICHARS))
+ if (option(OPT_ASCII_CHARS))
addch('|');
#ifdef WACS_VLINE
else
#endif
break;
case MUTT_TREE_TTEE:
- if (option(OPTASCIICHARS))
+ if (option(OPT_ASCII_CHARS))
addch('-');
#ifdef WACS_TTEE
else
#endif
break;
case MUTT_TREE_BTEE:
- if (option(OPTASCIICHARS))
+ if (option(OPT_ASCII_CHARS))
addch('-');
#ifdef WACS_BTEE
else
static void menu_pad_string(struct Menu *menu, char *s, size_t n)
{
char *scratch = safe_strdup(s);
- int shift = option(OPTARROWCURSOR) ? 3 : 0;
+ int shift = option(OPT_ARROW_CURSOR) ? 3 : 0;
int cols = menu->indexwin->cols - shift;
mutt_simple_format(s, n, cols, cols, FMT_LEFT, ' ', scratch, mutt_strlen(scratch), 1);
move(0, 0);
clrtobot();
- if (option(OPTHELP))
+ if (option(OPT_HELP))
{
SETCOLOR(MT_COLOR_STATUS);
mutt_window_move(menu->helpwin, 0, 0);
if (i == menu->current)
{
SETCOLOR(MT_COLOR_INDICATOR);
- if (option(OPTARROWCURSOR))
+ if (option(OPT_ARROW_CURSOR))
{
addstr("->");
ATTRSET(attr);
else
do_color = false;
}
- else if (option(OPTARROWCURSOR))
+ else if (option(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(menu->color(menu->oldcurrent));
- if (option(OPTARROWCURSOR))
+ if (option(OPT_ARROW_CURSOR))
{
/* clear the pointer */
addstr(" ");
menu_pad_string(menu, buf, sizeof(buf));
SETCOLOR(MT_COLOR_INDICATOR);
- if (option(OPTARROWCURSOR))
+ if (option(OPT_ARROW_CURSOR))
{
addstr("->");
ATTRSET(attr);
{
if (menu->dialog)
{
- if (option(OPTMSGERR))
+ if (option(OPT_MSG_ERR))
{
mutt_sleep(1);
- unset_option(OPTMSGERR);
+ unset_option(OPT_MSG_ERR);
}
if (*Errorbuf)
int c = MIN(MenuContext, menu->pagelen / 2);
int old_top = menu->top;
- if (!option(OPTMENUMOVEOFF) && menu->max <= menu->pagelen) /* less entries than lines */
+ if (!option(OPT_MENU_MOVE_OFF) && menu->max <= menu->pagelen) /* less entries than lines */
{
if (menu->top != 0)
{
}
else
{
- if (option(OPTMENUSCROLL) || (menu->pagelen <= 0) || (c < MenuContext))
+ if (option(OPT_MENU_SCROLL) || (menu->pagelen <= 0) || (c < MenuContext))
{
if (menu->current < menu->top + c)
menu->top = menu->current - c;
}
}
- if (!option(OPTMENUMOVEOFF)) /* make entries stick to bottom */
+ if (!option(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(OPTMENUMOVEOFF) ||
+ (option(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(OPTMENUMOVEOFF)) && DIRECTION * menu->top > tmp)
+ if ((neg || !option(OPT_MENU_MOVE_OFF)) && DIRECTION * menu->top > tmp)
menu->top = tmp;
/* need to move the cursor? */
r += search_dir;
}
- if (option(OPTWRAPSEARCH) && wrap++ == 0)
+ if (option(OPT_WRAP_SEARCH) && wrap++ == 0)
{
r = search_dir == 1 ? 0 : menu->max - 1;
goto search_next;
while (true)
{
- if (option(OPTMENUCALLER))
+ if (option(OPT_MENU_CALLER))
{
- unset_option(OPTMENUCALLER);
+ unset_option(OPT_MENU_CALLER);
return OP_NULL;
}
menu->oldcurrent = menu->current;
/* move the cursor out of the way */
- if (option(OPTARROWCURSOR))
+ if (option(OPT_ARROW_CURSOR))
mutt_window_move(menu->indexwin, menu->current - menu->top + menu->offset, 2);
- else if (option(OPTBRAILLEFRIENDLY))
+ else if (option(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(OPTAUTOTAG))
+ else if (menu->tagged && option(OPT_AUTO_TAG))
menu->tagprefix = 1;
mutt_curs_set(1);
case OP_TAG:
if (menu->tag && !menu->dialog)
{
- if (menu->tagprefix && !option(OPTAUTOTAG))
+ if (menu->tagprefix && !option(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(OPTRESOLVE) && menu->current < menu->max - 1)
+ if (j && option(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(OPTMAILCHECKRECENT) && mh_sequences_changed(mailbox) <= 0)
+ if (option(OPT_MAIL_CHECK_RECENT) && mh_sequences_changed(mailbox) <= 0)
{
rc = 0;
check_new = 0;
{
/* if the first unseen message we encounter was in the mailbox during the
last visit, don't notify about it */
- if (!option(OPTMAILCHECKRECENT) || mh_already_notified(mailbox, i) == 0)
+ if (!option(OPT_MAIL_CHECK_RECENT) || mh_already_notified(mailbox, i) == 0)
{
mailbox->new = true;
rc = 1;
break;
case 'T': /* trashed */
- if (!h->flagged || !option(OPTFLAGSAFE))
+ if (!h->flagged || !option(OPT_FLAG_SAFE))
{
h->trash = true;
h->deleted = true;
if (subdir)
{
snprintf(buf, sizeof(buf), "%s/%s", ctx->path, subdir);
- is_old = option(OPTMARKOLD) ? (mutt_strcmp("cur", subdir) == 0) : false;
+ is_old = option(OPT_MARK_OLD) ? (mutt_strcmp("cur", subdir) == 0) : false;
}
else
strfcpy(buf, ctx->path, sizeof(buf));
snprintf(fn, sizeof(fn), "%s/%s", ctx->path, p->h->path);
#ifdef USE_HCACHE
- if (option(OPTHCACHEVERIFY))
+ if (option(OPT_HCACHE_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(OPTMAILDIRTRASH)))
+ if (h->deleted && (ctx->magic != MUTT_MAILDIR || !option(OPT_MAILDIR_TRASH)))
{
snprintf(path, sizeof(path), "%s/%s", ctx->path, h->path);
- if (ctx->magic == MUTT_MAILDIR || (option(OPTMHPURGE) && ctx->magic == MUTT_MH))
+ if (ctx->magic == MUTT_MAILDIR || (option(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(OPTMAILDIRTRASH) || h->trash) && (h->deleted != h->trash)))
+ (option(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(OPTCHECKNEW))
+ if (!option(OPT_CHECK_NEW))
return 0;
snprintf(buf, sizeof(buf), "%s/new", ctx->path);
int i;
struct MhData *data = mh_data(ctx);
- if (!option(OPTCHECKNEW))
+ if (!option(OPT_CHECK_NEW))
return 0;
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(OPTMAILDIRTRASH)))
+ if (!ctx->hdrs[i]->deleted || (ctx->magic == MUTT_MAILDIR && option(OPT_MAILDIR_TRASH)))
ctx->hdrs[i]->index = j++;
}
}
#define BEEP() \
do \
{ \
- if (option(OPTBEEP)) \
+ if (option(OPT_BEEP)) \
beep(); \
} while (0)
#ifdef HAVE_LIBIDN
is_idn_encoded = check_idn(local_domain);
- if (is_idn_encoded && option(OPTIDNDECODE))
+ if (is_idn_encoded && option(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(OPTIDNDECODE))
+ if (is_idn_encoded && option(OPT_IDN_DECODE))
{
if (idna_to_ascii_8z(reversed_domain, &tmp, IDNA_ALLOW_UNASSIGNED) != IDNA_SUCCESS)
{
goto cleanup;
#ifdef HAVE_LIBIDN
- if (option(OPTIDNENCODE))
+ if (option(OPT_IDN_ENCODE))
{
if (idna_to_ascii_8z(intl_domain, &tmp, IDNA_ALLOW_UNASSIGNED) != IDNA_SUCCESS)
goto cleanup;
snprintf(prompt, sizeof(prompt), "%s: ", interaction->prompt);
resp[0] = '\0';
- if (option(OPTNOCURSES) || mutt_get_field(prompt, resp, sizeof(resp), 0))
+ if (option(OPT_NO_CURSES) || mutt_get_field(prompt, resp, sizeof(resp), 0))
return SASL_FAIL;
interaction->len = mutt_strlen(resp) + 1;
/* we accept v4 or v6 STREAM sockets */
memset(&hints, 0, sizeof(hints));
- if (option(OPTUSEIPV6))
+ if (option(OPT_USE_IPV6))
hints.ai_family = AF_UNSPEC;
else
hints.ai_family = AF_INET;
host_idna = conn->account.host;
#endif
- if (!option(OPTNOCURSES))
+ if (!option(OPT_NO_CURSES))
mutt_message(_("Looking up %s..."), conn->account.host);
rc = getaddrinfo(host_idna, port, &hints, &res);
return -1;
}
- if (!option(OPTNOCURSES))
+ if (!option(OPT_NO_CURSES))
mutt_message(_("Connecting to %s..."), conn->account.host);
rc = -1;
host_idna = conn->account.host;
#endif
- if (!option(OPTNOCURSES))
+ if (!option(OPT_NO_CURSES))
mutt_message(_("Looking up %s..."), conn->account.host);
he = gethostbyname(host_idna);
return -1;
}
- if (!option(OPTNOCURSES))
+ if (!option(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(OPTSSLVERIFYPARTIAL))
+ if (option(OPT_SSL_VERIFY_PARTIAL))
{
param = X509_VERIFY_PARAM_new();
if (param)
static bool check_certificate_expiration(X509 *peercert, bool silent)
{
- if (option(OPTSSLVERIFYDATES) != MUTT_NO)
+ if (option(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(OPTSSLVERIFYPARTIAL)))
+ if ((idx != 0) && (option(OPT_SSL_VERIFY_PARTIAL)))
allow_skip = 1;
#endif
menu->help = helpstr;
done = 0;
- set_option(OPTIGNOREMACROEVENTS);
+ set_option(OPT_IGNORE_MACRO_EVENTS);
while (!done)
{
switch (mutt_menu_loop(menu))
break;
}
}
- unset_option(OPTIGNOREMACROEVENTS);
+ unset_option(OPT_IGNORE_MACRO_EVENTS);
mutt_pop_current_menu(menu);
mutt_menu_destroy(&menu);
mutt_debug(2, "ssl interactive_check_cert: 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(OPTSSLVERIFYPARTIAL))
+ if (option(OPT_SSL_VERIFY_PARTIAL))
{
if (skip_mode && preverify_ok && (pos == last_pos) && last_cert)
{
/* check hostname only for the leaf certificate */
buf[0] = 0;
- if (pos == 0 && option(OPTSSLVERIFYHOST) != MUTT_NO)
+ if (pos == 0 && option(OPT_SSL_VERIFY_HOST) != MUTT_NO)
{
if (!check_host(cert, host, buf, sizeof(buf)))
{
}
/* disable SSL protocols as needed */
- if (!option(OPTTLSV1))
+ if (!option(OPT_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(OPTTLSV1_1))
+ if (!option(OPT_TLSV1_1))
{
SSL_CTX_set_options(data->ctx, SSL_OP_NO_TLSv1_1);
}
#endif
#ifdef SSL_OP_NO_TLSv1_2
- if (!option(OPTTLSV1_2))
+ if (!option(OPT_TLSV1_2))
{
SSL_CTX_set_options(data->ctx, SSL_OP_NO_TLSv1_2);
}
#endif
- if (!option(OPTSSLV2))
+ if (!option(OPT_SSLV2))
{
SSL_CTX_set_options(data->ctx, SSL_OP_NO_SSLv2);
}
- if (!option(OPTSSLV3))
+ if (!option(OPT_SSLV3))
{
SSL_CTX_set_options(data->ctx, SSL_OP_NO_SSLv3);
}
- if (option(OPTSSLSYSTEMCERTS))
+ if (option(OPT_SSL_SYSTEM_CERTS))
{
if (!SSL_CTX_set_default_verify_paths(data->ctx))
{
goto bail_ssldata;
}
#ifdef SSL_OP_NO_TLSv1_2
- if (!option(OPTTLSV1_2))
+ if (!option(OPT_TLSV1_2))
ssl_options |= SSL_OP_NO_TLSv1_2;
#endif
#ifdef SSL_OP_NO_TLSv1_1
- if (!option(OPTTLSV1_1))
+ if (!option(OPT_TLSV1_1))
ssl_options |= SSL_OP_NO_TLSv1_1;
#endif
#ifdef SSL_OP_NO_TLSv1
- if (!option(OPTTLSV1))
+ if (!option(OPT_TLSV1))
ssl_options |= SSL_OP_NO_TLSv1;
#endif
/* these are always set */
goto bail_ctx;
}
- if (option(OPTSSLSYSTEMCERTS))
+ if (option(OPT_SSL_SYSTEM_CERTS))
{
if (!SSL_CTX_set_default_verify_paths(ssldata->ctx))
{
return -1;
}
- if (option(OPTSSLVERIFYDATES) != MUTT_NO)
+ if (option(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(OPTSSLVERIFYHOST) != MUTT_NO &&
+ if (chainidx == 0 && option(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(OPTIGNOREMACROEVENTS);
+ set_option(OPT_IGNORE_MACRO_EVENTS);
while (!done)
{
switch (mutt_menu_loop(menu))
break;
}
}
- unset_option(OPTIGNOREMACROEVENTS);
+ unset_option(OPT_IGNORE_MACRO_EVENTS);
mutt_pop_current_menu(menu);
mutt_menu_destroy(&menu);
gnutls_x509_crt_deinit(cert);
else
safe_strcat(priority, priority_size, "NORMAL");
- if (!option(OPTTLSV1_2))
+ if (!option(OPT_TLSV1_2))
{
nproto--;
safe_strcat(priority, priority_size, ":-VERS-TLS1.2");
}
- if (!option(OPTTLSV1_1))
+ if (!option(OPT_TLSV1_1))
{
nproto--;
safe_strcat(priority, priority_size, ":-VERS-TLS1.1");
}
- if (!option(OPTTLSV1))
+ if (!option(OPT_TLSV1))
{
nproto--;
safe_strcat(priority, priority_size, ":-VERS-TLS1.0");
}
- if (!option(OPTSSLV3))
+ if (!option(OPT_SSLV3))
{
nproto--;
safe_strcat(priority, priority_size, ":-VERS-SSL3.0");
{
size_t nproto = 0; /* number of tls/ssl protocols */
- if (option(OPTTLSV1_2))
+ if (option(OPT_TLSV1_2))
protocol_priority[nproto++] = GNUTLS_TLS1_2;
- if (option(OPTTLSV1_1))
+ if (option(OPT_TLSV1_1))
protocol_priority[nproto++] = GNUTLS_TLS1_1;
- if (option(OPTTLSV1))
+ if (option(OPT_TLSV1))
protocol_priority[nproto++] = GNUTLS_TLS1;
- if (option(OPTSSLV3))
+ if (option(OPT_SSLV3))
protocol_priority[nproto++] = GNUTLS_SSL3;
protocol_priority[nproto] = 0;
tls_get_client_cert(conn);
- if (!option(OPTNOCURSES))
+ if (!option(OPT_NO_CURSES))
{
mutt_message(_("SSL/TLS connection using %s (%s/%s/%s)"),
gnutls_protocol_get_name(gnutls_protocol_get_version(data->state)),
if (a && a->mailbox)
{
strfcpy(d, a->mailbox, dsize);
- if (!option(OPTSAVEADDRESS))
+ if (!option(OPT_SAVE_ADDRESS))
{
char *p = NULL;
prefix[0] = '\0';
destlen--; /* save room for the terminal \0 */
- wlen = ((flags & MUTT_FORMAT_ARROWCURSOR) && option(OPTARROWCURSOR)) ? 3 : 0;
+ wlen = ((flags & MUTT_FORMAT_ARROWCURSOR) && option(OPT_ARROW_CURSOR)) ? 3 : 0;
col += wlen;
if ((flags & MUTT_FORMAT_NOFILTER) == 0)
col -= wlen; /* reset to passed in value */
wptr = dest; /* reset write ptr */
- wlen = ((flags & MUTT_FORMAT_ARROWCURSOR) && option(OPTARROWCURSOR)) ? 3 : 0;
+ wlen = ((flags & MUTT_FORMAT_ARROWCURSOR) && option(OPT_ARROW_CURSOR)) ? 3 : 0;
if ((pid = mutt_create_filter(command->data, NULL, &filter, NULL)) != -1)
{
int rc;
else if (soft && pad < 0)
{
int offset =
- ((flags & MUTT_FORMAT_ARROWCURSOR) && option(OPTARROWCURSOR)) ? 3 : 0;
+ ((flags & MUTT_FORMAT_ARROWCURSOR) && option(OPT_ARROW_CURSOR)) ? 3 : 0;
int avail_cols = (cols > offset) ? (cols - offset) : 0;
/* \0-terminate dest for length computation in mutt_wstr_trunc() */
*wptr = 0;
if (magic > 0 && !mx_access(s, W_OK))
{
- if (option(OPTCONFIRMAPPEND))
+ if (option(OPT_CONFIRM_APPEND))
{
snprintf(tmp, sizeof(tmp), _("Append messages to %s?"), s);
if ((rc = mutt_yesorno(tmp, MUTT_YES)) == MUTT_NO)
/* pathname does not exist */
if (errno == ENOENT)
{
- if (option(OPTCONFIRMCREATE))
+ if (option(OPT_CONFIRM_CREATE))
{
snprintf(tmp, sizeof(tmp), _("Create %s?"), s);
if ((rc = mutt_yesorno(tmp, MUTT_YES)) == MUTT_NO)
ret = -1;
}
- /* user confirmed with MUTT_YES or set OPTCONFIRMCREATE */
+ /* user confirmed with MUTT_YES or set OPT_CONFIRM_CREATE */
if (ret == 0)
{
strncpy(tmp, s, sizeof(tmp) - 1);
}
safe_fclose(&f);
- if (!option(OPTCHECKMBOXSIZE))
+ if (!option(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(OPTFORCEREFRESH);
+ set_option(OPT_FORCE_REFRESH);
if (!ctx->quiet)
mutt_message(_("Reading %s..."), ctx->path);
{
/* avoid unnecessary work since the mailbox is completely unthreaded
to begin with */
- unset_option(OPTSORTSUBTHREADS);
- unset_option(OPTNEEDRESCORE);
+ unset_option(OPT_SORT_SUBTHREADS);
+ unset_option(OPT_NEED_RESCORE);
mutt_sort_headers(ctx, 1);
}
if (!ctx->quiet)
FREE(&ctx);
}
- unset_option(OPTFORCEREFRESH);
+ unset_option(OPT_FORCE_REFRESH);
return ctx;
}
struct stat st, stc;
int opt_confappend, rc;
- if (!TrashPath || !ctx->deleted || (ctx->magic == MUTT_MAILDIR && option(OPTMAILDIRTRASH)))
+ if (!TrashPath || !ctx->deleted || (ctx->magic == MUTT_MAILDIR && option(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(OPTCONFIRMAPPEND);
+ opt_confappend = option(OPT_CONFIRM_APPEND);
if (opt_confappend)
- unset_option(OPTCONFIRMAPPEND);
+ unset_option(OPT_CONFIRM_APPEND);
rc = mutt_save_confirm(TrashPath, &st);
if (opt_confappend)
- set_option(OPTCONFIRMAPPEND);
+ set_option(OPT_CONFIRM_APPEND);
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(OPTKEEPFLAGGED)))
+ !(ctx->hdrs[i]->flagged && option(OPT_KEEP_FLAGGED)))
read_msgs++;
}
* 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(OPTMAILDIRTRASH)))
+ if (ctx->deleted && !(ctx->magic == MUTT_MAILDIR && option(OPT_MAILDIR_TRASH)))
{
snprintf(buf, sizeof(buf),
ctx->deleted == 1 ? _("Purge %d deleted message?") :
}
}
- if (option(OPTMARKOLD))
+ if (option(OPT_MARK_OLD))
{
for (i = 0; i < ctx->msgcount; i++)
{
/* tag messages for moving, and clear old tags, if any */
for (i = 0; i < ctx->msgcount; i++)
if (ctx->hdrs[i]->read && !ctx->hdrs[i]->deleted &&
- !(ctx->hdrs[i]->flagged && option(OPTKEEPFLAGGED)))
+ !(ctx->hdrs[i]->flagged && option(OPT_KEEP_FLAGGED)))
ctx->hdrs[i]->tagged = true;
else
ctx->hdrs[i]->tagged = false;
for (i = 0; i < ctx->msgcount; i++)
{
if (ctx->hdrs[i]->read && !ctx->hdrs[i]->deleted &&
- !(ctx->hdrs[i]->flagged && option(OPTKEEPFLAGGED)))
+ !(ctx->hdrs[i]->flagged && option(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(OPTSAVEEMPTY))
+ !mutt_is_spool(ctx->path) && !option(OPT_SAVE_EMPTY))
mx_unlink_empty(ctx->path);
#ifdef USE_SIDEBAR
{
if (!ctx->hdrs[i]->quasi_deleted &&
((committing && (!ctx->hdrs[i]->deleted ||
- (ctx->magic == MUTT_MAILDIR && option(OPTMAILDIRTRASH)))) ||
+ (ctx->magic == MUTT_MAILDIR && option(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(OPTMAILDIRTRASH)))
+ if (!committing || (ctx->magic == MUTT_MAILDIR && option(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(OPTSAVEEMPTY))
+ !mutt_is_spool(ctx->path) && !option(OPT_SAVE_EMPTY))
{
unlink(ctx->path);
mx_fastclose_mailbox(ctx);
if (h2)
{
h2->superseded = true;
- if (option(OPTSCORE))
+ if (option(OPT_SCORE))
mutt_score_message(ctx, h2, 1);
}
}
hash_insert(ctx->subj_hash, h->env->real_subj, h);
mutt_label_hash_add(ctx, h);
- if (option(OPTSCORE))
+ if (option(OPT_SCORE))
mutt_score_message(ctx, h, 0);
if (h->changed)
if (!WithCrypto)
return;
- if (option(OPTCRYPTTIMESTAMP))
+ if (option(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(OPTCRYPTUSEPKA) && (msg->security & SIGN))
+ if (option(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(OPTPGPRETAINABLESIG)))
+ (!(flags & ENCRYPT) || option(OPT_PGP_RETAINABLE_SIG)))
{
if (!(tmp_pbody = crypt_pgp_sign_message(msg->content)))
return -1;
a->encoding = ENC7BIT;
convert_to_7bit(a->parts);
}
- else if ((WithCrypto & APPLICATION_PGP) && option(OPTPGPSTRICTENC))
+ else if ((WithCrypto & APPLICATION_PGP) && option(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(OPTPGPSTRICTENC))))
+ (a->content->from || (a->content->space && option(OPT_PGP_STRICT_ENC))))
a->encoding = ENCQUOTEDPRINTABLE;
a = a->next;
}
}
if ((WithCrypto & APPLICATION_PGP))
- set_option(OPTDONTHANDLEPGPKEYS);
+ set_option(OPT_DONT_HANDLE_PGP_KEYS);
if (!h)
{
mutt_unlink(tempfname);
if ((WithCrypto & APPLICATION_PGP))
- unset_option(OPTDONTHANDLEPGPKEYS);
+ unset_option(OPT_DONT_HANDLE_PGP_KEYS);
}
/**
return 0;
if ((WithCrypto & APPLICATION_PGP))
- set_option(OPTPGPCHECKTRUST);
+ set_option(OPT_PGP_CHECK_TRUST);
last = rfc822_append(&adrlist, msg->env->to, 0);
last = rfc822_append(last ? &last : &adrlist, msg->env->cc, 0);
rfc822_free_address(&adrlist);
return -1;
}
- unset_option(OPTPGPCHECKTRUST);
- if (option(OPTPGPSELFENCRYPT) || (quadoption(OPT_PGPENCRYPTSELF) == MUTT_YES))
+ unset_option(OPT_PGP_CHECK_TRUST);
+ if (option(OPT_PGP_SELF_ENCRYPT) || (quadoption(OPT_PGPENCRYPTSELF) == MUTT_YES))
self_encrypt = PgpSelfEncryptAs;
}
if ((WithCrypto & APPLICATION_SMIME) && (msg->security & APPLICATION_SMIME))
rfc822_free_address(&adrlist);
return -1;
}
- if (option(OPTSMIMESELFENCRYPT) || (quadoption(OPT_SMIMEENCRYPTSELF) == MUTT_YES))
+ if (option(OPT_SMIME_SELF_ENCRYPT) || (quadoption(OPT_SMIMEENCRYPTSELF) == MUTT_YES))
self_encrypt = SmimeSelfEncryptAs;
}
}
if (!WithCrypto)
return;
- if (!(option(OPTCRYPTOPPORTUNISTICENCRYPT) && (msg->security & OPPENCRYPT)))
+ if (!(option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT) && (msg->security & OPPENCRYPT)))
return;
crypt_get_keys(msg, &pgpkeylist, 1);
size_t hexdigits;
/* User input may be partial name, fingerprint or short or long key ID,
- * independent of OPTPGPLONGIDS.
+ * independent of OPT_PGP_LONG_IDS.
* Fingerprint without spaces is 40 hex digits (SHA-1) or 32 hex digits (MD5).
* Strip leading "0x" for key ID detection and prepare pl and ps to indicate
* if an ID was found and to simplify logic in the key loop's inner
if (k->kobj && k->kobj->subkeys)
{
s = k->kobj->subkeys->keyid;
- if ((!option(OPTPGPLONGIDS)) && (strlen(s) == 16))
+ if ((!option(OPT_PGP_LONG_IDS)) && (strlen(s) == 16))
/* Return only the short keyID. */
s += 8;
}
return NULL;
}
- if (option(OPTCRYPTUSEPKA))
+ if (option(OPT_CRYPT_USE_PKA))
{
err = set_pka_sig_notation(ctx);
if (err)
return NULL;
}
- if (option(OPTCRYPTUSEPKA))
+ if (option(OPT_CRYPT_USE_PKA))
{
err = set_pka_sig_notation(ctx);
if (err)
state_puts("\n", s);
}
- if (option(OPTCRYPTUSEPKA))
+ if (option(OPT_CRYPT_USE_PKA))
{
if (sig->pka_trust == 1 && sig->pka_address)
{
key_table = NULL;
for (k = keys; k; k = k->next)
{
- if (!option(OPTPGPSHOWUNUSABLE) && (k->flags & KEYFLAG_CANTUSE))
+ if (!option(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(OPTPGPCHECKTRUST))
+ if (option(OPT_PGP_CHECK_TRUST))
{
if (!crypt_key_is_valid(key_table[menu->current]))
{
}
}
- if (option(OPTPGPCHECKTRUST) && (!crypt_id_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])))
{
const char *warn_s = NULL;
{
crypt_hook_val = crypt_hook->data;
r = MUTT_YES;
- if (!oppenc_mode && option(OPTCRYPTCONFIRMHOOK))
+ if (!oppenc_mode && option(OPT_CRYPT_CONFIRM_HOOK))
{
snprintf(buf, sizeof(buf), _("Use keyID = \"%s\" for %s?"),
crypt_hook_val, p->mailbox);
char buff[LONG_STRING];
struct stat sb;
- unset_option(OPTPGPCHECKTRUST);
+ unset_option(OPT_PGP_CHECK_TRUST);
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(OPTCRYPTOPPORTUNISTICENCRYPT) && (msg->security & OPPENCRYPT))
+ if (option(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(OPTCRYPTOPPORTUNISTICENCRYPT))
+ else if (option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT))
{
if (is_smime)
{
#ifdef CRYPT_BACKEND_CLASSIC_PGP
if (
#ifdef CRYPT_BACKEND_GPGME
- (!option(OPTCRYPTUSEGPGME))
+ (!option(OPT_CRYPT_USE_GPGME))
#else
1
#endif
#ifdef CRYPT_BACKEND_CLASSIC_SMIME
if (
#ifdef CRYPT_BACKEND_GPGME
- (!option(OPTCRYPTUSEGPGME))
+ (!option(OPT_CRYPT_USE_GPGME))
#else
1
#endif
crypto_module_register(&crypt_mod_smime_classic);
#endif
- if (option(OPTCRYPTUSEGPGME))
+ if (option(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(OPTPGPIGNORESUB))))
+ if (!(is_uid || is_fpr || (*is_subkey && option(OPT_PGP_IGNORE_SUB))))
memset(&tmp, 0, sizeof(tmp));
break;
break;
}
- if (!is_uid && !(*is_subkey && option(OPTPGPIGNORESUB)))
+ if (!is_uid && !(*is_subkey && option(OPT_PGP_IGNORE_SUB)))
tmp.flags |= flags;
break;
{
mutt_debug(2, "key len: %s\n", p);
- if (!(*is_subkey && option(OPTPGPIGNORESUB)) && mutt_atos(p, &tmp.keylen) < 0)
+ if (!(*is_subkey && option(OPT_PGP_IGNORE_SUB)) && mutt_atos(p, &tmp.keylen) < 0)
goto bail;
break;
}
{
mutt_debug(2, "pubkey algorithm: %s\n", p);
- if (!(*is_subkey && option(OPTPGPIGNORESUB)))
+ if (!(*is_subkey && option(OPT_PGP_IGNORE_SUB)))
{
int x = 0;
if (mutt_atoi(p, &x) < 0)
{
mutt_debug(2, "key id: %s\n", p);
- if (!(*is_subkey && option(OPTPGPIGNORESUB)))
+ if (!(*is_subkey && option(OPT_PGP_IGNORE_SUB)))
mutt_str_replace(&tmp.keyid, p);
break;
}
}
/* ignore user IDs on subkeys */
- if (!is_uid && (*is_subkey && option(OPTPGPIGNORESUB)))
+ if (!is_uid && (*is_subkey && option(OPT_PGP_IGNORE_SUB)))
break;
mutt_debug(2, "user ID: %s\n", NONULL(p));
}
}
- if (!is_uid && (!*is_subkey || !option(OPTPGPIGNORESUB) ||
+ if (!is_uid && (!*is_subkey || !option(OPT_PGP_IGNORE_SUB) ||
!((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(OPTPGPIGNORESUB))))
+ if (!(is_uid || is_fpr || (*is_subkey && option(OPT_PGP_IGNORE_SUB))))
k = safe_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(OPTUSEGPGAGENT))
+ if (!option(OPT_USE_GPG_AGENT))
return false;
if ((tty = ttyname(0)))
static struct PgpKeyInfo *_pgp_parent(struct PgpKeyInfo *k)
{
- if ((k->flags & KEYFLAG_SUBKEY) && k->parent && option(OPTPGPIGNORESUB))
+ if ((k->flags & KEYFLAG_SUBKEY) && k->parent && option(OPT_PGP_IGNORE_SUB))
k = k->parent;
return k;
char *_pgp_keyid(struct PgpKeyInfo *k)
{
- if (option(OPTPGPLONGIDS))
+ if (option(OPT_PGP_LONG_IDS))
return k->keyid;
else
return (k->keyid + 8);
}
mutt_endwin(NULL);
- set_option(OPTDONTHANDLEPGPKEYS);
+ set_option(OPT_DONT_HANDLE_PGP_KEYS);
for (; top; top = top->next)
{
break;
}
- unset_option(OPTDONTHANDLEPGPKEYS);
+ unset_option(OPT_DONT_HANDLE_PGP_KEYS);
}
static struct Body *pgp_decrypt_part(struct Body *a, struct State *s,
fputs(buffer, stdout);
}
- if (mutt_wait_filter(thepid) && option(OPTPGPCHECKEXIT))
+ if (mutt_wait_filter(thepid) && option(OPT_PGP_CHECK_EXIT))
empty = true;
safe_fclose(&pgperr);
{
keyID = crypt_hook->data;
r = MUTT_YES;
- if (!oppenc_mode && option(OPTCRYPTCONFIRMHOOK))
+ if (!oppenc_mode && option(OPT_CRYPT_CONFIRM_HOOK))
{
snprintf(buf, sizeof(buf), _("Use keyID = \"%s\" for %s?"), keyID, p->mailbox);
r = mutt_yesorno(buf, MUTT_YES);
}
safe_fclose(&pgpin);
- if (mutt_wait_filter(thepid) && option(OPTPGPCHECKEXIT))
+ if (mutt_wait_filter(thepid) && option(OPT_PGP_CHECK_EXIT))
empty = 1;
unlink(pgpinfile);
fprintf(pgpin, "%s\n", PgpPass);
safe_fclose(&pgpin);
- if (mutt_wait_filter(thepid) && option(OPTPGPCHECKEXIT))
+ if (mutt_wait_filter(thepid) && option(OPT_PGP_CHECK_EXIT))
empty = true;
mutt_unlink(pgpinfile);
return msg->security;
/* If autoinline and no crypto options set, then set inline. */
- if (option(OPTPGPAUTOINLINE) &&
+ if (option(OPT_PGP_AUTO_INLINE) &&
!((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(OPTCRYPTOPPORTUNISTICENCRYPT) && (msg->security & OPPENCRYPT))
+ if (option(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(OPTCRYPTOPPORTUNISTICENCRYPT))
+ else if (option(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(OPTPGPCHECKTRUST);
+ unset_option(OPT_PGP_CHECK_TRUST);
if ((p = pgp_ask_for_key(_("Sign as: "), NULL, 0, PGP_SECRING)))
{
for (i = 0, kp = keys; kp; kp = kp->next)
{
- if (!option(OPTPGPSHOWUNUSABLE) && (kp->flags & KEYFLAG_CANTUSE))
+ if (!option(OPT_PGP_SHOW_UNUSABLE) && (kp->flags & KEYFLAG_CANTUSE))
{
unusable = true;
continue;
for (a = kp->address; a; a = a->next)
{
- if (!option(OPTPGPSHOWUNUSABLE) && (a->flags & KEYFLAG_CANTUSE))
+ if (!option(OPT_PGP_SHOW_UNUSABLE) && (a->flags & KEYFLAG_CANTUSE))
{
unusable = true;
continue;
/* XXX make error reporting more verbose */
- if (option(OPTPGPCHECKTRUST))
+ if (option(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(OPTPGPCHECKTRUST) && (!pgp_id_is_valid(KeyTable[menu->current]) ||
+ if (option(OPT_PGP_CHECK_TRUST) && (!pgp_id_is_valid(KeyTable[menu->current]) ||
!pgp_id_is_strong(KeyTable[menu->current])))
{
char *str = "";
struct stat sb;
pid_t thepid;
struct PgpKeyInfo *key = NULL;
- unset_option(OPTPGPCHECKTRUST);
+ unset_option(OPT_PGP_CHECK_TRUST);
key = pgp_ask_for_key(_("Please enter the key ID: "), NULL, 0, PGP_PUBRING);
struct Address *t = NULL;
bool found = false;
- if (option(OPTSDEFAULTDECRYPTKEY) && SmimeDefaultKey && *SmimeDefaultKey)
+ if (option(OPT_SDEFAULT_DECRYPT_KEY) && SmimeDefaultKey && *SmimeDefaultKey)
{
snprintf(SmimeKeyToUse, sizeof(SmimeKeyToUse), "%s/%s", NONULL(SmimeKeys), SmimeDefaultKey);
mutt_unlink(tmpfname);
buf[0] = '\0';
- if (option(OPTASKCERTLABEL))
+ if (option(OPT_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(OPTCRYPTOPPORTUNISTICENCRYPT) && (msg->security & OPPENCRYPT))
+ if (option(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(OPTCRYPTOPPORTUNISTICENCRYPT))
+ else if (option(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(OPTSAVEUNSUB)))
+ !(nntp_data->newsrc_ent || nntp_data->subscribed || option(OPT_SAVE_UNSUB)))
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(OPTSAVEUNSUB))
+ else if (nntp_data->newsrc_ent || nntp_data->subscribed || option(OPT_SAVE_UNSUB))
continue;
nntp_delete_group_cache(nntp_data);
return;
/* article isn't read but cached, it's old */
- if (option(OPTMARKOLD))
+ if (option(OPT_MARK_OLD))
hdr->old = true;
}
return NULL;
nntp_data->subscribed = false;
- if (!option(OPTSAVEUNSUB))
+ if (!option(OPT_SAVE_UNSUB))
{
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(OPTSSLFORCETLS)))
+ if (nserv->use_tls != 1 && (nserv->hasSTARTTLS || option(OPT_SSL_FORCE_TLS)))
{
if (nserv->use_tls == 0)
nserv->use_tls =
- option(OPTSSLFORCETLS) ||
+ option(OPT_SSL_FORCE_TLS) ||
query_quadoption(OPT_SSLSTARTTLS,
_("Secure connection with TLS?")) == MUTT_YES ?
2 :
#endif
/* fetch list of articles */
- if (option(OPTLISTGROUP) && nntp_data->nserv->hasLISTGROUP && !nntp_data->deleted)
+ if (option(OPT_LIST_GROUP) && 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(OPTLISTGROUP) && nntp_data->nserv->hasLISTGROUP)
+ if (option(OPT_LIST_GROUP) && nntp_data->nserv->hasLISTGROUP)
break;
else
continue;
first_over = current + 1;
}
- if (!option(OPTLISTGROUP) || !nntp_data->nserv->hasLISTGROUP)
+ if (!option(OPT_LIST_GROUP) || !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(OPTSAVEUNSUB))
+ if (!nntp_data->newsrc_ent && !nntp_data->subscribed && !option(OPT_SAVE_UNSUB))
ctx->readonly = true;
/* select newsgroup */
nntp_data->deleted = true;
nntp_active_save_cache(nserv);
}
- if (nntp_data->newsrc_ent && !nntp_data->subscribed && !option(OPTSAVEUNSUB))
+ if (nntp_data->newsrc_ent && !nntp_data->subscribed && !option(OPT_SAVE_UNSUB))
{
FREE(&nntp_data->newsrc_ent);
nntp_data->newsrc_len = 0;
nntp_data->deleted = false;
/* get description if empty */
- if (option(OPTLOADDESC) && !nntp_data->desc)
+ if (option(OPT_LOAD_DESC) && !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(OPTSAVEUNSUB)))
+ (nntp_data->newsrc_ent || nntp_data->subscribed || option(OPT_SAVE_UNSUB)))
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(OPTLOADDESC))
+ if (option(OPT_LOAD_DESC))
rc = get_description(&nntp_data, "*", _("Loading descriptions..."));
nntp_active_save_cache(nserv);
return -1;
/* check subscribed newsgroups for new articles */
- if (option(OPTSHOWNEWNEWS))
+ if (option(OPT_SHOW_NEW_NEWS))
{
mutt_message(_("Checking for new messages..."));
for (i = 0; i < nserv->groups_num; i++)
}
/* loading descriptions */
- if (option(OPTLOADDESC))
+ if (option(OPT_LOAD_DESC))
{
unsigned int count = 0;
struct Progress progress;
*/
enum GlobalBool
{
- OPTALLOW8BIT,
- OPTALLOWANSI,
- OPTARROWCURSOR,
- OPTASCIICHARS,
- OPTASKBCC,
- OPTASKCC,
- OPTASKFOLLOWUP,
- OPTASKXCOMMENTTO,
- OPTATTACHSPLIT,
- OPTAUTOEDIT,
- OPTAUTOTAG,
- OPTBEEP,
- OPTBEEPNEW,
- OPTBOUNCEDELIVERED,
- OPTBRAILLEFRIENDLY,
- OPTCHECKMBOXSIZE,
- OPTCHECKNEW,
- OPTCOLLAPSEALL,
- OPTCOLLAPSEUNREAD,
- OPTCOLLAPSEFLAGGED,
- OPTCONFIRMAPPEND,
- OPTCONFIRMCREATE,
- OPTDELETEUNTAG,
- OPTDIGESTCOLLAPSE,
- OPTDUPTHREADS,
- OPTEDITHDRS,
- OPTENCODEFROM,
- OPTENVFROM,
- OPTFASTREPLY,
- OPTFCCCLEAR,
- OPTFLAGSAFE,
- OPTFOLLOWUPTO,
- OPTFORCENAME,
- OPTFORWDECODE,
- OPTFORWQUOTE,
- OPTFORWREF,
+ OPT_ALLOW_8BIT,
+ OPT_ALLOW_ANSI,
+ OPT_ARROW_CURSOR,
+ OPT_ASCII_CHARS,
+ OPT_ASK_BCC,
+ OPT_ASK_CC,
+ OPT_ASK_FOLLOWUP,
+ OPT_ASK_XCOMMENTTO,
+ OPT_ATTACH_SPLIT,
+ OPT_AUTO_EDIT,
+ OPT_AUTO_TAG,
+ OPT_BEEP,
+ OPT_BEEP_NEW,
+ OPT_BOUNCE_DELIVERED,
+ OPT_BRAILLE_FRIENDLY,
+ OPT_CHECK_MBOX_SIZE,
+ OPT_CHECK_NEW,
+ OPT_COLLAPSE_ALL,
+ OPT_COLLAPSE_UNREAD,
+ OPT_COLLAPSE_FLAGGED,
+ OPT_CONFIRM_APPEND,
+ OPT_CONFIRM_CREATE,
+ OPT_DELETE_UNTAG,
+ OPT_DIGEST_COLLAPSE,
+ OPT_DUP_THREADS,
+ OPT_EDIT_HDRS,
+ OPT_ENCODE_FROM,
+ OPT_ENV_FROM,
+ OPT_FAST_REPLY,
+ OPT_FCC_CLEAR,
+ OPT_FLAG_SAFE,
+ OPT_FOLLOW_UP_TO,
+ OPT_FORCE_NAME,
+ OPT_FORW_DECODE,
+ OPT_FORW_QUOTE,
+ OPT_FORW_REF,
#ifdef USE_HCACHE
- OPTHCACHEVERIFY,
+ OPT_HCACHE_VERIFY,
#if defined(HAVE_QDBM) || defined(HAVE_TC) || defined(HAVE_KC)
- OPTHCACHECOMPRESS,
+ OPT_HCACHE_COMPRESS,
#endif /* HAVE_QDBM */
#endif
- OPTHDRS,
- OPTHEADER,
- OPTHEADERCOLORPARTIAL,
- OPTHELP,
- OPTHIDDENHOST,
- OPTHIDELIMITED,
- OPTHIDEMISSING,
- OPTHIDETHREADSUBJECT,
- OPTHIDETOPLIMITED,
- OPTHIDETOPMISSING,
- OPTHISTREMOVEDUPS,
- OPTHONORDISP,
- OPTIGNORELWS,
- OPTIGNORELISTREPLYTO,
+ 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_HIST_REMOVE_DUPS,
+ OPT_HONOR_DISP,
+ OPT_IGNORE_LWS,
+ OPT_IGNORE_LIST_REPLY_TO,
#ifdef USE_IMAP
- OPTIMAPCHECKSUBSCRIBED,
- OPTIMAPIDLE,
- OPTIMAPLSUB,
- OPTIMAPPASSIVE,
- OPTIMAPPEEK,
- OPTIMAPSERVERNOISE,
+ OPT_IMAP_CHECK_SUBSCRIBED,
+ OPT_IMAP_IDLE,
+ OPT_IMAP_LSUB,
+ OPT_IMAP_PASSIVE,
+ OPT_IMAP_PEEK,
+ OPT_IMAP_SERVER_NOISE,
#endif
#ifdef USE_SSL
#ifndef USE_SSL_GNUTLS
- OPTSSLSYSTEMCERTS,
- OPTSSLV2,
+ OPT_SSL_SYSTEM_CERTS,
+ OPT_SSLV2,
#endif /* USE_SSL_GNUTLS */
- OPTSSLV3,
- OPTTLSV1,
- OPTTLSV1_1,
- OPTTLSV1_2,
- OPTSSLFORCETLS,
- OPTSSLVERIFYDATES,
- OPTSSLVERIFYHOST,
+ OPT_SSLV3,
+ OPT_TLSV1,
+ OPT_TLSV1_1,
+ OPT_TLSV1_2,
+ OPT_SSL_FORCE_TLS,
+ OPT_SSL_VERIFY_DATES,
+ OPT_SSL_VERIFY_HOST,
#if defined(USE_SSL_OPENSSL) && defined(HAVE_SSL_PARTIAL_CHAIN)
- OPTSSLVERIFYPARTIAL,
+ OPT_SSL_VERIFY_PARTIAL,
#endif /* USE_SSL_OPENSSL */
#endif /* defined(USE_SSL) */
- OPTIMPLICITAUTOVIEW,
- OPTINCLUDEONLYFIRST,
- OPTKEEPFLAGGED,
- OPTKEYWORDSLEGACY,
- OPTKEYWORDSSTANDARD,
- OPTMAILCAPSANITIZE,
- OPTMAILCHECKRECENT,
- OPTMAILCHECKSTATS,
- OPTMAILDIRTRASH,
- OPTMAILDIRCHECKCUR,
- OPTMARKERS,
- OPTMARKOLD,
- OPTMENUSCROLL, /**< scroll menu instead of implicit next-page */
- OPTMENUMOVEOFF, /**< allow menu to scroll past last entry */
+ OPT_IMPLICIT_AUTOVIEW,
+ OPT_INCLUDE_ONLY_FIRST,
+ OPT_KEEP_FLAGGED,
+ OPT_KEYWORDS_LEGACY,
+ OPT_KEYWORDS_STANDARD,
+ 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 */
#if defined(USE_IMAP) || defined(USE_POP)
- OPTMESSAGECACHECLEAN,
+ OPT_MESSAGE_CACHE_CLEAN,
#endif
- OPTMETAKEY, /**< interpret ALT-x as ESC-x */
- OPTMETOO,
- OPTMHPURGE,
- OPTMIMEFORWDECODE,
+ OPT_METAKEY, /**< interpret ALT-x as ESC-x */
+ OPT_ME_TOO,
+ OPT_MH_PURGE,
+ OPT_MIME_FORW_DECODE,
#ifdef USE_NNTP
- OPTMIMESUBJECT, /**< encode subject line with RFC2047 */
+ OPT_MIME_SUBJECT, /**< encode subject line with RFC2047 */
#endif
- OPTNARROWTREE,
- OPTPAGERSTOP,
- OPTPIPEDECODE,
- OPTPIPESPLIT,
+ OPT_NARROW_TREE,
+ OPT_PAGER_STOP,
+ OPT_PIPE_DECODE,
+ OPT_PIPE_SPLIT,
#ifdef USE_POP
- OPTPOPAUTHTRYALL,
- OPTPOPLAST,
+ OPT_POP_AUTH_TRY_ALL,
+ OPT_POP_LAST,
#endif
- OPTPOSTPONEENCRYPT,
- OPTPRINTDECODE,
- OPTPRINTSPLIT,
- OPTPROMPTAFTER,
- OPTREADONLY,
- OPTREFLOWSPACEQUOTES,
- OPTREFLOWTEXT,
- OPTREPLYSELF,
- OPTREPLYWITHXORIG,
- OPTRESOLVE,
- OPTRESUMEDRAFTFILES,
- OPTRESUMEEDITEDDRAFTFILES,
- OPTREVALIAS,
- OPTREVNAME,
- OPTREVREAL,
- OPTRFC2047PARAMS,
- OPTSAVEADDRESS,
- OPTSAVEEMPTY,
- OPTSAVENAME,
- OPTSCORE,
+ OPT_POSTPONE_ENCRYPT,
+ OPT_PRINT_DECODE,
+ OPT_PRINT_SPLIT,
+ OPT_PROMPT_AFTER,
+ OPT_READONLY,
+ 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_REV_ALIAS,
+ OPT_REV_NAME,
+ OPT_REV_REAL,
+ OPT_RFC2047_PARAMS,
+ OPT_SAVE_ADDRESS,
+ OPT_SAVE_EMPTY,
+ OPT_SAVE_NAME,
+ OPT_SCORE,
#ifdef USE_SIDEBAR
- OPTSIDEBAR,
- OPTSIDEBARFOLDERINDENT,
- OPTSIDEBARNEWMAILONLY,
- OPTSIDEBARNEXTNEWWRAP,
- OPTSIDEBARSHORTPATH,
- OPTSIDEBARONRIGHT,
+ OPT_SIDEBAR,
+ OPT_SIDEBAR_FOLDER_INDENT,
+ OPT_SIDEBAR_NEWMAIL_ONLY,
+ OPT_SIDEBAR_NEXT_NEW_WRAP,
+ OPT_SIDEBAR_SHORT_PATH,
+ OPT_SIDEBAR_ON_RIGHT,
#endif
- OPTSIGDASHES,
- OPTSIGONTOP,
- OPTSORTRE,
- OPTSTATUSONTOP,
- OPTSTRICTTHREADS,
- OPTSUSPEND,
- OPTTEXTFLOWED,
- OPTTHOROUGHSRC,
- OPTTHREADRECEIVED,
- OPTTILDE,
- OPTTSENABLED,
- OPTUNCOLLAPSEJUMP,
- OPTUNCOLLAPSENEW,
- OPTUSE8BITMIME,
- OPTUSEDOMAIN,
- OPTUSEFROM,
- OPTUSEGPGAGENT,
+ OPT_SIG_DASHES,
+ OPT_SIG_ON_TOP,
+ OPT_SORT_RE,
+ OPT_STATUS_ON_TOP,
+ OPT_STRICT_THREADS,
+ OPT_SUSPEND,
+ OPT_TEXT_FLOWED,
+ OPT_THOROUGH_SRC,
+ OPT_THREAD_RECEIVED,
+ OPT_TILDE,
+ OPT_TS_ENABLED,
+ OPT_UNCOLLAPSE_JUMP,
+ OPT_UNCOLLAPSE_NEW,
+ OPT_USE_8BIT_MIME,
+ OPT_USE_DOMAIN,
+ OPT_USE_FROM,
+ OPT_USE_GPG_AGENT,
#ifdef HAVE_LIBIDN
- OPTIDNDECODE,
- OPTIDNENCODE,
+ OPT_IDN_DECODE,
+ OPT_IDN_ENCODE,
#endif
#ifdef HAVE_GETADDRINFO
- OPTUSEIPV6,
+ OPT_USE_IPV6,
#endif
- OPTWAITKEY,
- OPTWEED,
- OPTWRAP,
- OPTWRAPSEARCH,
- OPTWRITEBCC, /**< write out a bcc header? */
- OPTXMAILER,
+ OPT_WAIT_KEY,
+ OPT_WEED,
+ OPT_WRAP,
+ OPT_WRAP_SEARCH,
+ OPT_WRITE_BCC, /**< write out a bcc header? */
+ OPT_XMAILER,
- OPTCRYPTUSEGPGME,
- OPTCRYPTUSEPKA,
+ OPT_CRYPT_USE_GPGME,
+ OPT_CRYPT_USE_PKA,
/* PGP options */
- OPTCRYPTAUTOSIGN,
- OPTCRYPTAUTOENCRYPT,
- OPTCRYPTAUTOPGP,
- OPTCRYPTAUTOSMIME,
- OPTCRYPTCONFIRMHOOK,
- OPTCRYPTOPPORTUNISTICENCRYPT,
- OPTCRYPTREPLYENCRYPT,
- OPTCRYPTREPLYSIGN,
- OPTCRYPTREPLYSIGNENCRYPTED,
- OPTCRYPTTIMESTAMP,
- OPTSMIMEISDEFAULT,
- OPTSMIMESELFENCRYPT,
- OPTASKCERTLABEL,
- OPTSDEFAULTDECRYPTKEY,
- OPTPGPIGNORESUB,
- OPTPGPCHECKEXIT,
- OPTPGPLONGIDS,
- OPTPGPAUTODEC,
- OPTPGPRETAINABLESIG,
- OPTPGPSELFENCRYPT,
- OPTPGPSTRICTENC,
- OPTFORWDECRYPT,
- OPTPGPSHOWUNUSABLE,
- OPTPGPAUTOINLINE,
- OPTPGPREPLYINLINE,
+ OPT_CRYPT_AUTO_SIGN,
+ OPT_CRYPT_AUTO_ENCRYPT,
+ OPT_CRYPT_AUTO_PGP,
+ OPT_CRYPT_AUTO_SMIME,
+ OPT_CRYPT_CONFIRM_HOOK,
+ OPT_CRYPT_OPPORTUNISTIC_ENCRYPT,
+ OPT_CRYPT_REPLY_ENCRYPT,
+ OPT_CRYPT_REPLY_SIGN,
+ OPT_CRYPT_REPLY_SIGN_ENCRYPTED,
+ OPT_CRYPT_TIMESTAMP,
+ OPT_SMIME_IS_DEFAULT,
+ OPT_SMIME_SELF_ENCRYPT,
+ OPT_ASK_CERT_LABEL,
+ OPT_SDEFAULT_DECRYPT_KEY,
+ OPT_PGP_IGNORE_SUB,
+ OPT_PGP_CHECK_EXIT,
+ OPT_PGP_LONG_IDS,
+ OPT_PGP_AUTO_DEC,
+ OPT_PGP_RETAINABLE_SIG,
+ OPT_PGP_SELF_ENCRYPT,
+ OPT_PGP_STRICT_ENC,
+ OPT_FORW_DECRYPT,
+ OPT_PGP_SHOW_UNUSABLE,
+ OPT_PGP_AUTO_INLINE,
+ OPT_PGP_REPLY_INLINE,
/* news options */
#ifdef USE_NNTP
- OPTSHOWNEWNEWS,
- OPTSHOWONLYUNREAD,
- OPTSAVEUNSUB,
- OPTLISTGROUP,
- OPTLOADDESC,
- OPTXCOMMENTTO,
+ OPT_SHOW_NEW_NEWS,
+ OPT_SHOW_ONLY_UNREAD,
+ OPT_SAVE_UNSUB,
+ OPT_LIST_GROUP,
+ OPT_LOAD_DESC,
+ OPT_XCOMMENT_TO,
#endif
/* pseudo options */
- OPTAUXSORT, /**< (pseudo) using auxiliary sort function */
- OPTFORCEREFRESH, /**< (pseudo) refresh even during macros */
- OPTLOCALES, /**< (pseudo) set if user has valid locale definition */
- OPTNOCURSES, /**< (pseudo) when sending in batch mode */
- OPTSEARCHREVERSE, /**< (pseudo) used by ci_search_command */
- OPTMSGERR, /**< (pseudo) used by mutt_error/mutt_message */
- OPTSEARCHINVALID, /**< (pseudo) used to invalidate the search pat */
- OPTSIGNALSBLOCKED, /**< (pseudo) using by mutt_block_signals () */
- OPTSYSSIGNALSBLOCKED, /**< (pseudo) using by mutt_block_signals_system () */
- OPTNEEDRESORT, /**< (pseudo) used to force a re-sort */
- OPTRESORTINIT, /**< (pseudo) used to force the next resort to be from scratch */
- OPTVIEWATTACH, /**< (pseudo) signals that we are viewing attachments */
- OPTSORTSUBTHREADS, /**< (pseudo) used when $sort_aux changes */
- OPTNEEDRESCORE, /**< (pseudo) set when the `score' command is used */
- OPTATTACHMSG, /**< (pseudo) used by attach-message */
- OPTHIDEREAD, /**< (pseudo) whether or not hide read messages */
- OPTKEEPQUIET, /**< (pseudo) shut up the message and refresh
+ OPT_AUX_SORT, /**< (pseudo) using auxiliary sort function */
+ OPT_FORCE_REFRESH, /**< (pseudo) refresh even during macros */
+ OPT_LOCALES, /**< (pseudo) set if user has valid locale definition */
+ 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_SIGNALS_BLOCKED, /**< (pseudo) using by mutt_block_signals () */
+ OPT_SYS_SIGNALS_BLOCKED, /**< (pseudo) using by mutt_block_signals_system () */
+ 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. */
- OPTMENUCALLER, /**< (pseudo) tell menu to give caller a take */
- OPTREDRAWTREE, /**< (pseudo) redraw the thread tree */
- OPTPGPCHECKTRUST, /**< (pseudo) used by pgp_select_key () */
- OPTDONTHANDLEPGPKEYS, /**< (pseudo) used to extract PGP keys */
- OPTIGNOREMACROEVENTS, /**< (pseudo) don't process macro/push/exec events while set */
+ 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 */
#ifdef USE_NNTP
- OPTNEWS, /**< (pseudo) used to change reader mode */
- OPTNEWSSEND, /**< (pseudo) used to change behavior when posting */
+ OPT_NEWS, /**< (pseudo) used to change reader mode */
+ OPT_NEWS_SEND, /**< (pseudo) used to change behavior when posting */
#endif
#ifdef USE_NOTMUCH
- OPTVIRTSPOOLFILE,
- OPTNOTMUCHRECORD,
+ OPT_VIRT_SPOOL_FILE,
+ OPT_NOTMUCH_RECORD,
#endif
- OPTMAX
+ OPT_GLOBAL_MAX
};
#define mutt_bit_set(v, n) v[n / 8] |= (1 << (n % 8))
/* bit vector for boolean variables */
#ifdef MAIN_C
-unsigned char Options[(OPTMAX + 7) / 8];
+unsigned char Options[(OPT_GLOBAL_MAX + 7) / 8];
#else
extern unsigned char Options[];
#endif
}
#define CHECK_ATTACH \
- if (option(OPTATTACHMSG)) \
+ if (option(OPT_ATTACH_MSG)) \
{ \
mutt_flushinp(); \
mutt_error(_(Function_not_permitted_in_attach_message_mode)); \
if (line_info[n].continuation)
{
- if (!cnt && option(OPTMARKERS))
+ if (!cnt && option(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(OPTHEADERCOLORPARTIAL))
+ if (!option(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(OPTHEADERCOLORPARTIAL))
+ if (!option(OPT_HEADER_COLOR_PARTIAL))
{
for (color_line = ColorHdrList; color_line; color_line = color_line->next)
{
/* 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(OPTHEADERCOLORPARTIAL)))
+ (line_info[n].type == MT_COLOR_HDEFAULT && option(OPT_HEADER_COLOR_PARTIAL)))
{
size_t nl;
x++;
/* Character Attributes */
- if (option(OPTALLOWANSI) && a != NULL && buf[x] == 'm')
+ if (option(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(OPTMARKERS) ? (*line_info)[n].continuation : 0;
+ int col = option(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(OPTWRAP))
+ if (option(OPT_WRAP))
{
if (cnt < b_read)
{
memcpy(rd->index_window, MuttIndexWindow, sizeof(struct MuttWindow));
rd->index_window->rows = rd->indexlen > 0 ? rd->indexlen - 1 : 0;
- if (option(OPTSTATUSONTOP))
+ if (option(OPT_STATUS_ON_TOP))
{
memcpy(rd->index_status_window, MuttStatusWindow, sizeof(struct MuttWindow));
}
}
- if (option(OPTHELP))
+ if (option(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(OPTTILDE))
+ if (option(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(OPTTSENABLED) && TSSupported && rd->index)
+ if (option(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(OPTBRAILLEFRIENDLY))
+ if (option(OPT_BRAILLE_FRIENDLY))
{
if (brailleLine != -1)
{
bool do_new_mail = false;
- if (Context && !option(OPTATTACHMSG))
+ if (Context && !option(OPT_ATTACH_MSG))
{
oldcount = Context ? Context->msgcount : 0;
/* check for new mail */
}
pager_menu->redraw = REDRAW_FULL;
- set_option(OPTSEARCHINVALID);
+ set_option(OPT_SEARCH_INVALID);
}
}
if (mutt_buffy_notify() || do_new_mail)
{
- if (option(OPTBEEPNEW))
+ if (option(OPT_BEEP_NEW))
beep();
if (NewMailCmd)
{
{
rd.topline = up_n_lines(PagerContext, rd.line_info, rd.curline, rd.hide_quoted);
}
- else if (option(OPTPAGERSTOP))
+ else if (option(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(OPTPAGERSTOP))
+ else if (option(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(OPTWRAPSEARCH))
+ else if (wrapped || !option(OPT_WRAP_SEARCH))
mutt_error(_("Not found."));
else
{
if (i >= 0)
rd.topline = i;
- else if (wrapped || !option(OPTWRAPSEARCH))
+ else if (wrapped || !option(OPT_WRAP_SEARCH))
mutt_error(_("Not found."));
else
{
CHECK_MODE(IsHeader(extra))
if (mutt_select_sort((ch == OP_SORT_REVERSE)) == 0)
{
- set_option(OPTNEEDRESORT);
+ set_option(OPT_NEED_RESORT);
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(OPTDELETEUNTAG))
+ if (option(OPT_DELETE_UNTAG))
mutt_set_flag(Context, extra->hdr, MUTT_TAG, 0);
pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX;
- if (option(OPTRESOLVE))
+ if (option(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(OPTRESOLVE))
+ if (extra->hdr->deleted && option(OPT_RESOLVE))
{
ch = -1;
rc = OP_MAIN_NEXT_UNDELETED;
break;
}
- if (option(OPTDELETEUNTAG))
+ if (option(OPT_DELETE_UNTAG))
mutt_thread_set_flag(extra->hdr, MUTT_TAG, 0, subthread);
- if (option(OPTRESOLVE))
+ if (option(OPT_RESOLVE))
{
rc = OP_MAIN_NEXT_UNDELETED;
ch = -1;
}
- if (!option(OPTRESOLVE) && PagerIndexLines)
+ if (!option(OPT_RESOLVE) && PagerIndexLines)
pager_menu->redraw = REDRAW_FULL;
else
pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX;
mutt_enter_command();
- if (option(OPTNEEDRESORT))
+ if (option(OPT_NEED_RESORT))
{
- unset_option(OPTNEEDRESORT);
+ unset_option(OPT_NEED_RESORT);
CHECK_MODE(IsHeader(extra));
- set_option(OPTNEEDRESORT);
+ set_option(OPT_NEED_RESORT);
}
if (old_PagerIndexLines != PagerIndexLines)
mutt_set_flag(Context, extra->hdr, MUTT_FLAG, !extra->hdr->flagged);
pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX;
- if (option(OPTRESOLVE))
+ if (option(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(OPTRESOLVE))
+ if (option(OPT_RESOLVE))
{
ch = -1;
rc = OP_MAIN_NEXT_UNDELETED;
}
pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX;
- if (option(OPTRESOLVE))
+ if (option(OPT_RESOLVE))
{
ch = -1;
rc = OP_NEXT_ENTRY;
first = 0;
Context->msgnotreadyet = -1;
pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX;
- if (option(OPTRESOLVE))
+ if (option(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(OPTRESOLVE))
+ if (option(OPT_RESOLVE))
{
ch = -1;
rc = OP_NEXT_ENTRY;
ch == OP_UNDELETE_THREAD ? 0 : 1);
if (r != -1)
{
- if (option(OPTRESOLVE))
+ if (option(OPT_RESOLVE))
{
rc = (ch == OP_DELETE_THREAD) ? OP_MAIN_NEXT_THREAD : OP_MAIN_NEXT_SUBTHREAD;
ch = -1;
}
- if (!option(OPTRESOLVE) && PagerIndexLines)
+ if (!option(OPT_RESOLVE) && PagerIndexLines)
pager_menu->redraw = REDRAW_FULL;
else
pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX;
break;
case OP_SIDEBAR_TOGGLE_VISIBLE:
- toggle_option(OPTSIDEBAR);
+ toggle_option(OPT_SIDEBAR);
mutt_reflow_windows();
break;
#endif
hdr->replied = true;
break;
case 'O':
- hdr->old = option(OPTMARKOLD) ? true : false;
+ hdr->old = option(OPT_MARK_OLD) ? true : false;
break;
case 'R':
hdr->read = true;
/* restore the original line */
line[strlen(line)] = ':';
- if (weed && option(OPTWEED) && mutt_matches_ignore(line))
+ if (weed && option(OPT_WEED) && mutt_matches_ignore(line))
goto done;
if (last)
if ((msg = mx_open_message(ctx, msgno)) != NULL)
{
- if (option(OPTTHOROUGHSRC))
+ if (option(OPT_THOROUGH_SRC))
{
/* decode the header / body */
memset(&s, 0, sizeof(s));
mx_close_message(ctx, &msg);
- if (option(OPTTHOROUGHSRC))
+ if (option(OPT_THOROUGH_SRC))
{
safe_fclose(&fp);
#ifdef USE_FMEMOPEN
return -1;
if (op == OP_SEARCH || op == OP_SEARCH_NEXT)
- unset_option(OPTSEARCHREVERSE);
+ unset_option(OPT_SEARCH_REVERSE);
else
- set_option(OPTSEARCHREVERSE);
+ set_option(OPT_SEARCH_REVERSE);
/* 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(OPTSEARCHINVALID);
+ set_option(OPT_SEARCH_INVALID);
strfcpy(LastSearch, buf, sizeof(LastSearch));
mutt_message(_("Compiling search pattern..."));
mutt_pattern_free(&SearchPattern);
}
}
- if (option(OPTSEARCHINVALID))
+ if (option(OPT_SEARCH_INVALID))
{
for (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(OPTSEARCHINVALID);
+ unset_option(OPT_SEARCH_INVALID);
}
- incr = (option(OPTSEARCHREVERSE)) ? -1 : 1;
+ incr = (option(OPT_SEARCH_REVERSE)) ? -1 : 1;
if (op == OP_SEARCH_OPPOSITE)
incr = -incr;
if (i > Context->vcount - 1)
{
i = 0;
- if (option(OPTWRAPSEARCH))
+ if (option(OPT_WRAP_SEARCH))
msg = _("Search wrapped to top.");
else
{
else if (i < 0)
{
i = Context->vcount - 1;
- if (option(OPTWRAPSEARCH))
+ if (option(OPT_WRAP_SEARCH))
msg = _("Search wrapped to bottom.");
else
{
{
if (bcached)
ctx->hdrs[i]->read = true;
- else if (option(OPTMARKOLD))
+ else if (option(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(OPTMESSAGECACHECLEAN))
+ if (option(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(OPTPOPLAST))
+ if (msgs > 0 && option(OPT_POP_LAST))
{
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(OPTPOPAUTHTRYALL)))
+ (ret == POP_A_FAILURE && !option(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(OPTPOPAUTHTRYALL)))
+ (ret == POP_A_FAILURE && !option(OPT_POP_AUTH_TRY_ALL)))
break;
authenticator++;
#ifdef USE_SSL
/* Attempt STLS if available and desired. */
- if (!pop_data->conn->ssf && (pop_data->cmd_stls || option(OPTSSLFORCETLS)))
+ if (!pop_data->conn->ssf && (pop_data->cmd_stls || option(OPT_SSL_FORCE_TLS)))
{
- if (option(OPTSSLFORCETLS))
+ if (option(OPT_SSL_FORCE_TLS))
pop_data->use_stls = 2;
if (pop_data->use_stls == 0)
{
}
}
- if (option(OPTSSLFORCETLS) && !pop_data->conn->ssf)
+ if (option(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(OPTNEWS);
+ int optnews = option(OPT_NEWS);
#endif
LastModify = st.st_mtime;
return (PostCount = 0);
#ifdef USE_NNTP
if (optnews)
- unset_option(OPTNEWS);
+ unset_option(OPT_NEWS);
#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(OPTNEWS);
+ set_option(OPT_NEWS);
#endif
}
mutt_set_flag(PostContext, PostContext->hdrs[menu->current],
MUTT_DELETE, (i == OP_DELETE) ? 1 : 0);
PostCount = PostContext->msgcount - PostContext->deleted;
- if (option(OPTRESOLVE) && menu->current < menu->max - 1)
+ if (option(OPT_RESOLVE) && menu->current < menu->max - 1)
{
menu->oldcurrent = menu->current;
menu->current++;
}
}
- if (option(OPTCRYPTOPPORTUNISTICENCRYPT))
+ if (option(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(OPTSMIMEISDEFAULT))
+ if (option(OPT_SMIME_IS_DEFAULT))
newhdr->security &= ~APPLICATION_PGP;
else
newhdr->security &= ~APPLICATION_SMIME;
#else
#define IsPrint(c) \
(isprint((unsigned char) (c)) || \
- (option(OPTLOCALES) ? 0 : ((unsigned char) (c) >= 0xa0)))
-#define IsWPrint(wc) (iswprint(wc) || (option(OPTLOCALES) ? 0 : (wc >= 0xa0)))
+ (option(OPT_LOCALES) ? 0 : ((unsigned char) (c) >= 0xa0)))
+#define IsWPrint(wc) (iswprint(wc) || (option(OPT_LOCALES) ? 0 : (wc >= 0xa0)))
#endif
int getdnsdomainname(char *d, size_t len);
{
if (!tag || top->tagged)
{
- if (!option(OPTATTACHSPLIT))
+ if (!option(OPT_ATTACH_SPLIT))
{
if (!buf[0])
{
menu->redraw |= REDRAW_MOTION;
}
- if (!option(OPTATTACHSPLIT) && (rc == 0))
+ if (!option(OPT_ATTACH_SPLIT) && (rc == 0))
mutt_message(_("Attachment saved."));
}
{
if (!tag || top->tagged)
{
- if (!filter && !option(OPTATTACHSPLIT))
+ if (!filter && !option(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(OPTATTACHSPLIT))
+ if (!filter && !option(OPT_ATTACH_SPLIT))
{
mutt_endwin(NULL);
thepid = mutt_create_filter(buf, &state.fpout, NULL, NULL);
pipe_attachment_list(buf, fp, tag, top, filter, &state);
safe_fclose(&state.fpout);
- if (mutt_wait_filter(thepid) != 0 || option(OPTWAITKEY))
+ if (mutt_wait_filter(thepid) != 0 || option(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(OPTATTACHSPLIT) && !rfc1524_mailcap_lookup(top, type, NULL, MUTT_PRINT))
+ if (!option(OPT_ATTACH_SPLIT) && !rfc1524_mailcap_lookup(top, type, NULL, MUTT_PRINT))
{
if ((ascii_strcasecmp("text/plain", top->subtype) == 0) ||
(ascii_strcasecmp("application/postscript", top->subtype) == 0))
_("Print attachment?")) != MUTT_YES)
return;
- if (!option(OPTATTACHSPLIT))
+ if (!option(OPT_ATTACH_SPLIT))
{
if (!can_print(top, tag))
return;
thepid = mutt_create_filter(NONULL(PrintCmd), &state.fpout, NULL, NULL);
print_attachment_list(fp, tag, top, &state);
safe_fclose(&state.fpout);
- if (mutt_wait_filter(thepid) != 0 || option(OPTWAITKEY))
+ if (mutt_wait_filter(thepid) != 0 || option(OPT_WAIT_KEY))
mutt_any_key_to_continue(NULL);
}
else
switch (op)
{
case OP_DISPLAY_HEADERS:
- toggle_option(OPTWEED);
+ toggle_option(OPT_WEED);
/* fall through */
case OP_VIEW_ATTACH:
for (; b; b = b->next)
{
i = init || b->collapsed;
- if (i && option(OPTDIGESTCOLLAPSE) && b->type == TYPEMULTIPART &&
+ if (i && option(OPT_DIGEST_COLLAPSE) && b->type == TYPEMULTIPART &&
(ascii_strcasecmp(b->subtype, "digest") == 0))
attach_collapse(b->parts, 1, 1, 0);
else if (b->type == TYPEMULTIPART || mutt_is_message_type(b->type, b->subtype))
N_("Function not permitted in attach-message mode.");
#define CHECK_ATTACH \
- if (option(OPTATTACHMSG)) \
+ if (option(OPT_ATTACH_MSG)) \
{ \
mutt_flushinp(); \
mutt_error(_(Function_not_permitted)); \
menu->tagprefix ? cur : idx[menu->current]->content,
hdr, menu);
- if (!menu->tagprefix && option(OPTRESOLVE) && menu->current < menu->max - 1)
+ if (!menu->tagprefix && option(OPT_RESOLVE) && menu->current < menu->max - 1)
menu->current++;
menu->redraw = REDRAW_MOTION_RESYNCH | REDRAW_FULL;
if (idx[menu->current]->parent_type == TYPEMULTIPART)
{
idx[menu->current]->content->deleted = true;
- if (option(OPTRESOLVE) && menu->current < menu->max - 1)
+ if (option(OPT_RESOLVE) && menu->current < menu->max - 1)
{
menu->current++;
menu->redraw = REDRAW_MOTION_RESYNCH;
if (!menu->tagprefix)
{
idx[menu->current]->content->deleted = false;
- if (option(OPTRESOLVE) && menu->current < menu->max - 1)
+ if (option(OPT_RESOLVE) && menu->current < menu->max - 1)
{
menu->current++;
menu->redraw = REDRAW_MOTION_RESYNCH;
int chflags = CH_DECODE;
char prefix[SHORT_STRING];
- if (option(OPTWEED))
+ if (option(OPT_WEED))
chflags |= CH_WEED | CH_REORDER;
if (quote)
{
if (_prefix)
strfcpy(prefix, _prefix, sizeof(prefix));
- else if (!option(OPTTEXTFLOWED))
+ else if (!option(OPT_TEXT_FLOWED))
_mutt_make_string(prefix, sizeof(prefix), NONULL(Prefix), Context, hdr, 0);
else
strfcpy(prefix, ">", sizeof(prefix));
/* prepare the prefix here since we'll need it later. */
- if (option(OPTFORWQUOTE))
+ if (option(OPT_FORW_QUOTE))
{
- if (!option(OPTTEXTFLOWED))
+ if (!option(OPT_TEXT_FLOWED))
_mutt_make_string(prefix, sizeof(prefix), NONULL(Prefix), Context, parent, 0);
else
strfcpy(prefix, ">", sizeof(prefix));
}
- include_header(option(OPTFORWQUOTE), fp, parent, tmpfp, prefix);
+ include_header(option(OPT_FORW_QUOTE), fp, parent, tmpfp, prefix);
/*
* Now, we have prepared the first part of the message body: The
memset(&st, 0, sizeof(st));
- if (option(OPTFORWQUOTE))
+ if (option(OPT_FORW_QUOTE))
st.prefix = prefix;
st.flags = MUTT_CHARCONV;
- if (option(OPTWEED))
+ if (option(OPT_WEED))
st.flags |= MUTT_WEED;
st.fpin = fp;
st.fpout = tmpfp;
return;
}
- if (option(OPTFORWQUOTE))
+ if (option(OPT_FORW_QUOTE))
{
chflags |= CH_PREFIX;
cmflags |= MUTT_CM_PREFIX;
}
- if (option(OPTFORWDECODE))
+ if (option(OPT_FORW_DECODE))
{
cmflags |= MUTT_CM_DECODE | MUTT_CM_CHARCONV;
- if (option(OPTWEED))
+ if (option(OPT_WEED))
{
chflags |= CH_WEED | CH_REORDER;
cmflags |= MUTT_CM_WEED;
mutt_make_attribution(Context, cur, tmpfp);
- if (!option(OPTHEADER))
+ if (!option(OPT_HEADER))
cmflags |= MUTT_CM_NOHEADER;
- if (option(OPTWEED))
+ if (option(OPT_WEED))
{
chflags |= CH_WEED;
cmflags |= MUTT_CM_WEED;
#ifdef USE_NNTP
if (flags & SENDNEWS)
- set_option(OPTNEWSSEND);
+ set_option(OPT_NEWS_SEND);
else
- unset_option(OPTNEWSSEND);
+ unset_option(OPT_NEWS_SEND);
#endif
if (!check_all_msg(idx, idxlen, cur, false))
st.fpin = fp;
st.fpout = tmpfp;
- if (!option(OPTTEXTFLOWED))
+ if (!option(OPT_TEXT_FLOWED))
_mutt_make_string(prefix, sizeof(prefix), NONULL(Prefix), Context, parent, 0);
else
strfcpy(prefix, ">", sizeof(prefix));
st.prefix = prefix;
st.flags = MUTT_CHARCONV;
- if (option(OPTWEED))
+ if (option(OPT_WEED))
st.flags |= MUTT_WEED;
- if (option(OPTHEADER))
+ if (option(OPT_HEADER))
include_header(1, fp, parent, tmpfp, prefix);
if (cur)
snprintf(cmd, sizeof(cmd), "%s%s%s", tmp, i ? "," : " -l ", cd_quoted);
}
- if (!option(OPTNOCURSES))
+ if (!option(OPT_NO_CURSES))
mutt_endwin(NULL);
if ((i = mutt_system(cmd)))
{
fprintf(stderr, _("Error sending message, child exited %d.\n"), i);
- if (!option(OPTNOCURSES))
+ if (!option(OPT_NO_CURSES))
{
mutt_any_key_to_continue(NULL);
mutt_error(_("Error sending message."));
strfcpy(type, _type, sizeof(type));
- if (option(OPTMAILCAPSANITIZE))
+ if (option(OPT_MAILCAP_SANITIZE))
mutt_sanitize_filename(type, 0);
while (x < clen - 1 && command[x] && y < sizeof(buf) - 1)
_pvalue = mutt_get_parameter(param, a->parameter);
strfcpy(pvalue, NONULL(_pvalue), sizeof(pvalue));
- if (option(OPTMAILCAPSANITIZE))
+ if (option(OPT_MAILCAP_SANITIZE))
mutt_sanitize_filename(pvalue, 0);
y += mutt_quote_filename(buf + y, sizeof(buf) - y, pvalue);
if (!(p = find_encoded_word(s, &q)))
{
/* no encoded words */
- if (option(OPTIGNORELWS))
+ if (option(OPT_IGNORE_LWS))
{
n = mutt_strlen(s);
if (found_encoded && (m = lwslen(s, n)) != 0)
n = (size_t)(p - s);
/* ignore spaces between encoded word
* and linear-white-space between encoded word and *text */
- if (option(OPTIGNORELWS))
+ if (option(OPT_IGNORE_LWS))
{
if (found_encoded && (m = lwslen(s, n)) != 0)
{
* Internet Gateways. So we actually decode it.
*/
- if (option(OPTRFC2047PARAMS) && p->value && strstr(p->value, "=?"))
+ if (option(OPT_RFC2047_PARAMS) && p->value && strstr(p->value, "=?"))
rfc2047_decode(&p->value);
else if (AssumedCharset && *AssumedCharset)
convert_nonmime_string(&p->value);
*/
static int space_quotes(struct State *s)
{
- /* Allow quote spacing in the pager even for OPTTEXTFLOWED,
+ /* Allow quote spacing in the pager even for OPT_TEXT_FLOWED,
* but obviously not when replying.
*/
- if (option(OPTTEXTFLOWED) && (s->flags & MUTT_REPLYING))
+ if (option(OPT_TEXT_FLOWED) && (s->flags & MUTT_REPLYING))
return 0;
- return option(OPTREFLOWSPACEQUOTES);
+ return option(OPT_REFLOW_SPACE_QUOTES);
}
/**
return false;
/* The prefix will add its own space */
- if (!option(OPTTEXTFLOWED) && !ql && s->prefix)
+ if (!option(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(OPTTEXTFLOWED))
+ if (option(OPT_TEXT_FLOWED))
ql++;
else
{
static int quote_width(struct State *s, int ql)
{
int width = mutt_window_wrap_cols(MuttIndexWindow, ReflowWrap);
- if (option(OPTTEXTFLOWED) && (s->flags & MUTT_REPLYING))
+ if (option(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(OPTTEXTFLOWED))
+ if (option(OPT_TEXT_FLOWED))
for (; fst->spaces; fst->spaces--)
state_putc(' ', s);
state_putc('\n', s);
{
int i;
- if (option(OPTNEEDRESCORE) && option(OPTSCORE))
+ if (option(OPT_NEED_RESCORE) && option(OPT_SCORE))
{
if ((Sort & SORT_MASK) == SORT_SCORE || (SortAux & SORT_MASK) == SORT_SCORE)
{
- set_option(OPTNEEDRESORT);
+ set_option(OPT_NEED_RESORT);
if ((Sort & SORT_MASK) == SORT_THREADS)
- set_option(OPTSORTSUBTHREADS);
+ set_option(OPT_SORT_SUBTHREADS);
}
/* must redraw the index since the user might have %N in it */
ctx->hdrs[i]->pair = 0;
}
}
- unset_option(OPTNEEDRESCORE);
+ unset_option(OPT_NEED_RESCORE);
}
int mutt_parse_score(struct Buffer *buf, struct Buffer *s, unsigned long data,
strfcpy(err->data, _("Error: score: invalid number"), err->dsize);
return -1;
}
- set_option(OPTNEEDRESCORE);
+ set_option(OPT_NEED_RESCORE);
return 0;
}
}
}
}
- set_option(OPTNEEDRESCORE);
+ set_option(OPT_NEED_RESCORE);
return 0;
}
if (Signature && (tmpfp = mutt_open_read(Signature, &thepid)))
{
- if (option(OPTSIGDASHES))
+ if (option(OPT_SIG_DASHES))
fputs("\n-- \n", f);
mutt_copy_stream(tmpfp, f);
safe_fclose(&tmpfp);
struct List *uh = UserHeader;
#ifdef USE_NNTP
- if (option(OPTNEWSSEND))
+ if (option(OPT_NEWS_SEND))
{
if (en->newsgroups)
strfcpy(buf, en->newsgroups, sizeof(buf));
strfcpy(buf, en->followup_to, sizeof(buf));
else
buf[0] = 0;
- if (option(OPTASKFOLLOWUP) && mutt_get_field("Followup-To: ", buf, sizeof(buf), 0) != 0)
+ if (option(OPT_ASK_FOLLOWUP) && mutt_get_field("Followup-To: ", buf, sizeof(buf), 0) != 0)
return -1;
FREE(&en->followup_to);
en->followup_to = safe_strdup(buf);
strfcpy(buf, en->x_comment_to, sizeof(buf));
else
buf[0] = 0;
- if (option(OPTXCOMMENTTO) && option(OPTASKXCOMMENTTO) &&
+ if (option(OPT_XCOMMENT_TO) && option(OPT_ASK_XCOMMENTTO) &&
mutt_get_field("X-Comment-To: ", buf, sizeof(buf), 0) != 0)
return -1;
FREE(&en->x_comment_to);
{
if (edit_address(&en->to, _("To: ")) == -1 || en->to == NULL)
return -1;
- if (option(OPTASKCC) && edit_address(&en->cc, _("Cc: ")) == -1)
+ if (option(OPT_ASK_CC) && edit_address(&en->cc, _("Cc: ")) == -1)
return -1;
- if (option(OPTASKBCC) && edit_address(&en->bcc, _("Bcc: ")) == -1)
+ if (option(OPT_ASK_BCC) && edit_address(&en->bcc, _("Bcc: ")) == -1)
return -1;
- if (option(OPTREPLYWITHXORIG) && (flags & (SENDREPLY | SENDLISTREPLY | SENDGROUPREPLY)) &&
+ if (option(OPT_REPLY_WITH_XORIG) && (flags & (SENDREPLY | SENDLISTREPLY | SENDGROUPREPLY)) &&
(edit_address(&en->from, "From: ") == -1))
return -1;
}
if (en->subject)
{
- if (option(OPTFASTREPLY))
+ if (option(OPT_FAST_REPLY))
return 0;
else
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(OPTFORWDECODE))
+ if (WithCrypto && (cur->security & ENCRYPT) && option(OPT_FORW_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(OPTFORWDECODE))
+ if (option(OPT_FORW_DECODE))
{
cmflags |= MUTT_CM_DECODE | MUTT_CM_CHARCONV;
- if (option(OPTWEED))
+ if (option(OPT_WEED))
{
chflags |= CH_WEED | CH_REORDER;
cmflags |= MUTT_CM_WEED;
}
}
- if (option(OPTFORWQUOTE))
+ if (option(OPT_FORW_QUOTE))
cmflags |= MUTT_CM_PREFIX;
/* wrapping headers for forwarding is considered a display
mutt_make_attribution(ctx, cur, out);
- if (!option(OPTHEADER))
+ if (!option(OPT_HEADER))
cmflags |= MUTT_CM_NOHEADER;
- if (option(OPTWEED))
+ if (option(OPT_WEED))
{
chflags |= CH_WEED | CH_REORDER;
cmflags |= MUTT_CM_WEED;
if (flags & SENDLISTREPLY)
return 0;
- if (!option(OPTREPLYSELF) && mutt_addr_is_user(env->from))
+ if (!option(OPT_REPLY_SELF) && mutt_addr_is_user(env->from))
{
/* mail is from the user, assume replying to recipients */
rfc822_append(to, env->to, 1);
{
if ((addrcmp(env->from, env->reply_to) && !env->reply_to->next &&
!env->reply_to->personal) ||
- (option(OPTIGNORELISTREPLYTO) && mutt_is_mail_list(env->reply_to) &&
+ (option(OPT_IGNORE_LIST_REPLY_TO) && mutt_is_mail_list(env->reply_to) &&
(addrsrc(env->reply_to, env->to) || addrsrc(env->reply_to, env->cc))))
{
/* If the Reply-To: address is a mailing list, assume that it was
void mutt_fix_reply_recipients(struct Envelope *env)
{
- if (!option(OPTMETOO))
+ if (!option(OPT_ME_TOO))
{
/* 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
*qq = q;
#ifdef USE_NNTP
- if (option(OPTNEWSSEND) && option(OPTXCOMMENTTO) && curenv->from)
+ if (option(OPT_NEWS_SEND) && option(OPT_XCOMMENT_TO) && curenv->from)
env->x_comment_to = safe_strdup(mutt_get_name(curenv->from));
#endif
}
else if (flags & SENDFORWARD)
{
mutt_make_forward_subject(env, ctx, cur);
- if (option(OPTFORWREF))
+ if (option(OPT_FORW_REF))
make_reference_headers(tag ? NULL : curenv, env, ctx);
}
* it hasn't already been set
*/
- if (!option(OPTFOLLOWUPTO))
+ if (!option(OPT_FOLLOW_UP_TO))
return;
#ifdef USE_NNTP
- if (option(OPTNEWSSEND))
+ if (option(OPT_NEWS_SEND))
{
if (!e->followup_to && e->newsgroups && (strrchr(e->newsgroups, ',')))
e->followup_to = safe_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(OPTREVREAL))
+ if (!option(OPT_REV_REAL))
FREE(&tmp->personal);
}
return tmp;
if (From)
adr = rfc822_cpy_adr_real(From);
- else if (option(OPTUSEDOMAIN))
+ else if (option(OPT_USE_DOMAIN))
{
adr = rfc822_new_address();
adr->mailbox = safe_malloc(mutt_strlen(Username) + mutt_strlen(fqdn) + 2);
return -1;
#ifdef USE_SMTP
- old_write_bcc = option(OPTWRITEBCC);
+ old_write_bcc = option(OPT_WRITE_BCC);
if (SmtpUrl)
- unset_option(OPTWRITEBCC);
+ unset_option(OPT_WRITE_BCC);
#endif
#ifdef MIXMASTER
mutt_write_rfc822_header(tempfp, msg->env, msg->content, 0, msg->chain ? 1 : 0);
#endif
#ifdef USE_SMTP
if (old_write_bcc)
- set_option(OPTWRITEBCC);
+ set_option(OPT_WRITE_BCC);
#endif
fputc('\n', tempfp); /* tie off the header. */
#ifdef USE_SMTP
#ifdef USE_NNTP
- if (!option(OPTNEWSSEND))
+ if (!option(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(OPTSMIMEISDEFAULT))
+ if ((WithCrypto & APPLICATION_SMIME) && option(OPT_SMIME_IS_DEFAULT))
msg->security |= APPLICATION_SMIME;
else if (WithCrypto & APPLICATION_PGP)
msg->security |= APPLICATION_PGP;
msg->security |= APPLICATION_SMIME;
}
- if (option(OPTCRYPTOPPORTUNISTICENCRYPT))
+ if (option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT))
{
msg->security |= OPPENCRYPT;
crypt_opportunistic_encrypt(msg);
#ifdef USE_NNTP
if (flags & SENDNEWS)
- set_option(OPTNEWSSEND);
+ set_option(OPT_NEWS_SEND);
else
- unset_option(OPTNEWSSEND);
+ unset_option(OPT_NEWS_SEND);
#endif
if (!flags && !msg && quadoption(OPT_RECALL) != MUTT_NO && mutt_num_postponed(1))
if (msg->env->newsgroups)
{
flags |= SENDNEWS;
- set_option(OPTNEWSSEND);
+ set_option(OPT_NEWS_SEND);
}
else
{
flags &= ~SENDNEWS;
- unset_option(OPTNEWSSEND);
+ unset_option(OPT_NEWS_SEND);
}
#endif
}
}
/* this is handled here so that the user can match ~f in send-hook */
- if (cur && option(OPTREVNAME) && !(flags & (SENDPOSTPONED | SENDRESEND)))
+ if (cur && option(OPT_REV_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(OPTREPLYWITHXORIG) && !(flags & (SENDPOSTPONED | SENDRESEND | SENDFORWARD)))
+ if (cur && option(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
* line option.
*
* If there is already a from address recorded in `msg->env->from',
- * then it theoretically comes from OPTREVNAME handling, and we don't use
+ * then it theoretically comes from OPT_REV_NAME handling, and we don't use
* the `X-Orig-To header'.
*/
if (cur->env->x_original_to && !msg->env->from)
}
if (!(flags & (SENDPOSTPONED | SENDRESEND)) &&
- !((flags & SENDDRAFTFILE) && option(OPTRESUMEDRAFTFILES)))
+ !((flags & SENDDRAFTFILE) && option(OPT_RESUME_DRAFT_FILES)))
{
if ((flags & (SENDREPLY | SENDFORWARD)) && ctx &&
envelope_defaults(msg->env, ctx, cur, flags) == -1)
goto cleanup;
- if (option(OPTHDRS))
+ if (option(OPT_HDRS))
process_user_recips(msg->env);
/* Expand aliases and remove duplicates/crossrefs */
msg->env->newsgroups = safe_strdup(((struct NntpData *) ctx->data)->group);
#endif
- if (!(flags & (SENDMAILX | SENDBATCH)) && !(option(OPTAUTOEDIT) && option(OPTEDITHDRS)) &&
- !((flags & SENDREPLY) && option(OPTFASTREPLY)))
+ if (!(flags & (SENDMAILX | SENDBATCH)) && !(option(OPT_AUTO_EDIT) && option(OPT_EDIT_HDRS)) &&
+ !((flags & SENDREPLY) && option(OPT_FAST_REPLY)))
{
if (edit_envelope(msg->env, flags) == -1)
goto cleanup;
if (!(flags & SENDKEY))
{
- if (option(OPTTEXTFLOWED) && msg->content->type == TYPETEXT &&
+ if (option(OPT_TEXT_FLOWED) && msg->content->type == TYPETEXT &&
(ascii_strcasecmp(msg->content->subtype, "plain") == 0))
mutt_set_parameter("format", "flowed", &msg->content->parameter);
}
if (killfrom)
{
rfc822_free_address(&msg->env->from);
- if (option(OPTUSEFROM) && !(flags & (SENDPOSTPONED | SENDRESEND)))
+ if (option(OPT_USE_FROM) && !(flags & (SENDPOSTPONED | SENDRESEND)))
msg->env->from = mutt_default_from();
killfrom = false;
}
- if (option(OPTHDRS))
+ if (option(OPT_HDRS))
process_user_header(msg->env);
if (flags & SENDBATCH)
mutt_copy_stream(stdin, tempfp);
- if (option(OPTSIGONTOP) && !(flags & (SENDMAILX | SENDKEY | SENDBATCH)) &&
+ if (option(OPT_SIG_ON_TOP) && !(flags & (SENDMAILX | SENDKEY | SENDBATCH)) &&
Editor && (mutt_strcmp(Editor, "builtin") != 0))
append_signature(tempfp);
generate_body(tempfp, msg, flags, ctx, cur) == -1)
goto cleanup;
- if (!option(OPTSIGONTOP) && !(flags & (SENDMAILX | SENDKEY | SENDBATCH)) &&
+ if (!option(OPT_SIG_ON_TOP) && !(flags & (SENDMAILX | SENDKEY | SENDBATCH)) &&
Editor && (mutt_strcmp(Editor, "builtin") != 0))
append_signature(tempfp);
}
* recipients.
*/
if (!(flags & SENDKEY) &&
- ((flags & SENDFORWARD) == 0 || (option(OPTEDITHDRS) && option(OPTAUTOEDIT)) ||
+ ((flags & SENDFORWARD) == 0 || (option(OPT_EDIT_HDRS) && option(OPT_AUTO_EDIT)) ||
query_quadoption(OPT_FORWEDIT, _("Edit forwarded message?")) == MUTT_YES))
{
/* If the this isn't a text message, look for a mailcap edit command */
}
else if (!Editor || (mutt_strcmp("builtin", Editor) == 0))
mutt_builtin_editor(msg->content->filename, msg, cur);
- else if (option(OPTEDITHDRS))
+ else if (option(OPT_EDIT_HDRS))
{
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(OPTTEXTFLOWED) && msg->content->type == TYPETEXT &&
+ if (option(OPT_TEXT_FLOWED) && msg->content->type == TYPETEXT &&
(ascii_strcasecmp("plain", msg->content->subtype) == 0))
{
char *p = mutt_get_parameter("format", msg->content->parameter);
if (WithCrypto && (msg->security == 0) &&
!(flags & (SENDBATCH | SENDMAILX | SENDPOSTPONED | SENDRESEND)))
{
- if (option(OPTCRYPTAUTOSIGN))
+ if (option(OPT_CRYPT_AUTO_SIGN))
msg->security |= SIGN;
- if (option(OPTCRYPTAUTOENCRYPT))
+ if (option(OPT_CRYPT_AUTO_ENCRYPT))
msg->security |= ENCRYPT;
- if (option(OPTCRYPTREPLYENCRYPT) && cur && (cur->security & ENCRYPT))
+ if (option(OPT_CRYPT_REPLY_ENCRYPT) && cur && (cur->security & ENCRYPT))
msg->security |= ENCRYPT;
- if (option(OPTCRYPTREPLYSIGN) && cur && (cur->security & SIGN))
+ if (option(OPT_CRYPT_REPLY_SIGN) && cur && (cur->security & SIGN))
msg->security |= SIGN;
- if (option(OPTCRYPTREPLYSIGNENCRYPTED) && cur && (cur->security & ENCRYPT))
+ if (option(OPT_CRYPT_REPLY_SIGN_ENCRYPTED) && cur && (cur->security & ENCRYPT))
msg->security |= SIGN;
if ((WithCrypto & APPLICATION_PGP) &&
- ((msg->security & (ENCRYPT | SIGN)) || option(OPTCRYPTOPPORTUNISTICENCRYPT)))
+ ((msg->security & (ENCRYPT | SIGN)) || option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT)))
{
- if (option(OPTPGPAUTOINLINE))
+ if (option(OPT_PGP_AUTO_INLINE))
msg->security |= INLINE;
- if (option(OPTPGPREPLYINLINE) && cur && (cur->security & INLINE))
+ if (option(OPT_PGP_REPLY_INLINE) && cur && (cur->security & INLINE))
msg->security |= INLINE;
}
- if (msg->security || option(OPTCRYPTOPPORTUNISTICENCRYPT))
+ if (msg->security || option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT))
{
/*
* When replying / forwarding, use the original message's
*/
if (cur)
{
- if ((WithCrypto & APPLICATION_PGP) && option(OPTCRYPTAUTOPGP) &&
+ if ((WithCrypto & APPLICATION_PGP) && option(OPT_CRYPT_AUTO_PGP) &&
(cur->security & APPLICATION_PGP))
msg->security |= APPLICATION_PGP;
- else if ((WithCrypto & APPLICATION_SMIME) && option(OPTCRYPTAUTOSMIME) &&
+ else if ((WithCrypto & APPLICATION_SMIME) && option(OPT_CRYPT_AUTO_SMIME) &&
(cur->security & APPLICATION_SMIME))
msg->security |= APPLICATION_SMIME;
}
*/
if (!(msg->security & (APPLICATION_SMIME | APPLICATION_PGP)))
{
- if ((WithCrypto & APPLICATION_SMIME) && option(OPTCRYPTAUTOSMIME) &&
- option(OPTSMIMEISDEFAULT))
+ if ((WithCrypto & APPLICATION_SMIME) && option(OPT_CRYPT_AUTO_SMIME) &&
+ option(OPT_SMIME_IS_DEFAULT))
msg->security |= APPLICATION_SMIME;
- else if ((WithCrypto & APPLICATION_PGP) && option(OPTCRYPTAUTOPGP))
+ else if ((WithCrypto & APPLICATION_PGP) && option(OPT_CRYPT_AUTO_PGP))
msg->security |= APPLICATION_PGP;
- else if ((WithCrypto & APPLICATION_SMIME) && option(OPTCRYPTAUTOSMIME))
+ else if ((WithCrypto & APPLICATION_SMIME) && option(OPT_CRYPT_AUTO_SMIME))
msg->security |= APPLICATION_SMIME;
}
}
/* opportunistic encrypt relies on SMIME or PGP already being selected */
- if (option(OPTCRYPTOPPORTUNISTICENCRYPT))
+ if (option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT))
{
- /* If something has already enabled encryption, e.g. OPTCRYPTAUTOENCRYPT
- * or OPTCRYPTREPLYENCRYPT, then don't enable opportunistic encrypt for
+ /* If something has already enabled encryption, e.g. OPT_CRYPT_AUTO_ENCRYPT
+ * or OPT_CRYPT_REPLY_ENCRYPT, then don't enable opportunistic encrypt for
* the message.
*/
if (!(msg->security & ENCRYPT))
if (msg->content->next)
msg->content = mutt_make_multipart(msg->content);
- if (WithCrypto && option(OPTPOSTPONEENCRYPT) && (msg->security & ENCRYPT))
+ if (WithCrypto && option(OPT_POSTPONE_ENCRYPT) && (msg->security & ENCRYPT))
{
char *encrypt_as = NULL;
free_clear_content = true;
}
- if (!option(OPTNOCURSES) && !(flags & SENDMAILX))
+ if (!option(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(OPTFCCCLEAR))
+ if (WithCrypto && (msg->security & (ENCRYPT | SIGN)) && option(OPT_FCC_CLEAR))
msg->content = clear_content;
/* check to see if the user wants copies of all attachments */
goto cleanup;
}
}
- else if (!option(OPTNOCURSES) && !(flags & SENDMAILX))
+ else if (!option(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(OPTNOTMUCHRECORD))
+ if (option(OPT_NOTMUCH_RECORD))
nm_record_message(ctx, finalpath, cur);
#endif
}
{
char *chsname = mutt_get_body_charset(send_charset, sizeof(send_charset), b);
if ((info->lobin && (ascii_strncasecmp(chsname, "iso-2022", 8) != 0)) ||
- info->linemax > 990 || (info->from && option(OPTENCODEFROM)))
+ info->linemax > 990 || (info->from && option(OPT_ENCODE_FROM)))
b->encoding = ENCQUOTEDPRINTABLE;
else if (info->hibin)
- b->encoding = option(OPTALLOW8BIT) ? ENC8BIT : ENCQUOTEDPRINTABLE;
+ b->encoding = option(OPT_ALLOW_8BIT) ? ENC8BIT : ENCQUOTEDPRINTABLE;
else
b->encoding = ENC7BIT;
}
{
if (info->lobin || info->hibin)
{
- if (option(OPTALLOW8BIT) && !info->lobin)
+ if (option(OPT_ALLOW_8BIT) && !info->lobin)
b->encoding = ENC8BIT;
else
mutt_message_to_7bit(b, NULL);
if (WithCrypto)
{
- if ((option(OPTMIMEFORWDECODE) || option(OPTFORWDECRYPT)) && (hdr->security & ENCRYPT))
+ if ((option(OPT_MIME_FORW_DECODE) || option(OPT_FORW_DECRYPT)) && (hdr->security & ENCRYPT))
{
if (!crypt_valid_passphrase(hdr->security))
return NULL;
chflags = CH_XMIT;
cmflags = 0;
- /* If we are attaching a message, ignore OPTMIMEFORWDECODE */
- if (!attach_msg && option(OPTMIMEFORWDECODE))
+ /* If we are attaching a message, ignore OPT_MIME_FORW_DECODE */
+ if (!attach_msg && option(OPT_MIME_FORW_DECODE))
{
chflags |= CH_MIME | CH_TXTPLAIN;
cmflags = MUTT_CM_DECODE | MUTT_CM_CHARCONV;
if ((WithCrypto & APPLICATION_SMIME))
pgp &= ~SMIMEENCRYPT;
}
- else if (WithCrypto && option(OPTFORWDECRYPT) && (hdr->security & ENCRYPT))
+ else if (WithCrypto && option(OPT_FORW_DECRYPT) && (hdr->security & ENCRYPT))
{
if ((WithCrypto & APPLICATION_PGP) && mutt_is_multipart_encrypted(hdr->content))
{
int pfxw = mutt_strwidth(pfx);
char *v = safe_strdup(value);
- if (!(flags & CH_DISPLAY) || option(OPTWEED))
+ if (!(flags & CH_DISPLAY) || option(OPT_WEED))
v = unfold_header(v);
/* when not displaying, use sane wrap value */
if (mode == 0 && !privacy)
fputs(mutt_make_date(buffer, sizeof(buffer)), fp);
- /* OPTUSEFROM is not consulted here so that we can still write a From:
+ /* OPT_USE_FROM is not consulted here so that we can still write a From:
* field if the user sets it with the `my_hdr' command
*/
if (env->from && !privacy)
}
else if (mode > 0)
#ifdef USE_NNTP
- if (!option(OPTNEWSSEND))
+ if (!option(OPT_NEWS_SEND))
#endif
fputs("To: \n", fp);
}
else if (mode > 0)
#ifdef USE_NNTP
- if (!option(OPTNEWSSEND))
+ if (!option(OPT_NEWS_SEND))
#endif
fputs("Cc: \n", fp);
if (env->bcc)
{
- if (mode != 0 || option(OPTWRITEBCC))
+ if (mode != 0 || option(OPT_WRITE_BCC))
{
fputs("Bcc: ", fp);
mutt_write_address_list(env->bcc, fp, 5, 0);
}
else if (mode > 0)
#ifdef USE_NNTP
- if (!option(OPTNEWSSEND))
+ if (!option(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(OPTNEWSSEND))
+ else if (mode == 1 && option(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(OPTNEWSSEND))
+ else if (mode == 1 && option(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(OPTNEWSSEND) && option(OPTXCOMMENTTO))
+ else if (mode == 1 && option(OPT_NEWS_SEND) && option(OPT_XCOMMENT_TO))
fputs("X-Comment-To: \n", fp);
#endif
if (env->mail_followup_to)
#ifdef USE_NNTP
- if (!option(OPTNEWSSEND))
+ if (!option(OPT_NEWS_SEND))
#endif
{
fputs("Mail-Followup-To: ", fp);
}
}
- if (mode == 0 && !privacy && option(OPTXMAILER) && !has_agent)
+ if (mode == 0 && !privacy && option(OPT_XMAILER) && !has_agent)
{
/* Add a vanity header */
fprintf(fp, "User-Agent: NeoMutt/%s%s (%s)\n", PACKAGE_VERSION, GitVer, MUTT_VERSION);
{
p = Fqdn;
- if (may_hide_host && option(OPTHIDDENHOST))
+ if (may_hide_host && option(OPT_HIDDEN_HOST))
{
if ((p = strchr(Fqdn, '.')))
p++;
int i;
#ifdef USE_NNTP
- if (option(OPTNEWSSEND))
+ if (option(OPT_NEWS_SEND))
{
char cmd[LONG_STRING];
}
#ifdef USE_NNTP
- if (!option(OPTNEWSSEND))
+ if (!option(OPT_NEWS_SEND))
{
#endif
/* If Sendmail contained a "--", we save the recipients to append to
}
}
- if (eightbit && option(OPTUSE8BITMIME))
+ if (eightbit && option(OPT_USE_8BIT_MIME))
args = add_option(args, &argslen, &argsmax, "-B8BITMIME");
- if (option(OPTENVFROM))
+ if (option(OPT_ENV_FROM))
{
if (EnvFrom)
{
* 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(OPTNOCURSES))
+ if (!option(OPT_NO_CURSES))
mutt_need_hard_redraw();
- if ((i = send_msg(path, args, msg, option(OPTNOCURSES) ? NULL : &childout)) != (EX_OK & 0xff))
+ if ((i = send_msg(path, args, msg, option(OPT_NO_CURSES) ? NULL : &childout)) != (EX_OK & 0xff))
{
if (i != S_BKG)
{
if (env->subject)
#ifdef USE_NNTP
- if (!option(OPTNEWSSEND) || option(OPTMIMESUBJECT))
+ if (!option(OPT_NEWS_SEND) || option(OPT_MIME_SUBJECT))
#endif
{
rfc2047_encode_string(&env->subject);
int ch_flags = CH_XMIT | CH_NONEWLINE | CH_NOQFROM;
char *msgid_str = NULL;
- if (!option(OPTBOUNCEDELIVERED))
+ if (!option(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(OPTNEWSSEND);
+ unset_option(OPT_NEWS_SEND);
#endif
/*
*/
static void update_entries_visibility(void)
{
- short new_only = option(OPTSIDEBARNEWMAILONLY);
+ short new_only = option(OPT_SIDEBAR_NEWMAIL_ONLY);
struct SbEntry *sbe = NULL;
for (int i = 0; i < EntryCount; i++)
{
entry++;
if (entry == EntryCount)
{
- if (option(OPTSIDEBARNEXTNEWWRAP))
+ if (option(OPT_SIDEBAR_NEXT_NEW_WRAP))
entry = 0;
else
return false;
entry--;
if (entry < 0)
{
- if (option(OPTSIDEBARNEXTNEWWRAP))
+ if (option(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(OPTSIDEBARNEWMAILONLY))
+ if (option(OPT_SIDEBAR_NEWMAIL_ONLY))
{
TopIndex = BotIndex = -1;
while (BotIndex < HilIndex)
altchar = SB_DIV_USER; /* User config */
}
- if (option(OPTASCIICHARS) && (altchar != SB_DIV_ASCII))
+ if (option(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(OPTSIDEBARONRIGHT) ? 0 : (SidebarWidth - delim_len);
+ int col = option(OPT_SIDEBAR_ON_RIGHT) ? 0 : (SidebarWidth - delim_len);
for (i = 0; i < num_rows; i++)
{
/* Fill the remaining rows with blank space */
SETCOLOR(MT_COLOR_NORMAL);
- if (!option(OPTSIDEBARONRIGHT))
+ if (!option(OPT_SIDEBAR_ON_RIGHT))
div_width = 0;
for (int r = 0; r < num_rows; r++)
{
}
int col = 0;
- if (option(OPTSIDEBARONRIGHT))
+ if (option(OPT_SIDEBAR_ON_RIGHT))
col = div_width;
mutt_window_move(MuttSidebarWindow, row, col);
int sidebar_folder_depth = 0;
char *sidebar_folder_name = NULL;
int i;
- if (option(OPTSIDEBARSHORTPATH))
+ if (option(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(OPTSIDEBARFOLDERINDENT))
+ else if (maildir_is_prefix && option(OPT_SIDEBAR_FOLDER_INDENT))
{
const char *tmp_folder_name = NULL;
int lastsep = 0;
}
if (sidebar_folder_depth > 0)
{
- if (option(OPTSIDEBARSHORTPATH))
+ if (option(OPT_SIDEBAR_SHORT_PATH))
tmp_folder_name += lastsep; /* basename */
int sfn_len = mutt_strlen(tmp_folder_name) +
sidebar_folder_depth * mutt_strlen(SidebarIndentString) + 1;
*/
void mutt_sb_draw(void)
{
- if (!option(OPTSIDEBAR))
+ if (!option(OPT_SIDEBAR))
return;
#ifdef USE_SLANG_CURSES
*/
void mutt_sb_change_mailbox(int op)
{
- if (!option(OPTSIDEBAR))
+ if (!option(OPT_SIDEBAR))
return;
if (HilIndex < 0) /* It'll get reset on the next draw */
*/
const char *mutt_sb_get_highlight(void)
{
- if (!option(OPTSIDEBAR))
+ if (!option(OPT_SIDEBAR))
return NULL;
if (!EntryCount || HilIndex < 0)
switch (sig)
{
case SIGTSTP: /* user requested a suspend */
- if (!option(OPTSUSPEND))
+ if (!option(OPT_SUSPEND))
break;
IsEndwin = isendwin();
curs_set(1);
*/
void mutt_block_signals(void)
{
- if (!option(OPTSIGNALSBLOCKED))
+ if (!option(OPT_SIGNALS_BLOCKED))
{
sigemptyset(&Sigset);
sigaddset(&Sigset, SIGTERM);
sigaddset(&Sigset, SIGWINCH);
#endif
sigprocmask(SIG_BLOCK, &Sigset, 0);
- set_option(OPTSIGNALSBLOCKED);
+ set_option(OPT_SIGNALS_BLOCKED);
}
}
*/
void mutt_unblock_signals(void)
{
- if (option(OPTSIGNALSBLOCKED))
+ if (option(OPT_SIGNALS_BLOCKED))
{
sigprocmask(SIG_UNBLOCK, &Sigset, 0);
- unset_option(OPTSIGNALSBLOCKED);
+ unset_option(OPT_SIGNALS_BLOCKED);
}
}
{
struct sigaction sa;
- if (!option(OPTSYSSIGNALSBLOCKED))
+ if (!option(OPT_SYS_SIGNALS_BLOCKED))
{
/* POSIX: ignore SIGINT and SIGQUIT & block SIGCHLD before exec */
sa.sa_handler = SIG_IGN;
sigemptyset(&SigsetSys);
sigaddset(&SigsetSys, SIGCHLD);
sigprocmask(SIG_BLOCK, &SigsetSys, 0);
- set_option(OPTSYSSIGNALSBLOCKED);
+ set_option(OPT_SYS_SIGNALS_BLOCKED);
}
}
void mutt_unblock_signals_system(int catch)
{
- if (option(OPTSYSSIGNALSBLOCKED))
+ if (option(OPT_SYS_SIGNALS_BLOCKED))
{
sigprocmask(SIG_UNBLOCK, &SigsetSys, NULL);
if (catch)
sigaction(SIGINT, &sa, NULL);
}
- unset_option(OPTSYSSIGNALSBLOCKED);
+ unset_option(OPT_SYS_SIGNALS_BLOCKED);
}
}
if (conn->account.flags & MUTT_ACCT_USER)
Esmtp = 1;
#ifdef USE_SSL
- if (option(OPTSSLFORCETLS) || quadoption(OPT_SSLSTARTTLS) != MUTT_NO)
+ if (option(OPT_SSL_FORCE_TLS) || quadoption(OPT_SSLSTARTTLS) != MUTT_NO)
Esmtp = 1;
#endif
}
return SMTP_AUTH_UNAVAIL;
}
- if (!option(OPTNOCURSES))
+ if (!option(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(OPTSSLFORCETLS))
+ else if (option(OPT_SSL_FORCE_TLS))
rc = MUTT_YES;
else if (mutt_bit_isset(Capabilities, STARTTLS) &&
(rc = query_quadoption(OPT_SSLSTARTTLS,
static sort_t *AuxSort = NULL;
#define AUXSORT(code, a, b) \
- if (!code && AuxSort && !option(OPTAUXSORT)) \
+ if (!code && AuxSort && !option(OPT_AUX_SORT)) \
{ \
- set_option(OPTAUXSORT); \
+ set_option(OPT_AUX_SORT); \
code = AuxSort(a, b); \
- unset_option(OPTAUXSORT); \
+ unset_option(OPT_AUX_SORT); \
} \
if (!code) \
code = (*((struct Header **) a))->index - (*((struct Header **) b))->index;
if (a)
{
- if (option(OPTREVALIAS) && (ali = alias_reverse_lookup(a)) && ali->personal)
+ if (option(OPT_REV_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(OPTNEEDRESORT);
+ unset_option(OPT_NEED_RESORT);
if (!ctx)
return;
if (!ctx->quiet)
mutt_message(_("Sorting mailbox..."));
- if (option(OPTNEEDRESCORE) && option(OPTSCORE))
+ if (option(OPT_NEED_RESCORE) && option(OPT_SCORE))
{
for (i = 0; i < ctx->msgcount; i++)
mutt_score_message(ctx, ctx->hdrs[i], 1);
}
- unset_option(OPTNEEDRESCORE);
+ unset_option(OPT_NEED_RESCORE);
- if (option(OPTRESORTINIT))
+ if (option(OPT_RESORT_INIT))
{
- unset_option(OPTRESORTINIT);
+ unset_option(OPT_RESORT_INIT);
init = 1;
}
AuxSort = NULL;
/* if $sort_aux changed after the mailbox is sorted, then all the
subthreads need to be resorted */
- if (option(OPTSORTSUBTHREADS))
+ if (option(OPT_SORT_SUBTHREADS))
{
i = Sort;
Sort = SortAux;
if (ctx->tree)
ctx->tree = mutt_sort_subthreads(ctx->tree, 1);
Sort = i;
- unset_option(OPTSORTSUBTHREADS);
+ unset_option(OPT_SORT_SUBTHREADS);
}
mutt_sort_threads(ctx, init);
}
if (Context)
{
- i = option(OPTATTACHMSG) ?
+ i = option(OPT_ATTACH_MSG) ?
3 :
((Context->readonly || Context->dontwrite) ?
2 :
struct MuttThread *tmp = NULL, *tree = hdr->thread;
/* if the user disabled subject hiding, display it */
- if (!option(OPTHIDETHREADSUBJECT))
+ if (!option(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(OPTHIDETOPMISSING) && !option(OPTHIDEMISSING);
- int hide_top_limited = option(OPTHIDETOPLIMITED) && !option(OPTHIDELIMITED);
+ 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 depth = 0;
/* we walk each level backwards to make it easier to compute next_subtree_visible */
else
{
tree->visible = false;
- tree->deep = !option(OPTHIDELIMITED);
+ tree->deep = !option(OPT_HIDE_LIMITED);
}
}
else
{
tree->visible = false;
- tree->deep = !option(OPTHIDEMISSING);
+ tree->deep = !option(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(OPTNARROWTREE) ? 1 : 2;
+ int depth = 0, start_depth = 0, max_depth = 0, width = option(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(OPTHIDELIMITED))
+ else if (parent->message && !option(OPT_HIDE_LIMITED))
myarrow[0] = MUTT_TREE_HIDDEN;
- else if (!parent->message && !option(OPTHIDEMISSING))
+ else if (!parent->message && !option(OPT_HIDE_MISSING))
myarrow[0] = MUTT_TREE_MISSING;
else
myarrow[0] = vtee;
if (dateptr)
{
- thisdate = option(OPTTHREADRECEIVED) ? cur->message->received :
+ thisdate = option(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(OPTSORTRE))))
+ if (env->real_subj && ((env->real_subj != env->subject) || (!option(OPT_SORT_RE))))
{
for (curlist = subjects, oldlist = NULL; curlist;
oldlist = curlist, curlist = curlist->next)
!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(OPTTHREADRECEIVED) ? tmp->message->received :
+ (date >= (option(OPT_THREAD_RECEIVED) ? tmp->message->received :
tmp->message->date_sent)) &&
- (!last || (option(OPTTHREADRECEIVED) ?
+ (!last || (option(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(OPTDUPTHREADS)) && cur->env->message_id)
+ if ((!init || option(OPT_DUP_THREADS)) && cur->env->message_id)
thread = hash_find(ctx->thread_hash, cur->env->message_id);
else
thread = NULL;
}
else
{
- new = (option(OPTDUPTHREADS) ? thread : NULL);
+ new = (option(OPT_DUP_THREADS) ? thread : NULL);
thread = safe_calloc(1, sizeof(struct MuttThread));
thread->message = cur;
check_subjects(ctx, init);
- if (!option(OPTSTRICTTHREADS))
+ if (!option(OPT_STRICT_THREADS))
pseudo_threads(ctx);
if (ctx->tree)