else
{
/* Use built-in handler */
- OPT_VIEW_ATTACH = true; /* disable the "use 'v' to view this part"
+ OptViewAttach = true; /* disable the "use 'v' to view this part"
* message in case of error */
if (mutt_decode_save_attachment(fp, a, pagerfile, MUTT_DISPLAY, 0))
{
- OPT_VIEW_ATTACH = false;
+ OptViewAttach = false;
goto return_error;
}
- OPT_VIEW_ATTACH = false;
+ OptViewAttach = false;
}
if (a->description)
#ifdef USE_NNTP
case SORT_SIZE:
case SORT_DATE:
- if (OPT_NEWS)
+ if (OptNews)
return;
#endif
default:
(state->entry)[state->entrylen].imap = false;
#endif
#ifdef USE_NNTP
- if (OPT_NEWS)
+ if (OptNews)
(state->entry)[state->entrylen].nd = (struct NntpData *) data;
#endif
(state->entrylen)++;
char *d, const char *prefix)
{
#ifdef USE_NNTP
- if (OPT_NEWS)
+ if (OptNews)
{
struct NntpServer *nserv = CurrentNewsSrv;
struct stat s;
#ifdef USE_NNTP
- if (OPT_NEWS)
+ if (OptNews)
{
struct NntpServer *nserv = CurrentNewsSrv;
static int select_file_search(struct Menu *menu, regex_t *re, int n)
{
#ifdef USE_NNTP
- if (OPT_NEWS)
+ if (OptNews)
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 (OPT_NEWS)
+ if (OptNews)
mutt_expando_format(buf, buflen, 0, MuttIndexWindow->cols,
NONULL(GroupIndexFormat), group_index_format_str,
(unsigned long) &folder, MUTT_FORMAT_ARROWCURSOR);
menu->tagged = 0;
#ifdef USE_NNTP
- if (OPT_NEWS)
+ if (OptNews)
{
if (buffy)
snprintf(title, titlelen, _("Subscribed newsgroups"));
memset(&state, 0, sizeof(struct BrowserState));
#ifdef USE_NNTP
- if (OPT_NEWS)
+ if (OptNews)
{
if (*f)
mutt_str_strfcpy(prefix, f, sizeof(prefix));
menu->help = mutt_compile_help(helpstr, sizeof(helpstr), MENU_FOLDER,
#ifdef USE_NNTP
- OPT_NEWS ? FolderNewsHelp :
+ OptNews ? FolderNewsHelp :
#endif
FolderHelp);
mutt_menu_push_current(menu);
}
}
- if (buffy || OPT_NEWS) /* USE_NNTP */
+ if (buffy || OptNews) /* USE_NNTP */
{
mutt_str_strfcpy(f, state.entry[menu->current].name, flen);
mutt_expand_path(f, flen);
case OP_CHANGE_DIRECTORY:
#ifdef USE_NNTP
- if (OPT_NEWS)
+ if (OptNews)
break;
#endif
#ifdef USE_NNTP
case OP_CATCHUP:
case OP_UNCATCHUP:
- if (OPT_NEWS)
+ if (OptNews)
{
struct FolderFile *ff = &state.entry[menu->current];
int rc;
break;
case OP_LOAD_ACTIVE:
- if (OPT_NEWS)
+ if (OptNews)
{
struct NntpServer *nserv = CurrentNewsSrv;
#ifdef USE_NNTP
case OP_SUBSCRIBE_PATTERN:
case OP_UNSUBSCRIBE_PATTERN:
- if (OPT_NEWS)
+ if (OptNews)
{
struct NntpServer *nserv = CurrentNewsSrv;
regex_t rx;
{
s += 5;
*col = strtol(s, &eptr, 10);
- if (!*s || *eptr || *col < 0 || (*col >= COLORS && !OPT_NO_CURSES && has_colors()))
+ if (!*s || *eptr || *col < 0 || (*col >= COLORS && !OptNoCurses && 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 */
- OPT_NO_CURSES || /* we're parsing an uncolor command, and have no colors */
+ OptNoCurses || /* 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())
(object == MT_COLOR_INDEX_FLAGS) || (object == MT_COLOR_INDEX_SUBJECT) ||
(object == MT_COLOR_INDEX_TAG));
- if (is_index && do_cache && !OPT_NO_CURSES)
+ if (is_index && do_cache && !OptNoCurses)
{
mutt_menu_set_redraw_full(MENU_MAIN);
/* force re-caching of index colors */
#ifdef HAVE_COLOR
#ifdef HAVE_USE_DEFAULT_COLORS
- if (!OPT_NO_CURSES &&
+ if (!OptNoCurses &&
has_colors()
/* delay use_default_colors() until needed, since it initializes things */
&& (fg == COLOR_DEFAULT || bg == COLOR_DEFAULT || object == MT_COLOR_TREE) &&
{
bool dry_run = false;
- if (OPT_NO_CURSES || !has_colors())
+ if (OptNoCurses || !has_colors())
dry_run = true;
return parse_color(buf, s, err, parse_color_pair, dry_run, true);
bool dry_run = false;
#ifdef HAVE_COLOR
- if (OPT_NO_CURSES || has_colors())
+ if (OptNoCurses || has_colors())
dry_run = true;
#else
- if (OPT_NO_CURSES)
+ if (OptNoCurses)
dry_run = true;
#endif
if (r == -1)
mutt_error(_("Error running \"%s\"!"), buf);
unlink(tempfile);
- if (!OPT_NO_CURSES)
+ if (!OptNoCurses)
keypad(stdscr, true);
if (r != -1)
mutt_set_flag(Context, cur, MUTT_READ, 1);
return 1;
}
- OPT_KEEP_QUIET = true;
+ OptKeepQuiet = true;
pipe_msg(h, fpout, decode, print);
mutt_file_fclose(&fpout);
rc = mutt_wait_filter(thepid);
- OPT_KEEP_QUIET = false;
+ OptKeepQuiet = false;
}
else
{
mutt_perror(_("Can't create filter process"));
return 1;
}
- OPT_KEEP_QUIET = true;
+ OptKeepQuiet = true;
pipe_msg(Context->hdrs[i], fpout, decode, print);
/* add the message separator */
if (sep)
mutt_file_fclose(&fpout);
if (mutt_wait_filter(thepid) != 0)
rc = 1;
- OPT_KEEP_QUIET = false;
+ OptKeepQuiet = false;
}
}
else
mutt_perror(_("Can't create filter process"));
return 1;
}
- OPT_KEEP_QUIET = true;
+ OptKeepQuiet = true;
for (int i = 0; i < Context->msgcount; i++)
{
if (!message_is_tagged(Context, i))
mutt_file_fclose(&fpout);
if (mutt_wait_filter(thepid) != 0)
rc = 1;
- OPT_KEEP_QUIET = false;
+ OptKeepQuiet = false;
}
}
mutt_debug(2, "completing %s\n", s);
#ifdef USE_NNTP
- if (OPT_NEWS)
+ if (OptNews)
{
struct NntpServer *nserv = CurrentNewsSrv;
unsigned int n = 0;
{
draw_envelope_addr(HDR_FROM, msg->env->from);
#ifdef USE_NNTP
- if (!OPT_NEWS_SEND)
+ if (!OptNewsSend)
{
#endif
draw_envelope_addr(HDR_TO, msg->env->to);
#ifdef USE_NNTP
int news = 0; /* is it a news article ? */
- if (OPT_NEWS_SEND)
+ if (OptNewsSend)
news++;
#endif
while (loop)
{
#ifdef USE_NNTP
- OPT_NEWS = false; /* for any case */
+ OptNews = false; /* for any case */
#endif
const int op = mutt_menu_loop(menu);
switch (op)
fname[0] = 0;
#ifdef USE_NNTP
- OPT_NEWS = false;
+ OptNews = false;
if (op == OP_COMPOSE_ATTACH_NEWS_MESSAGE)
{
CurrentNewsSrv = nntp_select_server(NewsServer, false);
break;
prompt = _("Open newsgroup to attach message from");
- OPT_NEWS = true;
+ OptNews = true;
}
#endif
break;
#ifdef USE_NNTP
- if (OPT_NEWS)
+ if (OptNews)
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) && !OPT_NEWS)
+ if (!mx_is_nntp(fname) && !OptNews)
#endif
/* check to make sure the file exists and is readable */
if (access(fname, R_OK) == -1)
old_sort_aux = SortAux;
Context = ctx;
- OPT_ATTACH_MSG = true;
+ OptAttachMsg = true;
mutt_message(_("Tag the messages you want to attach!"));
close = mutt_index_menu();
- OPT_ATTACH_MSG = false;
+ OptAttachMsg = false;
if (!Context)
{
snprintf(prompt, sizeof(prompt), "%s: ", interaction->prompt);
resp[0] = '\0';
- if (OPT_NO_CURSES || mutt_get_field(prompt, resp, sizeof(resp), 0))
+ if (OptNoCurses || mutt_get_field(prompt, resp, sizeof(resp), 0))
return SASL_FAIL;
interaction->len = mutt_str_strlen(resp) + 1;
host_idna = conn->account.host;
#endif
- if (!OPT_NO_CURSES)
+ if (!OptNoCurses)
mutt_message(_("Looking up %s..."), conn->account.host);
rc = getaddrinfo(host_idna, port, &hints, &res);
return -1;
}
- if (!OPT_NO_CURSES)
+ if (!OptNoCurses)
mutt_message(_("Connecting to %s..."), conn->account.host);
rc = -1;
host_idna = conn->account.host;
#endif
- if (!OPT_NO_CURSES)
+ if (!OptNoCurses)
mutt_message(_("Looking up %s..."), conn->account.host);
he = gethostbyname(host_idna);
return -1;
}
- if (!OPT_NO_CURSES)
+ if (!OptNoCurses)
mutt_message(_("Connecting to %s..."), conn->account.host);
rc = -1;
menu->help = helpstr;
done = 0;
- OPT_IGNORE_MACRO_EVENTS = true;
+ OptIgnoreMacroEvents = true;
while (!done)
{
switch (mutt_menu_loop(menu))
break;
}
}
- OPT_IGNORE_MACRO_EVENTS = false;
+ OptIgnoreMacroEvents = false;
mutt_menu_pop_current(menu);
mutt_menu_destroy(&menu);
mutt_debug(2, "done=%d\n", done);
menu->help = helpstr;
done = 0;
- OPT_IGNORE_MACRO_EVENTS = true;
+ OptIgnoreMacroEvents = true;
while (!done)
{
switch (mutt_menu_loop(menu))
break;
}
}
- OPT_IGNORE_MACRO_EVENTS = false;
+ OptIgnoreMacroEvents = false;
mutt_menu_pop_current(menu);
mutt_menu_destroy(&menu);
gnutls_x509_crt_deinit(cert);
tls_get_client_cert(conn);
- if (!OPT_NO_CURSES)
+ if (!OptNoCurses)
{
mutt_message(_("SSL/TLS connection using %s (%s/%s/%s)"),
gnutls_protocol_get_name(gnutls_protocol_get_version(data->state)),
*/
/* These are used for macros and exec/push commands.
- * They can be temporarily ignored by setting OPT_IGNORE_MACRO_EVENTS
+ * They can be temporarily ignored by setting OptIgnoreMacroEvents
*/
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 OPT_IGNORE_MACRO_EVENTS
+ * ignored when setting OptIgnoreMacroEvents
*/
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 (OPT_KEEP_QUIET)
+ if (OptKeepQuiet)
return;
/* don't refresh in the middle of macros unless necessary */
- if (MacroBufferCount && !OPT_FORCE_REFRESH && !OPT_IGNORE_MACRO_EVENTS)
+ if (MacroBufferCount && !OptForceRefresh && !OptIgnoreMacroEvents)
return;
/* else */
if (UngetCount)
return UngetKeyEvents[--UngetCount];
- if (!OPT_IGNORE_MACRO_EVENTS && MacroBufferCount)
+ if (!OptIgnoreMacroEvents && MacroBufferCount)
return MacroEvents[--MacroBufferCount];
SigInt = 0;
{
int rc;
- OPT_IGNORE_MACRO_EVENTS = true;
+ OptIgnoreMacroEvents = true;
rc = mutt_get_field(msg, buf, buflen, flags);
- OPT_IGNORE_MACRO_EVENTS = false;
+ OptIgnoreMacroEvents = false;
return rc;
}
void mutt_show_error(void)
{
- if (OPT_KEEP_QUIET || !ErrorBufMessage)
+ if (OptKeepQuiet || !ErrorBufMessage)
return;
- SETCOLOR(OPT_MSG_ERR ? MT_COLOR_ERROR : MT_COLOR_MESSAGE);
+ SETCOLOR(OptMsgErr ? MT_COLOR_ERROR : MT_COLOR_MESSAGE);
mutt_window_mvaddstr(MuttMessageWindow, 0, 0, ErrorBuf);
NORMAL_COLOR;
mutt_window_clrtoeol(MuttMessageWindow);
void mutt_endwin(void)
{
- if (OPT_NO_CURSES)
+ if (OptNoCurses)
return;
int e = errno;
}
#define CHECK_ATTACH \
- if (OPT_ATTACH_MSG) \
+ if (OptAttachMsg) \
{ \
mutt_flushinp(); \
mutt_error(_(Function_not_permitted_in_attach_message_mode)); \
size_t buflen, int *oldcount, int *index_hint)
{
#ifdef USE_NNTP
- if (OPT_NEWS)
+ if (OptNews)
{
- OPT_NEWS = false;
+ OptNews = false;
nntp_expand_path(buf, buflen, &CurrentNewsSrv->conn->account);
}
else
update_index(menu, Context, check, *oldcount, *index_hint);
FREE(&new_last_folder);
- OPT_SEARCH_INVALID = true;
+ OptSearchInvalid = true;
menu->redraw |= REDRAW_INDEX | REDRAW_STATUS;
return 0;
}
mutt_clear_error();
mutt_buffy_check(true); /* force the buffy check after we have changed the folder */
menu->redraw = REDRAW_FULL;
- OPT_SEARCH_INVALID = true;
+ OptSearchInvalid = true;
return 0;
}
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 = OPT_ATTACH_MSG;
+ int attach_msg = OptAttachMsg;
struct Menu *menu = mutt_menu_new(MENU_MAIN);
menu->make_entry = index_make_entry;
* any 'op' below could do mutt_enter_command(), either here or
* from any new menu launched, and change $sort/$sort_aux
*/
- if (OPT_NEED_RESORT && Context && Context->msgcount && menu->current >= 0)
+ if (OptNeedResort && Context && Context->msgcount && menu->current >= 0)
resort_index(menu);
menu->max = Context ? Context->vcount : 0;
oldcount = Context ? Context->msgcount : 0;
- if (OPT_REDRAW_TREE && Context && Context->msgcount && (Sort & SORT_MASK) == SORT_THREADS)
+ if (OptRedrawTree && Context && Context->msgcount && (Sort & SORT_MASK) == SORT_THREADS)
{
mutt_draw_tree(Context);
menu->redraw |= REDRAW_STATUS;
- OPT_REDRAW_TREE = false;
+ OptRedrawTree = false;
}
if (Context)
menu->redraw = REDRAW_FULL;
}
- OPT_SEARCH_INVALID = true;
+ OptSearchInvalid = true;
}
else if (check == MUTT_NEW_MAIL || check == MUTT_REOPENED || check == MUTT_FLAGS)
{
menu->redraw = REDRAW_FULL;
menu->max = Context->vcount;
- OPT_SEARCH_INVALID = true;
+ OptSearchInvalid = true;
}
}
}
#ifdef USE_NNTP
- OPT_NEWS = false; /* for any case */
+ OptNews = false; /* for any case */
#endif
#ifdef USE_NOTMUCH
{
snprintf(buf2, sizeof(buf2), "!~R!~D~s%s",
Context->pattern ? Context->pattern : ".*");
- OPT_HIDE_READ = true;
+ OptHideRead = true;
}
else
{
mutt_str_strfcpy(buf2, Context->pattern + 8, sizeof(buf2));
if (!*buf2 || (strncmp(buf2, ".*", 2) == 0))
snprintf(buf2, sizeof(buf2), "~A");
- OPT_HIDE_READ = false;
+ OptHideRead = false;
}
FREE(&Context->pattern);
Context->pattern = mutt_str_strdup(buf2);
update_index(menu, Context, check, oldcount, index_hint);
menu->redraw = REDRAW_FULL; /* new mail arrived? */
- OPT_SEARCH_INVALID = true;
+ OptSearchInvalid = true;
}
}
break;
if (Context && Context->msgcount)
{
resort_index(menu);
- OPT_SEARCH_INVALID = true;
+ OptSearchInvalid = true;
}
if (menu->menu == MENU_PAGER)
{
{
if (mx_close_mailbox(Context, &index_hint) != 0)
{
- OPT_SEARCH_INVALID = true;
+ OptSearchInvalid = true;
menu->redraw = REDRAW_FULL;
break;
}
}
imap_logout_all();
mutt_message(_("Logged out of IMAP servers."));
- OPT_SEARCH_INVALID = true;
+ OptSearchInvalid = true;
menu->redraw = REDRAW_FULL;
break;
#endif
}
}
}
- OPT_SEARCH_INVALID = true;
+ OptSearchInvalid = true;
}
else if (check == MUTT_NEW_MAIL || check == MUTT_REOPENED)
update_index(menu, Context, check, oc, index_hint);
#ifdef USE_NNTP
case OP_MAIN_CHANGE_GROUP:
case OP_MAIN_CHANGE_GROUP_READONLY:
- OPT_NEWS = false;
+ OptNews = false;
#endif
if (attach_msg || ReadOnly ||
#ifdef USE_NNTP
#ifdef USE_NNTP
if (op == OP_MAIN_CHANGE_GROUP || op == OP_MAIN_CHANGE_GROUP_READONLY)
{
- OPT_NEWS = true;
+ OptNews = true;
CurrentNewsSrv = nntp_select_server(NewsServer, false);
if (!CurrentNewsSrv)
break;
if (op == OP_DISPLAY_HEADERS)
Weed = !Weed;
- OPT_NEED_RESORT = false;
+ OptNeedResort = false;
if ((Sort & SORT_MASK) == SORT_THREADS && CURHDR->collapsed)
{
op = mutt_display_message(CURHDR);
if (op < 0)
{
- OPT_NEED_RESORT = false;
+ OptNeedResort = false;
break;
}
}
else if ((WithCrypto != 0) && b->type == TYPEAPPLICATION)
{
- if (OPT_DONT_HANDLE_PGP_KEYS && (mutt_str_strcasecmp("pgp-keys", b->subtype) == 0))
+ if (OptDontHandlePgpKeys && (mutt_str_strcasecmp("pgp-keys", b->subtype) == 0))
{
/* pass raw part through for key extraction */
plaintext = true;
/* only respect disposition == attachment if we're not
displaying from the attachment menu (i.e. pager) */
- if ((!HonorDisposition || (b->disposition != DISPATTACH || OPT_VIEW_ATTACH)) &&
+ if ((!HonorDisposition || (b->disposition != DISPATTACH || OptViewAttach)) &&
(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 && !OPT_VIEW_ATTACH &&
+ else if ((s->flags & MUTT_DISPLAY) || (b->disposition == DISPATTACH && !OptViewAttach &&
HonorDisposition && (plaintext || handler)))
{
state_mark_attach(s);
fputs(_("[-- This is an attachment "), s->fpout);
else
state_printf(s, _("[-- %s/%s is unsupported "), TYPE(b), b->subtype);
- if (!OPT_VIEW_ATTACH)
+ if (!OptViewAttach)
{
char keystroke[SHORT_STRING];
we can simply compare strings as we don't generate References for
multiple Message-Ids in IRT anyways */
#ifdef USE_NNTP
- if (!OPT_NEWS_SEND)
+ if (!OptNewsSend)
#endif
if (!STAILQ_EMPTY(&msg->env->in_reply_to) &&
(STAILQ_EMPTY(&n->in_reply_to) ||
bool imap_passive = ImapPassive;
ImapPassive = true;
- OPT_KEEP_QUIET = true;
+ OptKeepQuiet = true;
sigprocmask(SIG_SETMASK, NULL, &oldmask);
sigaction(SIGALRM, &oldalrm, NULL);
sigprocmask(SIG_SETMASK, &oldmask, NULL);
- OPT_KEEP_QUIET = false;
+ OptKeepQuiet = false;
if (!imap_passive)
ImapPassive = false;
tmp->name = mutt_str_strdup(buf->data);
/* give the main addressbook code a chance */
if (CurrentMenu == MENU_ALIAS)
- OPT_MENU_CALLER = true;
+ OptMenuCaller = true;
}
else
{
mutt_menu_set_redraw(MENU_PAGER, REDRAW_FLOW);
}
if (p->flags & R_RESORT_SUB)
- OPT_SORT_SUBTHREADS = true;
+ OptSortSubthreads = true;
if (p->flags & R_RESORT)
- OPT_NEED_RESORT = true;
+ OptNeedResort = true;
if (p->flags & R_RESORT_INIT)
- OPT_RESORT_INIT = true;
+ OptResortInit = true;
if (p->flags & R_TREE)
- OPT_REDRAW_TREE = true;
+ OptRedrawTree = true;
if (p->flags & R_REFLOW)
mutt_window_reflow();
#ifdef USE_SIDEBAR
for (idx = 0; MuttVars[idx].name; idx++)
restore_default(&MuttVars[idx]);
mutt_menu_set_current_redraw_full();
- OPT_SORT_SUBTHREADS = true;
- OPT_NEED_RESORT = true;
- OPT_RESORT_INIT = true;
- OPT_REDRAW_TREE = true;
+ OptSortSubthreads = true;
+ OptNeedResort = true;
+ OptResortInit = true;
+ OptRedrawTree = true;
return 0;
}
else
break;
}
- if (OPT_ATTACH_MSG &&
+ if (OptAttachMsg &&
(mutt_str_strcmp(MuttVars[idx].name, "reply_regex") == 0))
{
snprintf(err->data, err->dsize, "Operation not permitted when in attach-message mode.");
mutt_menu_set_redraw(MENU_PAGER, REDRAW_FLOW);
}
if (MuttVars[idx].flags & R_RESORT_SUB)
- OPT_SORT_SUBTHREADS = true;
+ OptSortSubthreads = true;
if (MuttVars[idx].flags & R_RESORT)
- OPT_NEED_RESORT = true;
+ OptNeedResort = true;
if (MuttVars[idx].flags & R_RESORT_INIT)
- OPT_RESORT_INIT = true;
+ OptResortInit = true;
if (MuttVars[idx].flags & R_TREE)
- OPT_REDRAW_TREE = true;
+ OptRedrawTree = true;
if (MuttVars[idx].flags & R_REFLOW)
mutt_window_reflow();
#ifdef USE_SIDEBAR
if ((p = mutt_str_getenv("LC_ALL")) || (p = mutt_str_getenv("LANG")) ||
(p = mutt_str_getenv("LC_CTYPE")))
{
- OPT_LOCALES = true;
+ OptLocales = true;
}
#endif
mutt_str_replace(&Visual, env_ed);
}
- if (need_pause && !OPT_NO_CURSES)
+ if (need_pause && !OptNoCurses)
{
log_queue_flush(log_disp_terminal);
if (mutt_any_key_to_continue(NULL) == 'q')
if (map->op != OP_MACRO)
return map->op;
- if (OPT_IGNORE_MACRO_EVENTS)
+ if (OptIgnoreMacroEvents)
{
mutt_error(_("Macros are currently disabled."));
return -1;
break;
default:
usage();
- OPT_NO_CURSES = true;
+ OptNoCurses = true;
goto main_ok; // TEST03: neomutt -9
}
}
print_version();
else
print_copyright();
- OPT_NO_CURSES = true;
+ OptNoCurses = true;
goto main_ok; // TEST04: neomutt -v
}
if (!isatty(0) || !STAILQ_EMPTY(&queries) || !STAILQ_EMPTY(&alias_queries) ||
dump_variables || batch_mode)
{
- OPT_NO_CURSES = true;
+ OptNoCurses = true;
sendflags = SENDBATCH;
MuttLogger = log_disp_terminal;
log_queue_flush(log_disp_terminal);
/* This must come before mutt_init() because curses needs to be started
* before calling the init_pair() function to set the color scheme. */
- if (!OPT_NO_CURSES)
+ if (!OptNoCurses)
{
int crc = start_curses();
/* Now that curses is set up, we drop back to normal screen mode.
goto main_curses; // TEST20: neomutt -A alias
}
- if (!OPT_NO_CURSES)
+ if (!OptNoCurses)
{
NORMAL_COLOR;
clear();
}
/* Create the Folder directory if it doesn't exist. */
- if (!OPT_NO_CURSES && Folder)
+ if (!OptNoCurses && Folder)
{
struct stat sb;
char fpath[_POSIX_PATH_MAX];
if (sendflags & SENDPOSTPONED)
{
- if (!OPT_NO_CURSES)
+ if (!OptNoCurses)
mutt_flushinp();
if (ci_send_message(SENDPOSTPONED, NULL, NULL, NULL, NULL) == 0)
rc = 0;
int rv = 0;
char expanded_infile[_POSIX_PATH_MAX];
- if (!OPT_NO_CURSES)
+ if (!OptNoCurses)
mutt_flushinp();
if (!msg)
#ifdef USE_NNTP
if (flags & MUTT_NEWS)
{
- OPT_NEWS = true;
+ OptNews = true;
CurrentNewsSrv = nntp_select_server(NewsServer, false);
if (!CurrentNewsSrv)
goto main_curses; // TEST38: neomutt -G (unset news_server)
}
#ifdef USE_NNTP
- if (OPT_NEWS)
+ if (OptNews)
{
- OPT_NEWS = false;
+ OptNews = false;
nntp_expand_path(folder, sizeof(folder), &CurrentNewsSrv->conn->account);
}
else
{
if (menu->dialog)
{
- if (OPT_MSG_ERR)
+ if (OptMsgErr)
{
mutt_sleep(1);
- OPT_MSG_ERR = false;
+ OptMsgErr = false;
}
if (ErrorBufMessage)
while (true)
{
- if (OPT_MENU_CALLER)
+ if (OptMenuCaller)
{
- OPT_MENU_CALLER = false;
+ OptMenuCaller = false;
return OP_NULL;
}
#include "memory.h"
#include "string2.h"
-bool OPT_LOCALES; /**< (pseudo) set if user has valid locale definition */
+bool OptLocales; /**< (pseudo) set if user has valid locale definition */
/**
* mutt_mb_charlen - Count the bytes in a (multibyte) character
#include <wchar.h>
#include <wctype.h>
-extern bool OPT_LOCALES;
+extern bool OptLocales;
#ifdef LOCALES_HACK
#define IsPrint(c) (isprint((unsigned char) (c)) || ((unsigned char) (c) >= 0xa0))
#else
#define IsPrint(c) \
(isprint((unsigned char) (c)) || \
- (OPT_LOCALES ? 0 : ((unsigned char) (c) >= 0xa0)))
-#define IsWPrint(wc) (iswprint(wc) || (OPT_LOCALES ? 0 : (wc >= 0xa0)))
+ (OptLocales ? 0 : ((unsigned char) (c) >= 0xa0)))
+#define IsWPrint(wc) (iswprint(wc) || (OptLocales ? 0 : (wc >= 0xa0)))
#endif
int mutt_mb_charlen(const char *s, int *width);
else if ((account->type == MUTT_ACCT_TYPE_NNTP) && NntpUser)
mutt_str_strfcpy(account->user, NntpUser, sizeof(account->user));
#endif
- else if (OPT_NO_CURSES)
+ else if (OptNoCurses)
return -1;
/* prompt (defaults to unix username), copy into account->user */
else
else if ((account->type == MUTT_ACCT_TYPE_NNTP) && NntpPass)
mutt_str_strfcpy(account->pass, NntpPass, sizeof(account->pass));
#endif
- else if (OPT_NO_CURSES)
+ else if (OptNoCurses)
return -1;
else
{
void mutt_clear_error(void)
{
/* Make sure the error message has had time to be read */
- if (OPT_MSG_ERR)
+ if (OptMsgErr)
error_pause();
ErrorBufMessage = false;
- if (!OPT_NO_CURSES)
+ if (!OptNoCurses)
mutt_window_clearline(MuttMessageWindow, 0);
}
return 0;
/* Only pause if this is a message following an error */
- if ((level > LL_ERROR) && OPT_MSG_ERR && !dupe)
+ if ((level > LL_ERROR) && OptMsgErr && !dupe)
error_pause();
mutt_simple_format(ErrorBuf, sizeof(ErrorBuf), 0, MuttMessageWindow->cols,
FMT_LEFT, 0, buf, sizeof(buf), 0);
ErrorBufMessage = true;
- if (!OPT_KEEP_QUIET)
+ if (!OptKeepQuiet)
{
if (level == LL_ERROR)
BEEP();
if ((level <= LL_ERROR) && !dupe)
{
- OPT_MSG_ERR = true;
+ OptMsgErr = true;
if (gettimeofday(&LastError, NULL) < 0)
mutt_debug(1, "gettimeofday failed: %d\n", errno);
}
else
{
- OPT_MSG_ERR = false;
+ OptMsgErr = false;
LastError.tv_sec = 0;
}
*/
void mutt_window_reflow(void)
{
- if (OPT_NO_CURSES)
+ if (OptNoCurses)
return;
mutt_debug(2, "entering\n");
* 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.
*/
- OPT_FORCE_REFRESH = true;
+ OptForceRefresh = true;
if (!ctx->quiet)
mutt_message(_("Reading %s..."), ctx->path);
{
/* avoid unnecessary work since the mailbox is completely unthreaded
to begin with */
- OPT_SORT_SUBTHREADS = false;
- OPT_NEED_RESCORE = false;
+ OptSortSubthreads = false;
+ OptNeedRescore = false;
mutt_sort_headers(ctx, 1);
}
if (!ctx->quiet)
FREE(&ctx);
}
- OPT_FORCE_REFRESH = false;
+ OptForceRefresh = false;
return ctx;
}
}
if (WithCrypto & APPLICATION_PGP)
- OPT_DONT_HANDLE_PGP_KEYS = true;
+ OptDontHandlePgpKeys = true;
if (!h)
{
mutt_file_unlink(tempfname);
if (WithCrypto & APPLICATION_PGP)
- OPT_DONT_HANDLE_PGP_KEYS = false;
+ OptDontHandlePgpKeys = false;
}
/**
return 0;
if (WithCrypto & APPLICATION_PGP)
- OPT_PGP_CHECK_TRUST = true;
+ OptPgpCheckTrust = true;
last = mutt_addr_append(&addrlist, msg->env->to, false);
last = mutt_addr_append(last ? &last : &addrlist, msg->env->cc, false);
mutt_addr_free(&addrlist);
return -1;
}
- OPT_PGP_CHECK_TRUST = false;
+ OptPgpCheckTrust = false;
if (PgpSelfEncrypt || (PgpEncryptSelf == MUTT_YES))
self_encrypt = PgpDefaultKey;
}
case OP_GENERIC_SELECT_ENTRY:
/* FIXME make error reporting more verbose - this should be
easy because gpgme provides more information */
- if (OPT_PGP_CHECK_TRUST)
+ if (OptPgpCheckTrust)
{
if (!crypt_key_is_valid(key_table[menu->current]))
{
}
}
- if (OPT_PGP_CHECK_TRUST && (!crypt_id_is_valid(key_table[menu->current]) ||
+ if (OptPgpCheckTrust && (!crypt_id_is_valid(key_table[menu->current]) ||
!crypt_id_is_strong(key_table[menu->current])))
{
const char *warn_s = NULL;
char buf[LONG_STRING];
struct stat sb;
- OPT_PGP_CHECK_TRUST = false;
+ OptPgpCheckTrust = false;
struct CryptKeyInfo *key = crypt_ask_for_key(_("Please enter the key ID: "), NULL, 0, APPLICATION_PGP, NULL);
if (!key)
}
mutt_endwin();
- OPT_DONT_HANDLE_PGP_KEYS = true;
+ OptDontHandlePgpKeys = true;
for (; top; top = top->next)
{
break;
}
- OPT_DONT_HANDLE_PGP_KEYS = false;
+ OptDontHandlePgpKeys = false;
}
static struct Body *pgp_decrypt_part(struct Body *a, struct State *s,
switch (choices[choice - 1])
{
case 'a': /* sign (a)s */
- OPT_PGP_CHECK_TRUST = false;
+ OptPgpCheckTrust = false;
p = pgp_ask_for_key(_("Sign as: "), NULL, 0, PGP_SECRING);
if (p)
/* XXX make error reporting more verbose */
- if (OPT_PGP_CHECK_TRUST)
+ if (OptPgpCheckTrust)
{
if (!pgp_key_is_valid(KeyTable[menu->current]->parent))
{
}
}
- if (OPT_PGP_CHECK_TRUST && (!pgp_id_is_valid(KeyTable[menu->current]) ||
+ if (OptPgpCheckTrust && (!pgp_id_is_valid(KeyTable[menu->current]) ||
!pgp_id_is_strong(KeyTable[menu->current])))
{
char *str = "";
FILE *devnull = NULL;
struct stat sb;
pid_t thepid;
- OPT_PGP_CHECK_TRUST = false;
+ OptPgpCheckTrust = false;
struct PgpKeyInfo *key = pgp_ask_for_key(_("Please enter the key ID: "), NULL, 0, PGP_PUBRING);
/* pseudo options */
-WHERE bool OPT_ATTACH_MSG; /**< (pseudo) used by attach-message */
-WHERE bool OPT_AUX_SORT; /**< (pseudo) using auxiliary sort function */
-WHERE bool OPT_DONT_HANDLE_PGP_KEYS; /**< (pseudo) used to extract PGP keys */
-WHERE bool OPT_FORCE_REFRESH; /**< (pseudo) refresh even during macros */
-WHERE bool OPT_HIDE_READ; /**< (pseudo) whether or not hide read messages */
-WHERE bool OPT_IGNORE_MACRO_EVENTS; /**< (pseudo) don't process macro/push/exec events while set */
-WHERE bool OPT_KEEP_QUIET; /**< (pseudo) shut up the message and refresh functions while we are executing an external program. */
-WHERE bool OPT_MENU_CALLER; /**< (pseudo) tell menu to give caller a take */
-WHERE bool OPT_MSG_ERR; /**< (pseudo) used by mutt_error/mutt_message */
-WHERE bool OPT_NEED_RESCORE; /**< (pseudo) set when the `score' command is used */
-WHERE bool OPT_NEED_RESORT; /**< (pseudo) used to force a re-sort */
+WHERE bool OptAttachMsg; /**< (pseudo) used by attach-message */
+WHERE bool OptAuxSort; /**< (pseudo) using auxiliary sort function */
+WHERE bool OptDontHandlePgpKeys; /**< (pseudo) used to extract PGP keys */
+WHERE bool OptForceRefresh; /**< (pseudo) refresh even during macros */
+WHERE bool OptHideRead; /**< (pseudo) whether or not hide read messages */
+WHERE bool OptIgnoreMacroEvents; /**< (pseudo) don't process macro/push/exec events while set */
+WHERE bool OptKeepQuiet; /**< (pseudo) shut up the message and refresh functions while we are executing an external program. */
+WHERE bool OptMenuCaller; /**< (pseudo) tell menu to give caller a take */
+WHERE bool OptMsgErr; /**< (pseudo) used by mutt_error/mutt_message */
+WHERE bool OptNeedRescore; /**< (pseudo) set when the `score' command is used */
+WHERE bool OptNeedResort; /**< (pseudo) used to force a re-sort */
#ifdef USE_NNTP
-WHERE bool OPT_NEWS; /**< (pseudo) used to change reader mode */
-WHERE bool OPT_NEWS_SEND; /**< (pseudo) used to change behavior when posting */
+WHERE bool OptNews; /**< (pseudo) used to change reader mode */
+WHERE bool OptNewsSend; /**< (pseudo) used to change behavior when posting */
#endif
-WHERE bool OPT_NO_CURSES; /**< (pseudo) when sending in batch mode */
-WHERE bool OPT_PGP_CHECK_TRUST; /**< (pseudo) used by pgp_select_key () */
-WHERE bool OPT_REDRAW_TREE; /**< (pseudo) redraw the thread tree */
-WHERE bool OPT_RESORT_INIT; /**< (pseudo) used to force the next resort to be from scratch */
-WHERE bool OPT_SEARCH_INVALID; /**< (pseudo) used to invalidate the search pat */
-WHERE bool OPT_SEARCH_REVERSE; /**< (pseudo) used by ci_search_command */
-WHERE bool OPT_SIGNALS_BLOCKED; /**< (pseudo) using by mutt_block_signals () */
-WHERE bool OPT_SORT_SUBTHREADS; /**< (pseudo) used when $sort_aux changes */
-WHERE bool OPT_SYS_SIGNALS_BLOCKED; /**< (pseudo) using by mutt_block_signals_system () */
-WHERE bool OPT_VIEW_ATTACH; /**< (pseudo) signals that we are viewing attachments */
+WHERE bool OptNoCurses; /**< (pseudo) when sending in batch mode */
+WHERE bool OptPgpCheckTrust; /**< (pseudo) used by pgp_select_key () */
+WHERE bool OptRedrawTree; /**< (pseudo) redraw the thread tree */
+WHERE bool OptResortInit; /**< (pseudo) used to force the next resort to be from scratch */
+WHERE bool OptSearchInvalid; /**< (pseudo) used to invalidate the search pat */
+WHERE bool OptSearchReverse; /**< (pseudo) used by ci_search_command */
+WHERE bool OptSignalsBlocked; /**< (pseudo) using by mutt_block_signals () */
+WHERE bool OptSortSubthreads; /**< (pseudo) used when $sort_aux changes */
+WHERE bool OptSysSignalsBlocked; /**< (pseudo) using by mutt_block_signals_system () */
+WHERE bool OptViewAttach; /**< (pseudo) signals that we are viewing attachments */
#define mutt_bit_set(v, n) v[n / 8] |= (1 << (n % 8))
#define mutt_bit_unset(v, n) v[n / 8] &= ~(1 << (n % 8))
}
#define CHECK_ATTACH \
- if (OPT_ATTACH_MSG) \
+ if (OptAttachMsg) \
{ \
mutt_flushinp(); \
mutt_error(_(Function_not_permitted_in_attach_message_mode)); \
bool do_new_mail = false;
- if (Context && !OPT_ATTACH_MSG)
+ if (Context && !OptAttachMsg)
{
oldcount = Context ? Context->msgcount : 0;
/* check for new mail */
}
pager_menu->redraw = REDRAW_FULL;
- OPT_SEARCH_INVALID = true;
+ OptSearchInvalid = true;
}
}
CHECK_MODE(IsHeader(extra))
if (mutt_select_sort((ch == OP_SORT_REVERSE)) == 0)
{
- OPT_NEED_RESORT = true;
+ OptNeedResort = true;
ch = -1;
rc = OP_DISPLAY_MESSAGE;
}
mutt_enter_command();
- if (OPT_NEED_RESORT)
+ if (OptNeedResort)
{
- OPT_NEED_RESORT = false;
+ OptNeedResort = false;
CHECK_MODE(IsHeader(extra));
- OPT_NEED_RESORT = true;
+ OptNeedResort = true;
}
if (old_PagerIndexLines != PagerIndexLines)
return -1;
if (op == OP_SEARCH || op == OP_SEARCH_NEXT)
- OPT_SEARCH_REVERSE = false;
+ OptSearchReverse = false;
else
- OPT_SEARCH_REVERSE = true;
+ OptSearchReverse = true;
/* compare the *expanded* version of the search pattern in case
$simple_search has changed while we were searching */
{
struct Buffer err;
mutt_buffer_init(&err);
- OPT_SEARCH_INVALID = true;
+ OptSearchInvalid = true;
mutt_str_strfcpy(LastSearch, buf, sizeof(LastSearch));
mutt_message(_("Compiling search pattern..."));
mutt_pattern_free(&SearchPattern);
}
}
- if (OPT_SEARCH_INVALID)
+ if (OptSearchInvalid)
{
for (int i = 0; i < Context->msgcount; i++)
Context->hdrs[i]->searched = false;
if (Context->magic == MUTT_IMAP && imap_search(Context, SearchPattern) < 0)
return -1;
#endif
- OPT_SEARCH_INVALID = false;
+ OptSearchInvalid = false;
}
- int incr = (OPT_SEARCH_REVERSE) ? -1 : 1;
+ int incr = (OptSearchReverse) ? -1 : 1;
if (op == OP_SEARCH_OPPOSITE)
incr = -incr;
if (LastModify < st.st_mtime)
{
#ifdef USE_NNTP
- int optnews = OPT_NEWS;
+ int optnews = OptNews;
#endif
LastModify = st.st_mtime;
return (PostCount = 0);
#ifdef USE_NNTP
if (optnews)
- OPT_NEWS = false;
+ OptNews = false;
#endif
if (mx_open_mailbox(Postponed, MUTT_NOSORT | MUTT_QUIET, &ctx) == NULL)
PostCount = 0;
mx_fastclose_mailbox(&ctx);
#ifdef USE_NNTP
if (optnews)
- OPT_NEWS = true;
+ OptNews = true;
#endif
}
if (!progress)
return;
- if (OPT_NO_CURSES)
+ if (OptNoCurses)
return;
memset(progress, 0, sizeof(struct Progress));
struct timeval tv = { 0, 0 };
unsigned int now = 0;
- if (OPT_NO_CURSES)
+ if (OptNoCurses)
return;
if (progress->inc == 0)
N_("Function not permitted in attach-message mode.");
#define CHECK_ATTACH \
- if (OPT_ATTACH_MSG) \
+ if (OptAttachMsg) \
{ \
mutt_flushinp(); \
mutt_error(_(Function_not_permitted)); \
#ifdef USE_NNTP
if (flags & SENDNEWS)
- OPT_NEWS_SEND = true;
+ OptNewsSend = true;
else
- OPT_NEWS_SEND = false;
+ OptNewsSend = false;
#endif
if (!check_all_msg(actx, cur, false))
if (i != 0)
{
fprintf(stderr, _("Error sending message, child exited %d.\n"), i);
- if (!OPT_NO_CURSES)
+ if (!OptNoCurses)
{
mutt_any_key_to_continue(NULL);
mutt_error(_("Error sending message."));
void mutt_check_rescore(struct Context *ctx)
{
- if (OPT_NEED_RESCORE && Score)
+ if (OptNeedRescore && Score)
{
if ((Sort & SORT_MASK) == SORT_SCORE || (SortAux & SORT_MASK) == SORT_SCORE)
{
- OPT_NEED_RESORT = true;
+ OptNeedResort = true;
if ((Sort & SORT_MASK) == SORT_THREADS)
- OPT_SORT_SUBTHREADS = true;
+ OptSortSubthreads = true;
}
/* must redraw the index since the user might have %N in it */
ctx->hdrs[i]->pair = 0;
}
}
- OPT_NEED_RESCORE = false;
+ OptNeedRescore = false;
}
int mutt_parse_score(struct Buffer *buf, struct Buffer *s, unsigned long data,
mutt_str_strfcpy(err->data, _("Error: score: invalid number"), err->dsize);
return -1;
}
- OPT_NEED_RESCORE = true;
+ OptNeedRescore = true;
return 0;
}
}
}
}
- OPT_NEED_RESCORE = true;
+ OptNeedRescore = true;
return 0;
}
char buf[HUGE_STRING];
#ifdef USE_NNTP
- if (OPT_NEWS_SEND)
+ if (OptNewsSend)
{
if (en->newsgroups)
mutt_str_strfcpy(buf, en->newsgroups, sizeof(buf));
add_message_id(&env->in_reply_to, curenv);
#ifdef USE_NNTP
- if (OPT_NEWS_SEND && XCommentTo && curenv->from)
+ if (OptNewsSend && XCommentTo && curenv->from)
env->x_comment_to = mutt_str_strdup(mutt_get_name(curenv->from));
#endif
}
if (!FollowupTo)
return;
#ifdef USE_NNTP
- if (OPT_NEWS_SEND)
+ if (OptNewsSend)
{
if (!e->followup_to && e->newsgroups && (strrchr(e->newsgroups, ',')))
e->followup_to = mutt_str_strdup(e->newsgroups);
#ifdef USE_SMTP
#ifdef USE_NNTP
- if (!OPT_NEWS_SEND)
+ if (!OptNewsSend)
#endif
if (SmtpUrl)
return mutt_smtp_send(msg->env->from, msg->env->to, msg->env->cc, msg->env->bcc,
#ifdef USE_NNTP
if (flags & SENDNEWS)
- OPT_NEWS_SEND = true;
+ OptNewsSend = true;
else
- OPT_NEWS_SEND = false;
+ OptNewsSend = false;
#endif
if (!flags && !msg && Recall != MUTT_NO && mutt_num_postponed(1))
if (msg->env->newsgroups)
{
flags |= SENDNEWS;
- OPT_NEWS_SEND = true;
+ OptNewsSend = true;
}
else
{
flags &= ~SENDNEWS;
- OPT_NEWS_SEND = false;
+ OptNewsSend = false;
}
#endif
}
free_clear_content = true;
}
- if (!OPT_NO_CURSES && !(flags & SENDMAILX))
+ if (!OptNoCurses && !(flags & SENDMAILX))
mutt_message(_("Sending message..."));
mutt_prepare_envelope(msg->env, 1);
goto cleanup;
}
}
- else if (!OPT_NO_CURSES && !(flags & SENDMAILX))
+ else if (!OptNoCurses && !(flags & SENDMAILX))
{
mutt_message(i != 0 ? _("Sending in background.") :
(flags & SENDNEWS) ? _("Article posted.") : /* USE_NNTP */
}
else if (mode > 0)
#ifdef USE_NNTP
- if (!OPT_NEWS_SEND)
+ if (!OptNewsSend)
#endif
fputs("To: \n", fp);
}
else if (mode > 0)
#ifdef USE_NNTP
- if (!OPT_NEWS_SEND)
+ if (!OptNewsSend)
#endif
fputs("Cc: \n", fp);
}
else if (mode > 0)
#ifdef USE_NNTP
- if (!OPT_NEWS_SEND)
+ if (!OptNewsSend)
#endif
fputs("Bcc: \n", fp);
#ifdef USE_NNTP
if (env->newsgroups)
fprintf(fp, "Newsgroups: %s\n", env->newsgroups);
- else if (mode == 1 && OPT_NEWS_SEND)
+ else if (mode == 1 && OptNewsSend)
fputs("Newsgroups: \n", fp);
if (env->followup_to)
fprintf(fp, "Followup-To: %s\n", env->followup_to);
- else if (mode == 1 && OPT_NEWS_SEND)
+ else if (mode == 1 && OptNewsSend)
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 && OPT_NEWS_SEND && XCommentTo)
+ else if (mode == 1 && OptNewsSend && XCommentTo)
fputs("X-Comment-To: \n", fp);
#endif
if (env->mail_followup_to)
#ifdef USE_NNTP
- if (!OPT_NEWS_SEND)
+ if (!OptNewsSend)
#endif
{
fputs("Mail-Followup-To: ", fp);
int i;
#ifdef USE_NNTP
- if (OPT_NEWS_SEND)
+ if (OptNewsSend)
{
char cmd[LONG_STRING];
}
#ifdef USE_NNTP
- if (!OPT_NEWS_SEND)
+ if (!OptNewsSend)
{
#endif
size_t extra_argslen = 0;
* 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 (!OPT_NO_CURSES)
+ if (!OptNoCurses)
mutt_need_hard_redraw();
- i = send_msg(path, args, msg, OPT_NO_CURSES ? NULL : &childout);
+ i = send_msg(path, args, msg, OptNoCurses ? NULL : &childout);
if (i != (EX_OK & 0xff))
{
if (i != S_BKG)
if (env->subject)
#ifdef USE_NNTP
- if (!OPT_NEWS_SEND || MimeSubject)
+ if (!OptNewsSend || MimeSubject)
#endif
{
mutt_rfc2047_encode(&env->subject, NULL, sizeof("Subject:"), SendCharset);
mutt_addr_write(resent_from, sizeof(resent_from), from, false);
#ifdef USE_NNTP
- OPT_NEWS_SEND = false;
+ OptNewsSend = false;
#endif
/*
*/
void mutt_block_signals(void)
{
- if (!OPT_SIGNALS_BLOCKED)
+ if (!OptSignalsBlocked)
{
sigemptyset(&Sigset);
sigaddset(&Sigset, SIGTERM);
sigaddset(&Sigset, SIGINT);
sigaddset(&Sigset, SIGWINCH);
sigprocmask(SIG_BLOCK, &Sigset, 0);
- OPT_SIGNALS_BLOCKED = true;
+ OptSignalsBlocked = true;
}
}
*/
void mutt_unblock_signals(void)
{
- if (OPT_SIGNALS_BLOCKED)
+ if (OptSignalsBlocked)
{
sigprocmask(SIG_UNBLOCK, &Sigset, 0);
- OPT_SIGNALS_BLOCKED = false;
+ OptSignalsBlocked = false;
}
}
{
struct sigaction sa;
- if (!OPT_SYS_SIGNALS_BLOCKED)
+ if (!OptSysSignalsBlocked)
{
/* POSIX: ignore SIGINT and SIGQUIT & block SIGCHLD before exec */
sa.sa_handler = SIG_IGN;
sigemptyset(&SigsetSys);
sigaddset(&SigsetSys, SIGCHLD);
sigprocmask(SIG_BLOCK, &SigsetSys, 0);
- OPT_SYS_SIGNALS_BLOCKED = true;
+ OptSysSignalsBlocked = true;
}
}
void mutt_unblock_signals_system(int catch)
{
- if (OPT_SYS_SIGNALS_BLOCKED)
+ if (OptSysSignalsBlocked)
{
sigprocmask(SIG_UNBLOCK, &SigsetSys, NULL);
if (catch)
sigaction(SIGINT, &sa, NULL);
}
- OPT_SYS_SIGNALS_BLOCKED = false;
+ OptSysSignalsBlocked = false;
}
}
return SMTP_AUTH_UNAVAIL;
}
- if (!OPT_NO_CURSES)
+ if (!OptNoCurses)
mutt_message(_("Authenticating (%s)..."), mech);
bufsize = ((len * 2) > LONG_STRING) ? (len * 2) : LONG_STRING;
{
/* If the items compared equal by the main sort
* and we're not already doing an 'aux' sort... */
- if ((retval == 0) && AuxSort && !OPT_AUX_SORT)
+ if ((retval == 0) && AuxSort && !OptAuxSort)
{
- OPT_AUX_SORT = true;
+ OptAuxSort = true;
retval = AuxSort(a, b);
- OPT_AUX_SORT = false;
+ OptAuxSort = false;
}
/* If the items still match, use their index positions
* to maintain a stable sort order */
struct MuttThread *thread = NULL, *top = NULL;
sort_t *sortfunc = NULL;
- OPT_NEED_RESORT = false;
+ OptNeedResort = false;
if (!ctx)
return;
if (!ctx->quiet)
mutt_message(_("Sorting mailbox..."));
- if (OPT_NEED_RESCORE && Score)
+ if (OptNeedRescore && Score)
{
for (int i = 0; i < ctx->msgcount; i++)
mutt_score_message(ctx, ctx->hdrs[i], 1);
}
- OPT_NEED_RESCORE = false;
+ OptNeedRescore = false;
- if (OPT_RESORT_INIT)
+ if (OptResortInit)
{
- OPT_RESORT_INIT = false;
+ OptResortInit = false;
init = 1;
}
AuxSort = NULL;
/* if $sort_aux changed after the mailbox is sorted, then all the
subthreads need to be resorted */
- if (OPT_SORT_SUBTHREADS)
+ if (OptSortSubthreads)
{
int i = Sort;
Sort = SortAux;
if (ctx->tree)
ctx->tree = mutt_sort_subthreads(ctx->tree, 1);
Sort = i;
- OPT_SORT_SUBTHREADS = false;
+ OptSortSubthreads = false;
}
mutt_sort_threads(ctx, init);
}
if (Context)
{
- i = OPT_ATTACH_MSG ?
+ i = OptAttachMsg ?
3 :
((Context->readonly || Context->dontwrite) ?
2 :