From: Richard Russon Date: Mon, 30 Oct 2017 00:42:25 +0000 (+0000) Subject: Rename all the config bools OPT_ABC_XYZ -> AbcXyz X-Git-Tag: neomutt-20180223~57^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a539917b910a4c5776cd725c6eb3e641e70ad873;p=neomutt Rename all the config bools OPT_ABC_XYZ -> AbcXyz --- diff --git a/addrbook.c b/addrbook.c index ea6cad7c0..74da70e86 100644 --- a/addrbook.c +++ b/addrbook.c @@ -248,7 +248,7 @@ new_aliases: { AliasTable[menu->current]->del = (op == OP_DELETE); menu->redraw |= REDRAW_CURRENT; - if (OPT_RESOLVE && menu->current < menu->max - 1) + if (Resolve && menu->current < menu->max - 1) { menu->current++; menu->redraw |= REDRAW_INDEX; diff --git a/alias.c b/alias.c index a3e1509eb..f6ee769e0 100644 --- a/alias.c +++ b/alias.c @@ -123,7 +123,7 @@ static struct Address *expand_aliases_r(struct Address *a, struct ListHead *expn last->next = NULL; } - if (OPT_USE_DOMAIN && (fqdn = mutt_fqdn(1))) + if (UseDomain && (fqdn = mutt_fqdn(1))) { /* now qualify all local addresses */ mutt_addr_qualify(head, fqdn); diff --git a/attach.c b/attach.c index 466740637..191f1d5d6 100644 --- a/attach.c +++ b/attach.c @@ -523,7 +523,7 @@ int mutt_view_attachment(FILE *fp, struct Body *a, int flag, struct Header *hdr, _("---Command: %-30.30s Attachment: %s"), command, type); } - if ((mutt_wait_filter(thepid) || (entry->needsterminal && OPT_WAIT_KEY)) && !use_pager) + if ((mutt_wait_filter(thepid) || (entry->needsterminal && WaitKey)) && !use_pager) mutt_any_key_to_continue(NULL); if (tempfd != -1) @@ -538,7 +538,7 @@ int mutt_view_attachment(FILE *fp, struct Body *a, int flag, struct Header *hdr, if (rv == -1) mutt_debug(1, "Error running \"%s\"!", command); - if ((rv != 0) || (entry->needsterminal && OPT_WAIT_KEY)) + if ((rv != 0) || (entry->needsterminal && WaitKey)) mutt_any_key_to_continue(NULL); } } @@ -741,7 +741,7 @@ bail: if (mutt_wait_filter(thepid) != 0) rc = 0; - if (rc == 0 || OPT_WAIT_KEY) + if (rc == 0 || WaitKey) mutt_any_key_to_continue(NULL); return rc; } @@ -1056,7 +1056,7 @@ int mutt_print_attachment(FILE *fp, struct Body *a) mutt_file_copy_stream(ifp, fpout); mutt_file_fclose(&fpout); mutt_file_fclose(&ifp); - if (mutt_wait_filter(thepid) || OPT_WAIT_KEY) + if (mutt_wait_filter(thepid) || WaitKey) mutt_any_key_to_continue(NULL); } else @@ -1065,7 +1065,7 @@ int mutt_print_attachment(FILE *fp, struct Body *a) if (rc == -1) mutt_debug(1, "Error running \"%s\"!", command); - if ((rc != 0) || OPT_WAIT_KEY) + if ((rc != 0) || WaitKey) mutt_any_key_to_continue(NULL); } @@ -1121,7 +1121,7 @@ int mutt_print_attachment(FILE *fp, struct Body *a) mutt_file_fclose(&fpout); mutt_file_fclose(&ifp); - if (mutt_wait_filter(thepid) != 0 || OPT_WAIT_KEY) + if (mutt_wait_filter(thepid) != 0 || WaitKey) mutt_any_key_to_continue(NULL); rc = 1; } diff --git a/browser.c b/browser.c index 3492371db..6cea7ccc1 100644 --- a/browser.c +++ b/browser.c @@ -641,7 +641,7 @@ static const char *group_index_format_str(char *buf, size_t buflen, size_t col, snprintf(fmt, sizeof(fmt), "%%%sd", prec); snprintf(buf, buflen, fmt, Context->new); } - else if (OPT_MARK_OLD && folder->ff->nd->last_cached >= folder->ff->nd->first_message && + else if (MarkOld && folder->ff->nd->last_cached >= folder->ff->nd->first_message && folder->ff->nd->last_cached <= folder->ff->nd->last_message) { snprintf(fmt, sizeof(fmt), "%%%sd", prec); @@ -864,7 +864,7 @@ static int examine_mailboxes(struct Menu *menu, struct BrowserState *state) { struct NntpData *nntp_data = nserv->groups_list[i]; if (nntp_data && (nntp_data->new || (nntp_data->subscribed && - (nntp_data->unread || !OPT_SHOW_ONLY_UNREAD)))) + (nntp_data->unread || !ShowOnlyUnread)))) add_folder(menu, state, nntp_data->group, NULL, NULL, NULL, nntp_data); } } @@ -1588,10 +1588,10 @@ void mutt_select_file(char *f, size_t flen, int flags, char ***files, int *numfi #ifdef USE_IMAP case OP_BROWSER_TOGGLE_LSUB: - if (OPT_IMAP_LIST_SUBSCRIBED) - OPT_IMAP_LIST_SUBSCRIBED = false; + if (ImapListSubscribed) + ImapListSubscribed = false; else - OPT_IMAP_LIST_SUBSCRIBED = true; + ImapListSubscribed = true; mutt_unget_event(0, OP_CHECK_NEW); break; diff --git a/buffy.c b/buffy.c index 79c71affd..1381c3cb6 100644 --- a/buffy.c +++ b/buffy.c @@ -205,7 +205,7 @@ static int buffy_maildir_check_dir(struct Buffy *mailbox, const char *dir_name, /* 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 && OPT_MAIL_CHECK_RECENT) + if (check_new && MailCheckRecent) { if (stat(path, &sb) == 0 && sb.st_mtime < mailbox->last_visited) { @@ -245,7 +245,7 @@ static int buffy_maildir_check_dir(struct Buffy *mailbox, const char *dir_name, mailbox->msg_unread++; if (check_new) { - if (OPT_MAIL_CHECK_RECENT) + if (MailCheckRecent) { snprintf(msgpath, sizeof(msgpath), "%s/%s", path, de->d_name); /* ensure this message was received since leaving this mailbox */ @@ -286,7 +286,7 @@ static int buffy_maildir_check(struct Buffy *mailbox, bool check_stats) rc = buffy_maildir_check_dir(mailbox, "new", check_new, check_stats); - check_new = !rc && OPT_MAILDIR_CHECK_CUR; + check_new = !rc && MaildirCheckCur; if (check_new || check_stats) if (buffy_maildir_check_dir(mailbox, "cur", check_new, check_stats)) rc = 1; @@ -307,7 +307,7 @@ static int buffy_mbox_check(struct Buffy *mailbox, struct stat *sb, bool check_s int new_or_changed; struct Context ctx; - if (OPT_CHECK_MBOX_SIZE) + if (CheckMboxSize) new_or_changed = sb->st_size > mailbox->size; else new_or_changed = sb->st_mtime > sb->st_atime || @@ -316,13 +316,13 @@ static int buffy_mbox_check(struct Buffy *mailbox, struct stat *sb, bool check_s if (new_or_changed) { - if (!OPT_MAIL_CHECK_RECENT || sb->st_mtime > mailbox->last_visited) + if (!MailCheckRecent || sb->st_mtime > mailbox->last_visited) { rc = 1; mailbox->new = true; } } - else if (OPT_CHECK_MBOX_SIZE) + else if (CheckMboxSize) { /* some other program has deleted mail from the folder */ mailbox->size = (off_t) sb->st_size; @@ -439,7 +439,7 @@ static void buffy_check(struct Buffy *tmp, struct stat *contex_sb, bool check_st #endif } } - else if (OPT_CHECK_MBOX_SIZE && Context && Context->path) + else if (CheckMboxSize && Context && Context->path) tmp->size = (off_t) sb.st_size; /* update the size of current folder */ #ifdef USE_SIDEBAR @@ -489,7 +489,7 @@ void mutt_buffy_cleanup(const char *buf, struct stat *st) { struct utimbuf ut; - if (OPT_CHECK_MBOX_SIZE) + if (CheckMboxSize) { struct Buffy *b = mutt_find_mailbox(buf); if (b && !b->new) @@ -617,7 +617,7 @@ int mutt_parse_mailboxes(struct Buffer *path, struct Buffer *s, * 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 (OPT_CHECK_MBOX_SIZE && stat((*b)->path, &sb) == 0 && !test_new_folder((*b)->path)) + if (CheckMboxSize && stat((*b)->path, &sb) == 0 && !test_new_folder((*b)->path)) { /* some systems out there don't have an off_t type */ (*b)->size = (off_t) sb.st_size; @@ -715,7 +715,7 @@ int mutt_buffy_check(bool force) if (!force && (t - BuffyTime < MailCheck)) return BuffyCount; - if (OPT_MAIL_CHECK_STATS && (t - BuffyStatsTime >= MailCheckStatsInterval)) + if (MailCheckStats && (t - BuffyStatsTime >= MailCheckStatsInterval)) { check_stats = true; BuffyStatsTime = t; diff --git a/buffy.h b/buffy.h index 587774d82..ae88193a1 100644 --- a/buffy.h +++ b/buffy.h @@ -48,7 +48,7 @@ struct Buffy struct Buffy *next; bool new; /**< mailbox has new mail */ - /* These next three are only set when OPT_MAIL_CHECK_STATS is set */ + /* These next three are only set when MailCheckStats is set */ int msg_count; /**< total number of messages */ int msg_unread; /**< number of unread messages */ int msg_flagged; /**< number of flagged messages */ diff --git a/commands.c b/commands.c index 0fdaf9f9e..40f09a238 100644 --- a/commands.c +++ b/commands.c @@ -104,7 +104,7 @@ int mutt_display_message(struct Header *cur) else if (cur->security & SIGN) { /* find out whether or not the verify signature */ - if (query_quadoption(OPT_CRYPT_VERIFY_SIG, _("Verify PGP signature?")) == MUTT_YES) + if (query_quadoption(CryptVerifySig, _("Verify PGP signature?")) == MUTT_YES) { cmflags |= MUTT_CM_VERIFY; } @@ -162,7 +162,7 @@ int mutt_display_message(struct Header *cur) fputs("\n\n", fpout); } - chflags = (OPT_WEED ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE | CH_FROM | CH_DISPLAY; + chflags = (Weed ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE | CH_FROM | CH_DISPLAY; #ifdef USE_NOTMUCH if (Context->magic == MUTT_NOTMUCH) chflags |= CH_VIRTUAL; @@ -246,7 +246,7 @@ int mutt_display_message(struct Header *cur) keypad(stdscr, true); if (r != -1) mutt_set_flag(Context, cur, MUTT_READ, 1); - if (r != -1 && OPT_PROMPT_AFTER) + if (r != -1 && PromptAfter) { mutt_unget_event(mutt_any_key_to_continue(_("Command: ")), 0); rc = km_dokey(MENU_PAGER); @@ -332,7 +332,7 @@ void ci_bounce_message(struct Header *h) else snprintf(prompt, sizeof(prompt), "%s?", scratch); - if (query_quadoption(OPT_BOUNCE, prompt) != MUTT_YES) + if (query_quadoption(Bounce, prompt) != MUTT_YES) { mutt_addr_free(&adr); mutt_window_clearline(MuttMessageWindow, 0); @@ -356,7 +356,7 @@ static void pipe_set_flags(int decode, int print, int *cmflags, int *chflags) *cmflags |= MUTT_CM_DECODE | MUTT_CM_CHARCONV; *chflags |= CH_DECODE | CH_REORDER; - if (OPT_WEED) + if (Weed) { *chflags |= CH_WEED; *cmflags |= MUTT_CM_WEED; @@ -498,7 +498,7 @@ static int pipe_message(struct Header *h, char *cmd, int decode, int print, } } - if (rc || OPT_WAIT_KEY) + if (rc || WaitKey) mutt_any_key_to_continue(NULL); return rc; } @@ -515,22 +515,22 @@ void mutt_pipe_message(struct Header *h) } mutt_expand_path(buffer, sizeof(buffer)); - pipe_message(h, buffer, OPT_PIPE_DECODE, 0, OPT_PIPE_SPLIT, PipeSep); + pipe_message(h, buffer, PipeDecode, 0, PipeSplit, PipeSep); } void mutt_print_message(struct Header *h) { - if (OPT_PRINT && (!PrintCommand || !*PrintCommand)) + if (Print && (!PrintCommand || !*PrintCommand)) { mutt_message(_("No printing command has been defined.")); return; } - if (query_quadoption(OPT_PRINT, + if (query_quadoption(Print, h ? _("Print message?") : _("Print tagged messages?")) != MUTT_YES) return; - if (pipe_message(h, PrintCommand, OPT_PRINT_DECODE, 1, OPT_PRINT_SPLIT, "\f") == 0) + if (pipe_message(h, PrintCommand, PrintDecode, 1, PrintSplit, "\f") == 0) mutt_message(h ? _("Message printed") : _("Messages printed")); else mutt_message(h ? _("Message could not be printed") : @@ -627,7 +627,7 @@ void mutt_shell_escape(void) if (rc == -1) mutt_debug(1, "Error running \"%s\"!", buf); - if ((rc != 0) || OPT_WAIT_KEY) + if ((rc != 0) || WaitKey) mutt_any_key_to_continue(NULL); mutt_buffy_check(true); } @@ -721,7 +721,7 @@ static void set_copy_flags(struct Header *hdr, int decode, int decrypt, { *chflags |= CH_DECODE; /* then decode RFC2047 headers, */ - if (OPT_WEED) + if (Weed) { *chflags |= CH_WEED; /* and respect $weed. */ *cmflags |= MUTT_CM_WEED; @@ -749,7 +749,7 @@ int mutt_save_message_ctx(struct Header *h, int delete, int decode, int decrypt, { mutt_set_flag(Context, h, MUTT_DELETE, 1); mutt_set_flag(Context, h, MUTT_PURGE, 1); - if (OPT_DELETE_UNTAG) + if (DeleteUntag) mutt_set_flag(Context, h, MUTT_TAG, 0); } diff --git a/compose.c b/compose.c index ee8e0103f..dd4dcd805 100644 --- a/compose.c +++ b/compose.c @@ -289,7 +289,7 @@ static void redraw_crypt_lines(struct Header *msg) addstr(_(" (S/MIME)")); } - if (OPT_CRYPT_OPPORTUNISTIC_ENCRYPT && (msg->security & OPPENCRYPT)) + if (CryptOpportunisticEncrypt && (msg->security & OPPENCRYPT)) addstr(_(" (OppEnc mode)")); mutt_window_clrtoeol(MuttIndexWindow); @@ -428,7 +428,7 @@ static void draw_envelope(struct Header *msg, char *fcc) mutt_window_mvprintw(MuttIndexWindow, HDR_CC, 0, "%*s", HeaderPadding[HDR_FOLLOWUPTO], Prompts[HDR_FOLLOWUPTO]); mutt_paddstr(W, NONULL(msg->env->followup_to)); - if (OPT_X_COMMENT_TO) + if (XCommentTo) { mutt_window_mvprintw(MuttIndexWindow, HDR_BCC, 0, "%*s", HeaderPadding[HDR_XCOMMENTTO], Prompts[HDR_XCOMMENTTO]); @@ -841,7 +841,7 @@ int mutt_compose_menu(struct Header *msg, /* structure for new message */ break; #endif edit_address_list(HDR_TO, &msg->env->to); - if (OPT_CRYPT_OPPORTUNISTIC_ENCRYPT) + if (CryptOpportunisticEncrypt) { crypt_opportunistic_encrypt(msg); redraw_crypt_lines(msg); @@ -854,7 +854,7 @@ int mutt_compose_menu(struct Header *msg, /* structure for new message */ break; #endif edit_address_list(HDR_BCC, &msg->env->bcc); - if (OPT_CRYPT_OPPORTUNISTIC_ENCRYPT) + if (CryptOpportunisticEncrypt) { crypt_opportunistic_encrypt(msg); redraw_crypt_lines(msg); @@ -867,7 +867,7 @@ int mutt_compose_menu(struct Header *msg, /* structure for new message */ break; #endif edit_address_list(HDR_CC, &msg->env->cc); - if (OPT_CRYPT_OPPORTUNISTIC_ENCRYPT) + if (CryptOpportunisticEncrypt) { crypt_opportunistic_encrypt(msg); redraw_crypt_lines(msg); @@ -912,7 +912,7 @@ int mutt_compose_menu(struct Header *msg, /* structure for new message */ } break; case OP_COMPOSE_EDIT_X_COMMENT_TO: - if (news && OPT_X_COMMENT_TO) + if (news && XCommentTo) { if (msg->env->x_comment_to) mutt_str_strfcpy(buf, msg->env->x_comment_to, sizeof(buf)); @@ -963,7 +963,7 @@ int mutt_compose_menu(struct Header *msg, /* structure for new message */ mutt_message_hook(NULL, msg, MUTT_SEND2HOOK); break; case OP_COMPOSE_EDIT_MESSAGE: - if (Editor && (mutt_str_strcmp("builtin", Editor) != 0) && !OPT_EDIT_HEADERS) + if (Editor && (mutt_str_strcmp("builtin", Editor) != 0) && !EditHeaders) { mutt_edit_file(Editor, msg->content->filename); mutt_update_encoding(msg->content); @@ -974,7 +974,7 @@ int mutt_compose_menu(struct Header *msg, /* structure for new message */ /* fallthrough */ case OP_COMPOSE_EDIT_HEADERS: if ((mutt_str_strcmp("builtin", Editor) != 0) && - (op == OP_COMPOSE_EDIT_HEADERS || (op == OP_COMPOSE_EDIT_MESSAGE && OPT_EDIT_HEADERS))) + (op == OP_COMPOSE_EDIT_HEADERS || (op == OP_COMPOSE_EDIT_MESSAGE && EditHeaders))) { char *tag = NULL, *err = NULL; mutt_env_to_local(msg->env); @@ -984,7 +984,7 @@ int mutt_compose_menu(struct Header *msg, /* structure for new message */ mutt_error(_("Bad IDN in \"%s\": '%s'"), tag, err); FREE(&err); } - if (OPT_CRYPT_OPPORTUNISTIC_ENCRYPT) + if (CryptOpportunisticEncrypt) crypt_opportunistic_encrypt(msg); } else @@ -1319,7 +1319,7 @@ int mutt_compose_menu(struct Header *msg, /* structure for new message */ if (!fcc_set && *fcc) { - i = query_quadoption(OPT_COPY, _("Save a copy of this message?")); + i = query_quadoption(Copy, _("Save a copy of this message?")); if (i == MUTT_ABORT) break; else if (i == MUTT_NO) @@ -1527,7 +1527,7 @@ int mutt_compose_menu(struct Header *msg, /* structure for new message */ break; case OP_EXIT: - i = query_quadoption(OPT_POSTPONE, _("Postpone this message?")); + i = query_quadoption(Postpone, _("Postpone this message?")); if (i == MUTT_NO) { for (i = 0; i < actx->idxlen; i++) diff --git a/compress.c b/compress.c index b9ec230b9..b9a027780 100644 --- a/compress.c +++ b/compress.c @@ -613,7 +613,7 @@ static int comp_close_mailbox(struct Context *ctx) if (!ctx->append) { /* If the file was removed, remove the compressed folder too */ - if ((access(ctx->path, F_OK) != 0) && !OPT_SAVE_EMPTY) + if ((access(ctx->path, F_OK) != 0) && !SaveEmpty) { remove(ctx->realpath); } diff --git a/conn/socket.c b/conn/socket.c index 4614ec634..fb5a4b0c1 100644 --- a/conn/socket.c +++ b/conn/socket.c @@ -495,7 +495,7 @@ int raw_socket_open(struct Connection *conn) /* we accept v4 or v6 STREAM sockets */ memset(&hints, 0, sizeof(hints)); - if (OPT_USE_IPV6) + if (UseIpv6) hints.ai_family = AF_UNSPEC; else hints.ai_family = AF_INET; diff --git a/conn/ssl.c b/conn/ssl.c index b122e9b54..ec1877275 100644 --- a/conn/ssl.c +++ b/conn/ssl.c @@ -180,7 +180,7 @@ static int ssl_set_verify_partial(SSL_CTX *ctx) #ifdef HAVE_SSL_PARTIAL_CHAIN X509_VERIFY_PARAM *param = NULL; - if (OPT_SSL_VERIFY_PARTIAL_CHAINS) + if (SslVerifyPartialChains) { param = X509_VERIFY_PARAM_new(); if (param) @@ -511,7 +511,7 @@ static bool compare_certificates(X509 *cert, X509 *peercert, */ static bool check_certificate_expiration(X509 *peercert, bool silent) { - if (OPT_SSL_VERIFY_DATES != MUTT_NO) + if (SslVerifyDates != MUTT_NO) { if (X509_cmp_current_time(X509_get_notBefore(peercert)) >= 0) { @@ -1014,7 +1014,7 @@ static int interactive_check_cert(X509 *cert, int idx, size_t len, SSL *ssl, int /* The leaf/host certificate can't be skipped. */ #ifdef HAVE_SSL_PARTIAL_CHAIN - if ((idx != 0) && OPT_SSL_VERIFY_PARTIAL_CHAINS) + if ((idx != 0) && SslVerifyPartialChains) ALLOW_SKIP = 1; #endif @@ -1169,7 +1169,7 @@ static int ssl_verify_callback(int preverify_ok, X509_STORE_CTX *ctx) * a second time with preverify_ok = 1. Don't show it or the user * will think their "s" key is broken. */ - if (OPT_SSL_VERIFY_PARTIAL_CHAINS) + if (SslVerifyPartialChains) { if (skip_mode && preverify_ok && (pos == last_pos) && last_cert) { @@ -1198,7 +1198,7 @@ static int ssl_verify_callback(int preverify_ok, X509_STORE_CTX *ctx) /* check hostname only for the leaf certificate */ buf[0] = 0; - if (pos == 0 && OPT_SSL_VERIFY_HOST != MUTT_NO) + if (pos == 0 && SslVerifyHost != MUTT_NO) { if (!check_host(cert, host, buf, sizeof(buf))) { @@ -1342,7 +1342,7 @@ static int ssl_socket_open(struct Connection *conn) } /* disable SSL protocols as needed */ - if (!OPT_SSL_USE_TLSV1) + if (!SslUseTlsv1) { SSL_CTX_set_options(data->ctx, SSL_OP_NO_TLSv1); } @@ -1350,27 +1350,27 @@ static int ssl_socket_open(struct Connection *conn) * as Fedora 17 are on OpenSSL 1.0.0. */ #ifdef SSL_OP_NO_TLSv1_1 - if (!OPT_SSL_USE_TLSV1_1) + if (!SslUseTlsv11) { SSL_CTX_set_options(data->ctx, SSL_OP_NO_TLSv1_1); } #endif #ifdef SSL_OP_NO_TLSv1_2 - if (!OPT_SSL_USE_TLSV1_2) + if (!SslUseTlsv12) { SSL_CTX_set_options(data->ctx, SSL_OP_NO_TLSv1_2); } #endif - if (!OPT_SSL_USE_SSLV2) + if (!SslUseSslv2) { SSL_CTX_set_options(data->ctx, SSL_OP_NO_SSLv2); } - if (!OPT_SSL_USE_SSLV3) + if (!SslUseSslv3) { SSL_CTX_set_options(data->ctx, SSL_OP_NO_SSLv3); } - if (OPT_SSL_USESYSTEMCERTS) + if (SslUsesystemcerts) { if (!SSL_CTX_set_default_verify_paths(data->ctx)) { @@ -1444,15 +1444,15 @@ int mutt_ssl_starttls(struct Connection *conn) goto bail_ssldata; } #ifdef SSL_OP_NO_TLSv1_2 - if (!OPT_SSL_USE_TLSV1_2) + if (!SslUseTlsv12) ssl_options |= SSL_OP_NO_TLSv1_2; #endif #ifdef SSL_OP_NO_TLSv1_1 - if (!OPT_SSL_USE_TLSV1_1) + if (!SslUseTlsv11) ssl_options |= SSL_OP_NO_TLSv1_1; #endif #ifdef SSL_OP_NO_TLSv1 - if (!OPT_SSL_USE_TLSV1) + if (!SslUseTlsv1) ssl_options |= SSL_OP_NO_TLSv1; #endif /* these are always set */ @@ -1468,7 +1468,7 @@ int mutt_ssl_starttls(struct Connection *conn) goto bail_ctx; } - if (OPT_SSL_USESYSTEMCERTS) + if (SslUsesystemcerts) { if (!SSL_CTX_set_default_verify_paths(ssldata->ctx)) { diff --git a/conn/ssl_gnutls.c b/conn/ssl_gnutls.c index cfae24066..c242df8cb 100644 --- a/conn/ssl_gnutls.c +++ b/conn/ssl_gnutls.c @@ -469,7 +469,7 @@ static int tls_check_preauth(const gnutls_datum_t *certdata, return -1; } - if (OPT_SSL_VERIFY_DATES != MUTT_NO) + if (SslVerifyDates != MUTT_NO) { if (gnutls_x509_crt_get_expiration_time(cert) < time(NULL)) *certerr |= CERTERR_EXPIRED; @@ -477,7 +477,7 @@ static int tls_check_preauth(const gnutls_datum_t *certdata, *certerr |= CERTERR_NOTYETVALID; } - if (chainidx == 0 && OPT_SSL_VERIFY_HOST != MUTT_NO && + if (chainidx == 0 && SslVerifyHost != MUTT_NO && !gnutls_x509_crt_check_hostname(cert, hostname) && !tls_check_stored_hostname(certdata, hostname)) *certerr |= CERTERR_HOSTNAME; @@ -1045,22 +1045,22 @@ static int tls_set_priority(struct TlsSockData *data) else mutt_str_strcat(priority, priority_size, "NORMAL"); - if (!OPT_SSL_USE_TLSV1_2) + if (!SslUseTlsv12) { nproto--; mutt_str_strcat(priority, priority_size, ":-VERS-TLS1.2"); } - if (!OPT_SSL_USE_TLSV1_1) + if (!SslUseTlsv11) { nproto--; mutt_str_strcat(priority, priority_size, ":-VERS-TLS1.1"); } - if (!OPT_SSL_USE_TLSV1) + if (!SslUseTlsv1) { nproto--; mutt_str_strcat(priority, priority_size, ":-VERS-TLS1.0"); } - if (!OPT_SSL_USE_SSLV3) + if (!SslUseSslv3) { nproto--; mutt_str_strcat(priority, priority_size, ":-VERS-SSL3.0"); @@ -1097,13 +1097,13 @@ static int tls_set_priority(struct TlsSockData *data) { size_t nproto = 0; /* number of tls/ssl protocols */ - if (OPT_SSL_USE_TLSV1_2) + if (SslUseTlsv12) protocol_priority[nproto++] = GNUTLS_TLS1_2; - if (OPT_SSL_USE_TLSV1_1) + if (SslUseTlsv11) protocol_priority[nproto++] = GNUTLS_TLS1_1; - if (OPT_SSL_USE_TLSV1) + if (SslUseTlsv1) protocol_priority[nproto++] = GNUTLS_TLS1; - if (OPT_SSL_USE_SSLV3) + if (SslUseSslv3) protocol_priority[nproto++] = GNUTLS_SSL3; protocol_priority[nproto] = 0; diff --git a/copy.c b/copy.c index 90d658316..d68728878 100644 --- a/copy.c +++ b/copy.c @@ -455,7 +455,7 @@ int mutt_copy_header(FILE *in, struct Header *h, FILE *out, int flags, const cha { /* Add some fake headers based on notmuch data */ char *folder = nm_header_get_folder(h); - if (folder && !(OPT_WEED && mutt_matches_ignore("folder"))) + if (folder && !(Weed && mutt_matches_ignore("folder"))) { char buf[LONG_STRING]; mutt_str_strfcpy(buf, folder, sizeof(buf)); @@ -468,7 +468,7 @@ int mutt_copy_header(FILE *in, struct Header *h, FILE *out, int flags, const cha } #endif char *tags = driver_tags_get(&h->tags); - if (tags && !(OPT_WEED && mutt_matches_ignore("tags"))) + if (tags && !(Weed && mutt_matches_ignore("tags"))) { fputs("Tags: ", out); fputs(tags, out); @@ -559,7 +559,7 @@ int mutt_copy_message_fp(FILE *fpout, FILE *fpin, struct Header *hdr, int flags, if (flags & MUTT_CM_PREFIX) { - if (OPT_TEXT_FLOWED) + if (TextFlowed) mutt_str_strfcpy(prefix, ">", sizeof(prefix)); else mutt_make_string_flags(prefix, sizeof(prefix), NONULL(IndentString), Context, hdr, 0); diff --git a/curs_lib.c b/curs_lib.c index 0758a88a1..fb9c4c582 100644 --- a/curs_lib.c +++ b/curs_lib.c @@ -160,7 +160,7 @@ struct Event mutt_getch(void) return timeout; } - if ((ch & 0x80) && OPT_META_KEY) + if ((ch & 0x80) && MetaKey) { /* send ALT-x as ESC-x */ ch &= ~0x80; @@ -646,14 +646,14 @@ void mutt_reflow_windows(void) MuttStatusWindow->rows = 1; MuttStatusWindow->cols = COLS; - MuttStatusWindow->row_offset = OPT_STATUS_ON_TOP ? 0 : LINES - 2; + MuttStatusWindow->row_offset = StatusOnTop ? 0 : LINES - 2; MuttStatusWindow->col_offset = 0; memcpy(MuttHelpWindow, MuttStatusWindow, sizeof(struct MuttWindow)); - if (!OPT_HELP) + if (!Help) MuttHelpWindow->rows = 0; else - MuttHelpWindow->row_offset = OPT_STATUS_ON_TOP ? LINES - 2 : 0; + MuttHelpWindow->row_offset = StatusOnTop ? LINES - 2 : 0; memcpy(MuttMessageWindow, MuttStatusWindow, sizeof(struct MuttWindow)); MuttMessageWindow->row_offset = LINES - 1; @@ -662,16 +662,16 @@ void mutt_reflow_windows(void) MuttIndexWindow->rows = MAX( LINES - MuttStatusWindow->rows - MuttHelpWindow->rows - MuttMessageWindow->rows, 0); MuttIndexWindow->row_offset = - OPT_STATUS_ON_TOP ? MuttStatusWindow->rows : MuttHelpWindow->rows; + StatusOnTop ? MuttStatusWindow->rows : MuttHelpWindow->rows; #ifdef USE_SIDEBAR - if (OPT_SIDEBAR_VISIBLE) + if (SidebarVisible) { memcpy(MuttSidebarWindow, MuttIndexWindow, sizeof(struct MuttWindow)); MuttSidebarWindow->cols = SidebarWidth; MuttIndexWindow->cols -= SidebarWidth; - if (OPT_SIDEBAR_ON_RIGHT) + if (SidebarOnRight) { MuttSidebarWindow->col_offset = COLS - SidebarWidth; } @@ -692,16 +692,16 @@ static void reflow_message_window_rows(int mw_rows) MuttMessageWindow->rows = mw_rows; MuttMessageWindow->row_offset = LINES - mw_rows; - MuttStatusWindow->row_offset = OPT_STATUS_ON_TOP ? 0 : LINES - mw_rows - 1; + MuttStatusWindow->row_offset = StatusOnTop ? 0 : LINES - mw_rows - 1; - if (OPT_HELP) - MuttHelpWindow->row_offset = OPT_STATUS_ON_TOP ? LINES - mw_rows - 1 : 0; + if (Help) + MuttHelpWindow->row_offset = StatusOnTop ? LINES - mw_rows - 1 : 0; MuttIndexWindow->rows = MAX( LINES - MuttStatusWindow->rows - MuttHelpWindow->rows - MuttMessageWindow->rows, 0); #ifdef USE_SIDEBAR - if (OPT_SIDEBAR_VISIBLE) + if (SidebarVisible) MuttSidebarWindow->rows = MuttIndexWindow->rows; #endif diff --git a/curs_main.c b/curs_main.c index 833483cce..eaf34f02c 100644 --- a/curs_main.c +++ b/curs_main.c @@ -145,7 +145,7 @@ static const char *NoVisible = N_("No visible messages."); #define FLAGGED(h) mutt_thread_contains_flagged(Context, h) #define CAN_COLLAPSE(header) \ - ((OPT_COLLAPSE_UNREAD || !UNREAD(header)) && (OPT_COLLAPSE_FLAGGED || !FLAGGED(header))) + ((CollapseUnread || !UNREAD(header)) && (CollapseFlagged || !FLAGGED(header))) /* de facto standard escapes for tsl/fsl */ static char *tsl = "\033]0;"; @@ -157,7 +157,7 @@ static char *fsl = "\007"; * @param toggle toggle collapsed state * * This function is called by the OP_MAIN_COLLAPSE_ALL command and on folder - * enter if the OPT_COLLAPSE_ALL option is set. In the first case, the @a toggle + * enter if the CollapseAll 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. @@ -372,8 +372,7 @@ void update_index(struct Menu *menu, struct Context *ctx, int check, int oldcoun } /* save the list of new messages */ - if (OPT_UNCOLLAPSE_NEW && oldcount && check != MUTT_REOPENED && - ((Sort & SORT_MASK) == SORT_THREADS)) + if (UncollapseNew && oldcount && check != MUTT_REOPENED && ((Sort & SORT_MASK) == SORT_THREADS)) { save_new = mutt_mem_malloc(sizeof(struct Header *) * (ctx->msgcount - oldcount)); for (int i = oldcount; i < ctx->msgcount; i++) @@ -384,7 +383,7 @@ void update_index(struct Menu *menu, struct Context *ctx, int check, int oldcoun mutt_sort_headers(ctx, (check == MUTT_REOPENED)); /* uncollapse threads with new mail */ - if (OPT_UNCOLLAPSE_NEW && ((Sort & SORT_MASK) == SORT_THREADS)) + if (UncollapseNew && ((Sort & SORT_MASK) == SORT_THREADS)) { if (check == MUTT_REOPENED) { @@ -498,7 +497,7 @@ static int main_change_folder(struct Menu *menu, int op, char *buf, * switch statement would need to be run. */ mutt_folder_hook(buf); - Context = mx_open_mailbox(buf, (OPT_READ_ONLY || (op == OP_MAIN_CHANGE_FOLDER_READONLY)) ? MUTT_READONLY : 0, NULL); + Context = mx_open_mailbox(buf, (ReadOnly || (op == OP_MAIN_CHANGE_FOLDER_READONLY)) ? MUTT_READONLY : 0, NULL); if (Context) { menu->current = ci_first_message(); @@ -506,7 +505,7 @@ static int main_change_folder(struct Menu *menu, int op, char *buf, else menu->current = 0; - if (((Sort & SORT_MASK) == SORT_THREADS) && OPT_COLLAPSE_ALL) + if (((Sort & SORT_MASK) == SORT_THREADS) && CollapseAll) collapse_all(menu, 0); #ifdef USE_SIDEBAR @@ -886,7 +885,7 @@ static void index_menu_redraw(struct Menu *menu) mutt_draw_statusline(MuttStatusWindow->cols, buf, sizeof(buf)); NORMAL_COLOR; menu->redraw &= ~REDRAW_STATUS; - if (OPT_TS_ENABLED && TSSupported) + if (TsEnabled && TSSupported) { menu_status_line(buf, sizeof(buf), menu, NONULL(TSStatusFormat)); mutt_ts_status(buf); @@ -938,7 +937,7 @@ int mutt_index_menu(void) if (!attach_msg) mutt_buffy_check(true); /* force the buffy check after we enter the folder */ - if (((Sort & SORT_MASK) == SORT_THREADS) && OPT_COLLAPSE_ALL) + if (((Sort & SORT_MASK) == SORT_THREADS) && CollapseAll) { collapse_all(menu, 0); menu->redraw = REDRAW_FULL; @@ -1010,7 +1009,7 @@ int mutt_index_menu(void) if (!Context->hdrs[i]->read) { mutt_message(_("New mail in this mailbox.")); - if (OPT_BEEP_NEW) + if (BeepNew) beep(); if (NewMailCommand) { @@ -1053,7 +1052,7 @@ int mutt_index_menu(void) if (mutt_buffy_notify()) { menu->redraw |= REDRAW_STATUS; - if (OPT_BEEP_NEW) + if (BeepNew) beep(); if (NewMailCommand) { @@ -1087,9 +1086,9 @@ int mutt_index_menu(void) else menu->oldcurrent = -1; - if (OPT_ARROW_CURSOR) + if (ArrowCursor) mutt_window_move(MuttIndexWindow, menu->current - menu->top + menu->offset, 2); - else if (OPT_BRAILLE_FRIENDLY) + else if (BrailleFriendly) mutt_window_move(MuttIndexWindow, menu->current - menu->top + menu->offset, 0); else mutt_window_move(MuttIndexWindow, menu->current - menu->top + menu->offset, @@ -1160,7 +1159,7 @@ int mutt_index_menu(void) tag = true; continue; } - else if (OPT_AUTO_TAG && Context && Context->tagged) + else if (AutoTag && Context && Context->tagged) tag = true; mutt_clear_error(); @@ -1582,7 +1581,7 @@ int mutt_index_menu(void) break; } - if (query_quadoption(OPT_QUIT, _("Quit NeoMutt?")) == MUTT_YES) + if (query_quadoption(Quit, _("Quit NeoMutt?")) == MUTT_YES) { int check; @@ -1646,7 +1645,7 @@ int mutt_index_menu(void) CHECK_MSGCOUNT; CHECK_VISIBLE; - if (tag && !OPT_AUTO_TAG) + if (tag && !AutoTag) { for (j = 0; j < Context->msgcount; j++) if (message_is_visible(Context, j)) @@ -1663,7 +1662,7 @@ int mutt_index_menu(void) Context->last_tag); menu->redraw |= REDRAW_STATUS; - if (OPT_RESOLVE && menu->current < Context->vcount - 1) + if (Resolve && menu->current < Context->vcount - 1) { menu->current++; menu->redraw |= REDRAW_MOTION_RESYNCH; @@ -1952,7 +1951,7 @@ int mutt_index_menu(void) op = OP_DISPLAY_MESSAGE; continue; } - if (OPT_RESOLVE) + if (Resolve) { menu->current = ci_next_undeleted(menu->current); if (menu->current == -1) @@ -2040,7 +2039,7 @@ int mutt_index_menu(void) case OP_MAIN_CHANGE_GROUP_READONLY: OPT_NEWS = false; #endif - if (attach_msg || OPT_READ_ONLY || + if (attach_msg || ReadOnly || #ifdef USE_NNTP op == OP_MAIN_CHANGE_GROUP_READONLY || #endif @@ -2100,7 +2099,7 @@ int mutt_index_menu(void) #endif else { - if (OPT_CHANGE_FOLDER_NEXT && Context && Context->path) + if (ChangeFolderNext && Context && Context->path) { mutt_str_strfcpy(buf, Context->path, sizeof(buf)); mutt_pretty_mailbox(buf, sizeof(buf)); @@ -2168,7 +2167,7 @@ int mutt_index_menu(void) * again while reading the message. */ if (op == OP_DISPLAY_HEADERS) - OPT_WEED = !OPT_WEED; + Weed = !Weed; OPT_NEED_RESORT = false; @@ -2176,11 +2175,11 @@ int mutt_index_menu(void) { mutt_uncollapse_thread(Context, CURHDR); mutt_set_virtual(Context); - if (OPT_UNCOLLAPSE_JUMP) + if (UncollapseJump) menu->current = mutt_thread_next_unread(Context, CURHDR); } - if (OPT_PGP_AUTO_DECODE && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))) + if (PgpAutoDecode && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))) { mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw); } @@ -2218,7 +2217,7 @@ int mutt_index_menu(void) } if ((menu->menu == MENU_MAIN) && - (query_quadoption(OPT_QUIT, _("Exit NeoMutt without saving?")) == MUTT_YES)) + (query_quadoption(Quit, _("Exit NeoMutt without saving?")) == MUTT_YES)) { if (Context) { @@ -2433,7 +2432,7 @@ int mutt_index_menu(void) menu->redraw |= REDRAW_STATUS; if (tag) menu->redraw |= REDRAW_INDEX; - else if (OPT_RESOLVE) + else if (Resolve) { menu->current = ci_next_undeleted(menu->current); if (menu->current == -1) @@ -2567,7 +2566,7 @@ int mutt_index_menu(void) else { mutt_set_flag(Context, CURHDR, MUTT_FLAG, !CURHDR->flagged); - if (OPT_RESOLVE) + if (Resolve) { menu->current = ci_next_undeleted(menu->current); if (menu->current == -1) @@ -2613,7 +2612,7 @@ int mutt_index_menu(void) else mutt_set_flag(Context, CURHDR, MUTT_READ, 1); - if (OPT_RESOLVE) + if (Resolve) { menu->current = ci_next_undeleted(menu->current); if (menu->current == -1) @@ -2713,7 +2712,7 @@ int mutt_index_menu(void) menu->redraw |= REDRAW_STATUS; if (tag) menu->redraw |= REDRAW_INDEX; - else if (OPT_RESOLVE) + else if (Resolve) { menu->current = ci_next_undeleted(menu->current); if (menu->current == -1) @@ -2743,7 +2742,7 @@ int mutt_index_menu(void) { menu->current = mutt_uncollapse_thread(Context, CURHDR); mutt_set_virtual(Context); - if (OPT_UNCOLLAPSE_JUMP) + if (UncollapseJump) menu->current = mutt_thread_next_unread(Context, CURHDR); } else if (CAN_COLLAPSE(CURHDR)) @@ -2809,7 +2808,7 @@ int mutt_index_menu(void) { mutt_tag_set_flag(MUTT_DELETE, 1); mutt_tag_set_flag(MUTT_PURGE, (op == OP_PURGE_MESSAGE)); - if (OPT_DELETE_UNTAG) + if (DeleteUntag) mutt_tag_set_flag(MUTT_TAG, 0); menu->redraw |= REDRAW_INDEX; } @@ -2817,9 +2816,9 @@ int mutt_index_menu(void) { mutt_set_flag(Context, CURHDR, MUTT_DELETE, 1); mutt_set_flag(Context, CURHDR, MUTT_PURGE, (op == OP_PURGE_MESSAGE)); - if (OPT_DELETE_UNTAG) + if (DeleteUntag) mutt_set_flag(Context, CURHDR, MUTT_TAG, 0); - if (OPT_RESOLVE) + if (Resolve) { menu->current = ci_next_undeleted(menu->current); if (menu->current == -1) @@ -2863,9 +2862,9 @@ int mutt_index_menu(void) break; } - if (OPT_DELETE_UNTAG) + if (DeleteUntag) mutt_thread_set_flag(CURHDR, MUTT_TAG, 0, subthread); - if (OPT_RESOLVE) + if (Resolve) { menu->current = ci_next_undeleted(menu->current); if (menu->current == -1) @@ -2923,7 +2922,7 @@ int mutt_index_menu(void) else edit = false; - if (OPT_PGP_AUTO_DECODE && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))) + if (PgpAutoDecode && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))) { mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw); } @@ -2940,7 +2939,7 @@ int mutt_index_menu(void) CHECK_MSGCOUNT; CHECK_VISIBLE; CHECK_ATTACH; - if (OPT_PGP_AUTO_DECODE && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))) + if (PgpAutoDecode && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))) { mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw); } @@ -2957,7 +2956,7 @@ int mutt_index_menu(void) CHECK_MSGCOUNT; CHECK_VISIBLE; CHECK_ATTACH; - if (OPT_PGP_AUTO_DECODE && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))) + if (PgpAutoDecode && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))) { mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw); } @@ -2993,7 +2992,7 @@ int mutt_index_menu(void) CHECK_ATTACH; CHECK_MSGCOUNT; CHECK_VISIBLE; - if (OPT_PGP_AUTO_DECODE && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))) + if (PgpAutoDecode && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))) { mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw); } @@ -3050,7 +3049,7 @@ int mutt_index_menu(void) /* 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 && !OPT_IMAP_PEEK) + if (Context->magic == MUTT_IMAP && !ImapPeek) { menu->redraw |= (tag ? REDRAW_INDEX : REDRAW_CURRENT) | REDRAW_STATUS; } @@ -3068,7 +3067,7 @@ int mutt_index_menu(void) /* 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 && !OPT_IMAP_PEEK) + if (Context->magic == MUTT_IMAP && !ImapPeek) { menu->redraw |= (tag ? REDRAW_INDEX : REDRAW_CURRENT) | REDRAW_STATUS; } @@ -3089,7 +3088,7 @@ int mutt_index_menu(void) if (rc != -1) { - if (OPT_RESOLVE) + if (Resolve) { menu->current = (op == OP_MAIN_READ_THREAD ? mutt_next_thread(CURHDR) : mutt_next_subthread(CURHDR)); @@ -3181,11 +3180,11 @@ int mutt_index_menu(void) CHECK_ATTACH; if (op != OP_FOLLOWUP || !CURHDR->env->followup_to || (mutt_str_strcasecmp(CURHDR->env->followup_to, "poster") != 0) || - query_quadoption(OPT_FOLLOWUP_TO_POSTER, + query_quadoption(FollowupToPoster, _("Reply by mail as poster prefers?")) != MUTT_YES) { if (Context && Context->magic == MUTT_NNTP && - !((struct NntpData *) Context->data)->allowed && query_quadoption(OPT_POST_MODERATED, _("Posting to this group not allowed, may be moderated. Continue?")) != MUTT_YES) + !((struct NntpData *) Context->data)->allowed && query_quadoption(PostModerated, _("Posting to this group not allowed, may be moderated. Continue?")) != MUTT_YES) { break; } @@ -3207,7 +3206,7 @@ int mutt_index_menu(void) CHECK_ATTACH; CHECK_MSGCOUNT; CHECK_VISIBLE; - if (OPT_PGP_AUTO_DECODE && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))) + if (PgpAutoDecode && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))) { mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw); } @@ -3230,7 +3229,7 @@ int mutt_index_menu(void) if (rc != -1) { - if (OPT_RESOLVE) + if (Resolve) { if (op == OP_TAG_THREAD) menu->current = mutt_next_thread(CURHDR); @@ -3262,7 +3261,7 @@ int mutt_index_menu(void) { mutt_set_flag(Context, CURHDR, MUTT_DELETE, 0); mutt_set_flag(Context, CURHDR, MUTT_PURGE, 0); - if (OPT_RESOLVE && menu->current < Context->vcount - 1) + if (Resolve && menu->current < Context->vcount - 1) { menu->current++; menu->redraw |= REDRAW_MOTION_RESYNCH; @@ -3288,7 +3287,7 @@ int mutt_index_menu(void) op == OP_UNDELETE_THREAD ? 0 : 1); if (rc != -1) { - if (OPT_RESOLVE) + if (Resolve) { if (op == OP_UNDELETE_THREAD) menu->current = mutt_next_thread(CURHDR); @@ -3337,7 +3336,7 @@ int mutt_index_menu(void) break; case OP_SIDEBAR_TOGGLE_VISIBLE: - OPT_SIDEBAR_VISIBLE = !OPT_SIDEBAR_VISIBLE; + SidebarVisible = !SidebarVisible; mutt_reflow_windows(); break; diff --git a/edit.c b/edit.c index 3e6bd374d..d30fb6c41 100644 --- a/edit.c +++ b/edit.c @@ -288,7 +288,7 @@ static void be_edit_header(struct Envelope *e, int force) addch('\n'); } - if ((!e->cc && OPT_ASKCC) || force) + if ((!e->cc && Askcc) || force) { addstr("Cc: "); tmp[0] = '\0'; @@ -309,7 +309,7 @@ static void be_edit_header(struct Envelope *e, int force) addch('\n'); } - if (OPT_ASKBCC || force) + if (Askbcc || force) { addstr("Bcc: "); tmp[0] = '\0'; @@ -460,7 +460,7 @@ int mutt_builtin_editor(const char *path, struct Header *msg, struct Header *cur buf = NULL; bufmax = buflen = 0; - if (OPT_EDIT_HEADERS) + if (EditHeaders) { mutt_env_to_local(msg->env); mutt_edit_headers(NONULL(Visual), path, msg, NULL, 0); diff --git a/editmsg.c b/editmsg.c index 53cef62cc..91bf17ab7 100644 --- a/editmsg.c +++ b/editmsg.c @@ -241,7 +241,7 @@ bail: mutt_set_flag(Context, cur, MUTT_PURGE, 1); mutt_set_flag(Context, cur, MUTT_READ, 1); - if (OPT_DELETE_UNTAG) + if (DeleteUntag) mutt_set_flag(Context, cur, MUTT_TAG, 0); } else if (rc == -1) diff --git a/flags.c b/flags.c index d4cc74abb..3ea383aa3 100644 --- a/flags.c +++ b/flags.c @@ -59,7 +59,7 @@ void mutt_set_flag_update(struct Context *ctx, struct Header *h, int flag, int b if (bf) { - if (!h->deleted && !ctx->readonly && (!h->flagged || !OPT_FLAG_SAFE)) + if (!h->deleted && !ctx->readonly && (!h->flagged || !FlagSafe)) { h->deleted = true; update = true; diff --git a/handler.c b/handler.c index ac2fd2181..8b93f31cf 100644 --- a/handler.c +++ b/handler.c @@ -985,7 +985,7 @@ static int is_autoview(struct Body *b) snprintf(type, sizeof(type), "%s/%s", TYPE(b), b->subtype); - if (OPT_IMPLICIT_AUTOVIEW) + if (ImplicitAutoview) { /* $implicit_autoview is essentially the same as "auto_view *" */ is_av = 1; @@ -1154,7 +1154,7 @@ static int alternative_handler(struct Body *a, struct State *s) if (choice) { - if (s->flags & MUTT_DISPLAY && !OPT_WEED) + if (s->flags & MUTT_DISPLAY && !Weed) { fseeko(s->fpin, choice->hdr_offset, SEEK_SET); mutt_file_copy_bytes(s->fpin, s->fpout, choice->offset - choice->hdr_offset); @@ -1230,7 +1230,7 @@ static int message_handler(struct Body *a, struct State *s) { mutt_copy_hdr(s->fpin, s->fpout, off_start, b->parts->offset, (((s->flags & MUTT_WEED) || - ((s->flags & (MUTT_DISPLAY | MUTT_PRINTING)) && OPT_WEED)) ? + ((s->flags & (MUTT_DISPLAY | MUTT_PRINTING)) && Weed)) ? (CH_WEED | CH_REORDER) : 0) | (s->prefix ? CH_PREFIX : 0) | CH_DECODE | CH_FROM | @@ -1322,7 +1322,7 @@ static int multipart_handler(struct Body *a, struct State *s) } state_puts(" --]\n", s); print_part_line(s, p, 0); - if (!OPT_WEED) + if (!Weed) { fseeko(s->fpin, p->hdr_offset, SEEK_SET); mutt_file_copy_bytes(s->fpin, s->fpout, p->offset - p->hdr_offset); @@ -1341,7 +1341,7 @@ static int multipart_handler(struct Body *a, struct State *s) NONULL(p->subtype)); } - if ((s->flags & MUTT_REPLYING) && OPT_INCLUDE_ONLYFIRST && (s->flags & MUTT_FIRSTDONE)) + if ((s->flags & MUTT_REPLYING) && IncludeOnlyfirst && (s->flags & MUTT_FIRSTDONE)) { break; } @@ -1544,7 +1544,7 @@ static int external_body_handler(struct Body *b, struct State *s) } mutt_copy_hdr(s->fpin, s->fpout, ftello(s->fpin), b->parts->offset, - (OPT_WEED ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE, NULL); + (Weed ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE, NULL); } } else if (expiration && expire < time(NULL)) @@ -1559,7 +1559,7 @@ static int external_body_handler(struct Body *b, struct State *s) s); mutt_copy_hdr(s->fpin, s->fpout, ftello(s->fpin), b->parts->offset, - (OPT_WEED ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE | CH_DISPLAY, NULL); + (Weed ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE | CH_DISPLAY, NULL); } } else @@ -1573,7 +1573,7 @@ static int external_body_handler(struct Body *b, struct State *s) 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, - (OPT_WEED ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE | CH_DISPLAY, NULL); + (Weed ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE | CH_DISPLAY, NULL); } } @@ -1639,7 +1639,7 @@ static int text_plain_handler(struct Body *b, struct State *s) while ((buf = mutt_file_read_line(buf, &sz, s->fpin, NULL, 0))) { - if ((mutt_str_strcmp(buf, "-- ") != 0) && OPT_TEXT_FLOWED) + if ((mutt_str_strcmp(buf, "-- ") != 0) && TextFlowed) { l = mutt_str_strlen(buf); while (l > 0 && buf[l - 1] == ' ') @@ -1847,7 +1847,7 @@ int mutt_body_handler(struct Body *b, struct State *s) */ if ((WithCrypto & APPLICATION_PGP) && mutt_is_application_pgp(b)) handler = crypt_pgp_application_pgp_handler; - else if (OPT_REFLOW_TEXT && + else if (ReflowText && (mutt_str_strcasecmp("flowed", mutt_param_get("format", b->parameter)) == 0)) { handler = rfc3676_handler; @@ -1923,7 +1923,7 @@ int mutt_body_handler(struct Body *b, struct State *s) /* only respect disposition == attachment if we're not displaying from the attachment menu (i.e. pager) */ - if ((!OPT_HONOR_DISPOSITION || (b->disposition != DISPATTACH || OPT_VIEW_ATTACH)) && + if ((!HonorDisposition || (b->disposition != DISPATTACH || OPT_VIEW_ATTACH)) && (plaintext || handler)) { rc = run_decode_and_handler(b, s, handler, plaintext); @@ -1931,10 +1931,10 @@ int mutt_body_handler(struct Body *b, struct State *s) /* 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 && - OPT_HONOR_DISPOSITION && (plaintext || handler))) + HonorDisposition && (plaintext || handler))) { state_mark_attach(s); - if (OPT_HONOR_DISPOSITION && b->disposition == DISPATTACH) + if (HonorDisposition && b->disposition == DISPATTACH) fputs(_("[-- This is an attachment "), s->fpout); else state_printf(s, _("[-- %s/%s is unsupported "), TYPE(b), b->subtype); diff --git a/hcache/kc.c b/hcache/kc.c index 0e8845f14..333f8365a 100644 --- a/hcache/kc.c +++ b/hcache/kc.c @@ -45,7 +45,7 @@ static void *hcache_kyotocabinet_open(const char *path) printfresult = snprintf(kcdbpath, sizeof(kcdbpath), "%s#type=kct#opts=%s#rcomp=lex", - path, OPT_HEADER_CACHE_COMPRESS ? "lc" : "l"); + path, HeaderCacheCompress ? "lc" : "l"); if ((printfresult < 0) || (printfresult >= sizeof(kcdbpath))) { return NULL; diff --git a/hcache/qdbm.c b/hcache/qdbm.c index dc1f11bab..63ab9fe41 100644 --- a/hcache/qdbm.c +++ b/hcache/qdbm.c @@ -42,7 +42,7 @@ static void *hcache_qdbm_open(const char *path) { int flags = VL_OWRITER | VL_OCREAT; - if (OPT_HEADER_CACHE_COMPRESS) + if (HeaderCacheCompress) flags |= VL_OZCOMP; return vlopen(path, flags, VL_CMPLEX); diff --git a/hcache/tc.c b/hcache/tc.c index a8cd4002e..90e274847 100644 --- a/hcache/tc.c +++ b/hcache/tc.c @@ -43,7 +43,7 @@ static void *hcache_tokyocabinet_open(const char *path) TCBDB *db = tcbdbnew(); if (!db) return NULL; - if (OPT_HEADER_CACHE_COMPRESS) + if (HeaderCacheCompress) tcbdbtune(db, 0, 0, 0, -1, -1, BDBTDEFLATE); if (tcbdbopen(db, path, BDBOWRITER | BDBOCREAT)) return db; diff --git a/hdrline.c b/hdrline.c index 94043f30c..ae310714d 100644 --- a/hdrline.c +++ b/hdrline.c @@ -998,7 +998,7 @@ static const char *index_format_str(char *buf, size_t buflen, size_t col, int co if (!optional) { make_from_addr(hdr->env, tmp, sizeof(tmp), 1); - if (!OPT_SAVE_ADDRESS && (p = strpbrk(tmp, "%@"))) + if (!SaveAddress && (p = strpbrk(tmp, "%@"))) *p = 0; mutt_format_s(buf, buflen, prec, tmp); } diff --git a/help.c b/help.c index d0b8fe55e..e1dbe9f74 100644 --- a/help.c +++ b/help.c @@ -289,7 +289,7 @@ static void format_line(FILE *f, int ismacro, const char *t1, const char *t2, co else { n += col - MuttIndexWindow->cols; - if (OPT_MARKERS) + if (Markers) n++; } col = pad(f, n, col_b); diff --git a/history.c b/history.c index 5f53e68ba..eda49e944 100644 --- a/history.c +++ b/history.c @@ -205,7 +205,7 @@ static void shrink_histfile(void) if (!f) return; - if (OPT_HISTORY_REMOVE_DUPS) + if (HistoryRemoveDups) for (hclass = 0; hclass < HC_LAST; hclass++) dup_hashes[hclass] = mutt_hash_create(MAX(10, SaveHistory * 2), MUTT_HASH_STRDUP_KEYS); @@ -222,7 +222,7 @@ static void shrink_histfile(void) if (hclass >= HC_LAST) continue; *p = '\0'; - if (OPT_HISTORY_REMOVE_DUPS && (dup_hash_inc(dup_hashes[hclass], linebuf + read) > 1)) + if (HistoryRemoveDups && (dup_hash_inc(dup_hashes[hclass], linebuf + read) > 1)) { regen_file = true; continue; @@ -264,7 +264,7 @@ static void shrink_histfile(void) if (hclass >= HC_LAST) continue; *p = '\0'; - if (OPT_HISTORY_REMOVE_DUPS && (dup_hash_dec(dup_hashes[hclass], linebuf + read) > 0)) + if (HistoryRemoveDups && (dup_hash_dec(dup_hashes[hclass], linebuf + read) > 0)) { continue; } @@ -288,7 +288,7 @@ cleanup: mutt_file_fclose(&tmp); unlink(tmpfname); } - if (OPT_HISTORY_REMOVE_DUPS) + if (HistoryRemoveDups) for (hclass = 0; hclass < HC_LAST; hclass++) mutt_hash_destroy(&dup_hashes[hclass]); } @@ -414,7 +414,7 @@ void mutt_history_add(enum HistoryClass hclass, const char *s, bool save) */ if (*s != ' ' && (!h->hist[prev] || (mutt_str_strcmp(h->hist[prev], s) != 0))) { - if (OPT_HISTORY_REMOVE_DUPS) + if (HistoryRemoveDups) remove_history_dups(hclass, s); if (save && SaveHistory) save_history(hclass, s); diff --git a/hook.c b/hook.c index 75917828b..2c0d6375c 100644 --- a/hook.c +++ b/hook.c @@ -482,12 +482,12 @@ void mutt_select_fcc(char *path, size_t pathlen, struct Header *hdr) if (addr_hook(path, pathlen, MUTT_FCCHOOK, NULL, hdr) != 0) { - if ((OPT_SAVE_NAME || OPT_FORCE_NAME) && (env->to || env->cc || env->bcc)) + if ((SaveName || ForceName) && (env->to || env->cc || env->bcc)) { adr = env->to ? env->to : (env->cc ? env->cc : env->bcc); mutt_safe_path(buf, sizeof(buf), adr); mutt_file_concat_path(path, NONULL(Folder), buf, pathlen); - if (!OPT_FORCE_NAME && mx_access(path, W_OK) != 0) + if (!ForceName && mx_access(path, W_OK) != 0) mutt_str_strfcpy(path, NONULL(Record), pathlen); } else diff --git a/imap/browse.c b/imap/browse.c index 87920ac9f..06841714b 100644 --- a/imap/browse.c +++ b/imap/browse.c @@ -217,9 +217,9 @@ int imap_browse(char *path, struct BrowserState *state) return -1; } - save_lsub = OPT_IMAP_CHECK_SUBSCRIBED; - OPT_IMAP_CHECK_SUBSCRIBED = false; - mutt_str_strfcpy(list_cmd, OPT_IMAP_LIST_SUBSCRIBED ? "LSUB" : "LIST", sizeof(list_cmd)); + save_lsub = ImapCheckSubscribed; + ImapCheckSubscribed = false; + mutt_str_strfcpy(list_cmd, ImapListSubscribed ? "LSUB" : "LIST", sizeof(list_cmd)); idata = imap_conn_find(&(mx.account), 0); if (!idata) @@ -349,14 +349,14 @@ int imap_browse(char *path, struct BrowserState *state) mutt_clear_error(); if (save_lsub) - OPT_IMAP_CHECK_SUBSCRIBED = true; + ImapCheckSubscribed = true; FREE(&mx.mbox); return 0; fail: if (save_lsub) - OPT_IMAP_CHECK_SUBSCRIBED = true; + ImapCheckSubscribed = true; FREE(&mx.mbox); return -1; } diff --git a/imap/command.c b/imap/command.c index 2d0faa104..8bfc4c81a 100644 --- a/imap/command.c +++ b/imap/command.c @@ -495,7 +495,7 @@ static void cmd_parse_lsub(struct ImapData *idata, char *s) return; } - if (!OPT_IMAP_CHECK_SUBSCRIBED) + if (!ImapCheckSubscribed) return; idata->cmdtype = IMAP_CT_LIST; @@ -736,7 +736,7 @@ static void cmd_parse_status(struct ImapData *idata, char *s) mutt_debug(3, "Found %s in buffy list (OV: %d ON: %d U: %d)\n", mailbox, olduv, oldun, status->unseen); - if (OPT_MAIL_CHECK_RECENT) + if (MailCheckRecent) { if (olduv && olduv == status->uidvalidity) { @@ -891,7 +891,7 @@ static int cmd_handle_untagged(struct ImapData *idata) return -1; } - else if (OPT_IMAP_SERVERNOISE && (mutt_str_strncasecmp("NO", s, 2) == 0)) + else if (ImapServernoise && (mutt_str_strncasecmp("NO", s, 2) == 0)) { mutt_debug(2, "Handling untagged NO\n"); diff --git a/imap/imap.c b/imap/imap.c index c9fba3c86..6bbaa74c0 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -389,7 +389,7 @@ static int get_mailbox(const char *path, struct ImapData **hidata, char *buf, si mutt_debug(1, "Error parsing %s\n", path); return -1; } - if (!(*hidata = imap_conn_find(&(mx.account), OPT_IMAP_PASSIVE ? MUTT_IMAP_CONN_NONEW : 0)) || + if (!(*hidata = imap_conn_find(&(mx.account), ImapPassive ? MUTT_IMAP_CONN_NONEW : 0)) || (*hidata)->state < IMAP_AUTHENTICATED) { FREE(&mx.mbox); @@ -652,7 +652,7 @@ int imap_access(const char *path) if (imap_parse_path(path, &mx)) return -1; - idata = imap_conn_find(&mx.account, OPT_IMAP_PASSIVE ? MUTT_IMAP_CONN_NONEW : 0); + idata = imap_conn_find(&mx.account, ImapPassive ? MUTT_IMAP_CONN_NONEW : 0); if (!idata) { FREE(&mx.mbox); @@ -761,7 +761,7 @@ int imap_delete_mailbox(struct Context *ctx, struct ImapMbox *mx) if (!ctx || !ctx->data) { - idata = imap_conn_find(&mx->account, OPT_IMAP_PASSIVE ? MUTT_IMAP_CONN_NONEW : 0); + idata = imap_conn_find(&mx->account, ImapPassive ? MUTT_IMAP_CONN_NONEW : 0); if (!idata) { FREE(&mx->mbox); @@ -1025,7 +1025,7 @@ struct ImapData *imap_conn_find(const struct Account *account, int flags) /* get root delimiter, '/' as default */ idata->delim = '/'; imap_exec(idata, "LIST \"\" \"\"", IMAP_CMD_QUEUE); - if (OPT_IMAP_CHECK_SUBSCRIBED) + if (ImapCheckSubscribed) 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); @@ -1064,14 +1064,13 @@ int imap_open_connection(struct ImapData *idata) } #ifdef USE_SSL /* Attempt STARTTLS if available and desired. */ - if (!idata->conn->ssf && - (OPT_SSL_FORCE_TLS || mutt_bit_isset(idata->capabilities, STARTTLS))) + if (!idata->conn->ssf && (SslForceTls || mutt_bit_isset(idata->capabilities, STARTTLS))) { int rc; - if (OPT_SSL_FORCE_TLS) + if (SslForceTls) rc = MUTT_YES; - else if ((rc = query_quadoption(OPT_SSL_STARTTLS, + else if ((rc = query_quadoption(SslStarttls, _("Secure connection with TLS?"))) == MUTT_ABORT) { goto err_close_conn; @@ -1099,7 +1098,7 @@ int imap_open_connection(struct ImapData *idata) } } - if (OPT_SSL_FORCE_TLS && !idata->conn->ssf) + if (SslForceTls && !idata->conn->ssf) { mutt_error(_("Encrypted connection unavailable")); mutt_sleep(1); @@ -1411,7 +1410,7 @@ int imap_check(struct ImapData *idata, int force) int result = 0; /* try IDLE first, unless force is set */ - if (!force && OPT_IMAP_IDLE && mutt_bit_isset(idata->capabilities, IDLE) && + if (!force && ImapIdle && mutt_bit_isset(idata->capabilities, IDLE) && (idata->state != IMAP_IDLE || time(NULL) >= idata->lastread + ImapKeepalive)) { if (imap_cmd_idle(idata) < 0) @@ -1763,7 +1762,7 @@ int imap_subscribe(char *path, bool subscribe) if (!*buf) mutt_str_strfcpy(buf, "INBOX", sizeof(buf)); - if (OPT_IMAP_CHECK_SUBSCRIBED) + if (ImapCheckSubscribed) { mutt_buffer_init(&token); mutt_buffer_init(&err); @@ -1847,8 +1846,7 @@ int imap_complete(char *dest, size_t dlen, char *path) list[0] = '\0'; /* fire off command */ - snprintf(buf, sizeof(buf), "%s \"\" \"%s%%\"", - OPT_IMAP_LIST_SUBSCRIBED ? "LSUB" : "LIST", list); + snprintf(buf, sizeof(buf), "%s \"\" \"%s%%\"", ImapListSubscribed ? "LSUB" : "LIST", list); imap_cmd_start(idata, buf); @@ -1986,7 +1984,7 @@ int imap_fast_trash(struct Context *ctx, char *dest) break; mutt_debug(3, "server suggests TRYCREATE\n"); snprintf(prompt, sizeof(prompt), _("Create %s?"), mbox); - if (OPT_CONFIRMCREATE && mutt_yesorno(prompt, 1) != MUTT_YES) + if (Confirmcreate && mutt_yesorno(prompt, 1) != MUTT_YES) { mutt_clear_error(); goto out; @@ -2281,7 +2279,7 @@ static int imap_open_mailbox_append(struct Context *ctx, int flags) return -1; snprintf(buf, sizeof(buf), _("Create %s?"), mailbox); - if (OPT_CONFIRMCREATE && mutt_yesorno(buf, 1) != MUTT_YES) + if (Confirmcreate && mutt_yesorno(buf, 1) != MUTT_YES) return -1; if (imap_create_mailbox(idata, mailbox) < 0) @@ -2584,7 +2582,7 @@ int imap_sync_mailbox(struct Context *ctx, int expunge) idata->state = IMAP_AUTHENTICATED; } - if (OPT_MESSAGE_CACHE_CLEAN) + if (MessageCacheClean) imap_cache_clean(idata); rc = 0; diff --git a/imap/message.c b/imap/message.c index a6fd9633a..8f01cf6a7 100644 --- a/imap/message.c +++ b/imap/message.c @@ -260,7 +260,7 @@ static char *msg_parse_flags(struct ImapHeader *h, char *s) else if (mutt_str_strncasecmp("old", s, 3) == 0) { s += 3; - hd->old = OPT_MARK_OLD ? true : false; + hd->old = MarkOld ? true : false; } else { @@ -1072,7 +1072,7 @@ int imap_fetch_message(struct Context *ctx, struct Message *msg, int msgno) snprintf(buf, sizeof(buf), "UID FETCH %u %s", HEADER_DATA(h)->uid, (mutt_bit_isset(idata->capabilities, IMAP4REV1) ? - (OPT_IMAP_PEEK ? "BODY.PEEK[]" : "BODY[]") : + (ImapPeek ? "BODY.PEEK[]" : "BODY[]") : "RFC822")); imap_cmd_start(idata, buf); @@ -1511,7 +1511,7 @@ int imap_copy_messages(struct Context *ctx, struct Header *h, char *dest, int de break; mutt_debug(3, "server suggests TRYCREATE\n"); snprintf(prompt, sizeof(prompt), _("Create %s?"), mbox); - if (OPT_CONFIRMCREATE && mutt_yesorno(prompt, 1) != MUTT_YES) + if (Confirmcreate && mutt_yesorno(prompt, 1) != MUTT_YES) { mutt_clear_error(); goto out; @@ -1540,7 +1540,7 @@ int imap_copy_messages(struct Context *ctx, struct Header *h, char *dest, int de mutt_set_flag(ctx, ctx->hdrs[i], MUTT_DELETE, 1); mutt_set_flag(ctx, ctx->hdrs[i], MUTT_PURGE, 1); - if (OPT_DELETE_UNTAG) + if (DeleteUntag) mutt_set_flag(ctx, ctx->hdrs[i], MUTT_TAG, 0); } } @@ -1548,7 +1548,7 @@ int imap_copy_messages(struct Context *ctx, struct Header *h, char *dest, int de { mutt_set_flag(ctx, h, MUTT_DELETE, 1); mutt_set_flag(ctx, h, MUTT_PURGE, 1); - if (OPT_DELETE_UNTAG) + if (DeleteUntag) mutt_set_flag(ctx, h, MUTT_TAG, 0); } } diff --git a/imap/util.c b/imap/util.c index da960dc8e..12df02744 100644 --- a/imap/util.c +++ b/imap/util.c @@ -974,9 +974,9 @@ int imap_wait_keepalive(pid_t pid) sigset_t oldmask; int rc; - bool imap_passive = OPT_IMAP_PASSIVE; + bool imap_passive = ImapPassive; - OPT_IMAP_PASSIVE = true; + ImapPassive = true; OPT_KEEP_QUIET = true; sigprocmask(SIG_SETMASK, NULL, &oldmask); @@ -1006,7 +1006,7 @@ int imap_wait_keepalive(pid_t pid) OPT_KEEP_QUIET = false; if (!imap_passive) - OPT_IMAP_PASSIVE = false; + ImapPassive = false; return rc; } diff --git a/init.c b/init.c index 74173094e..1ca080012 100644 --- a/init.c +++ b/init.c @@ -4087,7 +4087,7 @@ void mutt_init(int skip_sys_rc, struct ListHead *commands) #ifdef HAVE_GETSID /* Unset suspend by default if we're the session leader */ if (getsid(0) == getpid()) - OPT_SUSPEND = false; + Suspend = false; #endif mutt_init_history(); @@ -4212,7 +4212,7 @@ void mutt_init(int skip_sys_rc, struct ListHead *commands) mutt_read_histfile(); #ifdef USE_NOTMUCH - if (OPT_VIRTUAL_SPOOLFILE) + if (VirtualSpoolfile) { /* Find the first virtual folder and open it */ for (struct Buffy *b = Incoming; b; b = b->next) diff --git a/init.h b/init.h index 0b3bc2209..fb37a059c 100644 --- a/init.h +++ b/init.h @@ -85,7 +85,7 @@ struct Buffer; struct Option MuttVars[] = { /*++*/ - { "abort_noattach", DT_QUAD, R_NONE, UL &OPT_ABORT_NOATTACH, MUTT_NO }, + { "abort_noattach", DT_QUAD, R_NONE, UL &AbortNoattach, MUTT_NO }, /* ** .pp ** If set to \fIyes\fP, when composing messages containing the regular expression @@ -98,7 +98,7 @@ struct Option MuttVars[] = { ** set attach_keyword = "\\" ** .te */ - { "abort_nosubject", DT_QUAD, R_NONE, UL &OPT_ABORT_NOSUBJECT, MUTT_ASKYES }, + { "abort_nosubject", DT_QUAD, R_NONE, UL &AbortNosubject, MUTT_ASKYES }, /* ** .pp ** If set to \fIyes\fP, when composing messages and no subject is given @@ -106,7 +106,7 @@ struct Option MuttVars[] = { ** \fIno\fP, composing messages with no subject given at the subject ** prompt will never be aborted. */ - { "abort_unmodified", DT_QUAD, R_NONE, UL &OPT_ABORT_UNMODIFIED, MUTT_YES }, + { "abort_unmodified", DT_QUAD, R_NONE, UL &AbortUnmodified, MUTT_YES }, /* ** .pp ** If set to \fIyes\fP, composition will automatically abort after @@ -142,13 +142,13 @@ struct Option MuttVars[] = { ** .dt %t .dd Character which indicates if the alias is tagged for inclusion ** .de */ - { "allow_8bit", DT_BOOL, R_NONE, UL &OPT_ALLOW_8BIT, 1 }, + { "allow_8bit", DT_BOOL, R_NONE, UL &Allow8bit, 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, UL &OPT_ALLOW_ANSI, 0 }, + { "allow_ansi", DT_BOOL, R_NONE, UL &AllowAnsi, 0 }, /* ** .pp ** Controls whether ANSI color codes in messages (and color tags in @@ -164,7 +164,7 @@ struct Option MuttVars[] = { ** and give it the same color as your attachment color (see also ** $$crypt_timestamp). */ - { "arrow_cursor", DT_BOOL, R_MENU, UL &OPT_ARROW_CURSOR, 0 }, + { "arrow_cursor", DT_BOOL, R_MENU, UL &ArrowCursor, 0 }, /* ** .pp ** When \fIset\fP, an arrow (``->'') will be used to indicate the current entry @@ -173,32 +173,32 @@ struct Option MuttVars[] = { ** be redrawn on the screen when moving to the next or previous entries ** in the menu. */ - { "ascii_chars", DT_BOOL, R_BOTH, UL &OPT_ASCII_CHARS, 0 }, + { "ascii_chars", DT_BOOL, R_BOTH, UL &AsciiChars, 0 }, /* ** .pp ** If \fIset\fP, NeoMutt will use plain ASCII characters when displaying thread ** and attachment trees, instead of the default \fIACS\fP characters. */ - { "askbcc", DT_BOOL, R_NONE, UL &OPT_ASKBCC, 0 }, + { "askbcc", DT_BOOL, R_NONE, UL &Askbcc, 0 }, /* ** .pp ** If \fIset\fP, NeoMutt will prompt you for blind-carbon-copy (Bcc) recipients ** before editing an outgoing message. */ - { "askcc", DT_BOOL, R_NONE, UL &OPT_ASKCC, 0 }, + { "askcc", DT_BOOL, R_NONE, UL &Askcc, 0 }, /* ** .pp ** If \fIset\fP, NeoMutt will prompt you for carbon-copy (Cc) recipients before ** editing the body of an outgoing message. */ #ifdef USE_NNTP - { "ask_follow_up", DT_BOOL, R_NONE, UL &OPT_ASK_FOLLOW_UP, 0 }, + { "ask_follow_up", DT_BOOL, R_NONE, UL &AskFollowUp, 0 }, /* ** .pp ** If set, NeoMutt will prompt you for follow-up groups before editing ** the body of an outgoing message. */ - { "ask_x_comment_to", DT_BOOL, R_NONE, UL &OPT_ASK_X_COMMENT_TO, 0 }, + { "ask_x_comment_to", DT_BOOL, R_NONE, UL &AskXCommentTo, 0 }, /* ** .pp ** If set, NeoMutt will prompt you for x-comment-to field before editing @@ -284,7 +284,7 @@ struct Option MuttVars[] = { ** The separator to add between attachments when operating (saving, ** printing, piping, etc) on a list of tagged attachments. */ - { "attach_split", DT_BOOL, R_NONE, UL &OPT_ATTACH_SPLIT, 1 }, + { "attach_split", DT_BOOL, R_NONE, UL &AttachSplit, 1 }, /* ** .pp ** If this variable is \fIunset\fP, when operating (saving, printing, piping, @@ -312,7 +312,7 @@ struct Option MuttVars[] = { ** will use your locale environment, so there is no need to set ** this except to override that default. */ - { "auto_tag", DT_BOOL, R_NONE, UL &OPT_AUTO_TAG, 0 }, + { "auto_tag", DT_BOOL, R_NONE, UL &AutoTag, 0 }, /* ** .pp ** When \fIset\fP, functions in the \fIindex\fP menu which affect a message @@ -320,7 +320,7 @@ struct Option MuttVars[] = { ** unset, you must first use the \fC\fP function (bound to ``;'' ** by default) to make the next function apply to all tagged messages. */ - { "autoedit", DT_BOOL, R_NONE, UL &OPT_AUTOEDIT, 0 }, + { "autoedit", DT_BOOL, R_NONE, UL &Autoedit, 0 }, /* ** .pp ** When \fIset\fP along with $$edit_headers, NeoMutt will skip the initial @@ -335,19 +335,19 @@ struct Option MuttVars[] = { ** .pp ** Also see $$fast_reply. */ - { "beep", DT_BOOL, R_NONE, UL &OPT_BEEP, 1 }, + { "beep", DT_BOOL, R_NONE, UL &Beep, 1 }, /* ** .pp ** When this variable is \fIset\fP, NeoMutt will beep when an error occurs. */ - { "beep_new", DT_BOOL, R_NONE, UL &OPT_BEEP_NEW, 0 }, + { "beep_new", DT_BOOL, R_NONE, UL &BeepNew, 0 }, /* ** .pp ** When this variable is \fIset\fP, NeoMutt will beep whenever it prints a message ** notifying you of new mail. This is independent of the setting of the ** $$beep variable. */ - { "bounce", DT_QUAD, R_NONE, UL &OPT_BOUNCE, MUTT_ASKYES }, + { "bounce", DT_QUAD, R_NONE, UL &Bounce, MUTT_ASKYES }, /* ** .pp ** Controls whether you will be asked to confirm bouncing messages. @@ -355,13 +355,13 @@ struct Option MuttVars[] = { ** 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, UL &OPT_BOUNCE_DELIVERED, 1 }, + { "bounce_delivered", DT_BOOL, R_NONE, UL &BounceDelivered, 1 }, /* ** .pp ** When this variable is \fIset\fP, NeoMutt will include Delivered-To headers when ** bouncing messages. Postfix users may wish to \fIunset\fP this variable. */ - { "braille_friendly", DT_BOOL, R_NONE, UL &OPT_BRAILLE_FRIENDLY, 0 }, + { "braille_friendly", DT_BOOL, R_NONE, UL &BrailleFriendly, 0 }, /* ** .pp ** When this variable is \fIset\fP, NeoMutt will place the cursor at the beginning @@ -371,7 +371,7 @@ struct Option MuttVars[] = { ** visual terminals don't permit making the cursor invisible. */ #ifdef USE_NNTP - { "catchup_newsgroup", DT_QUAD, R_NONE, UL &OPT_CATCHUP_NEWSGROUP, MUTT_ASKYES }, + { "catchup_newsgroup", DT_QUAD, R_NONE, UL &CatchupNewsgroup, MUTT_ASKYES }, /* ** .pp ** If this variable is \fIset\fP, NeoMutt will mark all articles in newsgroup @@ -399,7 +399,7 @@ struct Option MuttVars[] = { ** */ #endif - { "change_folder_next", DT_BOOL, R_NONE, UL &OPT_CHANGE_FOLDER_NEXT, 0 }, + { "change_folder_next", DT_BOOL, R_NONE, UL &ChangeFolderNext, 0 }, /* ** .pp ** When this variable is \fIset\fP, the \fC\fP function @@ -418,7 +418,7 @@ struct Option MuttVars[] = { ** \fBNote:\fP It should only be set in case NeoMutt isn't able to determine the ** character set used correctly. */ - { "check_mbox_size", DT_BOOL, R_NONE, UL &OPT_CHECK_MBOX_SIZE, 0 }, + { "check_mbox_size", DT_BOOL, R_NONE, UL &CheckMboxSize, 0 }, /* ** .pp ** When this variable is \fIset\fP, NeoMutt will use file size attribute instead of @@ -433,7 +433,7 @@ struct Option MuttVars[] = { ** 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, UL &OPT_CHECK_NEW, 1 }, + { "check_new", DT_BOOL, R_NONE, UL &CheckNew, 1 }, /* ** .pp ** \fBNote:\fP this option only affects \fImaildir\fP and \fIMH\fP style @@ -446,13 +446,13 @@ struct Option MuttVars[] = { ** this variable is \fIunset\fP, no check for new mail is performed ** while the mailbox is open. */ - { "collapse_unread", DT_BOOL, R_NONE, UL &OPT_COLLAPSE_UNREAD, 1 }, + { "collapse_unread", DT_BOOL, R_NONE, UL &CollapseUnread, 1 }, /* ** .pp ** When \fIunset\fP, NeoMutt will not collapse a thread if it contains any ** unread messages. */ - { "collapse_flagged", DT_BOOL, R_NONE, UL &OPT_COLLAPSE_FLAGGED, 1 }, + { "collapse_flagged", DT_BOOL, R_NONE, UL &CollapseFlagged, 1 }, /* ** .pp ** When \fIunset\fP, NeoMutt will not collapse a thread if it contains any @@ -488,13 +488,13 @@ struct Option MuttVars[] = { ** characters as question marks which can lead to undesired ** side effects (for example in regular expressions). */ - { "confirmappend", DT_BOOL, R_NONE, UL &OPT_CONFIRMAPPEND, 1 }, + { "confirmappend", DT_BOOL, R_NONE, UL &Confirmappend, 1 }, /* ** .pp ** When \fIset\fP, NeoMutt will prompt for confirmation when appending messages to ** an existing mailbox. */ - { "confirmcreate", DT_BOOL, R_NONE, UL &OPT_CONFIRMCREATE, 1 }, + { "confirmcreate", DT_BOOL, R_NONE, UL &Confirmcreate, 1 }, /* ** .pp ** When \fIset\fP, NeoMutt will prompt for confirmation when saving messages to a @@ -512,7 +512,7 @@ struct Option MuttVars[] = { ** .pp ** Sets the default Content-Type for the body of newly composed messages. */ - { "copy", DT_QUAD, R_NONE, UL &OPT_COPY, MUTT_YES }, + { "copy", DT_QUAD, R_NONE, UL &Copy, MUTT_YES }, /* ** .pp ** This variable controls whether or not copies of your outgoing messages @@ -520,7 +520,7 @@ struct Option MuttVars[] = { ** $$save_name, $$force_name and ``$fcc-hook''. */ { "pgp_autoencrypt", DT_SYNONYM, R_NONE, UL "crypt_autoencrypt", 0 }, - { "crypt_autoencrypt", DT_BOOL, R_NONE, UL &OPT_CRYPT_AUTOENCRYPT, 0 }, + { "crypt_autoencrypt", DT_BOOL, R_NONE, UL &CryptAutoencrypt, 0 }, /* ** .pp ** Setting this variable will cause NeoMutt to always attempt to PGP @@ -532,7 +532,7 @@ struct Option MuttVars[] = { ** settings can be overridden by use of the smime menu instead. ** (Crypto only) */ - { "crypt_autopgp", DT_BOOL, R_NONE, UL &OPT_CRYPT_AUTOPGP, 1 }, + { "crypt_autopgp", DT_BOOL, R_NONE, UL &CryptAutopgp, 1 }, /* ** .pp ** This variable controls whether or not NeoMutt may automatically enable @@ -541,7 +541,7 @@ struct Option MuttVars[] = { ** $$crypt_autosign, $$crypt_replysign and $$smime_is_default. */ { "pgp_autosign", DT_SYNONYM, R_NONE, UL "crypt_autosign", 0 }, - { "crypt_autosign", DT_BOOL, R_NONE, UL &OPT_CRYPT_AUTOSIGN, 0 }, + { "crypt_autosign", DT_BOOL, R_NONE, UL &CryptAutosign, 0 }, /* ** .pp ** Setting this variable will cause NeoMutt to always attempt to @@ -552,7 +552,7 @@ struct Option MuttVars[] = { ** be overridden by use of the smime menu instead of the pgp menu. ** (Crypto only) */ - { "crypt_autosmime", DT_BOOL, R_NONE, UL &OPT_CRYPT_AUTOSMIME, 1 }, + { "crypt_autosmime", DT_BOOL, R_NONE, UL &CryptAutosmime, 1 }, /* ** .pp ** This variable controls whether or not NeoMutt may automatically enable @@ -560,7 +560,7 @@ struct Option MuttVars[] = { ** $$crypt_replyencrypt, ** $$crypt_autosign, $$crypt_replysign and $$smime_is_default. */ - { "crypt_confirmhook", DT_BOOL, R_NONE, UL &OPT_CRYPT_CONFIRMHOOK, 1 }, + { "crypt_confirmhook", DT_BOOL, R_NONE, UL &CryptConfirmhook, 1 }, /* ** .pp ** If set, then you will be prompted for confirmation of keys when using @@ -568,7 +568,7 @@ struct Option MuttVars[] = { ** be presented. This is generally considered unsafe, especially where ** typos are concerned. */ - { "crypt_opportunistic_encrypt", DT_BOOL, R_NONE, UL &OPT_CRYPT_OPPORTUNISTIC_ENCRYPT, 0 }, + { "crypt_opportunistic_encrypt", DT_BOOL, R_NONE, UL &CryptOpportunisticEncrypt, 0 }, /* ** .pp ** Setting this variable will cause NeoMutt to automatically enable and @@ -590,7 +590,7 @@ struct Option MuttVars[] = { ** (Crypto only) */ { "pgp_replyencrypt", DT_SYNONYM, R_NONE, UL "crypt_replyencrypt", 1 }, - { "crypt_replyencrypt", DT_BOOL, R_NONE, UL &OPT_CRYPT_REPLYENCRYPT, 1 }, + { "crypt_replyencrypt", DT_BOOL, R_NONE, UL &CryptReplyencrypt, 1 }, /* ** .pp ** If \fIset\fP, automatically PGP or OpenSSL encrypt replies to messages which are @@ -598,7 +598,7 @@ struct Option MuttVars[] = { ** (Crypto only) */ { "pgp_replysign", DT_SYNONYM, R_NONE, UL "crypt_replysign", 0 }, - { "crypt_replysign", DT_BOOL, R_NONE, UL &OPT_CRYPT_REPLYSIGN, 0 }, + { "crypt_replysign", DT_BOOL, R_NONE, UL &CryptReplysign, 0 }, /* ** .pp ** If \fIset\fP, automatically PGP or OpenSSL sign replies to messages which are @@ -609,7 +609,7 @@ struct Option MuttVars[] = { ** (Crypto only) */ { "pgp_replysignencrypted", DT_SYNONYM, R_NONE, UL "crypt_replysignencrypted", 0 }, - { "crypt_replysignencrypted", DT_BOOL, R_NONE, UL &OPT_CRYPT_REPLYSIGNENCRYPTED, 0 }, + { "crypt_replysignencrypted", DT_BOOL, R_NONE, UL &CryptReplysignencrypted, 0 }, /* ** .pp ** If \fIset\fP, automatically PGP or OpenSSL sign replies to messages @@ -620,7 +620,7 @@ struct Option MuttVars[] = { ** to find out whether an encrypted message is also signed. ** (Crypto only) */ - { "crypt_timestamp", DT_BOOL, R_NONE, UL &OPT_CRYPT_TIMESTAMP, 1 }, + { "crypt_timestamp", DT_BOOL, R_NONE, UL &CryptTimestamp, 1 }, /* ** .pp ** If \fIset\fP, NeoMutt will include a time stamp in the lines surrounding @@ -629,7 +629,7 @@ struct Option MuttVars[] = { ** you may \fIunset\fP this setting. ** (Crypto only) */ - { "crypt_use_gpgme", DT_BOOL, R_NONE, UL &OPT_CRYPT_USE_GPGME, 0 }, + { "crypt_use_gpgme", DT_BOOL, R_NONE, UL &CryptUseGpgme, 0 }, /* ** .pp ** This variable controls the use of the GPGME-enabled crypto backends. @@ -641,7 +641,7 @@ struct Option MuttVars[] = { ** 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, UL &OPT_CRYPT_USE_PKA, 0 }, + { "crypt_use_pka", DT_BOOL, R_NONE, UL &CryptUsePka, 0 }, /* ** .pp ** Controls whether NeoMutt uses PKA @@ -649,7 +649,7 @@ struct Option MuttVars[] = { ** verification (only supported by the GPGME backend). */ { "pgp_verify_sig", DT_SYNONYM, R_NONE, UL "crypt_verify_sig", 0 }, - { "crypt_verify_sig", DT_QUAD, R_NONE, UL &OPT_CRYPT_VERIFY_SIG, MUTT_YES }, + { "crypt_verify_sig", DT_QUAD, R_NONE, UL &CryptVerifySig, MUTT_YES }, /* ** .pp ** If \fI``yes''\fP, always attempt to verify PGP or S/MIME signatures. @@ -702,7 +702,7 @@ struct Option MuttVars[] = { ** ``$alternates'') and is to or cc'ed to a user matching the given ** regular expression. */ - { "delete", DT_QUAD, R_NONE, UL &OPT_DELETE, MUTT_ASKYES }, + { "delete", DT_QUAD, R_NONE, UL &Delete, MUTT_ASKYES }, /* ** .pp ** Controls whether or not messages are really deleted when closing or @@ -710,14 +710,14 @@ struct Option MuttVars[] = { ** 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, UL &OPT_DELETE_UNTAG, 1 }, + { "delete_untag", DT_BOOL, R_NONE, UL &DeleteUntag, 1 }, /* ** .pp ** If this option is \fIset\fP, NeoMutt will untag messages when marking them ** for deletion. This applies when you either explicitly delete a message, ** or when you save it to another folder. */ - { "digest_collapse", DT_BOOL, R_NONE, UL &OPT_DIGEST_COLLAPSE, 1 }, + { "digest_collapse", DT_BOOL, R_NONE, UL &DigestCollapse, 1 }, /* ** .pp ** If this option is \fIset\fP, NeoMutt's received-attachments menu will not show the subparts of @@ -780,7 +780,7 @@ struct Option MuttVars[] = { ** 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, UL &OPT_DUPLICATE_THREADS, 1 }, + { "duplicate_threads", DT_BOOL, R_RESORT|R_RESORT_INIT|R_INDEX, UL &DuplicateThreads, 1 }, /* ** .pp ** This variable controls whether NeoMutt, when $$sort is set to \fIthreads\fP, threads @@ -788,7 +788,7 @@ struct Option MuttVars[] = { ** that it thinks they are duplicates of each other with an equals sign ** in the thread tree. */ - { "edit_headers", DT_BOOL, R_NONE, UL &OPT_EDIT_HEADERS, 0 }, + { "edit_headers", DT_BOOL, R_NONE, UL &EditHeaders, 0 }, /* ** .pp ** This option allows you to edit the header of your outgoing messages @@ -831,7 +831,7 @@ struct Option MuttVars[] = { ** 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, UL &OPT_ENCODE_FROM, 0 }, + { "encode_from", DT_BOOL, R_NONE, UL &EncodeFrom, 0 }, /* ** .pp ** When \fIset\fP, NeoMutt will quoted-printable encode messages when @@ -859,7 +859,7 @@ struct Option MuttVars[] = { ** .pp ** Escape character to use for functions in the built-in editor. */ - { "fast_reply", DT_BOOL, R_NONE, UL &OPT_FAST_REPLY, 0 }, + { "fast_reply", DT_BOOL, R_NONE, UL &FastReply, 0 }, /* ** .pp ** When \fIset\fP, the initial prompt for recipients and subject are skipped @@ -869,13 +869,13 @@ struct Option MuttVars[] = { ** \fBNote:\fP this variable has no effect when the $$autoedit ** variable is \fIset\fP. */ - { "fcc_attach", DT_QUAD, R_NONE, UL &OPT_FCC_ATTACH, MUTT_YES }, + { "fcc_attach", DT_QUAD, R_NONE, UL &FccAttach, MUTT_YES }, /* ** .pp ** This variable controls whether or not attachments on outgoing messages ** are saved along with the main body of your message. */ - { "fcc_clear", DT_BOOL, R_NONE, UL &OPT_FCC_CLEAR, 0 }, + { "fcc_clear", DT_BOOL, R_NONE, UL &FccClear, 0 }, /* ** .pp ** When this variable is \fIset\fP, FCCs will be stored unencrypted and @@ -883,7 +883,7 @@ struct Option MuttVars[] = { ** signed. ** (PGP only) */ - { "flag_safe", DT_BOOL, R_NONE, UL &OPT_FLAG_SAFE, 0 }, + { "flag_safe", DT_BOOL, R_NONE, UL &FlagSafe, 0 }, /* ** .pp ** If set, flagged messages cannot be deleted. @@ -932,7 +932,7 @@ struct Option MuttVars[] = { ** %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, UL &OPT_FOLLOWUP_TO, 1 }, + { "followup_to", DT_BOOL, R_NONE, UL &FollowupTo, 1 }, /* ** .pp ** Controls whether or not the ``Mail-Followup-To:'' header field is @@ -954,7 +954,7 @@ struct Option MuttVars[] = { ** of the same email for you. */ #ifdef USE_NNTP - { "followup_to_poster", DT_QUAD, R_NONE, UL &OPT_FOLLOWUP_TO_POSTER, MUTT_ASKYES }, + { "followup_to_poster", DT_QUAD, R_NONE, UL &FollowupToPoster, MUTT_ASKYES }, /* ** .pp ** If this variable is \fIset\fP and the keyword "poster" is present in @@ -963,7 +963,7 @@ struct Option MuttVars[] = { ** message via mail. */ #endif - { "force_name", DT_BOOL, R_NONE, UL &OPT_FORCE_NAME, 0 }, + { "force_name", DT_BOOL, R_NONE, UL &ForceName, 0 }, /* ** .pp ** This variable is similar to $$save_name, except that NeoMutt will @@ -988,7 +988,7 @@ struct Option MuttVars[] = { ** 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, UL &OPT_FORWARD_DECODE, 1 }, + { "forward_decode", DT_BOOL, R_NONE, UL &ForwardDecode, 1 }, /* ** .pp ** Controls the decoding of complex MIME messages into \fCtext/plain\fP when @@ -999,7 +999,7 @@ struct Option MuttVars[] = { { "forw_decode", DT_SYNONYM, R_NONE, UL "forward_decode", 0 }, /* */ - { "forward_decrypt", DT_BOOL, R_NONE, UL &OPT_FORWARD_DECRYPT, 1 }, + { "forward_decrypt", DT_BOOL, R_NONE, UL &ForwardDecrypt, 1 }, /* ** .pp ** Controls the handling of encrypted messages when forwarding a message. @@ -1011,7 +1011,7 @@ struct Option MuttVars[] = { { "forw_decrypt", DT_SYNONYM, R_NONE, UL "forward_decrypt", 0 }, /* */ - { "forward_edit", DT_QUAD, R_NONE, UL &OPT_FORWARD_EDIT, MUTT_YES }, + { "forward_edit", DT_QUAD, R_NONE, UL &ForwardEdit, MUTT_YES }, /* ** .pp ** This quadoption controls whether or not the user is automatically @@ -1027,7 +1027,7 @@ struct Option MuttVars[] = { { "forw_format", DT_SYNONYM, R_NONE, UL "forward_format", 0 }, /* */ - { "forward_quote", DT_BOOL, R_NONE, UL &OPT_FORWARD_QUOTE, 0 }, + { "forward_quote", DT_BOOL, R_NONE, UL &ForwardQuote, 0 }, /* ** .pp ** When \fIset\fP, forwarded messages included in the main body of the @@ -1037,7 +1037,7 @@ struct Option MuttVars[] = { { "forw_quote", DT_SYNONYM, R_NONE, UL "forward_quote", 0 }, /* */ - { "forward_references", DT_BOOL, R_NONE, UL &OPT_FORWARD_REFERENCES, 0 }, + { "forward_references", DT_BOOL, R_NONE, UL &ForwardReferences, 0 }, /* ** .pp ** When \fIset\fP, forwarded messages set the ``In-Reply-To:'' and @@ -1116,7 +1116,7 @@ struct Option MuttVars[] = { { "hdr_format", DT_SYNONYM, R_NONE, UL "index_format", 0 }, /* */ - { "hdrs", DT_BOOL, R_NONE, UL &OPT_HDRS, 1 }, + { "hdrs", DT_BOOL, R_NONE, UL &Hdrs, 1 }, /* ** .pp ** When \fIunset\fP, the header fields normally added by the ``$my_hdr'' @@ -1124,7 +1124,7 @@ struct Option MuttVars[] = { ** 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, UL &OPT_HEADER, 0 }, + { "header", DT_BOOL, R_NONE, UL &Header, 0 }, /* ** .pp ** When \fIset\fP, this variable causes NeoMutt to include the header @@ -1150,7 +1150,7 @@ struct Option MuttVars[] = { ** This variable specifies the header cache backend. */ #if defined(HAVE_QDBM) || defined(HAVE_TC) || defined(HAVE_KC) - { "header_cache_compress", DT_BOOL, R_NONE, UL &OPT_HEADER_CACHE_COMPRESS, 1 }, + { "header_cache_compress", DT_BOOL, R_NONE, UL &HeaderCacheCompress, 1 }, /* ** .pp ** When NeoMutt is compiled with qdbm, tokyocabinet or kyotocabinet @@ -1173,7 +1173,7 @@ struct Option MuttVars[] = { */ #endif /* HAVE_GDBM || HAVE_BDB */ #endif /* USE_HCACHE */ - { "header_color_partial", DT_BOOL, R_PAGER_FLOW, UL &OPT_HEADER_COLOR_PARTIAL, 0 }, + { "header_color_partial", DT_BOOL, R_PAGER_FLOW, UL &HeaderColorPartial, 0 }, /* ** .pp ** When \fIset\fP, color header regexes behave like color body regexes: @@ -1184,7 +1184,7 @@ struct Option MuttVars[] = { ** .pp ** See ``$color'' for more details. */ - { "help", DT_BOOL, R_REFLOW, UL &OPT_HELP, 1 }, + { "help", DT_BOOL, R_REFLOW, UL &Help, 1 }, /* ** .pp ** When \fIset\fP, help lines describing the bindings for the major functions @@ -1196,7 +1196,7 @@ struct Option MuttVars[] = { ** running. Since this variable is primarily aimed at new users, neither ** of these should present a major problem. */ - { "hidden_host", DT_BOOL, R_NONE, UL &OPT_HIDDEN_HOST, 0 }, + { "hidden_host", DT_BOOL, R_NONE, UL &HiddenHost, 0 }, /* ** .pp ** When \fIset\fP, NeoMutt will skip the host name part of $$hostname variable @@ -1204,33 +1204,33 @@ struct Option MuttVars[] = { ** 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, UL &OPT_HIDE_LIMITED, 0 }, + { "hide_limited", DT_BOOL, R_TREE|R_INDEX, UL &HideLimited, 0 }, /* ** .pp ** When \fIset\fP, NeoMutt will not show the presence of messages that are hidden ** by limiting, in the thread tree. */ - { "hide_missing", DT_BOOL, R_TREE|R_INDEX, UL &OPT_HIDE_MISSING, 1 }, + { "hide_missing", DT_BOOL, R_TREE|R_INDEX, UL &HideMissing, 1 }, /* ** .pp ** When \fIset\fP, NeoMutt will not show the presence of missing messages in the ** thread tree. */ - { "hide_thread_subject", DT_BOOL, R_TREE|R_INDEX, UL &OPT_HIDE_THREAD_SUBJECT, 1 }, + { "hide_thread_subject", DT_BOOL, R_TREE|R_INDEX, UL &HideThreadSubject, 1 }, /* ** .pp ** When \fIset\fP, NeoMutt will not show the subject of messages in the thread ** tree that have the same subject as their parent or closest previously ** displayed sibling. */ - { "hide_top_limited", DT_BOOL, R_TREE|R_INDEX, UL &OPT_HIDE_TOP_LIMITED, 0 }, + { "hide_top_limited", DT_BOOL, R_TREE|R_INDEX, UL &HideTopLimited, 0 }, /* ** .pp ** When \fIset\fP, NeoMutt will not show the presence of messages that are hidden ** by limiting, at the top of threads in the thread tree. Note that when ** $$hide_limited is \fIset\fP, this option will have no effect. */ - { "hide_top_missing", DT_BOOL, R_TREE|R_INDEX, UL &OPT_HIDE_TOP_MISSING, 1 }, + { "hide_top_missing", DT_BOOL, R_TREE|R_INDEX, UL &HideTopMissing, 1 }, /* ** .pp ** When \fIset\fP, NeoMutt will not show the presence of missing messages at the @@ -1251,14 +1251,14 @@ struct Option MuttVars[] = { ** .pp ** Also see $$save_history. */ - { "history_remove_dups", DT_BOOL, R_NONE, UL &OPT_HISTORY_REMOVE_DUPS, 0 }, + { "history_remove_dups", DT_BOOL, R_NONE, UL &HistoryRemoveDups, 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, UL &OPT_HONOR_DISPOSITION, 0 }, + { "honor_disposition", DT_BOOL, R_NONE, UL &HonorDisposition, 0 }, /* ** .pp ** When \fIset\fP, NeoMutt will not display attachments with a @@ -1269,7 +1269,7 @@ struct Option MuttVars[] = { ** If \fIunset\fP, NeoMutt will render all MIME parts it can ** properly transform to plain text. */ - { "honor_followup_to", DT_QUAD, R_NONE, UL &OPT_HONOR_FOLLOWUP_TO, MUTT_YES }, + { "honor_followup_to", DT_QUAD, R_NONE, UL &HonorFollowupTo, MUTT_YES }, /* ** .pp ** This variable controls whether or not a Mail-Followup-To header is @@ -1294,14 +1294,14 @@ struct Option MuttVars[] = { ** Also see $$use_domain and $$hidden_host. */ #ifdef HAVE_LIBIDN - { "idn_decode", DT_BOOL, R_MENU, UL &OPT_IDN_DECODE, 1 }, + { "idn_decode", DT_BOOL, R_MENU, UL &IdnDecode, 1 }, /* ** .pp ** When \fIset\fP, NeoMutt will show you international domain names decoded. ** Note: You can use IDNs for addresses even if this is \fIunset\fP. ** This variable only affects decoding. (IDN only) */ - { "idn_encode", DT_BOOL, R_MENU, UL &OPT_IDN_ENCODE, 1 }, + { "idn_encode", DT_BOOL, R_MENU, UL &IdnEncode, 1 }, /* ** .pp ** When \fIset\fP, NeoMutt will encode international domain names using @@ -1309,14 +1309,14 @@ struct Option MuttVars[] = { ** UTF-8 encoded domains. (IDN only) */ #endif /* HAVE_LIBIDN */ - { "ignore_linear_white_space", DT_BOOL, R_NONE, UL &OPT_IGNORE_LINEAR_WHITE_SPACE, 0 }, + { "ignore_linear_white_space", DT_BOOL, R_NONE, UL &IgnoreLinearWhiteSpace, 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, UL &OPT_IGNORE_LIST_REPLY_TO, 0 }, + { "ignore_list_reply_to", DT_BOOL, R_NONE, UL &IgnoreListReplyTo, 0 }, /* ** .pp ** Affects the behavior of the \fC\fP function when replying to @@ -1358,7 +1358,7 @@ struct Option MuttVars[] = { ** the previous methods are unavailable. If a method is available but ** authentication fails, NeoMutt will not connect to the IMAP server. */ - { "imap_check_subscribed", DT_BOOL, R_NONE, UL &OPT_IMAP_CHECK_SUBSCRIBED, 0 }, + { "imap_check_subscribed", DT_BOOL, R_NONE, UL &ImapCheckSubscribed, 0 }, /* ** .pp ** When \fIset\fP, NeoMutt will fetch the set of subscribed folders from @@ -1387,7 +1387,7 @@ struct Option MuttVars[] = { ** 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, UL &OPT_IMAP_IDLE, 0 }, + { "imap_idle", DT_BOOL, R_NONE, UL &ImapIdle, 0 }, /* ** .pp ** When \fIset\fP, NeoMutt will attempt to use the IMAP IDLE extension @@ -1407,7 +1407,7 @@ struct Option MuttVars[] = { ** 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, UL &OPT_IMAP_LIST_SUBSCRIBED, 0 }, + { "imap_list_subscribed", DT_BOOL, R_NONE, UL &ImapListSubscribed, 0 }, /* ** .pp ** This variable configures whether IMAP folder browsing will look for @@ -1432,7 +1432,7 @@ struct Option MuttVars[] = { ** fairly secure machine, because the superuser can read your neomuttrc even ** if you are the only one who can read the file. */ - { "imap_passive", DT_BOOL, R_NONE, UL &OPT_IMAP_PASSIVE, 1 }, + { "imap_passive", DT_BOOL, R_NONE, UL &ImapPassive, 1 }, /* ** .pp ** When \fIset\fP, NeoMutt will not open new IMAP connections to check for new @@ -1441,7 +1441,7 @@ struct Option MuttVars[] = { ** user/password pairs on NeoMutt invocation, or if opening the connection ** is slow. */ - { "imap_peek", DT_BOOL, R_NONE, UL &OPT_IMAP_PEEK, 1 }, + { "imap_peek", DT_BOOL, R_NONE, UL &ImapPeek, 1 }, /* ** .pp ** When \fIset\fP, NeoMutt will avoid implicitly marking your mail as read whenever @@ -1468,7 +1468,7 @@ struct Option MuttVars[] = { ** for new mail, before timing out and closing the connection. Set ** to 0 to disable timing out. */ - { "imap_servernoise", DT_BOOL, R_NONE, UL &OPT_IMAP_SERVERNOISE, 1 }, + { "imap_servernoise", DT_BOOL, R_NONE, UL &ImapServernoise, 1 }, /* ** .pp ** When \fIset\fP, NeoMutt will display warning messages from the IMAP @@ -1486,7 +1486,7 @@ struct Option MuttVars[] = { ** This variable defaults to your user name on the local machine. */ #endif - { "implicit_autoview", DT_BOOL,R_NONE, UL &OPT_IMPLICIT_AUTOVIEW, 0 }, + { "implicit_autoview", DT_BOOL,R_NONE, UL &ImplicitAutoview, 0 }, /* ** .pp ** If set to ``yes'', NeoMutt will look for a mailcap entry with the @@ -1495,13 +1495,13 @@ struct Option MuttVars[] = { ** use the viewer defined in that entry to convert the body part to text ** form. */ - { "include", DT_QUAD, R_NONE, UL &OPT_INCLUDE, MUTT_ASKYES }, + { "include", DT_QUAD, R_NONE, UL &Include, MUTT_ASKYES }, /* ** .pp ** Controls whether or not a copy of the message(s) you are replying to ** is included in your reply. */ - { "include_onlyfirst", DT_BOOL, R_NONE, UL &OPT_INCLUDE_ONLYFIRST, 0 }, + { "include_onlyfirst", DT_BOOL, R_NONE, UL &IncludeOnlyfirst, 0 }, /* ** .pp ** Controls whether or not NeoMutt includes only the first attachment @@ -1648,7 +1648,7 @@ struct Option MuttVars[] = { ** .pp ** How to invoke ispell (GNU's spell-checking software). */ - { "keep_flagged", DT_BOOL, R_NONE, UL &OPT_KEEP_FLAGGED, 0 }, + { "keep_flagged", DT_BOOL, R_NONE, UL &KeepFlagged, 0 }, /* ** .pp ** If \fIset\fP, read messages marked as flagged will not be moved @@ -1661,7 +1661,7 @@ struct Option MuttVars[] = { ** This variable configures how often (in seconds) NeoMutt should look for ** new mail. Also see the $$timeout variable. */ - { "mail_check_recent",DT_BOOL, R_NONE, UL &OPT_MAIL_CHECK_RECENT, 1 }, + { "mail_check_recent",DT_BOOL, R_NONE, UL &MailCheckRecent, 1 }, /* ** .pp ** When \fIset\fP, NeoMutt will only notify you about new mail that has been received @@ -1672,7 +1672,7 @@ struct Option MuttVars[] = { ** When \fI$$mark_old\fP is set, NeoMutt does not consider the mailbox to contain new ** mail if only old messages exist. */ - { "mail_check_stats", DT_BOOL, R_NONE, UL &OPT_MAIL_CHECK_STATS, 0 }, + { "mail_check_stats", DT_BOOL, R_NONE, UL &MailCheckStats, 0 }, /* ** .pp ** When \fIset\fP, NeoMutt will periodically calculate message @@ -1694,7 +1694,7 @@ struct Option MuttVars[] = { ** This variable specifies which files to consult when attempting to ** display MIME bodies not directly supported by NeoMutt. */ - { "mailcap_sanitize", DT_BOOL, R_NONE, UL &OPT_MAILCAP_SANITIZE, 1 }, + { "mailcap_sanitize", DT_BOOL, R_NONE, UL &MailcapSanitize, 1 }, /* ** .pp ** If \fIset\fP, NeoMutt will restrict possible characters in mailcap % expandos @@ -1705,7 +1705,7 @@ struct Option MuttVars[] = { ** DOING!\fP */ #ifdef USE_HCACHE - { "maildir_header_cache_verify", DT_BOOL, R_NONE, UL &OPT_MAILDIR_HEADER_CACHE_VERIFY, 1 }, + { "maildir_header_cache_verify", DT_BOOL, R_NONE, UL &MaildirHeaderCacheVerify, 1 }, /* ** .pp ** Check for Maildir unaware programs other than NeoMutt having modified maildir @@ -1714,7 +1714,7 @@ struct Option MuttVars[] = { ** folders). */ #endif - { "maildir_trash", DT_BOOL, R_NONE, UL &OPT_MAILDIR_TRASH, 0 }, + { "maildir_trash", DT_BOOL, R_NONE, UL &MaildirTrash, 0 }, /* ** .pp ** If \fIset\fP, messages marked as deleted will be saved with the maildir @@ -1722,7 +1722,7 @@ struct Option MuttVars[] = { ** to maildir-style mailboxes. Setting it will have no effect on other ** mailbox types. */ - { "maildir_check_cur", DT_BOOL, R_NONE, UL &OPT_MAILDIR_CHECK_CUR, 0 }, + { "maildir_check_cur", DT_BOOL, R_NONE, UL &MaildirCheckCur, 0 }, /* ** .pp ** If \fIset\fP, NeoMutt will poll both the new and cur directories of @@ -1739,7 +1739,7 @@ struct Option MuttVars[] = { ** automatically generated with \fIa\fP will be composed ** from this prefix and the letter \fIa\fP. */ - { "mark_old", DT_BOOL, R_BOTH, UL &OPT_MARK_OLD, 1 }, + { "mark_old", DT_BOOL, R_BOTH, UL &MarkOld, 1 }, /* ** .pp ** Controls whether or not NeoMutt marks \fInew\fP \fBunread\fP @@ -1748,7 +1748,7 @@ struct Option MuttVars[] = { ** will show up with an ``O'' next to them in the index menu, ** indicating that they are old. */ - { "markers", DT_BOOL, R_PAGER_FLOW, UL &OPT_MARKERS, 1 }, + { "markers", DT_BOOL, R_PAGER_FLOW, UL &Markers, 1 }, /* ** .pp ** Controls the display of wrapped lines in the internal pager. If set, a @@ -1784,14 +1784,14 @@ struct Option MuttVars[] = { ** 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, UL &OPT_MENU_MOVE_OFF, 1 }, + { "menu_move_off", DT_BOOL, R_NONE, UL &MenuMoveOff, 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, UL &OPT_MENU_SCROLL, 0 }, + { "menu_scroll", DT_BOOL, R_NONE, UL &MenuScroll, 0 }, /* ** .pp ** When \fIset\fP, menus will be scrolled up or down one line when you @@ -1800,7 +1800,7 @@ struct Option MuttVars[] = { ** (useful for slow links to avoid many redraws). */ #if defined(USE_IMAP) || defined(USE_POP) - { "message_cache_clean", DT_BOOL, R_NONE, UL &OPT_MESSAGE_CACHE_CLEAN, 0 }, + { "message_cache_clean", DT_BOOL, R_NONE, UL &MessageCacheClean, 0 }, /* ** .pp ** If \fIset\fP, NeoMutt will clean out obsolete entries from the message cache when @@ -1832,7 +1832,7 @@ struct Option MuttVars[] = { { "msg_format", DT_SYNONYM, R_NONE, UL "message_format", 0 }, /* */ - { "meta_key", DT_BOOL, R_NONE, UL &OPT_META_KEY, 0 }, + { "meta_key", DT_BOOL, R_NONE, UL &MetaKey, 0 }, /* ** .pp ** If \fIset\fP, forces NeoMutt to interpret keystrokes with the high bit (bit 8) @@ -1843,13 +1843,13 @@ struct Option MuttVars[] = { ** high bit from \fC0xf8\fP is \fC0x78\fP, which is the ASCII character ** ``x''. */ - { "metoo", DT_BOOL, R_NONE, UL &OPT_METOO, 0 }, + { "metoo", DT_BOOL, R_NONE, UL &Metoo, 0 }, /* ** .pp ** If \fIunset\fP, NeoMutt will remove your address (see the ``$alternates'' ** command) from the list of recipients when replying to a message. */ - { "mh_purge", DT_BOOL, R_NONE, UL &OPT_MH_PURGE, 0 }, + { "mh_purge", DT_BOOL, R_NONE, UL &MhPurge, 0 }, /* ** .pp ** When \fIunset\fP, NeoMutt will mimic mh's behavior and rename deleted messages @@ -1875,7 +1875,7 @@ struct Option MuttVars[] = { ** .pp ** The name of the MH sequence used for unseen messages. */ - { "mime_forward", DT_QUAD, R_NONE, UL &OPT_MIME_FORWARD, MUTT_NO }, + { "mime_forward", DT_QUAD, R_NONE, UL &MimeForward, MUTT_NO }, /* ** .pp ** When \fIset\fP, the message you are forwarding will be attached as a @@ -1887,7 +1887,7 @@ struct Option MuttVars[] = { ** .pp ** Also see $$forward_decode and $$mime_forward_decode. */ - { "mime_forward_decode", DT_BOOL, R_NONE, UL &OPT_MIME_FORWARD_DECODE, 0 }, + { "mime_forward_decode", DT_BOOL, R_NONE, UL &MimeForwardDecode, 0 }, /* ** .pp ** Controls the decoding of complex MIME messages into \fCtext/plain\fP when @@ -1897,7 +1897,7 @@ struct Option MuttVars[] = { { "mime_fwd", DT_SYNONYM, R_NONE, UL "mime_forward", 0 }, /* */ - { "mime_forward_rest", DT_QUAD, R_NONE, UL &OPT_MIME_FORWARD_REST, MUTT_YES }, + { "mime_forward_rest", DT_QUAD, R_NONE, UL &MimeForwardRest, MUTT_YES }, /* ** .pp ** When forwarding multiple attachments of a MIME message from the attachment @@ -1905,7 +1905,7 @@ struct Option MuttVars[] = { ** be attached to the newly composed message if this option is \fIset\fP. */ #ifdef USE_NNTP - { "mime_subject", DT_BOOL, R_NONE, UL &OPT_MIME_SUBJECT, 1 }, + { "mime_subject", DT_BOOL, R_NONE, UL &MimeSubject, 1 }, /* ** .pp ** If \fIunset\fP, 8-bit ``subject:'' line in article header will not be @@ -1933,7 +1933,7 @@ struct Option MuttVars[] = { ** Suggested values are ``xdg-mime query filetype'' or ** ``file -bi''. */ - { "mime_type_query_first", DT_BOOL, R_NONE, UL &OPT_MIME_TYPE_QUERY_FIRST, 0 }, + { "mime_type_query_first", DT_BOOL, R_NONE, UL &MimeTypeQueryFirst, 0 }, /* ** .pp ** When \fIset\fP, the $$mime_type_query_command will be run before the @@ -1962,14 +1962,14 @@ struct Option MuttVars[] = { ** mixmaster chain. */ #endif - { "move", DT_QUAD, R_NONE, UL &OPT_MOVE, MUTT_NO }, + { "move", DT_QUAD, R_NONE, UL &Move, MUTT_NO }, /* ** .pp ** Controls whether or not NeoMutt will move read messages ** from your spool mailbox to your $$mbox mailbox, or as a result of ** a ``$mbox-hook'' command. */ - { "narrow_tree", DT_BOOL, R_TREE|R_INDEX, UL &OPT_NARROW_TREE, 0 }, + { "narrow_tree", DT_BOOL, R_TREE|R_INDEX, UL &NarrowTree, 0 }, /* ** .pp ** This variable, when \fIset\fP, makes the thread tree narrower, allowing @@ -2059,13 +2059,13 @@ struct Option MuttVars[] = { ** 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, UL &OPT_NNTP_LISTGROUP, 1 }, + { "nntp_listgroup", DT_BOOL, R_NONE, UL &NntpListgroup, 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, UL &OPT_NNTP_LOAD_DESCRIPTION, 1 }, + { "nntp_load_description", DT_BOOL, R_NONE, UL &NntpLoadDescription, 1 }, /* ** .pp ** This variable controls whether or not descriptions for each newsgroup @@ -2128,7 +2128,7 @@ struct Option MuttVars[] = { ** .pp ** This variable specifies the default query type (threads or messages) used in notmuch queries. */ - { "nm_record", DT_BOOL, R_NONE, UL &OPT_NM_RECORD, 0 }, + { "nm_record", DT_BOOL, R_NONE, UL &NmRecord, 0 }, /* ** .pp ** This variable specifies if the NeoMutt record should indexed by notmuch. @@ -2217,14 +2217,14 @@ struct Option MuttVars[] = { ** is less than $$pager_index_lines, then the index will only use as ** many lines as it needs. */ - { "pager_stop", DT_BOOL, R_NONE, UL &OPT_PAGER_STOP, 0 }, + { "pager_stop", DT_BOOL, R_NONE, UL &PagerStop, 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\fP ** function. */ - { "pgp_auto_decode", DT_BOOL, R_NONE, UL &OPT_PGP_AUTO_DECODE, 0 }, + { "pgp_auto_decode", DT_BOOL, R_NONE, UL &PgpAutoDecode, 0 }, /* ** .pp ** If \fIset\fP, NeoMutt will automatically attempt to decrypt traditional PGP @@ -2235,7 +2235,7 @@ struct Option MuttVars[] = { ** check the message for traditional pgp. */ { "pgp_create_traditional", DT_SYNONYM, R_NONE, UL "pgp_autoinline", 0 }, - { "pgp_autoinline", DT_BOOL, R_NONE, UL &OPT_PGP_AUTOINLINE, 0 }, + { "pgp_autoinline", DT_BOOL, R_NONE, UL &PgpAutoinline, 0 }, /* ** .pp ** This option controls whether NeoMutt generates old-style inline @@ -2255,7 +2255,7 @@ struct Option MuttVars[] = { ** \fBdeprecated\fP. ** (PGP only) */ - { "pgp_check_exit", DT_BOOL, R_NONE, UL &OPT_PGP_CHECK_EXIT, 1 }, + { "pgp_check_exit", DT_BOOL, R_NONE, UL &PgpCheckExit, 1 }, /* ** .pp ** If \fIset\fP, NeoMutt will check the exit code of the PGP subprocess when @@ -2385,7 +2385,7 @@ struct Option MuttVars[] = { ** even for bad signatures. ** (PGP only) */ - { "pgp_ignore_subkeys", DT_BOOL, R_NONE, UL &OPT_PGP_IGNORE_SUBKEYS, 1 }, + { "pgp_ignore_subkeys", DT_BOOL, R_NONE, UL &PgpIgnoreSubkeys, 1 }, /* ** .pp ** Setting this variable will cause NeoMutt to ignore OpenPGP subkeys. Instead, @@ -2443,7 +2443,7 @@ struct Option MuttVars[] = { ** possible \fCprintf(3)\fP-like sequences. ** (PGP only) */ - { "pgp_long_ids", DT_BOOL, R_NONE, UL &OPT_PGP_LONG_IDS, 1 }, + { "pgp_long_ids", DT_BOOL, R_NONE, UL &PgpLongIds, 1 }, /* ** .pp ** If \fIset\fP, use 64 bit PGP key IDs, if \fIunset\fP use the normal 32 bit key IDs. @@ -2452,7 +2452,7 @@ struct Option MuttVars[] = { ** in the key selection menu and a few other places. ** (PGP only) */ - { "pgp_mime_auto", DT_QUAD, R_NONE, UL &OPT_PGP_MIME_AUTO, MUTT_ASKYES }, + { "pgp_mime_auto", DT_QUAD, R_NONE, UL &PgpMimeAuto, MUTT_ASKYES }, /* ** .pp ** This option controls whether NeoMutt will prompt you for @@ -2464,7 +2464,7 @@ struct Option MuttVars[] = { ** (PGP only) */ { "pgp_auto_traditional", DT_SYNONYM, R_NONE, UL "pgp_replyinline", 0 }, - { "pgp_replyinline", DT_BOOL, R_NONE, UL &OPT_PGP_REPLYINLINE, 0 }, + { "pgp_replyinline", DT_BOOL, R_NONE, UL &PgpReplyinline, 0 }, /* ** .pp ** Setting this variable will cause NeoMutt to always attempt to @@ -2487,7 +2487,7 @@ struct Option MuttVars[] = { ** (PGP only) ** */ - { "pgp_retainable_sigs", DT_BOOL, R_NONE, UL &OPT_PGP_RETAINABLE_SIGS, 0 }, + { "pgp_retainable_sigs", DT_BOOL, R_NONE, UL &PgpRetainableSigs, 0 }, /* ** .pp ** If \fIset\fP, signed and encrypted messages will consist of nested @@ -2498,7 +2498,7 @@ struct Option MuttVars[] = { ** removed, while the inner \fCmultipart/signed\fP part is retained. ** (PGP only) */ - { "pgp_self_encrypt", DT_BOOL, R_NONE, UL &OPT_PGP_SELF_ENCRYPT, 0 }, + { "pgp_self_encrypt", DT_BOOL, R_NONE, UL &PgpSelfEncrypt, 0 }, /* ** .pp ** When \fIset\fP, PGP encrypted messages will also be encrypted @@ -2513,7 +2513,7 @@ struct Option MuttVars[] = { ** It should be in keyid or fingerprint form (e.g. 0x00112233). ** (PGP only) */ - { "pgp_show_unusable", DT_BOOL, R_NONE, UL &OPT_PGP_SHOW_UNUSABLE, 1 }, + { "pgp_show_unusable", DT_BOOL, R_NONE, UL &PgpShowUnusable, 1 }, /* ** .pp ** If \fIset\fP, NeoMutt will display non-usable keys on the PGP key selection @@ -2555,7 +2555,7 @@ struct Option MuttVars[] = { ** ``reverse-''. ** (PGP only) */ - { "pgp_strict_enc", DT_BOOL, R_NONE, UL &OPT_PGP_STRICT_ENC, 1 }, + { "pgp_strict_enc", DT_BOOL, R_NONE, UL &PgpStrictEnc, 1 }, /* ** .pp ** If \fIset\fP, NeoMutt will automatically encode PGP/MIME signed messages as @@ -2571,7 +2571,7 @@ struct Option MuttVars[] = { ** not used. ** (PGP only) */ - { "pgp_use_gpg_agent", DT_BOOL, R_NONE, UL &OPT_PGP_USE_GPG_AGENT, 0 }, + { "pgp_use_gpg_agent", DT_BOOL, R_NONE, UL &PgpUseGpgAgent, 0 }, /* ** .pp ** If \fIset\fP, NeoMutt will use a possibly-running \fCgpg-agent(1)\fP process. @@ -2598,7 +2598,7 @@ struct Option MuttVars[] = { ** possible \fCprintf(3)\fP-like sequences. ** (PGP only) */ - { "pipe_decode", DT_BOOL, R_NONE, UL &OPT_PIPE_DECODE, 0 }, + { "pipe_decode", DT_BOOL, R_NONE, UL &PipeDecode, 0 }, /* ** .pp ** Used in connection with the \fC\fP command. When \fIunset\fP, @@ -2612,7 +2612,7 @@ struct Option MuttVars[] = { ** The separator to add between messages when piping a list of tagged ** messages to an external Unix command. */ - { "pipe_split", DT_BOOL, R_NONE, UL &OPT_PIPE_SPLIT, 0 }, + { "pipe_split", DT_BOOL, R_NONE, UL &PipeSplit, 0 }, /* ** .pp ** Used in connection with the \fC\fP function following @@ -2623,7 +2623,7 @@ struct Option MuttVars[] = { ** and the $$pipe_sep separator is added after each message. */ #ifdef USE_POP - { "pop_auth_try_all", DT_BOOL, R_NONE, UL &OPT_POP_AUTH_TRY_ALL, 1 }, + { "pop_auth_try_all", DT_BOOL, R_NONE, UL &PopAuthTryAll, 1 }, /* ** .pp ** If \fIset\fP, NeoMutt will try all available authentication methods. @@ -2653,7 +2653,7 @@ struct Option MuttVars[] = { ** This variable configures how often (in seconds) NeoMutt should look for ** new mail in the currently selected mailbox if it is a POP mailbox. */ - { "pop_delete", DT_QUAD, R_NONE, UL &OPT_POP_DELETE, MUTT_ASKNO }, + { "pop_delete", DT_QUAD, R_NONE, UL &PopDelete, MUTT_ASKNO }, /* ** .pp ** If \fIset\fP, NeoMutt will delete successfully downloaded messages from the POP @@ -2671,7 +2671,7 @@ struct Option MuttVars[] = { ** .pp ** where ``[...]'' denotes an optional part. */ - { "pop_last", DT_BOOL, R_NONE, UL &OPT_POP_LAST, 0 }, + { "pop_last", DT_BOOL, R_NONE, UL &PopLast, 0 }, /* ** .pp ** If this variable is \fIset\fP, NeoMutt will try to use the ``\fCLAST\fP'' POP command @@ -2688,7 +2688,7 @@ struct Option MuttVars[] = { ** fairly secure machine, because the superuser can read your neomuttrc ** even if you are the only one who can read the file. */ - { "pop_reconnect", DT_QUAD, R_NONE, UL &OPT_POP_RECONNECT, MUTT_ASKYES }, + { "pop_reconnect", DT_QUAD, R_NONE, UL &PopReconnect, MUTT_ASKYES }, /* ** .pp ** Controls whether or not NeoMutt will try to reconnect to the POP server if @@ -2712,7 +2712,7 @@ struct Option MuttVars[] = { /* */ #ifdef USE_NNTP - { "post_moderated", DT_QUAD, R_NONE, UL &OPT_POST_MODERATED, MUTT_ASKYES }, + { "post_moderated", DT_QUAD, R_NONE, UL &PostModerated, MUTT_ASKYES }, /* ** .pp ** If set to \fIyes\fP, NeoMutt will post article to newsgroup that have @@ -2721,7 +2721,7 @@ struct Option MuttVars[] = { ** posting will not have an effect. */ #endif - { "postpone", DT_QUAD, R_NONE, UL &OPT_POSTPONE, MUTT_ASKYES }, + { "postpone", DT_QUAD, R_NONE, UL &Postpone, MUTT_ASKYES }, /* ** .pp ** Controls whether or not messages are saved in the $$postponed @@ -2738,7 +2738,7 @@ struct Option MuttVars[] = { ** .pp ** Also see the $$postpone variable. */ - { "postpone_encrypt", DT_BOOL, R_NONE, UL &OPT_POSTPONE_ENCRYPT, 0 }, + { "postpone_encrypt", DT_BOOL, R_NONE, UL &PostponeEncrypt, 0 }, /* ** .pp ** When \fIset\fP, postponed messages that are marked for encryption will be @@ -2774,7 +2774,7 @@ struct Option MuttVars[] = { ** remote machine without having to enter a password. */ #endif /* USE_SOCKET */ - { "print", DT_QUAD, R_NONE, UL &OPT_PRINT, MUTT_ASKNO }, + { "print", DT_QUAD, R_NONE, UL &Print, MUTT_ASKNO }, /* ** .pp ** Controls whether or not NeoMutt really prints messages. @@ -2789,7 +2789,7 @@ struct Option MuttVars[] = { { "print_cmd", DT_SYNONYM, R_NONE, UL "print_command", 0 }, /* */ - { "print_decode", DT_BOOL, R_NONE, UL &OPT_PRINT_DECODE, 1 }, + { "print_decode", DT_BOOL, R_NONE, UL &PrintDecode, 1 }, /* ** .pp ** Used in connection with the \fC\fP command. If this @@ -2800,7 +2800,7 @@ struct Option MuttVars[] = { ** some advanced printer filter which is able to properly format ** e-mail messages for printing. */ - { "print_split", DT_BOOL, R_NONE, UL &OPT_PRINT_SPLIT, 0 }, + { "print_split", DT_BOOL, R_NONE, UL &PrintSplit, 0 }, /* ** .pp ** Used in connection with the \fC\fP command. If this option @@ -2813,7 +2813,7 @@ struct Option MuttVars[] = { ** 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, UL &OPT_PROMPT_AFTER, 1 }, + { "prompt_after", DT_BOOL, R_NONE, UL &PromptAfter, 1 }, /* ** .pp ** If you use an \fIexternal\fP $$pager, setting this variable will @@ -2852,7 +2852,7 @@ struct Option MuttVars[] = { ** .pp ** * = can be optionally printed if nonzero, see the $$status_format documentation. */ - { "quit", DT_QUAD, R_NONE, UL &OPT_QUIT, MUTT_YES }, + { "quit", DT_QUAD, R_NONE, UL &Quit, MUTT_YES }, /* ** .pp ** This variable controls whether ``quit'' and ``exit'' actually quit @@ -2891,7 +2891,7 @@ struct Option MuttVars[] = { ** 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, UL &OPT_READ_ONLY, 0 }, + { "read_only", DT_BOOL, R_NONE, UL &ReadOnly, 0 }, /* ** .pp ** If \fIset\fP, all folders are opened in read-only mode. @@ -2906,7 +2906,7 @@ struct Option MuttVars[] = { ** variable will \fInot\fP be used when the user has set a real name ** in the $$from variable. */ - { "recall", DT_QUAD, R_NONE, UL &OPT_RECALL, MUTT_ASKYES }, + { "recall", DT_QUAD, R_NONE, UL &Recall, MUTT_ASKYES }, /* ** .pp ** Controls whether or not NeoMutt recalls postponed messages @@ -2929,7 +2929,7 @@ struct Option MuttVars[] = { ** 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, UL &OPT_REFLOW_SPACE_QUOTES, 1 }, + { "reflow_space_quotes", DT_BOOL, R_NONE, UL &ReflowSpaceQuotes, 1 }, /* ** .pp ** This option controls how quotes from format=flowed messages are displayed @@ -2940,7 +2940,7 @@ struct Option MuttVars[] = { ** \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, UL &OPT_REFLOW_TEXT, 1 }, + { "reflow_text", DT_BOOL, R_NONE, UL &ReflowText, 1 }, /* ** .pp ** When \fIset\fP, NeoMutt will reformat paragraphs in text/plain @@ -2968,7 +2968,7 @@ struct Option MuttVars[] = { ** and replying. The default value corresponds to the English "Re:" and ** the German "Aw:". */ - { "reply_self", DT_BOOL, R_NONE, UL &OPT_REPLY_SELF, 0 }, + { "reply_self", DT_BOOL, R_NONE, UL &ReplySelf, 0 }, /* ** .pp ** If \fIunset\fP and you are replying to a message sent by you, NeoMutt will @@ -2977,7 +2977,7 @@ struct Option MuttVars[] = { ** .pp ** Also see the ``$alternates'' command. */ - { "reply_to", DT_QUAD, R_NONE, UL &OPT_REPLY_TO, MUTT_ASKYES }, + { "reply_to", DT_QUAD, R_NONE, UL &ReplyTo, MUTT_ASKYES }, /* ** .pp ** If \fIset\fP, when replying to a message, NeoMutt will use the address listed @@ -2987,7 +2987,7 @@ struct Option MuttVars[] = { ** 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, UL &OPT_REPLY_WITH_XORIG, 0 }, + { "reply_with_xorig", DT_BOOL, R_NONE, UL &ReplyWithXorig, 0 }, /* ** .pp ** This variable provides a toggle. When active, the From: header will be @@ -2997,14 +2997,14 @@ struct Option MuttVars[] = { ** Assuming `fast_reply' is disabled, this option will prompt the user with a ** prefilled From: header. */ - { "resolve", DT_BOOL, R_NONE, UL &OPT_RESOLVE, 1 }, + { "resolve", DT_BOOL, R_NONE, UL &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, UL &OPT_RESUME_DRAFT_FILES, 0 }, + { "resume_draft_files", DT_BOOL, R_NONE, UL &ResumeDraftFiles, 0 }, /* ** .pp ** If \fIset\fP, draft files (specified by \fC-H\fP on the command @@ -3013,7 +3013,7 @@ struct Option MuttVars[] = { ** 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, UL &OPT_RESUME_EDITED_DRAFT_FILES, 1 }, + { "resume_edited_draft_files", DT_BOOL, R_NONE, UL &ResumeEditedDraftFiles, 1 }, /* ** .pp ** If \fIset\fP, draft files previously edited (via \fC-E -H\fP on @@ -3029,7 +3029,7 @@ struct Option MuttVars[] = { ** user-defined headers, and other processing effects from being ** made multiple times to the draft file. */ - { "reverse_alias", DT_BOOL, R_BOTH, UL &OPT_REVERSE_ALIAS, 0 }, + { "reverse_alias", DT_BOOL, R_BOTH, UL &ReverseAlias, 0 }, /* ** .pp ** This variable controls whether or not NeoMutt will display the ``personal'' @@ -3049,7 +3049,7 @@ struct Option MuttVars[] = { ** ``abd30425@somewhere.net.'' This is useful when the person's e-mail ** address is not human friendly. */ - { "reverse_name", DT_BOOL, R_BOTH, UL &OPT_REVERSE_NAME, 0 }, + { "reverse_name", DT_BOOL, R_BOTH, UL &ReverseName, 0 }, /* ** .pp ** It may sometimes arrive that you receive mail to a certain machine, @@ -3063,7 +3063,7 @@ struct Option MuttVars[] = { ** .pp ** Also see the ``$alternates'' command. */ - { "reverse_realname", DT_BOOL, R_BOTH, UL &OPT_REVERSE_REALNAME, 1 }, + { "reverse_realname", DT_BOOL, R_BOTH, UL &ReverseRealname, 1 }, /* ** .pp ** This variable fine-tunes the behavior of the $$reverse_name feature. @@ -3071,7 +3071,7 @@ struct Option MuttVars[] = { ** possibly including eventual real names. When it is \fIunset\fP, NeoMutt will ** override any such real names with the setting of the $$realname variable. */ - { "rfc2047_parameters", DT_BOOL, R_NONE, UL &OPT_RFC2047_PARAMETERS, 0 }, + { "rfc2047_parameters", DT_BOOL, R_NONE, UL &Rfc2047Parameters, 0 }, /* ** .pp ** When this variable is \fIset\fP, NeoMutt will decode RFC2047-encoded MIME @@ -3092,14 +3092,14 @@ struct Option MuttVars[] = { ** that NeoMutt \fIgenerates\fP this kind of encoding. Instead, NeoMutt will ** unconditionally use the encoding specified in RFC2231. */ - { "save_address", DT_BOOL, R_NONE, UL &OPT_SAVE_ADDRESS, 0 }, + { "save_address", DT_BOOL, R_NONE, UL &SaveAddress, 0 }, /* ** .pp ** If \fIset\fP, NeoMutt will take the sender's full address when choosing a ** default folder for saving a mail. If $$save_name or $$force_name ** is \fIset\fP too, the selection of the Fcc folder will be changed as well. */ - { "save_empty", DT_BOOL, R_NONE, UL &OPT_SAVE_EMPTY, 1 }, + { "save_empty", DT_BOOL, R_NONE, UL &SaveEmpty, 1 }, /* ** .pp ** When \fIunset\fP, mailboxes which contain no saved messages will be removed @@ -3115,7 +3115,7 @@ struct Option MuttVars[] = { ** This variable controls the size of the history (per category) saved in the ** $$history_file file. */ - { "save_name", DT_BOOL, R_NONE, UL &OPT_SAVE_NAME, 0 }, + { "save_name", DT_BOOL, R_NONE, UL &SaveName, 0 }, /* ** .pp ** This variable controls how copies of outgoing messages are saved. @@ -3128,7 +3128,7 @@ struct Option MuttVars[] = { ** .pp ** Also see the $$force_name variable. */ - { "score", DT_BOOL, R_NONE, UL &OPT_SCORE, 1 }, + { "score", DT_BOOL, R_NONE, UL &Score, 1 }, /* ** .pp ** When this variable is \fIunset\fP, scoring is turned off. This can @@ -3212,13 +3212,13 @@ struct Option MuttVars[] = { ** shell from \fC/etc/passwd\fP is used. */ #ifdef USE_NNTP - { "save_unsubscribed", DT_BOOL, R_NONE, UL &OPT_SAVE_UNSUBSCRIBED, 0 }, + { "save_unsubscribed", DT_BOOL, R_NONE, UL &SaveUnsubscribed, 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, UL &OPT_SHOW_NEW_NEWS, 1 }, + { "show_new_news", DT_BOOL, R_NONE, UL &ShowNewNews, 1 }, /* ** .pp ** If \fIset\fP, news server will be asked for new newsgroups on entering @@ -3226,7 +3226,7 @@ struct Option MuttVars[] = { ** Also controls whether or not number of new articles of subscribed ** newsgroups will be then checked. */ - { "show_only_unread", DT_BOOL, R_NONE, UL &OPT_SHOW_ONLY_UNREAD, 0 }, + { "show_only_unread", DT_BOOL, R_NONE, UL &ShowOnlyUnread, 0 }, /* ** .pp ** If \fIset\fP, only subscribed newsgroups that contain unread articles @@ -3259,7 +3259,7 @@ struct Option MuttVars[] = { ** visible) and the other NeoMutt panels. ASCII and Unicode line-drawing ** characters are supported. */ - { "sidebar_folder_indent", DT_BOOL, R_SIDEBAR, UL &OPT_SIDEBAR_FOLDER_INDENT, 0 }, + { "sidebar_folder_indent", DT_BOOL, R_SIDEBAR, UL &SidebarFolderIndent, 0 }, /* ** .pp ** Set this to indent mailboxes in the sidebar. @@ -3305,7 +3305,7 @@ struct Option MuttVars[] = { ** .pp ** \fBSee also:\fP $$sidebar_short_path, $$sidebar_folder_indent, $$sidebar_delim_chars. */ - { "sidebar_new_mail_only", DT_BOOL, R_SIDEBAR, UL &OPT_SIDEBAR_NEW_MAIL_ONLY, 0 }, + { "sidebar_new_mail_only", DT_BOOL, R_SIDEBAR, UL &SidebarNewMailOnly, 0 }, /* ** .pp ** When set, the sidebar will only display mailboxes containing new, or @@ -3313,7 +3313,7 @@ struct Option MuttVars[] = { ** .pp ** \fBSee also:\fP $sidebar_whitelist. */ - { "sidebar_next_new_wrap", DT_BOOL, R_NONE, UL &OPT_SIDEBAR_NEXT_NEW_WRAP, 0 }, + { "sidebar_next_new_wrap", DT_BOOL, R_NONE, UL &SidebarNextNewWrap, 0 }, /* ** .pp ** When set, the \fC\fP command will not stop and the end of @@ -3321,12 +3321,12 @@ struct Option MuttVars[] = { ** \fC\fP command is similarly affected, wrapping around to ** the end of the list. */ - { "sidebar_on_right", DT_BOOL, R_BOTH|R_REFLOW, UL &OPT_SIDEBAR_ON_RIGHT, 0 }, + { "sidebar_on_right", DT_BOOL, R_BOTH|R_REFLOW, UL &SidebarOnRight, 0 }, /* ** .pp ** When set, the sidebar will appear on the right-hand side of the screen. */ - { "sidebar_short_path", DT_BOOL, R_SIDEBAR, UL &OPT_SIDEBAR_SHORT_PATH, 0 }, + { "sidebar_short_path", DT_BOOL, R_SIDEBAR, UL &SidebarShortPath, 0 }, /* ** .pp ** By default the sidebar will show the mailbox's path, relative to the @@ -3374,7 +3374,7 @@ struct Option MuttVars[] = { ** .pp ** \fBSee also:\fP $$sidebar_short_path */ - { "sidebar_visible", DT_BOOL, R_REFLOW, UL &OPT_SIDEBAR_VISIBLE, 0 }, + { "sidebar_visible", DT_BOOL, R_REFLOW, UL &SidebarVisible, 0 }, /* ** .pp ** This specifies whether or not to show sidebar. The sidebar shows a list of @@ -3390,7 +3390,7 @@ struct Option MuttVars[] = { ** Chinese characters. */ #endif - { "sig_dashes", DT_BOOL, R_NONE, UL &OPT_SIG_DASHES, 1 }, + { "sig_dashes", DT_BOOL, R_NONE, UL &SigDashes, 1 }, /* ** .pp ** If \fIset\fP, a line containing ``-- '' (note the trailing space) will be inserted before your @@ -3400,7 +3400,7 @@ struct Option MuttVars[] = { ** detect your signature. For example, NeoMutt has the ability to highlight ** the signature in a different color in the built-in pager. */ - { "sig_on_top", DT_BOOL, R_NONE, UL &OPT_SIG_ON_TOP, 0 }, + { "sig_on_top", DT_BOOL, R_NONE, UL &SigOnTop, 0 }, /* ** .pp ** If \fIset\fP, the signature will be included before any quoted or forwarded @@ -3442,7 +3442,7 @@ struct Option MuttVars[] = { ** 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, UL &OPT_SMART_WRAP, 1 }, + { "smart_wrap", DT_BOOL, R_PAGER_FLOW, UL &SmartWrap, 1 }, /* ** .pp ** Controls the display of lines longer than the screen width in the @@ -3458,7 +3458,7 @@ struct Option MuttVars[] = { ** 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, UL &OPT_SMIME_ASK_CERT_LABEL, 1 }, + { "smime_ask_cert_label", DT_BOOL, R_NONE, UL &SmimeAskCertLabel, 1 }, /* ** .pp ** This flag controls whether you want to be asked to enter a label @@ -3512,7 +3512,7 @@ struct Option MuttVars[] = { ** alongside the documentation. ** (S/MIME only) */ - { "smime_decrypt_use_default_key", DT_BOOL, R_NONE, UL &OPT_SMIME_DECRYPT_USE_DEFAULT_KEY, 1 }, + { "smime_decrypt_use_default_key", DT_BOOL, R_NONE, UL &SmimeDecryptUseDefaultKey, 1 }, /* ** .pp ** If \fIset\fP (default) this tells NeoMutt to use the default key for decryption. Otherwise, @@ -3589,7 +3589,7 @@ struct Option MuttVars[] = { ** possible \fCprintf(3)\fP-like sequences. ** (S/MIME only) */ - { "smime_is_default", DT_BOOL, R_NONE, UL &OPT_SMIME_IS_DEFAULT, 0 }, + { "smime_is_default", DT_BOOL, R_NONE, UL &SmimeIsDefault, 0 }, /* ** .pp ** The default behavior of NeoMutt is to use PGP on all auto-sign/encryption @@ -3620,7 +3620,7 @@ struct Option MuttVars[] = { ** possible \fCprintf(3)\fP-like sequences. ** (S/MIME only) */ - { "smime_self_encrypt", DT_BOOL, R_NONE, UL &OPT_SMIME_SELF_ENCRYPT, 0 }, + { "smime_self_encrypt", DT_BOOL, R_NONE, UL &SmimeSelfEncrypt, 0 }, /* ** .pp ** When \fIset\fP, S/MIME encrypted messages will also be encrypted @@ -3801,7 +3801,7 @@ struct Option MuttVars[] = { ** 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, UL &OPT_SORT_RE, 1 }, + { "sort_re", DT_BOOL, R_INDEX|R_RESORT|R_RESORT_INIT, UL &SortRe, 1 }, /* ** .pp ** This variable is only useful when sorting by mailboxes in sidebar. By default, @@ -3852,7 +3852,7 @@ struct Option MuttVars[] = { ** The file containing a client certificate and its associated private ** key. */ - { "ssl_force_tls", DT_BOOL, R_NONE, UL &OPT_SSL_FORCE_TLS, 0 }, + { "ssl_force_tls", DT_BOOL, R_NONE, UL &SslForceTls, 0 }, /* ** .pp ** If this variable is \fIset\fP, NeoMutt will require that all connections @@ -3870,7 +3870,7 @@ struct Option MuttVars[] = { ** the default from the GNUTLS library. (GnuTLS only) */ #endif /* USE_SSL_GNUTLS */ - { "ssl_starttls", DT_QUAD, R_NONE, UL &OPT_SSL_STARTTLS, MUTT_YES }, + { "ssl_starttls", DT_QUAD, R_NONE, UL &SslStarttls, MUTT_YES }, /* ** .pp ** If \fIset\fP (the default), NeoMutt will attempt to use \fCSTARTTLS\fP on servers @@ -3878,7 +3878,7 @@ struct Option MuttVars[] = { ** use \fCSTARTTLS\fP regardless of the server's capabilities. */ #ifdef USE_SSL_OPENSSL - { "ssl_use_sslv2", DT_BOOL, R_NONE, UL &OPT_SSL_USE_SSLV2, 0 }, + { "ssl_use_sslv2", DT_BOOL, R_NONE, UL &SslUseSslv2, 0 }, /* ** .pp ** This variable specifies whether to attempt to use SSLv2 in the @@ -3887,33 +3887,33 @@ struct Option MuttVars[] = { ** (OpenSSL only) */ #endif /* defined USE_SSL_OPENSSL */ - { "ssl_use_sslv3", DT_BOOL, R_NONE, UL &OPT_SSL_USE_SSLV3, 0 }, + { "ssl_use_sslv3", DT_BOOL, R_NONE, UL &SslUseSslv3, 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, UL &OPT_SSL_USE_TLSV1, 1 }, + { "ssl_use_tlsv1", DT_BOOL, R_NONE, UL &SslUseTlsv1, 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, UL &OPT_SSL_USE_TLSV1_1, 1 }, + { "ssl_use_tlsv1_1", DT_BOOL, R_NONE, UL &SslUseTlsv11, 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, UL &OPT_SSL_USE_TLSV1_2, 1 }, + { "ssl_use_tlsv1_2", DT_BOOL, R_NONE, UL &SslUseTlsv12, 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, UL &OPT_SSL_USESYSTEMCERTS, 1 }, + { "ssl_usesystemcerts", DT_BOOL, R_NONE, UL &SslUsesystemcerts, 1 }, /* ** .pp ** If set to \fIyes\fP, NeoMutt will use CA certificates in the @@ -3921,7 +3921,7 @@ struct Option MuttVars[] = { ** is signed by a trusted CA. (OpenSSL only) */ #endif - { "ssl_verify_dates", DT_BOOL, R_NONE, UL &OPT_SSL_VERIFY_DATES, 1 }, + { "ssl_verify_dates", DT_BOOL, R_NONE, UL &SslVerifyDates, 1 }, /* ** .pp ** If \fIset\fP (the default), NeoMutt will not automatically accept a server @@ -3929,7 +3929,7 @@ struct Option MuttVars[] = { ** only unset this for particular known hosts, using the ** \fC$\fP function. */ - { "ssl_verify_host", DT_BOOL, R_NONE, UL &OPT_SSL_VERIFY_HOST, 1 }, + { "ssl_verify_host", DT_BOOL, R_NONE, UL &SslVerifyHost, 1 }, /* ** .pp ** If \fIset\fP (the default), NeoMutt will not automatically accept a server @@ -3939,7 +3939,7 @@ struct Option MuttVars[] = { */ #ifdef USE_SSL_OPENSSL #ifdef HAVE_SSL_PARTIAL_CHAIN - { "ssl_verify_partial_chains", DT_BOOL, R_NONE, UL &OPT_SSL_VERIFY_PARTIAL_CHAINS, 0 }, + { "ssl_verify_partial_chains", DT_BOOL, R_NONE, UL &SslVerifyPartialChains, 0 }, /* ** .pp ** This option should not be changed from the default unless you understand @@ -4058,14 +4058,14 @@ struct Option MuttVars[] = { ** 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, UL &OPT_STATUS_ON_TOP, 0 }, + { "status_on_top", DT_BOOL, R_REFLOW, UL &StatusOnTop, 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, UL &OPT_STRICT_THREADS, 0 }, + { "strict_threads", DT_BOOL, R_RESORT|R_RESORT_INIT|R_INDEX, UL &StrictThreads, 0 }, /* ** .pp ** If \fIset\fP, threading will only make use of the ``In-Reply-To'' and @@ -4077,14 +4077,14 @@ struct Option MuttVars[] = { ** $$sort_re for a less drastic way of controlling this ** behavior. */ - { "suspend", DT_BOOL, R_NONE, UL &OPT_SUSPEND, 1 }, + { "suspend", DT_BOOL, R_NONE, UL &Suspend, 1 }, /* ** .pp ** When \fIunset\fP, NeoMutt won't stop when the user presses the terminal's ** \fIsusp\fP key, usually ``^Z''. This is useful if you run NeoMutt ** inside an xterm using a command like ``\fCxterm -e neomutt\fP''. */ - { "text_flowed", DT_BOOL, R_NONE, UL &OPT_TEXT_FLOWED, 0 }, + { "text_flowed", DT_BOOL, R_NONE, UL &TextFlowed, 0 }, /* ** .pp ** When \fIset\fP, NeoMutt will generate ``format=flowed'' bodies with a content type @@ -4095,7 +4095,7 @@ struct Option MuttVars[] = { ** .pp ** Note that $$indent_string is ignored when this option is \fIset\fP. */ - { "thorough_search", DT_BOOL, R_NONE, UL &OPT_THOROUGH_SEARCH, 1 }, + { "thorough_search", DT_BOOL, R_NONE, UL &ThoroughSearch, 1 }, /* ** .pp ** Affects the \fC~b\fP and \fC~h\fP search operations described in @@ -4109,13 +4109,13 @@ struct Option MuttVars[] = { ** 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, UL &OPT_THREAD_RECEIVED, 0 }, + { "thread_received", DT_BOOL, R_RESORT|R_RESORT_INIT|R_INDEX, UL &ThreadReceived, 0 }, /* ** .pp ** When \fIset\fP, NeoMutt uses the date received rather than the date sent ** to thread messages by subject. */ - { "tilde", DT_BOOL, R_PAGER, UL &OPT_TILDE, 0 }, + { "tilde", DT_BOOL, R_PAGER, UL &Tilde, 0 }, /* ** .pp ** When \fIset\fP, the internal-pager will pad blank lines to the bottom of the @@ -4205,7 +4205,7 @@ struct Option MuttVars[] = { ** This string is identical in formatting to the one used by ** ``$$status_format''. */ - { "ts_enabled", DT_BOOL, R_BOTH, UL &OPT_TS_ENABLED, 0 }, + { "ts_enabled", DT_BOOL, R_BOTH, UL &TsEnabled, 0 }, /* The default must be off to force in the validity checking. */ /* ** .pp @@ -4238,13 +4238,13 @@ struct Option MuttVars[] = { ** tunnel commands per connection. */ #endif - { "uncollapse_jump", DT_BOOL, R_NONE, UL &OPT_UNCOLLAPSE_JUMP, 0 }, + { "uncollapse_jump", DT_BOOL, R_NONE, UL &UncollapseJump, 0 }, /* ** .pp ** When \fIset\fP, NeoMutt will jump to the next unread message, if any, ** when the current thread is \fIun\fPcollapsed. */ - { "uncollapse_new", DT_BOOL, R_NONE, UL &OPT_UNCOLLAPSE_NEW, 1 }, + { "uncollapse_new", DT_BOOL, R_NONE, UL &UncollapseNew, 1 }, /* ** .pp ** When \fIset\fP, NeoMutt will automatically uncollapse any collapsed thread @@ -4252,7 +4252,7 @@ struct Option MuttVars[] = { ** remain collapsed. the presence of the new message will still affect ** index sorting, though. */ - { "use_8bitmime", DT_BOOL, R_NONE, UL &OPT_USE_8BITMIME, 0 }, + { "use_8bitmime", DT_BOOL, R_NONE, UL &Use8bitmime, 0 }, /* ** .pp ** \fBWarning:\fP do not set this variable unless you are using a version @@ -4262,14 +4262,14 @@ struct Option MuttVars[] = { ** When \fIset\fP, NeoMutt will invoke $$sendmail with the \fC-B8BITMIME\fP ** flag when sending 8-bit messages to enable ESMTP negotiation. */ - { "use_domain", DT_BOOL, R_NONE, UL &OPT_USE_DOMAIN, 1 }, + { "use_domain", DT_BOOL, R_NONE, UL &UseDomain, 1 }, /* ** .pp ** When \fIset\fP, NeoMutt will qualify all local addresses (ones without the ** ``@host'' portion) with the value of $$hostname. If \fIunset\fP, no ** addresses will be qualified. */ - { "use_envelope_from", DT_BOOL, R_NONE, UL &OPT_USE_ENVELOPE_FROM, 0 }, + { "use_envelope_from", DT_BOOL, R_NONE, UL &UseEnvelopeFrom, 0 }, /* ** .pp ** When \fIset\fP, NeoMutt will set the \fIenvelope\fP sender of the message. @@ -4285,7 +4285,7 @@ struct Option MuttVars[] = { { "envelope_from", DT_SYNONYM, R_NONE, UL "use_envelope_from", 0 }, /* */ - { "use_from", DT_BOOL, R_NONE, UL &OPT_USE_FROM, 1 }, + { "use_from", DT_BOOL, R_NONE, UL &UseFrom, 1 }, /* ** .pp ** When \fIset\fP, NeoMutt will generate the ``From:'' header field when @@ -4294,7 +4294,7 @@ struct Option MuttVars[] = { ** command. */ #ifdef HAVE_GETADDRINFO - { "use_ipv6", DT_BOOL, R_NONE, UL &OPT_USE_IPV6, 1 }, + { "use_ipv6", DT_BOOL, R_NONE, UL &UseIpv6, 1 }, /* ** .pp ** When \fIset\fP, NeoMutt will look for IPv6 addresses of hosts it tries to @@ -4302,7 +4302,7 @@ struct Option MuttVars[] = { ** Normally, the default should work. */ #endif /* HAVE_GETADDRINFO */ - { "user_agent", DT_BOOL, R_NONE, UL &OPT_USER_AGENT, 1 }, + { "user_agent", DT_BOOL, R_NONE, UL &UserAgent, 1 }, /* ** .pp ** When \fIset\fP, NeoMutt will add a ``User-Agent:'' header to outgoing @@ -4323,14 +4323,14 @@ struct Option MuttVars[] = { ** folders to your personal taste. This string uses many of the same ** expandos as $$folder_format. */ - { "virtual_spoolfile", DT_BOOL, R_NONE, UL &OPT_VIRTUAL_SPOOLFILE, 0 }, + { "virtual_spoolfile", DT_BOOL, R_NONE, UL &VirtualSpoolfile, 0 }, /* ** .pp ** When \fIset\fP, NeoMutt will use the first defined virtual mailbox (see ** virtual-mailboxes) as a spool file. */ #endif - { "wait_key", DT_BOOL, R_NONE, UL &OPT_WAIT_KEY, 1 }, + { "wait_key", DT_BOOL, R_NONE, UL &WaitKey, 1 }, /* ** .pp ** Controls whether NeoMutt will ask you to press a key after an external command @@ -4345,7 +4345,7 @@ struct Option MuttVars[] = { ** When \fIset\fP, NeoMutt will always ask for a key. When \fIunset\fP, NeoMutt will wait ** for a key only if the external command returned a non-zero status. */ - { "weed", DT_BOOL, R_NONE, UL &OPT_WEED, 1 }, + { "weed", DT_BOOL, R_NONE, UL &Weed, 1 }, /* ** .pp ** When \fIset\fP, NeoMutt will weed headers when displaying, forwarding, @@ -4372,7 +4372,7 @@ struct Option MuttVars[] = { ** 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, UL &OPT_WRAP_SEARCH, 1 }, + { "wrap_search", DT_BOOL, R_NONE, UL &WrapSearch, 1 }, /* ** .pp ** Controls whether searches wrap around the end. @@ -4385,7 +4385,7 @@ struct Option MuttVars[] = { ** .pp ** (DEPRECATED) Equivalent to setting $$wrap with a negative value. */ - { "write_bcc", DT_BOOL, R_NONE, UL &OPT_WRITE_BCC, 1 }, + { "write_bcc", DT_BOOL, R_NONE, UL &WriteBcc, 1 }, /* ** .pp ** Controls whether NeoMutt writes out the ``Bcc:'' header when preparing @@ -4414,21 +4414,21 @@ struct Option MuttVars[] = { /* */ #ifdef USE_NNTP - { "x_comment_to", DT_BOOL, R_NONE, UL &OPT_X_COMMENT_TO, 0 }, + { "x_comment_to", DT_BOOL, R_NONE, UL &XCommentTo, 0 }, /* ** .pp ** If \fIset\fP, NeoMutt will add ``X-Comment-To:'' field (that contains full ** name of original article author) to article that followuped to newsgroup. */ #endif - { "collapse_all", DT_BOOL, R_NONE, UL &OPT_COLLAPSE_ALL, 0 }, + { "collapse_all", DT_BOOL, R_NONE, UL &CollapseAll, 0 }, /* ** .pp ** When \fIset\fP, NeoMutt will collapse all threads when entering a folder. */ /*--*/ - { "pgp_encrypt_self", DT_QUAD, R_NONE, UL &OPT_PGP_ENCRYPT_SELF, MUTT_NO }, - { "smime_encrypt_self", DT_QUAD, R_NONE, UL &OPT_SMIME_ENCRYPT_SELF, MUTT_NO }, + { "pgp_encrypt_self", DT_QUAD, R_NONE, UL &PgpEncryptSelf, MUTT_NO }, + { "smime_encrypt_self", DT_QUAD, R_NONE, UL &SmimeEncryptSelf, MUTT_NO }, { NULL, 0, 0, 0, 0 }, }; diff --git a/main.c b/main.c index 8611a93b1..782afd19c 100644 --- a/main.c +++ b/main.c @@ -579,7 +579,7 @@ int main(int argc, char **argv, char **env) msg->env->to = mutt_addr_parse_list(msg->env->to, argv[i]); } - if (!draft_file && OPT_AUTOEDIT && !msg->env->to && !msg->env->cc) + if (!draft_file && Autoedit && !msg->env->to && !msg->env->cc) { if (!OPT_NO_CURSES) mutt_endwin(NULL); @@ -701,14 +701,14 @@ int main(int argc, char **argv, char **env) mutt_prepare_template(fin, NULL, msg, context_hdr, 0); - /* Scan for neomutt header to set OPT_RESUME_DRAFT_FILES */ + /* Scan for neomutt header to set ResumeDraftFiles */ struct ListNode *np, *tmp; STAILQ_FOREACH_SAFE(np, &msg->env->userhdrs, entries, tmp) { if (mutt_str_strncasecmp("X-Mutt-Resume-Draft:", np->data, 20) == 0) { - if (OPT_RESUME_EDITED_DRAFT_FILES) - OPT_RESUME_DRAFT_FILES = true; + if (ResumeEditedDraftFiles) + ResumeDraftFiles = true; STAILQ_REMOVE(&msg->env->userhdrs, np, ListNode, entries); FREE(&np->data); @@ -807,7 +807,7 @@ int main(int argc, char **argv, char **env) } mutt_write_rfc822_header(fout, msg->env, msg->content, -1, 0); - if (OPT_RESUME_EDITED_DRAFT_FILES) + if (ResumeEditedDraftFiles) fprintf(fout, "X-Mutt-Resume-Draft: 1\n"); fputc('\n', fout); if ((mutt_write_mime_body(msg->content, fout) == -1)) @@ -917,7 +917,7 @@ int main(int argc, char **argv, char **env) mutt_folder_hook(folder); mutt_startup_shutdown_hook(MUTT_STARTUPHOOK); - Context = mx_open_mailbox(folder, ((flags & MUTT_RO) || OPT_READ_ONLY) ? MUTT_READONLY : 0, NULL); + Context = mx_open_mailbox(folder, ((flags & MUTT_RO) || ReadOnly) ? MUTT_READONLY : 0, NULL); if (Context || !explicit_folder) { #ifdef USE_SIDEBAR diff --git a/mbox.c b/mbox.c index 5177ee9c2..c48df80a5 100644 --- a/mbox.c +++ b/mbox.c @@ -921,7 +921,7 @@ void mbox_reset_atime(struct Context *ctx, struct stat *st) * 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 (!OPT_MAIL_CHECK_RECENT && utimebuf.actime >= utimebuf.modtime && mbox_has_new(ctx)) + if (!MailCheckRecent && utimebuf.actime >= utimebuf.modtime && mbox_has_new(ctx)) { utimebuf.actime = utimebuf.modtime - 1; } @@ -1258,7 +1258,7 @@ static int mbox_sync_mailbox(struct Context *ctx, int *index_hint) unlink(tempfile); /* remove partial copy of the mailbox */ mutt_sig_unblock(); - if (OPT_CHECK_MBOX_SIZE) + if (CheckMboxSize) { tmp = mutt_find_mailbox(ctx->path); if (tmp && tmp->new == false) diff --git a/menu.c b/menu.c index 47be7e240..7eaedfe1b 100644 --- a/menu.c +++ b/menu.c @@ -125,7 +125,7 @@ static void print_enriched_string(int index, int attr, unsigned char *s, int do_ switch (*s) { case MUTT_TREE_LLCORNER: - if (OPT_ASCII_CHARS) + if (AsciiChars) addch('`'); #ifdef WACS_LLCORNER else @@ -138,7 +138,7 @@ static void print_enriched_string(int index, int attr, unsigned char *s, int do_ #endif break; case MUTT_TREE_ULCORNER: - if (OPT_ASCII_CHARS) + if (AsciiChars) addch(','); #ifdef WACS_ULCORNER else @@ -151,7 +151,7 @@ static void print_enriched_string(int index, int attr, unsigned char *s, int do_ #endif break; case MUTT_TREE_LTEE: - if (OPT_ASCII_CHARS) + if (AsciiChars) addch('|'); #ifdef WACS_LTEE else @@ -164,7 +164,7 @@ static void print_enriched_string(int index, int attr, unsigned char *s, int do_ #endif break; case MUTT_TREE_HLINE: - if (OPT_ASCII_CHARS) + if (AsciiChars) addch('-'); #ifdef WACS_HLINE else @@ -177,7 +177,7 @@ static void print_enriched_string(int index, int attr, unsigned char *s, int do_ #endif break; case MUTT_TREE_VLINE: - if (OPT_ASCII_CHARS) + if (AsciiChars) addch('|'); #ifdef WACS_VLINE else @@ -190,7 +190,7 @@ static void print_enriched_string(int index, int attr, unsigned char *s, int do_ #endif break; case MUTT_TREE_TTEE: - if (OPT_ASCII_CHARS) + if (AsciiChars) addch('-'); #ifdef WACS_TTEE else @@ -203,7 +203,7 @@ static void print_enriched_string(int index, int attr, unsigned char *s, int do_ #endif break; case MUTT_TREE_BTEE: - if (OPT_ASCII_CHARS) + if (AsciiChars) addch('-'); #ifdef WACS_BTEE else @@ -289,7 +289,7 @@ static void menu_make_entry(char *s, int l, struct Menu *menu, int i) static void menu_pad_string(struct Menu *menu, char *buf, size_t buflen) { char *scratch = mutt_str_strdup(buf); - int shift = OPT_ARROW_CURSOR ? 3 : 0; + int shift = ArrowCursor ? 3 : 0; int cols = menu->indexwin->cols - shift; mutt_simple_format(buf, buflen, cols, cols, FMT_LEFT, ' ', scratch, @@ -308,7 +308,7 @@ void menu_redraw_full(struct Menu *menu) move(0, 0); clrtobot(); - if (OPT_HELP) + if (Help) { SETCOLOR(MT_COLOR_STATUS); mutt_window_move(menu->helpwin, 0, 0); @@ -368,7 +368,7 @@ void menu_redraw_index(struct Menu *menu) if (i == menu->current) { SETCOLOR(MT_COLOR_INDICATOR); - if (OPT_ARROW_CURSOR) + if (ArrowCursor) { addstr("->"); ATTRSET(attr); @@ -377,7 +377,7 @@ void menu_redraw_index(struct Menu *menu) else do_color = false; } - else if (OPT_ARROW_CURSOR) + else if (ArrowCursor) addstr(" "); print_enriched_string(i, attr, (unsigned char *) buf, do_color); @@ -411,7 +411,7 @@ void menu_redraw_motion(struct Menu *menu) mutt_window_move(menu->indexwin, menu->oldcurrent + menu->offset - menu->top, 0); ATTRSET(old_color); - if (OPT_ARROW_CURSOR) + if (ArrowCursor) { /* clear the pointer */ addstr(" "); @@ -457,7 +457,7 @@ void menu_redraw_current(struct Menu *menu) menu_pad_string(menu, buf, sizeof(buf)); SETCOLOR(MT_COLOR_INDICATOR); - if (OPT_ARROW_CURSOR) + if (ArrowCursor) { addstr("->"); ATTRSET(attr); @@ -494,7 +494,7 @@ void menu_check_recenter(struct Menu *menu) int c = MIN(MenuContext, menu->pagelen / 2); int old_top = menu->top; - if (!OPT_MENU_MOVE_OFF && menu->max <= menu->pagelen) /* less entries than lines */ + if (!MenuMoveOff && menu->max <= menu->pagelen) /* less entries than lines */ { if (menu->top != 0) { @@ -504,7 +504,7 @@ void menu_check_recenter(struct Menu *menu) } else { - if (OPT_MENU_SCROLL || (menu->pagelen <= 0) || (c < MenuContext)) + if (MenuScroll || (menu->pagelen <= 0) || (c < MenuContext)) { if (menu->current < menu->top + c) menu->top = menu->current - c; @@ -523,7 +523,7 @@ void menu_check_recenter(struct Menu *menu) } } - if (!OPT_MENU_MOVE_OFF) /* make entries stick to bottom */ + if (!MenuMoveOff) /* make entries stick to bottom */ menu->top = MIN(menu->top, menu->max - menu->pagelen); menu->top = MAX(menu->top, 0); @@ -563,8 +563,7 @@ void menu_next_line(struct Menu *menu) int c = MIN(MenuContext, menu->pagelen / 2); if (menu->top + 1 < menu->max - c && - (OPT_MENU_MOVE_OFF || - (menu->max > menu->pagelen && menu->top < menu->max - menu->pagelen))) + (MenuMoveOff || (menu->max > menu->pagelen && menu->top < menu->max - menu->pagelen))) { menu->top++; if (menu->current < menu->top + c && menu->current < menu->max - 1) @@ -616,7 +615,7 @@ static void menu_length_jump(struct Menu *menu, int jumplen) menu->top += jumplen; /* jumped too long? */ - if ((neg || !OPT_MENU_MOVE_OFF) && DIRECTION * menu->top > tmp) + if ((neg || !MenuMoveOff) && DIRECTION * menu->top > tmp) menu->top = tmp; /* need to move the cursor? */ @@ -985,7 +984,7 @@ search_next: r += search_dir; } - if (OPT_WRAP_SEARCH && wrap++ == 0) + if (WrapSearch && wrap++ == 0) { r = search_dir == 1 ? 0 : menu->max - 1; goto search_next; @@ -1121,9 +1120,9 @@ int mutt_menu_loop(struct Menu *menu) menu->oldcurrent = menu->current; /* move the cursor out of the way */ - if (OPT_ARROW_CURSOR) + if (ArrowCursor) mutt_window_move(menu->indexwin, menu->current - menu->top + menu->offset, 2); - else if (OPT_BRAILLE_FRIENDLY) + else if (BrailleFriendly) mutt_window_move(menu->indexwin, menu->current - menu->top + menu->offset, 0); else mutt_window_move(menu->indexwin, menu->current - menu->top + menu->offset, @@ -1162,7 +1161,7 @@ int mutt_menu_loop(struct Menu *menu) i = -1; } } - else if (menu->tagged && OPT_AUTO_TAG) + else if (menu->tagged && AutoTag) menu->tagprefix = true; mutt_curs_set(1); @@ -1271,7 +1270,7 @@ int mutt_menu_loop(struct Menu *menu) case OP_TAG: if (menu->tag && !menu->dialog) { - if (menu->tagprefix && !OPT_AUTO_TAG) + if (menu->tagprefix && !AutoTag) { for (i = 0; i < menu->max; i++) menu->tagged += menu->tag(menu, i, 0); @@ -1281,7 +1280,7 @@ int mutt_menu_loop(struct Menu *menu) { int j = menu->tag(menu, menu->current, -1); menu->tagged += j; - if (j && OPT_RESOLVE && menu->current < menu->max - 1) + if (j && Resolve && menu->current < menu->max - 1) { menu->current++; menu->redraw |= REDRAW_MOTION_RESYNCH; diff --git a/mh.c b/mh.c index a17bf2e4e..a9ac0c223 100644 --- a/mh.c +++ b/mh.c @@ -313,7 +313,7 @@ bool mh_buffy(struct Buffy *mailbox, bool check_stats) /* 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 (OPT_MAIL_CHECK_RECENT && mh_sequences_changed(mailbox) <= 0) + if (MailCheckRecent && mh_sequences_changed(mailbox) <= 0) { rc = false; check_new = false; @@ -345,7 +345,7 @@ bool mh_buffy(struct Buffy *mailbox, bool check_stats) { /* if the first unseen message we encounter was in the mailbox during the last visit, don't notify about it */ - if (!OPT_MAIL_CHECK_RECENT || mh_already_notified(mailbox, i) == 0) + if (!MailCheckRecent || mh_already_notified(mailbox, i) == 0) { mailbox->new = true; rc = true; @@ -735,7 +735,7 @@ void maildir_parse_flags(struct Header *h, const char *path) break; case 'T': /* trashed */ - if (!h->flagged || !OPT_FLAG_SAFE) + if (!h->flagged || !FlagSafe) { h->trash = true; h->deleted = true; @@ -854,7 +854,7 @@ static int maildir_parse_dir(struct Context *ctx, struct Maildir ***last, if (subdir) { snprintf(buf, sizeof(buf), "%s/%s", ctx->path, subdir); - is_old = OPT_MARK_OLD ? (mutt_str_strcmp("cur", subdir) == 0) : false; + is_old = MarkOld ? (mutt_str_strcmp("cur", subdir) == 0) : false; } else mutt_str_strfcpy(buf, ctx->path, sizeof(buf)); @@ -1180,7 +1180,7 @@ static void maildir_delayed_parsing(struct Context *ctx, struct Maildir **md, snprintf(fn, sizeof(fn), "%s/%s", ctx->path, p->h->path); #ifdef USE_HCACHE - if (OPT_MAILDIR_HEADER_CACHE_VERIFY) + if (MaildirHeaderCacheVerify) { ret = stat(fn, &lastchanged); } @@ -1921,10 +1921,10 @@ int mh_sync_mailbox_message(struct Context *ctx, int msgno) char path[_POSIX_PATH_MAX], tmp[_POSIX_PATH_MAX]; struct Header *h = ctx->hdrs[msgno]; - if (h->deleted && (ctx->magic != MUTT_MAILDIR || !OPT_MAILDIR_TRASH)) + if (h->deleted && (ctx->magic != MUTT_MAILDIR || !MaildirTrash)) { snprintf(path, sizeof(path), "%s/%s", ctx->path, h->path); - if (ctx->magic == MUTT_MAILDIR || (OPT_MH_PURGE && ctx->magic == MUTT_MH)) + if (ctx->magic == MUTT_MAILDIR || (MhPurge && ctx->magic == MUTT_MH)) { #ifdef USE_HCACHE if (hc) @@ -1956,7 +1956,7 @@ int mh_sync_mailbox_message(struct Context *ctx, int msgno) } } else if (h->changed || h->attach_del || h->xlabel_changed || - (ctx->magic == MUTT_MAILDIR && (OPT_MAILDIR_TRASH || h->trash) && + (ctx->magic == MUTT_MAILDIR && (MaildirTrash || h->trash) && (h->deleted != h->trash))) { if (ctx->magic == MUTT_MAILDIR) @@ -2065,7 +2065,7 @@ static int maildir_check_mailbox(struct Context *ctx, int *index_hint) /* XXX seems like this check belongs in mx_check_mailbox() * rather than here. */ - if (!OPT_CHECK_NEW) + if (!CheckNew) return 0; snprintf(buf, sizeof(buf), "%s/new", ctx->path); @@ -2215,7 +2215,7 @@ static int mh_check_mailbox(struct Context *ctx, int *index_hint) int i; struct MhData *data = mh_data(ctx); - if (!OPT_CHECK_NEW) + if (!CheckNew) return 0; mutt_str_strfcpy(buf, ctx->path, sizeof(buf)); @@ -2373,7 +2373,7 @@ static int mh_sync_mailbox(struct Context *ctx, int *index_hint) { for (i = 0, j = 0; i < ctx->msgcount; i++) { - if (!ctx->hdrs[i]->deleted || (ctx->magic == MUTT_MAILDIR && OPT_MAILDIR_TRASH)) + if (!ctx->hdrs[i]->deleted || (ctx->magic == MUTT_MAILDIR && MaildirTrash)) ctx->hdrs[i]->index = j++; } } diff --git a/mutt.h b/mutt.h index 8af238945..4bcc13220 100644 --- a/mutt.h +++ b/mutt.h @@ -230,40 +230,40 @@ enum QuadOptionResponse }; /* Quad-options */ -WHERE unsigned char OPT_ABORT_UNMODIFIED; -WHERE unsigned char OPT_BOUNCE; -WHERE unsigned char OPT_COPY; -WHERE unsigned char OPT_DELETE; -WHERE unsigned char OPT_FORWARD_EDIT; -WHERE unsigned char OPT_FCC_ATTACH; -WHERE unsigned char OPT_INCLUDE; -WHERE unsigned char OPT_HONOR_FOLLOWUP_TO; -WHERE unsigned char OPT_MIME_FORWARD; -WHERE unsigned char OPT_MIME_FORWARD_REST; -WHERE unsigned char OPT_MOVE; -WHERE unsigned char OPT_PGP_MIME_AUTO; /* ask to revert to PGP/MIME when inline fails */ -WHERE unsigned char OPT_SMIME_ENCRYPT_SELF; -WHERE unsigned char OPT_PGP_ENCRYPT_SELF; +WHERE unsigned char AbortUnmodified; +WHERE unsigned char Bounce; +WHERE unsigned char Copy; +WHERE unsigned char Delete; +WHERE unsigned char ForwardEdit; +WHERE unsigned char FccAttach; +WHERE unsigned char Include; +WHERE unsigned char HonorFollowupTo; +WHERE unsigned char MimeForward; +WHERE unsigned char MimeForwardRest; +WHERE unsigned char Move; +WHERE unsigned char PgpMimeAuto; /* ask to revert to PGP/MIME when inline fails */ +WHERE unsigned char SmimeEncryptSelf; +WHERE unsigned char PgpEncryptSelf; #ifdef USE_POP -WHERE unsigned char OPT_POP_DELETE; -WHERE unsigned char OPT_POP_RECONNECT; +WHERE unsigned char PopDelete; +WHERE unsigned char PopReconnect; #endif -WHERE unsigned char OPT_POSTPONE; -WHERE unsigned char OPT_PRINT; -WHERE unsigned char OPT_QUIT; -WHERE unsigned char OPT_REPLY_TO; -WHERE unsigned char OPT_RECALL; +WHERE unsigned char Postpone; +WHERE unsigned char Print; +WHERE unsigned char Quit; +WHERE unsigned char ReplyTo; +WHERE unsigned char Recall; #ifdef USE_SSL -WHERE unsigned char OPT_SSL_STARTTLS; +WHERE unsigned char SslStarttls; #endif -WHERE unsigned char OPT_ABORT_NOSUBJECT; -WHERE unsigned char OPT_CRYPT_VERIFY_SIG; /* verify PGP signatures */ +WHERE unsigned char AbortNosubject; +WHERE unsigned char CryptVerifySig; /* verify PGP signatures */ #ifdef USE_NNTP -WHERE unsigned char OPT_POST_MODERATED; -WHERE unsigned char OPT_CATCHUP_NEWSGROUP; -WHERE unsigned char OPT_FOLLOWUP_TO_POSTER; +WHERE unsigned char PostModerated; +WHERE unsigned char CatchupNewsgroup; +WHERE unsigned char FollowupToPoster; #endif -WHERE unsigned char OPT_ABORT_NOATTACH; /* forgotten attachment detector */ +WHERE unsigned char AbortNoattach; /* forgotten attachment detector */ /* flags to ci_send_message() */ #define SENDREPLY (1 << 0) diff --git a/mutt_curses.h b/mutt_curses.h index e77e1a16f..b11fa1cfe 100644 --- a/mutt_curses.h +++ b/mutt_curses.h @@ -81,7 +81,7 @@ #define BEEP() \ do \ { \ - if (OPT_BEEP) \ + if (Beep) \ beep(); \ } while (0) diff --git a/mutt_idna.c b/mutt_idna.c index 0d5f01356..bc5007278 100644 --- a/mutt_idna.c +++ b/mutt_idna.c @@ -143,7 +143,7 @@ char *mutt_idna_intl_to_local(char *orig_user, char *orig_domain, int flags) #ifdef HAVE_LIBIDN is_idn_encoded = check_idn(local_domain); - if (is_idn_encoded && OPT_IDN_DECODE) + if (is_idn_encoded && IdnDecode) { if (idna_to_unicode_8z8z(local_domain, &tmp, IDNA_ALLOW_UNASSIGNED) != IDNA_SUCCESS) goto cleanup; @@ -197,7 +197,7 @@ char *mutt_idna_intl_to_local(char *orig_user, char *orig_domain, int flags) * 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 && OPT_IDN_DECODE) + if (is_idn_encoded && IdnDecode) { if (idna_to_ascii_8z(reversed_domain, &tmp, IDNA_ALLOW_UNASSIGNED) != IDNA_SUCCESS) { @@ -247,7 +247,7 @@ char *mutt_idna_local_to_intl(char *user, char *domain) goto cleanup; #ifdef HAVE_LIBIDN - if (OPT_IDN_ENCODE) + if (IdnEncode) { if (idna_to_ascii_8z(intl_domain, &tmp, IDNA_ALLOW_UNASSIGNED) != IDNA_SUCCESS) goto cleanup; diff --git a/mutt_signal.c b/mutt_signal.c index 0ca9c916c..7a3f26d92 100644 --- a/mutt_signal.c +++ b/mutt_signal.c @@ -41,7 +41,7 @@ static void curses_signal_handler(int sig) switch (sig) { case SIGTSTP: /* user requested a suspend */ - if (!OPT_SUSPEND) + if (!Suspend) break; IsEndwin = isendwin(); curs_set(1); diff --git a/muttlib.c b/muttlib.c index 55597ad89..0267cc6f8 100644 --- a/muttlib.c +++ b/muttlib.c @@ -726,7 +726,7 @@ void mutt_save_path(char *d, size_t dsize, struct Address *a) if (a && a->mailbox) { mutt_str_strfcpy(d, a->mailbox, dsize); - if (!OPT_SAVE_ADDRESS) + if (!SaveAddress) { char *p = NULL; @@ -776,7 +776,7 @@ void mutt_expando_format(char *buf, size_t buflen, size_t col, int cols, const c prefix[0] = '\0'; buflen--; /* save room for the terminal \0 */ - wlen = ((flags & MUTT_FORMAT_ARROWCURSOR) && OPT_ARROW_CURSOR) ? 3 : 0; + wlen = ((flags & MUTT_FORMAT_ARROWCURSOR) && ArrowCursor) ? 3 : 0; col += wlen; if ((flags & MUTT_FORMAT_NOFILTER) == 0) @@ -843,7 +843,7 @@ void mutt_expando_format(char *buf, size_t buflen, size_t col, int cols, const c col -= wlen; /* reset to passed in value */ wptr = buf; /* reset write ptr */ - wlen = ((flags & MUTT_FORMAT_ARROWCURSOR) && OPT_ARROW_CURSOR) ? 3 : 0; + wlen = ((flags & MUTT_FORMAT_ARROWCURSOR) && ArrowCursor) ? 3 : 0; pid = mutt_create_filter(command->data, NULL, &filter, NULL); if (pid != -1) { @@ -1120,7 +1120,7 @@ void mutt_expando_format(char *buf, size_t buflen, size_t col, int cols, const c } else if (soft && pad < 0) { - int offset = ((flags & MUTT_FORMAT_ARROWCURSOR) && OPT_ARROW_CURSOR) ? 3 : 0; + int offset = ((flags & MUTT_FORMAT_ARROWCURSOR) && ArrowCursor) ? 3 : 0; int avail_cols = (cols > offset) ? (cols - offset) : 0; /* \0-terminate buf for length computation in mutt_wstr_trunc() */ *wptr = 0; @@ -1340,7 +1340,7 @@ int mutt_save_confirm(const char *s, struct stat *st) if (magic > 0 && !mx_access(s, W_OK)) { - if (OPT_CONFIRMAPPEND) + if (Confirmappend) { snprintf(tmp, sizeof(tmp), _("Append messages to %s?"), s); rc = mutt_yesorno(tmp, MUTT_YES); @@ -1375,7 +1375,7 @@ int mutt_save_confirm(const char *s, struct stat *st) /* pathname does not exist */ if (errno == ENOENT) { - if (OPT_CONFIRMCREATE) + if (Confirmcreate) { snprintf(tmp, sizeof(tmp), _("Create %s?"), s); rc = mutt_yesorno(tmp, MUTT_YES); @@ -1385,7 +1385,7 @@ int mutt_save_confirm(const char *s, struct stat *st) ret = -1; } - /* user confirmed with MUTT_YES or set OPT_CONFIRMCREATE */ + /* user confirmed with MUTT_YES or set Confirmcreate */ if (ret == 0) { /* create dir recursively */ diff --git a/mx.c b/mx.c index 147c0c6c2..3055318d0 100644 --- a/mx.c +++ b/mx.c @@ -287,7 +287,7 @@ int mx_get_magic(const char *path) } mutt_file_fclose(&f); - if (!OPT_CHECK_MBOX_SIZE) + if (!CheckMboxSize) { /* need to restore the times here, the file was not really accessed, * only the type was accessed. This is important, because detection @@ -577,7 +577,7 @@ static int trash_append(struct Context *ctx) struct stat st, stc; int opt_confappend, rc; - if (!Trash || !ctx->deleted || (ctx->magic == MUTT_MAILDIR && OPT_MAILDIR_TRASH)) + if (!Trash || !ctx->deleted || (ctx->magic == MUTT_MAILDIR && MaildirTrash)) return 0; for (i = 0; i < ctx->msgcount; i++) @@ -587,12 +587,12 @@ static int trash_append(struct Context *ctx) return 0; /* nothing to be done */ /* avoid the "append messages" prompt */ - opt_confappend = OPT_CONFIRMAPPEND; + opt_confappend = Confirmappend; if (opt_confappend) - OPT_CONFIRMAPPEND = false; + Confirmappend = false; rc = mutt_save_confirm(Trash, &st); if (opt_confappend) - OPT_CONFIRMAPPEND = true; + Confirmappend = true; if (rc != 0) { mutt_error(_("message(s) not deleted")); @@ -669,8 +669,7 @@ int mx_close_mailbox(struct Context *ctx, int *index_hint) if (nntp_data && nntp_data->nserv && nntp_data->group) { - int rc = - query_quadoption(OPT_CATCHUP_NEWSGROUP, _("Mark all articles read?")); + int rc = query_quadoption(CatchupNewsgroup, _("Mark all articles read?")); if (rc == MUTT_ABORT) { ctx->closing = false; @@ -684,8 +683,7 @@ int mx_close_mailbox(struct Context *ctx, int *index_hint) for (i = 0; i < ctx->msgcount; i++) { - if (!ctx->hdrs[i]->deleted && ctx->hdrs[i]->read && - !(ctx->hdrs[i]->flagged && OPT_KEEP_FLAGGED)) + if (!ctx->hdrs[i]->deleted && ctx->hdrs[i]->read && !(ctx->hdrs[i]->flagged && KeepFlagged)) { read_msgs++; } @@ -697,7 +695,7 @@ int mx_close_mailbox(struct Context *ctx, int *index_hint) read_msgs = 0; #endif - if (read_msgs && OPT_MOVE != MUTT_NO) + if (read_msgs && Move != MUTT_NO) { char *p = NULL; @@ -717,7 +715,7 @@ int mx_close_mailbox(struct Context *ctx, int *index_hint) { mutt_expand_path(mbox, sizeof(mbox)); snprintf(buf, sizeof(buf), _("Move %d read messages to %s?"), read_msgs, mbox); - move_messages = query_quadoption(OPT_MOVE, buf); + move_messages = query_quadoption(Move, buf); if (move_messages == MUTT_ABORT) { ctx->closing = false; @@ -730,13 +728,13 @@ int mx_close_mailbox(struct Context *ctx, int *index_hint) * 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 && OPT_MAILDIR_TRASH)) + if (ctx->deleted && !(ctx->magic == MUTT_MAILDIR && MaildirTrash)) { snprintf(buf, sizeof(buf), ctx->deleted == 1 ? _("Purge %d deleted message?") : _("Purge %d deleted messages?"), ctx->deleted); - purge = query_quadoption(OPT_DELETE, buf); + purge = query_quadoption(Delete, buf); if (purge == MUTT_ABORT) { ctx->closing = false; @@ -744,7 +742,7 @@ int mx_close_mailbox(struct Context *ctx, int *index_hint) } } - if (OPT_MARK_OLD) + if (MarkOld) { for (i = 0; i < ctx->msgcount; i++) { @@ -768,7 +766,7 @@ int mx_close_mailbox(struct Context *ctx, int *index_hint) for (i = 0; i < ctx->msgcount; i++) { if (ctx->hdrs[i]->read && !ctx->hdrs[i]->deleted && - !(ctx->hdrs[i]->flagged && OPT_KEEP_FLAGGED)) + !(ctx->hdrs[i]->flagged && KeepFlagged)) { ctx->hdrs[i]->tagged = true; } @@ -800,7 +798,7 @@ int mx_close_mailbox(struct Context *ctx, int *index_hint) for (i = 0; i < ctx->msgcount; i++) { if (ctx->hdrs[i]->read && !ctx->hdrs[i]->deleted && - !(ctx->hdrs[i]->flagged && OPT_KEEP_FLAGGED)) + !(ctx->hdrs[i]->flagged && KeepFlagged)) { if (mutt_append_message(&f, ctx, ctx->hdrs[i], 0, CH_UPDATE_LEN) == 0) { @@ -884,7 +882,7 @@ int mx_close_mailbox(struct Context *ctx, int *index_hint) } if (ctx->msgcount == ctx->deleted && (ctx->magic == MUTT_MMDF || ctx->magic == MUTT_MBOX) && - !mutt_is_spool(ctx->path) && !OPT_SAVE_EMPTY) + !mutt_is_spool(ctx->path) && !SaveEmpty) { mutt_file_unlink_empty(ctx->path); } @@ -931,7 +929,7 @@ void mx_update_tables(struct Context *ctx, bool committing) for (i = 0, j = 0; i < ctx->msgcount; i++) { if (!ctx->hdrs[i]->quasi_deleted && - ((committing && (!ctx->hdrs[i]->deleted || (ctx->magic == MUTT_MAILDIR && OPT_MAILDIR_TRASH))) || + ((committing && (!ctx->hdrs[i]->deleted || (ctx->magic == MUTT_MAILDIR && MaildirTrash))) || (!committing && ctx->hdrs[i]->active))) { if (i != j) @@ -953,7 +951,7 @@ void mx_update_tables(struct Context *ctx, bool committing) else if (ctx->hdrs[j]->changed) ctx->changed = true; - if (!committing || (ctx->magic == MUTT_MAILDIR && OPT_MAILDIR_TRASH)) + if (!committing || (ctx->magic == MUTT_MAILDIR && MaildirTrash)) { if (ctx->hdrs[j]->deleted) ctx->deleted++; @@ -1041,7 +1039,7 @@ int mx_sync_mailbox(struct Context *ctx, int *index_hint) ctx->deleted == 1 ? _("Purge %d deleted message?") : _("Purge %d deleted messages?"), ctx->deleted); - purge = query_quadoption(OPT_DELETE, buf); + purge = query_quadoption(Delete, buf); if (purge == MUTT_ABORT) return -1; else if (purge == MUTT_NO) @@ -1098,7 +1096,7 @@ int mx_sync_mailbox(struct Context *ctx, int *index_hint) mutt_sleep(0); if (ctx->msgcount == ctx->deleted && (ctx->magic == MUTT_MBOX || ctx->magic == MUTT_MMDF) && - !mutt_is_spool(ctx->path) && !OPT_SAVE_EMPTY) + !mutt_is_spool(ctx->path) && !SaveEmpty) { unlink(ctx->path); mx_fastclose_mailbox(ctx); @@ -1329,7 +1327,7 @@ void mx_update_context(struct Context *ctx, int new_messages) if (h2) { h2->superseded = true; - if (OPT_SCORE) + if (Score) mutt_score_message(ctx, h2, 1); } } @@ -1341,7 +1339,7 @@ void mx_update_context(struct Context *ctx, int new_messages) mutt_hash_insert(ctx->subj_hash, h->env->real_subj, h); mutt_label_hash_add(ctx, h); - if (OPT_SCORE) + if (Score) mutt_score_message(ctx, h, 0); if (h->changed) diff --git a/ncrypt/crypt.c b/ncrypt/crypt.c index aec2dceb0..18bfc8aaf 100644 --- a/ncrypt/crypt.c +++ b/ncrypt/crypt.c @@ -65,7 +65,7 @@ void crypt_current_time(struct State *s, char *app_name) if (!WithCrypto) return; - if (OPT_CRYPT_TIMESTAMP) + if (CryptTimestamp) { t = time(NULL); strftime(p, sizeof(p), _(" (current time: %c)"), localtime(&t)); @@ -148,7 +148,7 @@ int mutt_protect(struct Header *msg, char *keylist) if ((msg->content->type != TYPETEXT) || (mutt_str_strcasecmp(msg->content->subtype, "plain") != 0)) { - if (query_quadoption(OPT_PGP_MIME_AUTO, + if (query_quadoption(PgpMimeAuto, _("Inline PGP can't be used with attachments. " "Revert to PGP/MIME?")) != MUTT_YES) { @@ -160,7 +160,7 @@ int mutt_protect(struct Header *msg, char *keylist) else if (!mutt_str_strcasecmp("flowed", mutt_param_get("format", msg->content->parameter))) { - if ((query_quadoption(OPT_PGP_MIME_AUTO, + if ((query_quadoption(PgpMimeAuto, _("Inline PGP can't be used with format=flowed. " "Revert to PGP/MIME?"))) != MUTT_YES) { @@ -183,7 +183,7 @@ int mutt_protect(struct Header *msg, char *keylist) /* otherwise inline won't work...ask for revert */ if (query_quadoption( - OPT_PGP_MIME_AUTO, + PgpMimeAuto, _("Message can't be sent inline. Revert to using PGP/MIME?")) != MUTT_YES) { mutt_error(_("Mail not sent.")); @@ -202,7 +202,7 @@ int mutt_protect(struct Header *msg, char *keylist) if ((WithCrypto & APPLICATION_PGP)) tmp_pgp_pbody = msg->content; - if (OPT_CRYPT_USE_PKA && (msg->security & SIGN)) + if (CryptUsePka && (msg->security & SIGN)) { /* Set sender (necessary for e.g. PKA). */ const char *mailbox = NULL; @@ -235,7 +235,7 @@ int mutt_protect(struct Header *msg, char *keylist) } if ((WithCrypto & APPLICATION_PGP) && (msg->security & APPLICATION_PGP) && - (!(flags & ENCRYPT) || OPT_PGP_RETAINABLE_SIGS)) + (!(flags & ENCRYPT) || PgpRetainableSigs)) { tmp_pbody = crypt_pgp_sign_message(msg->content); if (!tmp_pbody) @@ -686,7 +686,7 @@ void convert_to_7bit(struct Body *a) a->encoding = ENC7BIT; convert_to_7bit(a->parts); } - else if ((WithCrypto & APPLICATION_PGP) && OPT_PGP_STRICT_ENC) + else if ((WithCrypto & APPLICATION_PGP) && PgpStrictEnc) convert_to_7bit(a->parts); } else if (a->type == TYPEMESSAGE && @@ -700,7 +700,7 @@ void convert_to_7bit(struct Body *a) else if (a->encoding == ENCBINARY) a->encoding = ENCBASE64; else if (a->content && a->encoding != ENCBASE64 && - (a->content->from || (a->content->space && OPT_PGP_STRICT_ENC))) + (a->content->from || (a->content->space && PgpStrictEnc))) { a->encoding = ENCQUOTEDPRINTABLE; } @@ -873,7 +873,7 @@ int crypt_get_keys(struct Header *msg, char **keylist, int oppenc_mode) return -1; } OPT_PGP_CHECK_TRUST = false; - if (OPT_PGP_SELF_ENCRYPT || (OPT_PGP_ENCRYPT_SELF == MUTT_YES)) + if (PgpSelfEncrypt || (PgpEncryptSelf == MUTT_YES)) self_encrypt = PgpSelfEncryptAs; } if ((WithCrypto & APPLICATION_SMIME) && (msg->security & APPLICATION_SMIME)) @@ -884,7 +884,7 @@ int crypt_get_keys(struct Header *msg, char **keylist, int oppenc_mode) mutt_addr_free(&adrlist); return -1; } - if (OPT_SMIME_SELF_ENCRYPT || (OPT_SMIME_ENCRYPT_SELF == MUTT_YES)) + if (SmimeSelfEncrypt || (SmimeEncryptSelf == MUTT_YES)) self_encrypt = SmimeSelfEncryptAs; } } @@ -914,7 +914,7 @@ void crypt_opportunistic_encrypt(struct Header *msg) if (!WithCrypto) return; - if (!(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT && (msg->security & OPPENCRYPT))) + if (!(CryptOpportunisticEncrypt && (msg->security & OPPENCRYPT))) return; crypt_get_keys(msg, &pgpkeylist, 1); @@ -1103,7 +1103,7 @@ const char *crypt_get_fingerprint_or_id(char *p, const char **pphint, size_t hexdigits; /* User input may be partial name, fingerprint or short or long key ID, - * independent of OPT_PGP_LONG_IDS. + * independent of PgpLongIds. * 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 diff --git a/ncrypt/crypt_gpgme.c b/ncrypt/crypt_gpgme.c index 829bc3770..d06d122b6 100644 --- a/ncrypt/crypt_gpgme.c +++ b/ncrypt/crypt_gpgme.c @@ -202,7 +202,7 @@ static const char *crypt_keyid(struct CryptKeyInfo *k) if (k->kobj && k->kobj->subkeys) { s = k->kobj->subkeys->keyid; - if ((!OPT_PGP_LONG_IDS) && (strlen(s) == 16)) + if ((!PgpLongIds) && (strlen(s) == 16)) /* Return only the short keyID. */ s += 8; } @@ -883,7 +883,7 @@ static char *encrypt_gpgme_object(gpgme_data_t plaintext, gpgme_key_t *rset, return NULL; } - if (OPT_CRYPT_USE_PKA) + if (CryptUsePka) { err = set_pka_sig_notation(ctx); if (err) @@ -1010,7 +1010,7 @@ static struct Body *sign_message(struct Body *a, int use_smime) return NULL; } - if (OPT_CRYPT_USE_PKA) + if (CryptUsePka) { err = set_pka_sig_notation(ctx); if (err) @@ -1343,7 +1343,7 @@ static int show_sig_summary(unsigned long sum, gpgme_ctx_t ctx, gpgme_key_t key, state_puts("\n", s); } - if (OPT_CRYPT_USE_PKA) + if (CryptUsePka) { if (sig->pka_trust == 1 && sig->pka_address) { @@ -4199,7 +4199,7 @@ static struct CryptKeyInfo *crypt_select_key(struct CryptKeyInfo *keys, key_table = NULL; for (k = keys; k; k = k->next) { - if (!OPT_PGP_SHOW_UNUSABLE && (k->flags & KEYFLAG_CANTUSE)) + if (!PgpShowUnusable && (k->flags & KEYFLAG_CANTUSE)) { unusable = true; continue; @@ -4669,7 +4669,7 @@ static char *find_keys(struct Address *adrlist, unsigned int app, int oppenc_mod { crypt_hook_val = crypt_hook->data; r = MUTT_YES; - if (!oppenc_mode && OPT_CRYPT_CONFIRMHOOK) + if (!oppenc_mode && CryptConfirmhook) { snprintf(buf, sizeof(buf), _("Use keyID = \"%s\" for %s?"), crypt_hook_val, p->mailbox); @@ -4899,7 +4899,7 @@ static int gpgme_send_menu(struct Header *msg, int is_smime) * NOTE: "Signing" and "Clearing" only adjust the sign bit, so we have different * letter choices for those. */ - if (OPT_CRYPT_OPPORTUNISTIC_ENCRYPT && (msg->security & OPPENCRYPT)) + if (CryptOpportunisticEncrypt && (msg->security & OPPENCRYPT)) { if (is_smime) { @@ -4924,7 +4924,7 @@ static int gpgme_send_menu(struct Header *msg, int is_smime) * Opportunistic encryption option is set, but is toggled off * for this message. */ - else if (OPT_CRYPT_OPPORTUNISTIC_ENCRYPT) + else if (CryptOpportunisticEncrypt) { if (is_smime) { diff --git a/ncrypt/cryptglue.c b/ncrypt/cryptglue.c index 62a6d79c3..3a90ae88e 100644 --- a/ncrypt/cryptglue.c +++ b/ncrypt/cryptglue.c @@ -71,7 +71,7 @@ void crypt_init(void) #ifdef CRYPT_BACKEND_CLASSIC_PGP if ( #ifdef CRYPT_BACKEND_GPGME - (!OPT_CRYPT_USE_GPGME) + (!CryptUseGpgme) #else 1 #endif @@ -82,7 +82,7 @@ void crypt_init(void) #ifdef CRYPT_BACKEND_CLASSIC_SMIME if ( #ifdef CRYPT_BACKEND_GPGME - (!OPT_CRYPT_USE_GPGME) + (!CryptUseGpgme) #else 1 #endif @@ -90,7 +90,7 @@ void crypt_init(void) crypto_module_register(&crypt_mod_smime_classic); #endif - if (OPT_CRYPT_USE_GPGME) + if (CryptUseGpgme) { #ifdef CRYPT_BACKEND_GPGME crypto_module_register(&crypt_mod_pgp_gpgme); diff --git a/ncrypt/gnupgparse.c b/ncrypt/gnupgparse.c index 3696799f4..01ec7c892 100644 --- a/ncrypt/gnupgparse.c +++ b/ncrypt/gnupgparse.c @@ -179,7 +179,7 @@ static struct PgpKeyInfo *parse_pub_line(char *buf, int *is_subkey, struct PgpKe else return NULL; - if (!(is_uid || is_fpr || (*is_subkey && OPT_PGP_IGNORE_SUBKEYS))) + if (!(is_uid || is_fpr || (*is_subkey && PgpIgnoreSubkeys))) memset(&tmp, 0, sizeof(tmp)); break; @@ -213,7 +213,7 @@ static struct PgpKeyInfo *parse_pub_line(char *buf, int *is_subkey, struct PgpKe break; } - if (!is_uid && !(*is_subkey && OPT_PGP_IGNORE_SUBKEYS)) + if (!is_uid && !(*is_subkey && PgpIgnoreSubkeys)) tmp.flags |= flags; break; @@ -222,7 +222,7 @@ static struct PgpKeyInfo *parse_pub_line(char *buf, int *is_subkey, struct PgpKe { mutt_debug(2, "key len: %s\n", p); - if (!(*is_subkey && OPT_PGP_IGNORE_SUBKEYS) && mutt_str_atos(p, &tmp.keylen) < 0) + if (!(*is_subkey && PgpIgnoreSubkeys) && mutt_str_atos(p, &tmp.keylen) < 0) { goto bail; } @@ -232,7 +232,7 @@ static struct PgpKeyInfo *parse_pub_line(char *buf, int *is_subkey, struct PgpKe { mutt_debug(2, "pubkey algorithm: %s\n", p); - if (!(*is_subkey && OPT_PGP_IGNORE_SUBKEYS)) + if (!(*is_subkey && PgpIgnoreSubkeys)) { int x = 0; if (mutt_str_atoi(p, &x) < 0) @@ -246,7 +246,7 @@ static struct PgpKeyInfo *parse_pub_line(char *buf, int *is_subkey, struct PgpKe { mutt_debug(2, "key id: %s\n", p); - if (!(*is_subkey && OPT_PGP_IGNORE_SUBKEYS)) + if (!(*is_subkey && PgpIgnoreSubkeys)) mutt_str_replace(&tmp.keyid, p); break; } @@ -310,7 +310,7 @@ static struct PgpKeyInfo *parse_pub_line(char *buf, int *is_subkey, struct PgpKe } /* ignore user IDs on subkeys */ - if (!is_uid && (*is_subkey && OPT_PGP_IGNORE_SUBKEYS)) + if (!is_uid && (*is_subkey && PgpIgnoreSubkeys)) break; mutt_debug(2, "user ID: %s\n", NONULL(p)); @@ -353,7 +353,7 @@ static struct PgpKeyInfo *parse_pub_line(char *buf, int *is_subkey, struct PgpKe } } - if (!is_uid && (!*is_subkey || !OPT_PGP_IGNORE_SUBKEYS || + if (!is_uid && (!*is_subkey || !PgpIgnoreSubkeys || !((flags & KEYFLAG_DISABLED) || (flags & KEYFLAG_REVOKED) || (flags & KEYFLAG_EXPIRED)))) tmp.flags |= flags; @@ -366,7 +366,7 @@ static struct PgpKeyInfo *parse_pub_line(char *buf, int *is_subkey, struct PgpKe } /* merge temp key back into real key */ - if (!(is_uid || is_fpr || (*is_subkey && OPT_PGP_IGNORE_SUBKEYS))) + if (!(is_uid || is_fpr || (*is_subkey && PgpIgnoreSubkeys))) k = mutt_mem_malloc(sizeof(*k)); memcpy(k, &tmp, sizeof(*k)); /* fixup parentship of uids after merging the temp key into diff --git a/ncrypt/pgp.c b/ncrypt/pgp.c index e0a3549ff..1497e940f 100644 --- a/ncrypt/pgp.c +++ b/ncrypt/pgp.c @@ -106,7 +106,7 @@ bool pgp_use_gpg_agent(void) char *tty = NULL; /* GnuPG 2.1 no longer exports GPG_AGENT_INFO */ - if (!OPT_PGP_USE_GPG_AGENT) + if (!PgpUseGpgAgent) return false; tty = ttyname(0); @@ -121,7 +121,7 @@ bool pgp_use_gpg_agent(void) static struct PgpKeyInfo *key_parent(struct PgpKeyInfo *k) { - if ((k->flags & KEYFLAG_SUBKEY) && k->parent && OPT_PGP_IGNORE_SUBKEYS) + if ((k->flags & KEYFLAG_SUBKEY) && k->parent && PgpIgnoreSubkeys) k = k->parent; return k; @@ -143,7 +143,7 @@ char *pgp_short_keyid(struct PgpKeyInfo *k) char *pgp_this_keyid(struct PgpKeyInfo *k) { - if (OPT_PGP_LONG_IDS) + if (PgpLongIds) return k->keyid; else return (k->keyid + 8); @@ -1180,7 +1180,7 @@ struct Body *pgp_sign_message(struct Body *a) fputs(buffer, stdout); } - if (mutt_wait_filter(thepid) && OPT_PGP_CHECK_EXIT) + if (mutt_wait_filter(thepid) && PgpCheckExit) empty = true; mutt_file_fclose(&pgperr); @@ -1268,7 +1268,7 @@ char *pgp_find_keys(struct Address *adrlist, int oppenc_mode) { keyID = crypt_hook->data; r = MUTT_YES; - if (!oppenc_mode && OPT_CRYPT_CONFIRMHOOK) + if (!oppenc_mode && CryptConfirmhook) { snprintf(buf, sizeof(buf), _("Use keyID = \"%s\" for %s?"), keyID, p->mailbox); r = mutt_yesorno(buf, MUTT_YES); @@ -1427,7 +1427,7 @@ struct Body *pgp_encrypt_message(struct Body *a, char *keylist, int sign) } mutt_file_fclose(&pgpin); - if (mutt_wait_filter(thepid) && OPT_PGP_CHECK_EXIT) + if (mutt_wait_filter(thepid) && PgpCheckExit) empty = 1; unlink(pgpinfile); @@ -1603,7 +1603,7 @@ struct Body *pgp_traditional_encryptsign(struct Body *a, int flags, char *keylis fprintf(pgpin, "%s\n", PgpPass); mutt_file_fclose(&pgpin); - if (mutt_wait_filter(thepid) && OPT_PGP_CHECK_EXIT) + if (mutt_wait_filter(thepid) && PgpCheckExit) empty = true; mutt_file_unlink(pgpinfile); @@ -1675,7 +1675,7 @@ int pgp_send_menu(struct Header *msg) return msg->security; /* If autoinline and no crypto options set, then set inline. */ - if (OPT_PGP_AUTOINLINE && + if (PgpAutoinline && !((msg->security & APPLICATION_PGP) && (msg->security & (SIGN | ENCRYPT)))) { msg->security |= INLINE; @@ -1702,7 +1702,7 @@ int pgp_send_menu(struct Header *msg) * NOTE: "Signing" and "Clearing" only adjust the sign bit, so we have different * letter choices for those. */ - if (OPT_CRYPT_OPPORTUNISTIC_ENCRYPT && (msg->security & OPPENCRYPT)) + if (CryptOpportunisticEncrypt && (msg->security & OPPENCRYPT)) { if (msg->security & (ENCRYPT | SIGN)) { @@ -1730,7 +1730,7 @@ int pgp_send_menu(struct Header *msg) * Opportunistic encryption option is set, but is toggled off * for this message. */ - else if (OPT_CRYPT_OPPORTUNISTIC_ENCRYPT) + else if (CryptOpportunisticEncrypt) { /* When the message is not selected for signing or encryption, the toggle * between PGP/MIME and Traditional doesn't make sense. diff --git a/ncrypt/pgpkey.c b/ncrypt/pgpkey.c index 6ed2a25ad..847f5a4dc 100644 --- a/ncrypt/pgpkey.c +++ b/ncrypt/pgpkey.c @@ -483,7 +483,7 @@ static struct PgpKeyInfo *pgp_select_key(struct PgpKeyInfo *keys, for (i = 0, kp = keys; kp; kp = kp->next) { - if (!OPT_PGP_SHOW_UNUSABLE && (kp->flags & KEYFLAG_CANTUSE)) + if (!PgpShowUnusable && (kp->flags & KEYFLAG_CANTUSE)) { unusable = true; continue; @@ -491,7 +491,7 @@ static struct PgpKeyInfo *pgp_select_key(struct PgpKeyInfo *keys, for (a = kp->address; a; a = a->next) { - if (!OPT_PGP_SHOW_UNUSABLE && (a->flags & KEYFLAG_CANTUSE)) + if (!PgpShowUnusable && (a->flags & KEYFLAG_CANTUSE)) { unusable = true; continue; diff --git a/ncrypt/smime.c b/ncrypt/smime.c index 8859fc30d..8f4b977dd 100644 --- a/ncrypt/smime.c +++ b/ncrypt/smime.c @@ -831,7 +831,7 @@ void smime_getkeys(struct Envelope *env) struct Address *t = NULL; bool found = false; - if (OPT_SMIME_DECRYPT_USE_DEFAULT_KEY && SmimeDefaultKey && *SmimeDefaultKey) + if (SmimeDecryptUseDefaultKey && SmimeDefaultKey && *SmimeDefaultKey) { snprintf(SmimeKeyToUse, sizeof(SmimeKeyToUse), "%s/%s", NONULL(SmimeKeys), SmimeDefaultKey); @@ -1205,7 +1205,7 @@ void smime_invoke_import(char *infile, char *mailbox) mutt_file_unlink(tmpfname); buf[0] = '\0'; - if (OPT_SMIME_ASK_CERT_LABEL) + if (SmimeAskCertLabel) { if ((mutt_get_field(_("Label for certificate: "), buf, sizeof(buf), 0) != 0) || (buf[0] == 0)) @@ -2049,7 +2049,7 @@ int smime_send_menu(struct Header *msg) * NOTE: "Signing" and "Clearing" only adjust the sign bit, so we have different * letter choices for those. */ - if (OPT_CRYPT_OPPORTUNISTIC_ENCRYPT && (msg->security & OPPENCRYPT)) + if (CryptOpportunisticEncrypt && (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 " @@ -2062,7 +2062,7 @@ int smime_send_menu(struct Header *msg) * Opportunistic encryption option is set, but is toggled off * for this message. */ - else if (OPT_CRYPT_OPPORTUNISTIC_ENCRYPT) + else if (CryptOpportunisticEncrypt) { /* L10N: S/MIME options (opportunistic encryption is off) */ prompt = _("S/MIME (e)ncrypt, (s)ign, encrypt (w)ith, sign (a)s, (b)oth, " diff --git a/newsrc.c b/newsrc.c index 1c3822a8d..0ab6e5e95 100644 --- a/newsrc.c +++ b/newsrc.c @@ -681,7 +681,7 @@ header_cache_t *nntp_hcache_open(struct NntpData *nntp_data) if (!nntp_data->nserv || !nntp_data->nserv->cacheable || !nntp_data->nserv->conn || !nntp_data->group || - !(nntp_data->newsrc_ent || nntp_data->subscribed || OPT_SAVE_UNSUBSCRIBED)) + !(nntp_data->newsrc_ent || nntp_data->subscribed || SaveUnsubscribed)) return NULL; mutt_account_tourl(&nntp_data->nserv->conn->account, &url); @@ -848,7 +848,7 @@ void nntp_clear_cache(struct NntpServer *nserv) nntp_data->group = group; nntp_data->bcache = NULL; } - else if (nntp_data->newsrc_ent || nntp_data->subscribed || OPT_SAVE_UNSUBSCRIBED) + else if (nntp_data->newsrc_ent || nntp_data->subscribed || SaveUnsubscribed) continue; nntp_delete_group_cache(nntp_data); @@ -1182,7 +1182,7 @@ void nntp_article_status(struct Context *ctx, struct Header *hdr, char *group, a return; /* article isn't read but cached, it's old */ - if (OPT_MARK_OLD) + if (MarkOld) hdr->old = true; } @@ -1223,7 +1223,7 @@ struct NntpData *mutt_newsgroup_unsubscribe(struct NntpServer *nserv, char *grou return NULL; nntp_data->subscribed = false; - if (!OPT_SAVE_UNSUBSCRIBED) + if (!SaveUnsubscribed) { nntp_data->newsrc_len = 0; FREE(&nntp_data->newsrc_ent); diff --git a/nntp.c b/nntp.c index 7604479e5..ff21ed8c6 100644 --- a/nntp.c +++ b/nntp.c @@ -674,12 +674,12 @@ int nntp_open_connection(struct NntpServer *nserv) #ifdef USE_SSL /* Attempt STARTTLS if available and desired. */ - if (nserv->use_tls != 1 && (nserv->hasSTARTTLS || OPT_SSL_FORCE_TLS)) + if (nserv->use_tls != 1 && (nserv->hasSTARTTLS || SslForceTls)) { if (nserv->use_tls == 0) nserv->use_tls = - OPT_SSL_FORCE_TLS || - query_quadoption(OPT_SSL_STARTTLS, + SslForceTls || + query_quadoption(SslStarttls, _("Secure connection with TLS?")) == MUTT_YES ? 2 : 1; @@ -1250,7 +1250,7 @@ static int nntp_fetch_headers(struct Context *ctx, void *hc, anum_t first, #endif /* fetch list of articles */ - if (OPT_NNTP_LISTGROUP && nntp_data->nserv->hasLISTGROUP && !nntp_data->deleted) + if (NntpListgroup && nntp_data->nserv->hasLISTGROUP && !nntp_data->deleted) { if (!ctx->quiet) mutt_message(_("Fetching list of articles...")); @@ -1347,7 +1347,7 @@ static int nntp_fetch_headers(struct Context *ctx, void *hc, anum_t first, /* fallback to fetch overview */ else if (nntp_data->nserv->hasOVER || nntp_data->nserv->hasXOVER) - if (OPT_NNTP_LISTGROUP && nntp_data->nserv->hasLISTGROUP) + if (NntpListgroup && nntp_data->nserv->hasLISTGROUP) break; else continue; @@ -1425,7 +1425,7 @@ static int nntp_fetch_headers(struct Context *ctx, void *hc, anum_t first, first_over = current + 1; } - if (!OPT_NNTP_LISTGROUP || !nntp_data->nserv->hasLISTGROUP) + if (!NntpListgroup || !nntp_data->nserv->hasLISTGROUP) current = first_over; /* fetch overview information */ @@ -1496,7 +1496,7 @@ static int nntp_open_mailbox(struct Context *ctx) } mutt_bit_unset(ctx->rights, MUTT_ACL_INSERT); - if (!nntp_data->newsrc_ent && !nntp_data->subscribed && !OPT_SAVE_UNSUBSCRIBED) + if (!nntp_data->newsrc_ent && !nntp_data->subscribed && !SaveUnsubscribed) ctx->readonly = true; /* select newsgroup */ @@ -1517,7 +1517,7 @@ static int nntp_open_mailbox(struct Context *ctx) nntp_data->deleted = true; nntp_active_save_cache(nserv); } - if (nntp_data->newsrc_ent && !nntp_data->subscribed && !OPT_SAVE_UNSUBSCRIBED) + if (nntp_data->newsrc_ent && !nntp_data->subscribed && !SaveUnsubscribed) { FREE(&nntp_data->newsrc_ent); nntp_data->newsrc_len = 0; @@ -1542,7 +1542,7 @@ static int nntp_open_mailbox(struct Context *ctx) nntp_data->deleted = false; /* get description if empty */ - if (OPT_NNTP_LOAD_DESCRIPTION && !nntp_data->desc) + if (NntpLoadDescription && !nntp_data->desc) { if (get_description(nntp_data, NULL, NULL) < 0) { @@ -1556,8 +1556,7 @@ static int nntp_open_mailbox(struct Context *ctx) time(&nserv->check_time); ctx->data = nntp_data; - if (!nntp_data->bcache && - (nntp_data->newsrc_ent || nntp_data->subscribed || OPT_SAVE_UNSUBSCRIBED)) + if (!nntp_data->bcache && (nntp_data->newsrc_ent || nntp_data->subscribed || SaveUnsubscribed)) nntp_data->bcache = mutt_bcache_open(&nserv->conn->account, nntp_data->group); /* strip off extra articles if adding context is greater than $nntp_context */ @@ -2250,7 +2249,7 @@ int nntp_active_fetch(struct NntpServer *nserv, bool new) } } - if (OPT_NNTP_LOAD_DESCRIPTION) + if (NntpLoadDescription) rc = get_description(&nntp_data, "*", _("Loading descriptions...")); nntp_active_save_cache(nserv); @@ -2280,7 +2279,7 @@ int nntp_check_new_groups(struct NntpServer *nserv) return -1; /* check subscribed newsgroups for new articles */ - if (OPT_SHOW_NEW_NEWS) + if (ShowNewNews) { mutt_message(_("Checking for new messages...")); for (i = 0; i < nserv->groups_num; i++) @@ -2346,7 +2345,7 @@ int nntp_check_new_groups(struct NntpServer *nserv) } /* loading descriptions */ - if (OPT_NNTP_LOAD_DESCRIPTION) + if (NntpLoadDescription) { unsigned int count = 0; struct Progress progress; diff --git a/options.h b/options.h index 7c6a4f01c..4a3c313fd 100644 --- a/options.h +++ b/options.h @@ -26,217 +26,217 @@ #include #include "where.h" -WHERE bool OPT_ALLOW_8BIT; -WHERE bool OPT_ALLOW_ANSI; -WHERE bool OPT_ARROW_CURSOR; -WHERE bool OPT_ASCII_CHARS; -WHERE bool OPT_ASKBCC; -WHERE bool OPT_ASKCC; -WHERE bool OPT_ASK_FOLLOW_UP; -WHERE bool OPT_ASK_X_COMMENT_TO; -WHERE bool OPT_ATTACH_SPLIT; -WHERE bool OPT_AUTOEDIT; -WHERE bool OPT_AUTO_TAG; -WHERE bool OPT_BEEP; -WHERE bool OPT_BEEP_NEW; -WHERE bool OPT_BOUNCE_DELIVERED; -WHERE bool OPT_BRAILLE_FRIENDLY; -WHERE bool OPT_CHANGE_FOLDER_NEXT; -WHERE bool OPT_CHECK_MBOX_SIZE; -WHERE bool OPT_CHECK_NEW; -WHERE bool OPT_COLLAPSE_ALL; -WHERE bool OPT_COLLAPSE_UNREAD; -WHERE bool OPT_COLLAPSE_FLAGGED; -WHERE bool OPT_CONFIRMAPPEND; -WHERE bool OPT_CONFIRMCREATE; -WHERE bool OPT_DELETE_UNTAG; -WHERE bool OPT_DIGEST_COLLAPSE; -WHERE bool OPT_DUPLICATE_THREADS; -WHERE bool OPT_EDIT_HEADERS; -WHERE bool OPT_ENCODE_FROM; -WHERE bool OPT_USE_ENVELOPE_FROM; -WHERE bool OPT_FAST_REPLY; -WHERE bool OPT_FCC_CLEAR; -WHERE bool OPT_FLAG_SAFE; -WHERE bool OPT_FOLLOWUP_TO; -WHERE bool OPT_FORCE_NAME; -WHERE bool OPT_FORWARD_DECODE; -WHERE bool OPT_FORWARD_QUOTE; -WHERE bool OPT_FORWARD_REFERENCES; +WHERE bool Allow8bit; +WHERE bool AllowAnsi; +WHERE bool ArrowCursor; +WHERE bool AsciiChars; +WHERE bool Askbcc; +WHERE bool Askcc; +WHERE bool AskFollowUp; +WHERE bool AskXCommentTo; +WHERE bool AttachSplit; +WHERE bool Autoedit; +WHERE bool AutoTag; +WHERE bool Beep; +WHERE bool BeepNew; +WHERE bool BounceDelivered; +WHERE bool BrailleFriendly; +WHERE bool ChangeFolderNext; +WHERE bool CheckMboxSize; +WHERE bool CheckNew; +WHERE bool CollapseAll; +WHERE bool CollapseUnread; +WHERE bool CollapseFlagged; +WHERE bool Confirmappend; +WHERE bool Confirmcreate; +WHERE bool DeleteUntag; +WHERE bool DigestCollapse; +WHERE bool DuplicateThreads; +WHERE bool EditHeaders; +WHERE bool EncodeFrom; +WHERE bool UseEnvelopeFrom; +WHERE bool FastReply; +WHERE bool FccClear; +WHERE bool FlagSafe; +WHERE bool FollowupTo; +WHERE bool ForceName; +WHERE bool ForwardDecode; +WHERE bool ForwardQuote; +WHERE bool ForwardReferences; #ifdef USE_HCACHE -WHERE bool OPT_MAILDIR_HEADER_CACHE_VERIFY; +WHERE bool MaildirHeaderCacheVerify; #if defined(HAVE_QDBM) || defined(HAVE_TC) || defined(HAVE_KC) -WHERE bool OPT_HEADER_CACHE_COMPRESS; +WHERE bool HeaderCacheCompress; #endif /* HAVE_QDBM */ #endif -WHERE bool OPT_HDRS; -WHERE bool OPT_HEADER; -WHERE bool OPT_HEADER_COLOR_PARTIAL; -WHERE bool OPT_HELP; -WHERE bool OPT_HIDDEN_HOST; -WHERE bool OPT_HIDE_LIMITED; -WHERE bool OPT_HIDE_MISSING; -WHERE bool OPT_HIDE_THREAD_SUBJECT; -WHERE bool OPT_HIDE_TOP_LIMITED; -WHERE bool OPT_HIDE_TOP_MISSING; -WHERE bool OPT_HISTORY_REMOVE_DUPS; -WHERE bool OPT_HONOR_DISPOSITION; -WHERE bool OPT_IGNORE_LINEAR_WHITE_SPACE; -WHERE bool OPT_IGNORE_LIST_REPLY_TO; +WHERE bool Hdrs; +WHERE bool Header; +WHERE bool HeaderColorPartial; +WHERE bool Help; +WHERE bool HiddenHost; +WHERE bool HideLimited; +WHERE bool HideMissing; +WHERE bool HideThreadSubject; +WHERE bool HideTopLimited; +WHERE bool HideTopMissing; +WHERE bool HistoryRemoveDups; +WHERE bool HonorDisposition; +WHERE bool IgnoreLinearWhiteSpace; +WHERE bool IgnoreListReplyTo; #ifdef USE_IMAP -WHERE bool OPT_IMAP_CHECK_SUBSCRIBED; -WHERE bool OPT_IMAP_IDLE; -WHERE bool OPT_IMAP_LIST_SUBSCRIBED; -WHERE bool OPT_IMAP_PASSIVE; -WHERE bool OPT_IMAP_PEEK; -WHERE bool OPT_IMAP_SERVERNOISE; +WHERE bool ImapCheckSubscribed; +WHERE bool ImapIdle; +WHERE bool ImapListSubscribed; +WHERE bool ImapPassive; +WHERE bool ImapPeek; +WHERE bool ImapServernoise; #endif #ifdef USE_SSL #ifndef USE_SSL_GNUTLS -WHERE bool OPT_SSL_USESYSTEMCERTS; -WHERE bool OPT_SSL_USE_SSLV2; +WHERE bool SslUsesystemcerts; +WHERE bool SslUseSslv2; #endif /* USE_SSL_GNUTLS */ -WHERE bool OPT_SSL_USE_SSLV3; -WHERE bool OPT_SSL_USE_TLSV1; -WHERE bool OPT_SSL_USE_TLSV1_1; -WHERE bool OPT_SSL_USE_TLSV1_2; -WHERE bool OPT_SSL_FORCE_TLS; -WHERE bool OPT_SSL_VERIFY_DATES; -WHERE bool OPT_SSL_VERIFY_HOST; +WHERE bool SslUseSslv3; +WHERE bool SslUseTlsv1; +WHERE bool SslUseTlsv11; +WHERE bool SslUseTlsv12; +WHERE bool SslForceTls; +WHERE bool SslVerifyDates; +WHERE bool SslVerifyHost; #if defined(USE_SSL_OPENSSL) && defined(HAVE_SSL_PARTIAL_CHAIN) -WHERE bool OPT_SSL_VERIFY_PARTIAL_CHAINS; +WHERE bool SslVerifyPartialChains; #endif /* USE_SSL_OPENSSL */ #endif /* defined(USE_SSL) */ -WHERE bool OPT_IMPLICIT_AUTOVIEW; -WHERE bool OPT_INCLUDE_ONLYFIRST; -WHERE bool OPT_KEEP_FLAGGED; -WHERE bool OPT_MAILCAP_SANITIZE; -WHERE bool OPT_MAIL_CHECK_RECENT; -WHERE bool OPT_MAIL_CHECK_STATS; -WHERE bool OPT_MAILDIR_TRASH; -WHERE bool OPT_MAILDIR_CHECK_CUR; -WHERE bool OPT_MARKERS; -WHERE bool OPT_MARK_OLD; -WHERE bool OPT_MENU_SCROLL; /**< scroll menu instead of implicit next-page */ -WHERE bool OPT_MENU_MOVE_OFF; /**< allow menu to scroll past last entry */ +WHERE bool ImplicitAutoview; +WHERE bool IncludeOnlyfirst; +WHERE bool KeepFlagged; +WHERE bool MailcapSanitize; +WHERE bool MailCheckRecent; +WHERE bool MailCheckStats; +WHERE bool MaildirTrash; +WHERE bool MaildirCheckCur; +WHERE bool Markers; +WHERE bool MarkOld; +WHERE bool MenuScroll; /**< scroll menu instead of implicit next-page */ +WHERE bool MenuMoveOff; /**< allow menu to scroll past last entry */ #if defined(USE_IMAP) || defined(USE_POP) -WHERE bool OPT_MESSAGE_CACHE_CLEAN; +WHERE bool MessageCacheClean; #endif -WHERE bool OPT_META_KEY; /**< interpret ALT-x as ESC-x */ -WHERE bool OPT_METOO; -WHERE bool OPT_MH_PURGE; -WHERE bool OPT_MIME_FORWARD_DECODE; -WHERE bool OPT_MIME_TYPE_QUERY_FIRST; +WHERE bool MetaKey; /**< interpret ALT-x as ESC-x */ +WHERE bool Metoo; +WHERE bool MhPurge; +WHERE bool MimeForwardDecode; +WHERE bool MimeTypeQueryFirst; #ifdef USE_NNTP -WHERE bool OPT_MIME_SUBJECT; /**< encode subject line with RFC2047 */ +WHERE bool MimeSubject; /**< encode subject line with RFC2047 */ #endif -WHERE bool OPT_NARROW_TREE; -WHERE bool OPT_PAGER_STOP; -WHERE bool OPT_PIPE_DECODE; -WHERE bool OPT_PIPE_SPLIT; +WHERE bool NarrowTree; +WHERE bool PagerStop; +WHERE bool PipeDecode; +WHERE bool PipeSplit; #ifdef USE_POP -WHERE bool OPT_POP_AUTH_TRY_ALL; -WHERE bool OPT_POP_LAST; +WHERE bool PopAuthTryAll; +WHERE bool PopLast; #endif -WHERE bool OPT_POSTPONE_ENCRYPT; -WHERE bool OPT_PRINT_DECODE; -WHERE bool OPT_PRINT_SPLIT; -WHERE bool OPT_PROMPT_AFTER; -WHERE bool OPT_READ_ONLY; -WHERE bool OPT_REFLOW_SPACE_QUOTES; -WHERE bool OPT_REFLOW_TEXT; -WHERE bool OPT_REPLY_SELF; -WHERE bool OPT_REPLY_WITH_XORIG; -WHERE bool OPT_RESOLVE; -WHERE bool OPT_RESUME_DRAFT_FILES; -WHERE bool OPT_RESUME_EDITED_DRAFT_FILES; -WHERE bool OPT_REVERSE_ALIAS; -WHERE bool OPT_REVERSE_NAME; -WHERE bool OPT_REVERSE_REALNAME; -WHERE bool OPT_RFC2047_PARAMETERS; -WHERE bool OPT_SAVE_ADDRESS; -WHERE bool OPT_SAVE_EMPTY; -WHERE bool OPT_SAVE_NAME; -WHERE bool OPT_SCORE; +WHERE bool PostponeEncrypt; +WHERE bool PrintDecode; +WHERE bool PrintSplit; +WHERE bool PromptAfter; +WHERE bool ReadOnly; +WHERE bool ReflowSpaceQuotes; +WHERE bool ReflowText; +WHERE bool ReplySelf; +WHERE bool ReplyWithXorig; +WHERE bool Resolve; +WHERE bool ResumeDraftFiles; +WHERE bool ResumeEditedDraftFiles; +WHERE bool ReverseAlias; +WHERE bool ReverseName; +WHERE bool ReverseRealname; +WHERE bool Rfc2047Parameters; +WHERE bool SaveAddress; +WHERE bool SaveEmpty; +WHERE bool SaveName; +WHERE bool Score; #ifdef USE_SIDEBAR -WHERE bool OPT_SIDEBAR_VISIBLE; -WHERE bool OPT_SIDEBAR_FOLDER_INDENT; -WHERE bool OPT_SIDEBAR_NEW_MAIL_ONLY; -WHERE bool OPT_SIDEBAR_NEXT_NEW_WRAP; -WHERE bool OPT_SIDEBAR_SHORT_PATH; -WHERE bool OPT_SIDEBAR_ON_RIGHT; +WHERE bool SidebarVisible; +WHERE bool SidebarFolderIndent; +WHERE bool SidebarNewMailOnly; +WHERE bool SidebarNextNewWrap; +WHERE bool SidebarShortPath; +WHERE bool SidebarOnRight; #endif -WHERE bool OPT_SIG_DASHES; -WHERE bool OPT_SIG_ON_TOP; -WHERE bool OPT_SORT_RE; -WHERE bool OPT_STATUS_ON_TOP; -WHERE bool OPT_STRICT_THREADS; -WHERE bool OPT_SUSPEND; -WHERE bool OPT_TEXT_FLOWED; -WHERE bool OPT_THOROUGH_SEARCH; -WHERE bool OPT_THREAD_RECEIVED; -WHERE bool OPT_TILDE; -WHERE bool OPT_TS_ENABLED; -WHERE bool OPT_UNCOLLAPSE_JUMP; -WHERE bool OPT_UNCOLLAPSE_NEW; -WHERE bool OPT_USE_8BITMIME; -WHERE bool OPT_USE_DOMAIN; -WHERE bool OPT_USE_FROM; -WHERE bool OPT_PGP_USE_GPG_AGENT; +WHERE bool SigDashes; +WHERE bool SigOnTop; +WHERE bool SortRe; +WHERE bool StatusOnTop; +WHERE bool StrictThreads; +WHERE bool Suspend; +WHERE bool TextFlowed; +WHERE bool ThoroughSearch; +WHERE bool ThreadReceived; +WHERE bool Tilde; +WHERE bool TsEnabled; +WHERE bool UncollapseJump; +WHERE bool UncollapseNew; +WHERE bool Use8bitmime; +WHERE bool UseDomain; +WHERE bool UseFrom; +WHERE bool PgpUseGpgAgent; #ifdef HAVE_LIBIDN -WHERE bool OPT_IDN_DECODE; -WHERE bool OPT_IDN_ENCODE; +WHERE bool IdnDecode; +WHERE bool IdnEncode; #endif #ifdef HAVE_GETADDRINFO -WHERE bool OPT_USE_IPV6; +WHERE bool UseIpv6; #endif -WHERE bool OPT_WAIT_KEY; -WHERE bool OPT_WEED; -WHERE bool OPT_SMART_WRAP; -WHERE bool OPT_WRAP_SEARCH; -WHERE bool OPT_WRITE_BCC; /**< write out a bcc header? */ -WHERE bool OPT_USER_AGENT; +WHERE bool WaitKey; +WHERE bool Weed; +WHERE bool SmartWrap; +WHERE bool WrapSearch; +WHERE bool WriteBcc; /**< write out a bcc header? */ +WHERE bool UserAgent; -WHERE bool OPT_CRYPT_USE_GPGME; -WHERE bool OPT_CRYPT_USE_PKA; +WHERE bool CryptUseGpgme; +WHERE bool CryptUsePka; /* PGP options */ -WHERE bool OPT_CRYPT_AUTOSIGN; -WHERE bool OPT_CRYPT_AUTOENCRYPT; -WHERE bool OPT_CRYPT_AUTOPGP; -WHERE bool OPT_CRYPT_AUTOSMIME; -WHERE bool OPT_CRYPT_CONFIRMHOOK; -WHERE bool OPT_CRYPT_OPPORTUNISTIC_ENCRYPT; -WHERE bool OPT_CRYPT_REPLYENCRYPT; -WHERE bool OPT_CRYPT_REPLYSIGN; -WHERE bool OPT_CRYPT_REPLYSIGNENCRYPTED; -WHERE bool OPT_CRYPT_TIMESTAMP; -WHERE bool OPT_SMIME_IS_DEFAULT; -WHERE bool OPT_SMIME_SELF_ENCRYPT; -WHERE bool OPT_SMIME_ASK_CERT_LABEL; -WHERE bool OPT_SMIME_DECRYPT_USE_DEFAULT_KEY; -WHERE bool OPT_PGP_IGNORE_SUBKEYS; -WHERE bool OPT_PGP_CHECK_EXIT; -WHERE bool OPT_PGP_LONG_IDS; -WHERE bool OPT_PGP_AUTO_DECODE; -WHERE bool OPT_PGP_RETAINABLE_SIGS; -WHERE bool OPT_PGP_SELF_ENCRYPT; -WHERE bool OPT_PGP_STRICT_ENC; -WHERE bool OPT_FORWARD_DECRYPT; -WHERE bool OPT_PGP_SHOW_UNUSABLE; -WHERE bool OPT_PGP_AUTOINLINE; -WHERE bool OPT_PGP_REPLYINLINE; +WHERE bool CryptAutosign; +WHERE bool CryptAutoencrypt; +WHERE bool CryptAutopgp; +WHERE bool CryptAutosmime; +WHERE bool CryptConfirmhook; +WHERE bool CryptOpportunisticEncrypt; +WHERE bool CryptReplyencrypt; +WHERE bool CryptReplysign; +WHERE bool CryptReplysignencrypted; +WHERE bool CryptTimestamp; +WHERE bool SmimeIsDefault; +WHERE bool SmimeSelfEncrypt; +WHERE bool SmimeAskCertLabel; +WHERE bool SmimeDecryptUseDefaultKey; +WHERE bool PgpIgnoreSubkeys; +WHERE bool PgpCheckExit; +WHERE bool PgpLongIds; +WHERE bool PgpAutoDecode; +WHERE bool PgpRetainableSigs; +WHERE bool PgpSelfEncrypt; +WHERE bool PgpStrictEnc; +WHERE bool ForwardDecrypt; +WHERE bool PgpShowUnusable; +WHERE bool PgpAutoinline; +WHERE bool PgpReplyinline; /* news options */ #ifdef USE_NNTP -WHERE bool OPT_SHOW_NEW_NEWS; -WHERE bool OPT_SHOW_ONLY_UNREAD; -WHERE bool OPT_SAVE_UNSUBSCRIBED; -WHERE bool OPT_NNTP_LISTGROUP; -WHERE bool OPT_NNTP_LOAD_DESCRIPTION; -WHERE bool OPT_X_COMMENT_TO; +WHERE bool ShowNewNews; +WHERE bool ShowOnlyUnread; +WHERE bool SaveUnsubscribed; +WHERE bool NntpListgroup; +WHERE bool NntpLoadDescription; +WHERE bool XCommentTo; #endif /* pseudo options */ @@ -266,8 +266,8 @@ WHERE bool OPT_NEWS; /**< (pseudo) used to change reader mode */ WHERE bool OPT_NEWS_SEND; /**< (pseudo) used to change behavior when posting */ #endif #ifdef USE_NOTMUCH -WHERE bool OPT_VIRTUAL_SPOOLFILE; -WHERE bool OPT_NM_RECORD; +WHERE bool VirtualSpoolfile; +WHERE bool NmRecord; #endif diff --git a/pager.c b/pager.c index 32c694eec..1b85d9787 100644 --- a/pager.c +++ b/pager.c @@ -232,7 +232,7 @@ static void resolve_color(struct Line *line_info, int n, int cnt, int flags, if (line_info[n].continuation) { - if (!cnt && OPT_MARKERS) + if (!cnt && Markers) { SETCOLOR(MT_COLOR_MARKERS); addch('+'); @@ -776,7 +776,7 @@ static void resolve_types(char *buf, char *raw, struct Line *line_info, int n, if (n > 0 && (buf[0] == ' ' || buf[0] == '\t')) { line_info[n].type = line_info[n - 1].type; /* wrapped line */ - if (!OPT_HEADER_COLOR_PARTIAL) + if (!HeaderColorPartial) { (line_info[n].syntax)[0].color = (line_info[n - 1].syntax)[0].color; line_info[n].is_cont_hdr = 1; @@ -791,7 +791,7 @@ static void resolve_types(char *buf, char *raw, struct Line *line_info, int n, * same color. Otherwise, we handle the header patterns just * like body patterns (further below). */ - if (!OPT_HEADER_COLOR_PARTIAL) + if (!HeaderColorPartial) { STAILQ_FOREACH(color_line, &ColorHdrList, entries) { @@ -888,7 +888,7 @@ static void resolve_types(char *buf, char *raw, struct Line *line_info, int n, /* body patterns */ if (line_info[n].type == MT_COLOR_NORMAL || line_info[n].type == MT_COLOR_QUOTED || - (line_info[n].type == MT_COLOR_HDEFAULT && OPT_HEADER_COLOR_PARTIAL)) + (line_info[n].type == MT_COLOR_HDEFAULT && HeaderColorPartial)) { size_t nl; @@ -1038,7 +1038,7 @@ static int grok_ansi(unsigned char *buf, int pos, struct AnsiAttr *a) x++; /* Character Attributes */ - if (OPT_ALLOW_ANSI && a != NULL && buf[x] == 'm') + if (AllowAnsi && a != NULL && buf[x] == 'm') { if (pos == x) { @@ -1212,7 +1212,7 @@ static int format_line(struct Line **line_info, int n, unsigned char *buf, int f int *pcol, int *pspecial, struct MuttWindow *pager_window) { int space = -1; /* index of the last space or TAB */ - int col = OPT_MARKERS ? (*line_info)[n].continuation : 0; + int col = Markers ? (*line_info)[n].continuation : 0; size_t k; int ch, vch, last_special = -1, special = 0, t; wchar_t wc; @@ -1557,7 +1557,7 @@ static int display_line(FILE *f, LOFF_T *last_pos, struct Line **line_info, buf_ptr = buf + cnt; /* move the break point only if smart_wrap is set */ - if (OPT_SMART_WRAP) + if (SmartWrap) { if ((cnt < b_read) && (ch != -1) && !ISHEADER((*line_info)[n].type) && !ISSPACE(buf[cnt])) @@ -1769,7 +1769,7 @@ static void pager_menu_redraw(struct Menu *pager_menu) memcpy(rd->index_window, MuttIndexWindow, sizeof(struct MuttWindow)); rd->index_window->rows = rd->indexlen > 0 ? rd->indexlen - 1 : 0; - if (OPT_STATUS_ON_TOP) + if (StatusOnTop) { memcpy(rd->index_status_window, MuttStatusWindow, sizeof(struct MuttWindow)); @@ -1795,7 +1795,7 @@ static void pager_menu_redraw(struct Menu *pager_menu) } } - if (OPT_HELP) + if (Help) { SETCOLOR(MT_COLOR_STATUS); mutt_window_move(MuttHelpWindow, 0, 0); @@ -1941,7 +1941,7 @@ static void pager_menu_redraw(struct Menu *pager_menu) while (rd->lines < rd->pager_window->rows) { mutt_window_clrtoeol(rd->pager_window); - if (OPT_TILDE) + if (Tilde) addch('~'); rd->lines++; mutt_window_move(rd->pager_window, rd->lines, 0); @@ -1989,7 +1989,7 @@ static void pager_menu_redraw(struct Menu *pager_menu) mutt_draw_statusline(rd->pager_status_window->cols, bn, sizeof(bn)); } NORMAL_COLOR; - if (OPT_TS_ENABLED && TSSupported && rd->index) + if (TsEnabled && TSSupported && rd->index) { menu_status_line(buffer, sizeof(buffer), rd->index, NONULL(TSStatusFormat)); mutt_ts_status(buffer); @@ -2130,7 +2130,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e pager_menu_redraw(pager_menu); - if (OPT_BRAILLE_FRIENDLY) + if (BrailleFriendly) { if (braille_line != -1) { @@ -2228,7 +2228,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e if (mutt_buffy_notify() || do_new_mail) { - if (OPT_BEEP_NEW) + if (BeepNew) beep(); if (NewMailCommand) { @@ -2290,10 +2290,10 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e break; case OP_QUIT: - if (query_quadoption(OPT_QUIT, _("Quit NeoMutt?")) == MUTT_YES) + if (query_quadoption(Quit, _("Quit NeoMutt?")) == MUTT_YES) { /* avoid prompting again in the index menu */ - OPT_QUIT = MUTT_YES; + Quit = MUTT_YES; ch = -1; } break; @@ -2303,7 +2303,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e { rd.topline = up_n_lines(PagerContext, rd.line_info, rd.curline, rd.hide_quoted); } - else if (OPT_PAGER_STOP) + else if (PagerStop) { /* emulate "less -q" and don't go on to the next message. */ mutt_error(_("Bottom of message is shown.")); @@ -2368,7 +2368,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e rd.topline = up_n_lines(rd.pager_window->rows / 2, rd.line_info, rd.curline, rd.hide_quoted); } - else if (OPT_PAGER_STOP) + else if (PagerStop) { /* emulate "less -q" and don't go on to the next message. */ mutt_error(_("Bottom of message is shown.")); @@ -2408,7 +2408,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e if (i < rd.last_line) rd.topline = i; - else if (wrapped || !OPT_WRAP_SEARCH) + else if (wrapped || !WrapSearch) mutt_error(_("Not found.")); else { @@ -2431,7 +2431,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e if (i >= 0) rd.topline = i; - else if (wrapped || !OPT_WRAP_SEARCH) + else if (wrapped || !WrapSearch) mutt_error(_("Not found.")); else { @@ -2760,10 +2760,10 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e mutt_set_flag(Context, extra->hdr, MUTT_DELETE, 1); mutt_set_flag(Context, extra->hdr, MUTT_PURGE, (ch == OP_PURGE_MESSAGE)); - if (OPT_DELETE_UNTAG) + if (DeleteUntag) mutt_set_flag(Context, extra->hdr, MUTT_TAG, 0); pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX; - if (OPT_RESOLVE) + if (Resolve) { ch = -1; rc = OP_MAIN_NEXT_UNDELETED; @@ -2777,7 +2777,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e if (mutt_change_flag(extra->hdr, (ch == OP_MAIN_SET_FLAG)) == 0) pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX; - if (extra->hdr->deleted && OPT_RESOLVE) + if (extra->hdr->deleted && Resolve) { ch = -1; rc = OP_MAIN_NEXT_UNDELETED; @@ -2804,15 +2804,15 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e break; } - if (OPT_DELETE_UNTAG) + if (DeleteUntag) mutt_thread_set_flag(extra->hdr, MUTT_TAG, 0, subthread); - if (OPT_RESOLVE) + if (Resolve) { rc = OP_MAIN_NEXT_UNDELETED; ch = -1; } - if (!OPT_RESOLVE && PagerIndexLines) + if (!Resolve && PagerIndexLines) pager_menu->redraw = REDRAW_FULL; else pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX; @@ -2864,7 +2864,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e mutt_set_flag(Context, extra->hdr, MUTT_FLAG, !extra->hdr->flagged); pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX; - if (OPT_RESOLVE) + if (Resolve) { ch = -1; rc = OP_MAIN_NEXT_UNDELETED; @@ -2899,7 +2899,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e CHECK_MODE(IsHeader(extra) && !IsAttach(extra)); CHECK_ATTACH; if (extra->ctx && extra->ctx->magic == MUTT_NNTP && - !((struct NntpData *) extra->ctx->data)->allowed && query_quadoption(OPT_POST_MODERATED, _("Posting to this group not allowed, may be moderated. Continue?")) != MUTT_YES) + !((struct NntpData *) extra->ctx->data)->allowed && query_quadoption(PostModerated, _("Posting to this group not allowed, may be moderated. Continue?")) != MUTT_YES) { break; } @@ -2911,7 +2911,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e CHECK_MODE(IsHeader(extra) || IsMsgAttach(extra)); CHECK_ATTACH; if (extra->ctx && extra->ctx->magic == MUTT_NNTP && - !((struct NntpData *) extra->ctx->data)->allowed && query_quadoption(OPT_POST_MODERATED, _("Posting to this group not allowed, may be moderated. Continue?")) != MUTT_YES) + !((struct NntpData *) extra->ctx->data)->allowed && query_quadoption(PostModerated, _("Posting to this group not allowed, may be moderated. Continue?")) != MUTT_YES) { break; } @@ -2932,11 +2932,11 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e followup_to = extra->hdr->env->followup_to; if (!followup_to || (mutt_str_strcasecmp(followup_to, "poster") != 0) || - query_quadoption(OPT_FOLLOWUP_TO_POSTER, + query_quadoption(FollowupToPoster, _("Reply by mail as poster prefers?")) != MUTT_YES) { if (extra->ctx && extra->ctx->magic == MUTT_NNTP && - !((struct NntpData *) extra->ctx->data)->allowed && query_quadoption(OPT_POST_MODERATED, _("Posting to this group not allowed, may be moderated. Continue?")) != MUTT_YES) + !((struct NntpData *) extra->ctx->data)->allowed && query_quadoption(PostModerated, _("Posting to this group not allowed, may be moderated. Continue?")) != MUTT_YES) { break; } @@ -3032,7 +3032,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e (ch == OP_DECRYPT_SAVE) || (ch == OP_DECRYPT_COPY) || 0) == 0 && (ch == OP_SAVE || ch == OP_DECODE_SAVE || ch == OP_DECRYPT_SAVE)) { - if (OPT_RESOLVE) + if (Resolve) { ch = -1; rc = OP_MAIN_NEXT_UNDELETED; @@ -3061,7 +3061,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e } pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX; - if (OPT_RESOLVE) + if (Resolve) { ch = -1; rc = OP_NEXT_ENTRY; @@ -3081,7 +3081,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e first = 0; Context->msgnotreadyet = -1; pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX; - if (OPT_RESOLVE) + if (Resolve) { ch = -1; rc = OP_MAIN_NEXT_UNDELETED; @@ -3097,7 +3097,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e 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 (OPT_RESOLVE) + if (Resolve) { ch = -1; rc = OP_NEXT_ENTRY; @@ -3118,13 +3118,13 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e ch == OP_UNDELETE_THREAD ? 0 : 1); if (r != -1) { - if (OPT_RESOLVE) + if (Resolve) { rc = (ch == OP_DELETE_THREAD) ? OP_MAIN_NEXT_THREAD : OP_MAIN_NEXT_SUBTHREAD; ch = -1; } - if (!OPT_RESOLVE && PagerIndexLines) + if (!Resolve && PagerIndexLines) pager_menu->redraw = REDRAW_FULL; else pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX; @@ -3210,7 +3210,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e break; case OP_SIDEBAR_TOGGLE_VISIBLE: - OPT_SIDEBAR_VISIBLE = !OPT_SIDEBAR_VISIBLE; + SidebarVisible = !SidebarVisible; mutt_reflow_windows(); break; #endif diff --git a/parse.c b/parse.c index 547e92b8b..92399dbd6 100644 --- a/parse.c +++ b/parse.c @@ -1042,7 +1042,7 @@ int mutt_parse_rfc822_line(struct Envelope *e, struct Header *hdr, char *line, hdr->replied = true; break; case 'O': - hdr->old = OPT_MARK_OLD ? true : false; + hdr->old = MarkOld ? true : false; break; case 'R': hdr->read = true; @@ -1132,7 +1132,7 @@ int mutt_parse_rfc822_line(struct Envelope *e, struct Header *hdr, char *line, /* restore the original line */ line[strlen(line)] = ':'; - if (!(weed && OPT_WEED && mutt_matches_ignore(line))) + if (!(weed && Weed && mutt_matches_ignore(line))) { struct ListNode *np = mutt_list_insert_tail(&e->userhdrs, mutt_str_strdup(line)); if (do_2047) diff --git a/pattern.c b/pattern.c index 3bbb247db..ce15ae194 100644 --- a/pattern.c +++ b/pattern.c @@ -915,7 +915,7 @@ static int msg_search(struct Context *ctx, struct Pattern *pat, int msgno) msg = mx_open_message(ctx, msgno); if (msg) { - if (OPT_THOROUGH_SEARCH) + if (ThoroughSearch) { /* decode the header / body */ memset(&s, 0, sizeof(s)); @@ -1037,7 +1037,7 @@ static int msg_search(struct Context *ctx, struct Pattern *pat, int msgno) mx_close_message(ctx, &msg); - if (OPT_THOROUGH_SEARCH) + if (ThoroughSearch) { mutt_file_fclose(&fp); #ifdef USE_FMEMOPEN @@ -2083,7 +2083,7 @@ int mutt_search_command(int cur, int op) if (i > Context->vcount - 1) { i = 0; - if (OPT_WRAP_SEARCH) + if (WrapSearch) msg = _("Search wrapped to top."); else { @@ -2094,7 +2094,7 @@ int mutt_search_command(int cur, int op) else if (i < 0) { i = Context->vcount - 1; - if (OPT_WRAP_SEARCH) + if (WrapSearch) msg = _("Search wrapped to bottom."); else { diff --git a/pop.c b/pop.c index fd8d5356a..dbed2b849 100644 --- a/pop.c +++ b/pop.c @@ -383,7 +383,7 @@ static int pop_fetch_headers(struct Context *ctx) { if (bcached) ctx->hdrs[i]->read = true; - else if (OPT_MARK_OLD) + else if (MarkOld) ctx->hdrs[i]->old = true; } else @@ -414,7 +414,7 @@ static int pop_fetch_headers(struct Context *ctx) * clean up cache, i.e. wipe messages deleted outside * the availability of our cache */ - if (OPT_MESSAGE_CACHE_CLEAN) + if (MessageCacheClean) mutt_bcache_list(pop_data->bcache, msg_cache_check, (void *) ctx); mutt_clear_error(); @@ -884,7 +884,7 @@ void pop_fetch_mail(void) sscanf(buffer, "+OK %d %d", &msgs, &bytes); /* only get unread messages */ - if (msgs > 0 && OPT_POP_LAST) + if (msgs > 0 && PopLast) { mutt_str_strfcpy(buffer, "LAST\r\n", sizeof(buffer)); ret = pop_query(pop_data, buffer, sizeof(buffer)); @@ -903,8 +903,7 @@ void pop_fetch_mail(void) if (mx_open_mailbox(NONULL(SpoolFile), MUTT_APPEND, &ctx) == NULL) goto finish; - delanswer = - query_quadoption(OPT_POP_DELETE, _("Delete messages from server?")); + delanswer = query_quadoption(PopDelete, _("Delete messages from server?")); snprintf(msgbuf, sizeof(msgbuf), _("Reading new messages (%d bytes)..."), bytes); mutt_message("%s", msgbuf); diff --git a/pop_auth.c b/pop_auth.c index 749b413c6..d3183d2d9 100644 --- a/pop_auth.c +++ b/pop_auth.c @@ -380,7 +380,7 @@ int pop_authenticate(struct PopData *pop_data) if (ret != POP_A_UNAVAIL) attempts++; if (ret == POP_A_SUCCESS || ret == POP_A_SOCKET || - (ret == POP_A_FAILURE && !OPT_POP_AUTH_TRY_ALL)) + (ret == POP_A_FAILURE && !PopAuthTryAll)) { comma = NULL; break; @@ -417,8 +417,7 @@ int pop_authenticate(struct PopData *pop_data) if (ret != POP_A_UNAVAIL) attempts++; - if (ret == POP_A_SUCCESS || ret == POP_A_SOCKET || - (ret == POP_A_FAILURE && !OPT_POP_AUTH_TRY_ALL)) + if (ret == POP_A_SUCCESS || ret == POP_A_SOCKET || (ret == POP_A_FAILURE && !PopAuthTryAll)) { break; } diff --git a/pop_lib.c b/pop_lib.c index db9b15efa..049400977 100644 --- a/pop_lib.c +++ b/pop_lib.c @@ -321,13 +321,13 @@ int pop_open_connection(struct PopData *pop_data) #ifdef USE_SSL /* Attempt STLS if available and desired. */ - if (!pop_data->conn->ssf && (pop_data->cmd_stls || OPT_SSL_FORCE_TLS)) + if (!pop_data->conn->ssf && (pop_data->cmd_stls || SslForceTls)) { - if (OPT_SSL_FORCE_TLS) + if (SslForceTls) pop_data->use_stls = 2; if (pop_data->use_stls == 0) { - rc = query_quadoption(OPT_SSL_STARTTLS, _("Secure connection with TLS?")); + rc = query_quadoption(SslStarttls, _("Secure connection with TLS?")); if (rc == MUTT_ABORT) return -2; pop_data->use_stls = 1; @@ -366,7 +366,7 @@ int pop_open_connection(struct PopData *pop_data) } } - if (OPT_SSL_FORCE_TLS && !pop_data->conn->ssf) + if (SslForceTls && !pop_data->conn->ssf) { mutt_error(_("Encrypted connection unavailable")); mutt_sleep(1); @@ -642,7 +642,7 @@ int pop_reconnect(struct Context *ctx) if (ret < -1) return -1; - if (query_quadoption(OPT_POP_RECONNECT, + if (query_quadoption(PopReconnect, _("Connection lost. Reconnect to POP server?")) != MUTT_YES) return -1; } diff --git a/postpone.c b/postpone.c index 997e7855f..15252ffb6 100644 --- a/postpone.c +++ b/postpone.c @@ -219,7 +219,7 @@ static struct Header *select_msg(void) mutt_set_flag(PostContext, PostContext->hdrs[menu->current], MUTT_DELETE, (i == OP_DELETE) ? 1 : 0); PostCount = PostContext->msgcount - PostContext->deleted; - if (OPT_RESOLVE && menu->current < menu->max - 1) + if (Resolve && menu->current < menu->max - 1) { menu->oldcurrent = menu->current; menu->current++; @@ -319,10 +319,10 @@ int mutt_get_postponed(struct Context *ctx, struct Header *hdr, PostCount = PostContext->msgcount - PostContext->deleted; /* avoid the "purge deleted messages" prompt */ - opt_delete = OPT_DELETE; - OPT_DELETE = MUTT_YES; + opt_delete = Delete; + Delete = MUTT_YES; mx_close_mailbox(PostContext, NULL); - OPT_DELETE = opt_delete; + Delete = opt_delete; FREE(&PostContext); @@ -399,7 +399,7 @@ int mutt_get_postponed(struct Context *ctx, struct Header *hdr, FREE(&np); } - if (OPT_CRYPT_OPPORTUNISTIC_ENCRYPT) + if (CryptOpportunisticEncrypt) crypt_opportunistic_encrypt(hdr); return code; @@ -723,7 +723,7 @@ int mutt_prepare_template(FILE *fp, struct Context *ctx, struct Header *newhdr, /* 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 (OPT_SMIME_IS_DEFAULT) + if (SmimeIsDefault) newhdr->security &= ~APPLICATION_PGP; else newhdr->security &= ~APPLICATION_SMIME; diff --git a/recvattach.c b/recvattach.c index 0cb7e0db2..2a94f9d2a 100644 --- a/recvattach.c +++ b/recvattach.c @@ -560,7 +560,7 @@ void mutt_save_attachment_list(struct AttachCtx *actx, FILE *fp, bool tag, } if (!tag || top->tagged) { - if (!OPT_ATTACH_SPLIT) + if (!AttachSplit) { if (!buf[0]) { @@ -623,7 +623,7 @@ void mutt_save_attachment_list(struct AttachCtx *actx, FILE *fp, bool tag, menu->redraw |= REDRAW_MOTION; } - if (!OPT_ATTACH_SPLIT && (rc == 0)) + if (!AttachSplit && (rc == 0)) mutt_message(_("Attachment saved.")); } @@ -701,7 +701,7 @@ static void pipe_attachment_list(char *command, struct AttachCtx *actx, FILE *fp } if (!tag || top->tagged) { - if (!filter && !OPT_ATTACH_SPLIT) + if (!filter && !AttachSplit) pipe_attachment(fp, top, state); else query_pipe_attachment(command, fp, top, filter); @@ -733,13 +733,13 @@ void mutt_pipe_attachment_list(struct AttachCtx *actx, FILE *fp, bool tag, mutt_expand_path(buf, sizeof(buf)); - if (!filter && !OPT_ATTACH_SPLIT) + if (!filter && !AttachSplit) { mutt_endwin(NULL); thepid = mutt_create_filter(buf, &state.fpout, NULL, NULL); pipe_attachment_list(buf, actx, fp, tag, top, filter, &state); mutt_file_fclose(&state.fpout); - if (mutt_wait_filter(thepid) != 0 || OPT_WAIT_KEY) + if (mutt_wait_filter(thepid) != 0 || WaitKey) mutt_any_key_to_continue(NULL); } else @@ -791,7 +791,7 @@ static void print_attachment_list(struct AttachCtx *actx, FILE *fp, bool tag, if (!tag || top->tagged) { snprintf(type, sizeof(type), "%s/%s", TYPE(top), top->subtype); - if (!OPT_ATTACH_SPLIT && !rfc1524_mailcap_lookup(top, type, NULL, MUTT_PRINT)) + if (!AttachSplit && !rfc1524_mailcap_lookup(top, type, NULL, MUTT_PRINT)) { if ((mutt_str_strcasecmp("text/plain", top->subtype) == 0) || (mutt_str_strcasecmp("application/postscript", top->subtype) == 0)) @@ -833,12 +833,12 @@ void mutt_print_attachment_list(struct AttachCtx *actx, FILE *fp, bool tag, stru struct State state; pid_t thepid; - if (query_quadoption(OPT_PRINT, + if (query_quadoption(Print, tag ? _("Print tagged attachment(s)?") : _("Print attachment?")) != MUTT_YES) return; - if (!OPT_ATTACH_SPLIT) + if (!AttachSplit) { if (!can_print(actx, top, tag)) return; @@ -847,7 +847,7 @@ void mutt_print_attachment_list(struct AttachCtx *actx, FILE *fp, bool tag, stru thepid = mutt_create_filter(NONULL(PrintCommand), &state.fpout, NULL, NULL); print_attachment_list(actx, fp, tag, top, &state); mutt_file_fclose(&state.fpout); - if (mutt_wait_filter(thepid) != 0 || OPT_WAIT_KEY) + if (mutt_wait_filter(thepid) != 0 || WaitKey) mutt_any_key_to_continue(NULL); } else @@ -912,7 +912,7 @@ int mutt_attach_display_loop(struct Menu *menu, int op, struct Header *hdr, switch (op) { case OP_DISPLAY_HEADERS: - OPT_WEED = !OPT_WEED; + Weed = !Weed; /* fallthrough */ case OP_VIEW_ATTACH: @@ -1084,7 +1084,7 @@ void mutt_attach_init(struct AttachCtx *actx) /* OR an inner container is of type 'multipart/digest' */ actx->idx[i]->content->collapsed = - (OPT_DIGEST_COLLAPSE && + (DigestCollapse && (digest || ((actx->idx[i]->content->type == TYPEMULTIPART) && (mutt_str_strcasecmp(actx->idx[i]->content->subtype, "digest") == 0)))); @@ -1125,7 +1125,7 @@ static void attach_collapse(struct AttachCtx *actx, struct Menu *menu) while ((rindex < actx->idxlen) && (actx->idx[rindex]->level > curlevel)) { - if (OPT_DIGEST_COLLAPSE && actx->idx[rindex]->content->type == TYPEMULTIPART && + if (DigestCollapse && actx->idx[rindex]->content->type == TYPEMULTIPART && !mutt_str_strcasecmp(actx->idx[rindex]->content->subtype, "digest")) { actx->idx[rindex]->content->collapsed = true; @@ -1248,7 +1248,7 @@ void mutt_view_attachments(struct Header *hdr) mutt_save_attachment_list(actx, CURATTACH->fp, menu->tagprefix, CURATTACH->content, hdr, menu); - if (!menu->tagprefix && OPT_RESOLVE && menu->current < menu->max - 1) + if (!menu->tagprefix && Resolve && menu->current < menu->max - 1) menu->current++; menu->redraw = REDRAW_MOTION_RESYNCH | REDRAW_FULL; @@ -1291,7 +1291,7 @@ void mutt_view_attachments(struct Header *hdr) if (CURATTACH->parent_type == TYPEMULTIPART) { CURATTACH->content->deleted = true; - if (OPT_RESOLVE && menu->current < menu->max - 1) + if (Resolve && menu->current < menu->max - 1) { menu->current++; menu->redraw = REDRAW_MOTION_RESYNCH; @@ -1327,7 +1327,7 @@ void mutt_view_attachments(struct Header *hdr) if (!menu->tagprefix) { CURATTACH->content->deleted = false; - if (OPT_RESOLVE && menu->current < menu->max - 1) + if (Resolve && menu->current < menu->max - 1) { menu->current++; menu->redraw = REDRAW_MOTION_RESYNCH; @@ -1383,7 +1383,7 @@ void mutt_view_attachments(struct Header *hdr) if (!CURATTACH->content->hdr->env->followup_to || (mutt_str_strcasecmp(CURATTACH->content->hdr->env->followup_to, "poster") != 0) || - (query_quadoption(OPT_FOLLOWUP_TO_POSTER, + (query_quadoption(FollowupToPoster, _("Reply by mail as poster prefers?")) != MUTT_YES)) { mutt_attach_reply(CURATTACH->fp, hdr, actx, diff --git a/recvcmd.c b/recvcmd.c index 213628fbf..bca4b27fb 100644 --- a/recvcmd.c +++ b/recvcmd.c @@ -207,7 +207,7 @@ void mutt_attach_bounce(FILE *fp, struct AttachCtx *actx, struct Body *cur) else mutt_str_strcat(prompt, sizeof(prompt), "?"); - if (query_quadoption(OPT_BOUNCE, prompt) != MUTT_YES) + if (query_quadoption(Bounce, prompt) != MUTT_YES) { mutt_addr_free(&adr); mutt_window_clearline(MuttMessageWindow, 0); @@ -333,14 +333,14 @@ static void include_header(int quote, FILE *ifp, struct Header *hdr, FILE *ofp, int chflags = CH_DECODE; char prefix2[SHORT_STRING]; - if (OPT_WEED) + if (Weed) chflags |= CH_WEED | CH_REORDER; if (quote) { if (prefix) mutt_str_strfcpy(prefix2, prefix, sizeof(prefix2)); - else if (!OPT_TEXT_FLOWED) + else if (!TextFlowed) mutt_make_string_flags(prefix2, sizeof(prefix2), NONULL(IndentString), Context, hdr, 0); else @@ -431,16 +431,16 @@ static void attach_forward_bodies(FILE *fp, struct Header *hdr, struct AttachCtx /* prepare the prefix here since we'll need it later. */ - if (OPT_FORWARD_QUOTE) + if (ForwardQuote) { - if (!OPT_TEXT_FLOWED) + if (!TextFlowed) mutt_make_string_flags(prefix, sizeof(prefix), NONULL(IndentString), Context, parent_hdr, 0); else mutt_str_strfcpy(prefix, ">", sizeof(prefix)); } - include_header(OPT_FORWARD_QUOTE, parent_fp, parent_hdr, tmpfp, prefix); + include_header(ForwardQuote, parent_fp, parent_hdr, tmpfp, prefix); /* * Now, we have prepared the first part of the message body: The @@ -451,7 +451,7 @@ static void attach_forward_bodies(FILE *fp, struct Header *hdr, struct AttachCtx */ if ((!cur || mutt_can_decode(cur)) && - (rc = query_quadoption(OPT_MIME_FORWARD, _("Forward as attachments?"))) == MUTT_YES) + (rc = query_quadoption(MimeForward, _("Forward as attachments?"))) == MUTT_YES) { mime_fwd_all = true; } @@ -467,9 +467,7 @@ static void attach_forward_bodies(FILE *fp, struct Header *hdr, struct AttachCtx if (!mime_fwd_all && !cur && (nattach > 1) && !check_can_decode(actx, cur)) { - rc = query_quadoption( - OPT_MIME_FORWARD_REST, - _("Can't decode all tagged attachments. MIME-forward the others?")); + rc = query_quadoption(MimeForwardRest, _("Can't decode all tagged attachments. MIME-forward the others?")); if (rc == MUTT_ABORT) goto bail; else if (rc == MUTT_NO) @@ -480,10 +478,10 @@ static void attach_forward_bodies(FILE *fp, struct Header *hdr, struct AttachCtx memset(&st, 0, sizeof(st)); - if (OPT_FORWARD_QUOTE) + if (ForwardQuote) st.prefix = prefix; st.flags = MUTT_CHARCONV; - if (OPT_WEED) + if (Weed) st.flags |= MUTT_WEED; st.fpout = tmpfp; @@ -591,7 +589,7 @@ static void attach_forward_msgs(FILE *fp, struct AttachCtx *actx, struct Body *c tmpbody[0] = '\0'; - rc = query_quadoption(OPT_MIME_FORWARD, _("Forward MIME encapsulated?")); + rc = query_quadoption(MimeForward, _("Forward MIME encapsulated?")); if (rc == MUTT_NO) { /* no MIME encapsulation */ @@ -605,16 +603,16 @@ static void attach_forward_msgs(FILE *fp, struct AttachCtx *actx, struct Body *c return; } - if (OPT_FORWARD_QUOTE) + if (ForwardQuote) { chflags |= CH_PREFIX; cmflags |= MUTT_CM_PREFIX; } - if (OPT_FORWARD_DECODE) + if (ForwardDecode) { cmflags |= MUTT_CM_DECODE | MUTT_CM_CHARCONV; - if (OPT_WEED) + if (Weed) { chflags |= CH_WEED | CH_REORDER; cmflags |= MUTT_CM_WEED; @@ -790,9 +788,9 @@ static void attach_include_reply(FILE *fp, FILE *tmpfp, struct Header *cur) mutt_make_attribution(Context, cur, tmpfp); - if (!OPT_HEADER) + if (!Header) cmflags |= MUTT_CM_NOHEADER; - if (OPT_WEED) + if (Weed) { chflags |= CH_WEED; cmflags |= MUTT_CM_WEED; @@ -845,9 +843,7 @@ void mutt_attach_reply(FILE *fp, struct Header *hdr, struct AttachCtx *actx, if (nattach > 1 && !check_can_decode(actx, cur)) { - rc = query_quadoption(OPT_MIME_FORWARD_REST, - _("Can't decode all tagged attachments. " - "MIME-encapsulate the others?")); + rc = query_quadoption(MimeForwardRest, _("Can't decode all tagged attachments. MIME-encapsulate the others?")); if (rc == MUTT_ABORT) return; else if (rc == MUTT_YES) @@ -895,7 +891,7 @@ void mutt_attach_reply(FILE *fp, struct Header *hdr, struct AttachCtx *actx, memset(&st, 0, sizeof(struct State)); st.fpout = tmpfp; - if (!OPT_TEXT_FLOWED) + if (!TextFlowed) mutt_make_string_flags(prefix, sizeof(prefix), NONULL(IndentString), Context, parent_hdr, 0); else @@ -904,10 +900,10 @@ void mutt_attach_reply(FILE *fp, struct Header *hdr, struct AttachCtx *actx, st.prefix = prefix; st.flags = MUTT_CHARCONV; - if (OPT_WEED) + if (Weed) st.flags |= MUTT_WEED; - if (OPT_HEADER) + if (Header) include_header(1, parent_fp, parent_hdr, tmpfp, prefix); if (cur) diff --git a/rfc1524.c b/rfc1524.c index 1400a7a01..af446ab23 100644 --- a/rfc1524.c +++ b/rfc1524.c @@ -69,7 +69,7 @@ int rfc1524_expand_command(struct Body *a, char *filename, char *type, char *com mutt_str_strfcpy(type2, type, sizeof(type2)); - if (OPT_MAILCAP_SANITIZE) + if (MailcapSanitize) mutt_file_sanitize_filename(type2, 0); while (x < clen - 1 && command[x] && y < sizeof(buf) - 1) @@ -96,7 +96,7 @@ int rfc1524_expand_command(struct Body *a, char *filename, char *type, char *com pvalue2 = mutt_param_get(param, a->parameter); mutt_str_strfcpy(pvalue, NONULL(pvalue2), sizeof(pvalue)); - if (OPT_MAILCAP_SANITIZE) + if (MailcapSanitize) mutt_file_sanitize_filename(pvalue, 0); y += mutt_file_quote_filename(buf + y, sizeof(buf) - y, pvalue); diff --git a/rfc2047.c b/rfc2047.c index 4399596c5..c880b8bd3 100644 --- a/rfc2047.c +++ b/rfc2047.c @@ -810,7 +810,7 @@ void rfc2047_decode(char **pd) if (!p) { /* no encoded words */ - if (OPT_IGNORE_LINEAR_WHITE_SPACE) + if (IgnoreLinearWhiteSpace) { n = mutt_str_strlen(s); if (found_encoded && (m = mutt_str_lws_len(s, n)) != 0) @@ -849,7 +849,7 @@ void rfc2047_decode(char **pd) n = (size_t)(p - s); /* ignore spaces between encoded word * and linear-white-space between encoded word and *text */ - if (OPT_IGNORE_LINEAR_WHITE_SPACE) + if (IgnoreLinearWhiteSpace) { if (found_encoded && (m = mutt_str_lws_len(s, n)) != 0) { diff --git a/rfc2231.c b/rfc2231.c index d935a2f85..2aaf268fb 100644 --- a/rfc2231.c +++ b/rfc2231.c @@ -246,7 +246,7 @@ void rfc2231_decode_parameters(struct Parameter **headp) * Internet Gateways. So we actually decode it. */ - if (OPT_RFC2047_PARAMETERS && p->value && strstr(p->value, "=?")) + if (Rfc2047Parameters && p->value && strstr(p->value, "=?")) rfc2047_decode(&p->value); else if (AssumedCharset && *AssumedCharset) convert_nonmime_string(&p->value); diff --git a/rfc3676.c b/rfc3676.c index 6ca10345d..89a34d32c 100644 --- a/rfc3676.c +++ b/rfc3676.c @@ -76,13 +76,13 @@ static int get_quote_level(const char *line) */ static int space_quotes(struct State *s) { - /* Allow quote spacing in the pager even for OPT_TEXT_FLOWED, + /* Allow quote spacing in the pager even for TextFlowed, * but obviously not when replying. */ - if (OPT_TEXT_FLOWED && (s->flags & MUTT_REPLYING)) + if (TextFlowed && (s->flags & MUTT_REPLYING)) return 0; - return OPT_REFLOW_SPACE_QUOTES; + return ReflowSpaceQuotes; } /** @@ -105,7 +105,7 @@ static bool add_quote_suffix(struct State *s, int ql) return false; /* The prefix will add its own space */ - if (!OPT_TEXT_FLOWED && !ql && s->prefix) + if (!TextFlowed && !ql && s->prefix) return false; return true; @@ -120,7 +120,7 @@ static size_t print_indent(int ql, struct State *s, int add_suffix) /* use given prefix only for format=fixed replies to format=flowed, * for format=flowed replies to format=flowed, use '>' indentation */ - if (OPT_TEXT_FLOWED) + if (TextFlowed) ql++; else { @@ -162,7 +162,7 @@ static void flush_par(struct State *s, struct FlowedState *fst) static int quote_width(struct State *s, int ql) { int width = mutt_window_wrap_cols(MuttIndexWindow, ReflowWrap); - if (OPT_TEXT_FLOWED && (s->flags & MUTT_REPLYING)) + if (TextFlowed && (s->flags & MUTT_REPLYING)) { /* When replying, force a wrap at FLOWED_MAX to comply with RFC3676 * guidelines */ @@ -230,7 +230,7 @@ static void print_flowed_line(char *line, struct State *s, int ql, { 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 (OPT_TEXT_FLOWED) + if (TextFlowed) for (; fst->spaces; fst->spaces--) state_putc(' ', s); state_putc('\n', s); diff --git a/score.c b/score.c index a1644fa27..92ccdefcf 100644 --- a/score.c +++ b/score.c @@ -51,7 +51,7 @@ static struct Score *ScoreList = NULL; void mutt_check_rescore(struct Context *ctx) { - if (OPT_NEED_RESCORE && OPT_SCORE) + if (OPT_NEED_RESCORE && Score) { if ((Sort & SORT_MASK) == SORT_SCORE || (SortAux & SORT_MASK) == SORT_SCORE) { diff --git a/send.c b/send.c index e2bb5d4a1..9fba54f06 100644 --- a/send.c +++ b/send.c @@ -74,7 +74,7 @@ static void append_signature(FILE *f) if (Signature && (tmpfp = mutt_open_read(Signature, &thepid))) { - if (OPT_SIG_DASHES) + if (SigDashes) fputs("\n-- \n", f); mutt_file_copy_stream(tmpfp, f); mutt_file_fclose(&tmpfp); @@ -237,7 +237,7 @@ static int edit_envelope(struct Envelope *en, int flags) mutt_str_strfcpy(buf, en->followup_to, sizeof(buf)); else buf[0] = 0; - if (OPT_ASK_FOLLOW_UP && mutt_get_field("Followup-To: ", buf, sizeof(buf), 0) != 0) + if (AskFollowUp && mutt_get_field("Followup-To: ", buf, sizeof(buf), 0) != 0) { return -1; } @@ -248,7 +248,7 @@ static int edit_envelope(struct Envelope *en, int flags) mutt_str_strfcpy(buf, en->x_comment_to, sizeof(buf)); else buf[0] = 0; - if (OPT_X_COMMENT_TO && OPT_ASK_X_COMMENT_TO && + if (XCommentTo && AskXCommentTo && mutt_get_field("X-Comment-To: ", buf, sizeof(buf), 0) != 0) { return -1; @@ -261,18 +261,18 @@ static int edit_envelope(struct Envelope *en, int flags) { if (edit_address(&en->to, _("To: ")) == -1 || en->to == NULL) return -1; - if (OPT_ASKCC && edit_address(&en->cc, _("Cc: ")) == -1) + if (Askcc && edit_address(&en->cc, _("Cc: ")) == -1) return -1; - if (OPT_ASKBCC && edit_address(&en->bcc, _("Bcc: ")) == -1) + if (Askbcc && edit_address(&en->bcc, _("Bcc: ")) == -1) return -1; - if (OPT_REPLY_WITH_XORIG && (flags & (SENDREPLY | SENDLISTREPLY | SENDGROUPREPLY)) && + if (ReplyWithXorig && (flags & (SENDREPLY | SENDLISTREPLY | SENDGROUPREPLY)) && (edit_address(&en->from, "From: ") == -1)) return -1; } if (en->subject) { - if (OPT_FAST_REPLY) + if (FastReply) return 0; else mutt_str_strfcpy(buf, en->subject, sizeof(buf)); @@ -294,8 +294,7 @@ static int edit_envelope(struct Envelope *en, int flags) } if (mutt_get_field(_("Subject: "), buf, sizeof(buf), 0) != 0 || - (!buf[0] && - query_quadoption(OPT_ABORT_NOSUBJECT, _("No subject, abort?")) != MUTT_NO)) + (!buf[0] && query_quadoption(AbortNosubject, _("No subject, abort?")) != MUTT_NO)) { mutt_message(_("No subject, aborting.")); return -1; @@ -415,7 +414,7 @@ static int include_forward(struct Context *ctx, struct Header *cur, FILE *out) mutt_parse_mime_message(ctx, cur); mutt_message_hook(ctx, cur, MUTT_MESSAGEHOOK); - if (WithCrypto && (cur->security & ENCRYPT) && OPT_FORWARD_DECODE) + if (WithCrypto && (cur->security & ENCRYPT) && ForwardDecode) { /* make sure we have the user's passphrase before proceeding... */ if (!crypt_valid_passphrase(cur->security)) @@ -424,16 +423,16 @@ static int include_forward(struct Context *ctx, struct Header *cur, FILE *out) mutt_forward_intro(ctx, cur, out); - if (OPT_FORWARD_DECODE) + if (ForwardDecode) { cmflags |= MUTT_CM_DECODE | MUTT_CM_CHARCONV; - if (OPT_WEED) + if (Weed) { chflags |= CH_WEED | CH_REORDER; cmflags |= MUTT_CM_WEED; } } - if (OPT_FORWARD_QUOTE) + if (ForwardQuote) cmflags |= MUTT_CM_PREFIX; /* wrapping headers for forwarding is considered a display @@ -486,9 +485,9 @@ static int include_reply(struct Context *ctx, struct Header *cur, FILE *out) mutt_make_attribution(ctx, cur, out); - if (!OPT_HEADER) + if (!Header) cmflags |= MUTT_CM_NOHEADER; - if (OPT_WEED) + if (Weed) { chflags |= CH_WEED | CH_REORDER; cmflags |= MUTT_CM_WEED; @@ -517,7 +516,7 @@ static int default_to(struct Address **to, struct Envelope *env, int flags, int if (flags & SENDLISTREPLY) return 0; - if (!OPT_REPLY_SELF && mutt_addr_is_user(env->from)) + if (!ReplySelf && mutt_addr_is_user(env->from)) { /* mail is from the user, assume replying to recipients */ mutt_addr_append(to, env->to, true); @@ -526,7 +525,7 @@ static int default_to(struct Address **to, struct Envelope *env, int flags, int { if ((mutt_addr_cmp(env->from, env->reply_to) && !env->reply_to->next && !env->reply_to->personal) || - (OPT_IGNORE_LIST_REPLY_TO && mutt_is_mail_list(env->reply_to) && + (IgnoreListReplyTo && mutt_is_mail_list(env->reply_to) && (mutt_addr_search(env->reply_to, env->to) || mutt_addr_search(env->reply_to, env->cc)))) { @@ -541,7 +540,7 @@ static int default_to(struct Address **to, struct Envelope *env, int flags, int mutt_addr_append(to, env->from, false); } else if (!(mutt_addr_cmp(env->from, env->reply_to) && !env->reply_to->next) && - OPT_REPLY_TO != MUTT_YES) + ReplyTo != MUTT_YES) { /* There are quite a few mailing lists which set the Reply-To: * header field to the list address, which makes it quite impossible @@ -553,7 +552,7 @@ static int default_to(struct Address **to, struct Envelope *env, int flags, int If she says no, neomutt will reply to the from header's address instead. */ snprintf(prompt, sizeof(prompt), _("Reply to %s%s?"), env->reply_to->mailbox, env->reply_to->next ? ",..." : ""); - switch (query_quadoption(OPT_REPLY_TO, prompt)) + switch (query_quadoption(ReplyTo, prompt)) { case MUTT_YES: mutt_addr_append(to, env->reply_to, false); @@ -588,7 +587,7 @@ int mutt_fetch_recips(struct Envelope *out, struct Envelope *in, int flags) in->mail_followup_to->mailbox, in->mail_followup_to->next ? ",..." : ""); - hmfupto = query_quadoption(OPT_HONOR_FOLLOWUP_TO, prompt); + hmfupto = query_quadoption(HonorFollowupTo, prompt); if (hmfupto == MUTT_ABORT) return -1; } @@ -642,13 +641,13 @@ static void add_message_id(struct ListHead *head, struct Envelope *e) void mutt_fix_reply_recipients(struct Envelope *env) { - if (!OPT_METOO) + if (!Metoo) { /* the order is important here. do the CC: first so that if the * the user is the only recipient, it ends up on the TO: field */ env->cc = remove_user(env->cc, (env->to == NULL)); - env->to = remove_user(env->to, (env->cc == NULL) || OPT_REPLY_SELF); + env->to = remove_user(env->to, (env->cc == NULL) || ReplySelf); } /* the CC field can get cluttered, especially with lists */ @@ -700,7 +699,7 @@ void mutt_add_to_reference_headers(struct Envelope *env, struct Envelope *curenv add_message_id(&env->in_reply_to, curenv); #ifdef USE_NNTP - if (OPT_NEWS_SEND && OPT_X_COMMENT_TO && curenv->from) + if (OPT_NEWS_SEND && XCommentTo && curenv->from) env->x_comment_to = mutt_str_strdup(mutt_get_name(curenv->from)); #endif } @@ -806,7 +805,7 @@ static int envelope_defaults(struct Envelope *env, struct Context *ctx, else if (flags & SENDFORWARD) { mutt_make_forward_subject(env, ctx, cur); - if (OPT_FORWARD_REFERENCES) + if (ForwardReferences) make_reference_headers(tag ? NULL : curenv, env, ctx); } @@ -831,7 +830,7 @@ static int generate_body(FILE *tempfp, struct Header *msg, int flags, if (flags & SENDREPLY) { - i = query_quadoption(OPT_INCLUDE, _("Include message in reply?")); + i = query_quadoption(Include, _("Include message in reply?")); if (i == MUTT_ABORT) return -1; @@ -859,7 +858,7 @@ static int generate_body(FILE *tempfp, struct Header *msg, int flags, } else if (flags & SENDFORWARD) { - i = query_quadoption(OPT_MIME_FORWARD, _("Forward as attachment?")); + i = query_quadoption(MimeForward, _("Forward as attachment?")); if (i == MUTT_YES) { struct Body *last = msg->content; @@ -938,7 +937,7 @@ void mutt_set_followup_to(struct Envelope *e) * it hasn't already been set */ - if (!OPT_FOLLOWUP_TO) + if (!FollowupTo) return; #ifdef USE_NNTP if (OPT_NEWS_SEND) @@ -1028,7 +1027,7 @@ static struct Address *set_reverse_name(struct Envelope *env) /* when $reverse_realname is not set, clear the personal name so that it * may be set vi a reply- or send-hook. */ - if (!OPT_REVERSE_REALNAME) + if (!ReverseRealname) FREE(&tmp->personal); } return tmp; @@ -1046,7 +1045,7 @@ struct Address *mutt_default_from(void) if (From) adr = mutt_addr_copy(From); - else if (OPT_USE_DOMAIN) + else if (UseDomain) { adr = mutt_addr_new(); adr->mailbox = @@ -1078,9 +1077,9 @@ static int send_message(struct Header *msg) return -1; #ifdef USE_SMTP - old_write_bcc = OPT_WRITE_BCC; + old_write_bcc = WriteBcc; if (SmtpUrl) - OPT_WRITE_BCC = false; + WriteBcc = false; #endif #ifdef MIXMASTER mutt_write_rfc822_header(tempfp, msg->env, msg->content, 0, !STAILQ_EMPTY(&msg->chain)); @@ -1090,7 +1089,7 @@ static int send_message(struct Header *msg) #endif #ifdef USE_SMTP if (old_write_bcc) - OPT_WRITE_BCC = true; + WriteBcc = true; #endif fputc('\n', tempfp); /* tie off the header. */ @@ -1211,7 +1210,7 @@ int mutt_resend_message(FILE *fp, struct Context *ctx, struct Header *cur) * so fix that here */ if (!(msg->security & (APPLICATION_SMIME | APPLICATION_PGP))) { - if ((WithCrypto & APPLICATION_SMIME) && OPT_SMIME_IS_DEFAULT) + if ((WithCrypto & APPLICATION_SMIME) && SmimeIsDefault) msg->security |= APPLICATION_SMIME; else if (WithCrypto & APPLICATION_PGP) msg->security |= APPLICATION_PGP; @@ -1219,7 +1218,7 @@ int mutt_resend_message(FILE *fp, struct Context *ctx, struct Header *cur) msg->security |= APPLICATION_SMIME; } - if (OPT_CRYPT_OPPORTUNISTIC_ENCRYPT) + if (CryptOpportunisticEncrypt) { msg->security |= OPPENCRYPT; crypt_opportunistic_encrypt(msg); @@ -1306,12 +1305,12 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile, OPT_NEWS_SEND = false; #endif - if (!flags && !msg && OPT_RECALL != MUTT_NO && mutt_num_postponed(1)) + if (!flags && !msg && Recall != MUTT_NO && mutt_num_postponed(1)) { /* If the user is composing a new message, check to see if there * are any postponed messages first. */ - i = query_quadoption(OPT_RECALL, _("Recall postponed message?")); + i = query_quadoption(Recall, _("Recall postponed message?")); if (i == MUTT_ABORT) return rc; @@ -1426,7 +1425,7 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile, } /* this is handled here so that the user can match ~f in send-hook */ - if (cur && OPT_REVERSE_NAME && !(flags & (SENDPOSTPONED | SENDRESEND))) + if (cur && ReverseName && !(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 @@ -1445,7 +1444,7 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile, msg->env->from->mailbox); msg->env->from = set_reverse_name(cur->env); } - if (cur && OPT_REPLY_WITH_XORIG && !(flags & (SENDPOSTPONED | SENDRESEND | SENDFORWARD))) + if (cur && ReplyWithXorig && !(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 @@ -1453,7 +1452,7 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile, * line option. * * If there is already a from address recorded in `msg->env->from', - * then it theoretically comes from OPT_REVERSE_NAME handling, and we don't use + * then it theoretically comes from ReverseName handling, and we don't use * the `X-Orig-To header'. */ if (cur->env->x_original_to && !msg->env->from) @@ -1466,8 +1465,7 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile, } } - if (!(flags & (SENDPOSTPONED | SENDRESEND)) && - !((flags & SENDDRAFTFILE) && OPT_RESUME_DRAFT_FILES)) + if (!(flags & (SENDPOSTPONED | SENDRESEND)) && !((flags & SENDDRAFTFILE) && ResumeDraftFiles)) { if ((flags & (SENDREPLY | SENDFORWARD)) && ctx && envelope_defaults(msg->env, ctx, cur, flags) == -1) @@ -1475,7 +1473,7 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile, goto cleanup; } - if (OPT_HDRS) + if (Hdrs) process_user_recips(msg->env); /* Expand aliases and remove duplicates/crossrefs */ @@ -1489,8 +1487,8 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile, msg->env->newsgroups = mutt_str_strdup(((struct NntpData *) ctx->data)->group); #endif - if (!(flags & (SENDMAILX | SENDBATCH)) && !(OPT_AUTOEDIT && OPT_EDIT_HEADERS) && - !((flags & SENDREPLY) && OPT_FAST_REPLY)) + if (!(flags & (SENDMAILX | SENDBATCH)) && !(Autoedit && EditHeaders) && + !((flags & SENDREPLY) && FastReply)) { if (edit_envelope(msg->env, flags) == -1) goto cleanup; @@ -1534,7 +1532,7 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile, if (!(flags & SENDKEY)) { - if (OPT_TEXT_FLOWED && msg->content->type == TYPETEXT && + if (TextFlowed && msg->content->type == TYPETEXT && (mutt_str_strcasecmp(msg->content->subtype, "plain") == 0)) { mutt_param_set("format", "flowed", &msg->content->parameter); @@ -1545,19 +1543,19 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile, if (killfrom) { mutt_addr_free(&msg->env->from); - if (OPT_USE_FROM && !(flags & (SENDPOSTPONED | SENDRESEND))) + if (UseFrom && !(flags & (SENDPOSTPONED | SENDRESEND))) msg->env->from = mutt_default_from(); killfrom = false; } - if (OPT_HDRS) + if (Hdrs) process_user_header(msg->env); if (flags & SENDBATCH) mutt_file_copy_stream(stdin, tempfp); - if (OPT_SIG_ON_TOP && !(flags & (SENDMAILX | SENDKEY | SENDBATCH)) && - Editor && (mutt_str_strcmp(Editor, "builtin") != 0)) + if (SigOnTop && !(flags & (SENDMAILX | SENDKEY | SENDBATCH)) && Editor && + (mutt_str_strcmp(Editor, "builtin") != 0)) { append_signature(tempfp); } @@ -1569,8 +1567,8 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile, goto cleanup; } - if (!OPT_SIG_ON_TOP && !(flags & (SENDMAILX | SENDKEY | SENDBATCH)) && - Editor && (mutt_str_strcmp(Editor, "builtin") != 0)) + if (!SigOnTop && !(flags & (SENDMAILX | SENDKEY | SENDBATCH)) && Editor && + (mutt_str_strcmp(Editor, "builtin") != 0)) { append_signature(tempfp); } @@ -1614,8 +1612,8 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile, * recipients. */ if (!(flags & SENDKEY) && - ((flags & SENDFORWARD) == 0 || (OPT_EDIT_HEADERS && OPT_AUTOEDIT) || - query_quadoption(OPT_FORWARD_EDIT, _("Edit forwarded message?")) == MUTT_YES)) + ((flags & SENDFORWARD) == 0 || (EditHeaders && Autoedit) || + query_quadoption(ForwardEdit, _("Edit forwarded message?")) == MUTT_YES)) { /* If the this isn't a text message, look for a mailcap edit command */ if (mutt_needs_mailcap(msg->content)) @@ -1625,7 +1623,7 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile, } else if (!Editor || (mutt_str_strcmp("builtin", Editor) == 0)) mutt_builtin_editor(msg->content->filename, msg, cur); - else if (OPT_EDIT_HEADERS) + else if (EditHeaders) { mutt_env_to_local(msg->env); mutt_edit_headers(Editor, msg->content->filename, msg, fcc, sizeof(fcc)); @@ -1648,7 +1646,7 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile, * performed. If it has already been performed, the format=flowed * parameter will be present. */ - if (OPT_TEXT_FLOWED && msg->content->type == TYPETEXT && + if (TextFlowed && msg->content->type == TYPETEXT && (mutt_str_strcasecmp("plain", msg->content->subtype) == 0)) { char *p = mutt_param_get("format", msg->content->parameter); @@ -1665,8 +1663,7 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile, { /* if the file was not modified, bail out now */ if (mtime == st.st_mtime && !msg->content->next && - query_quadoption(OPT_ABORT_UNMODIFIED, - _("Abort unmodified message?")) == MUTT_YES) + query_quadoption(AbortUnmodified, _("Abort unmodified message?")) == MUTT_YES) { mutt_message(_("Aborted unmodified message.")); goto cleanup; @@ -1692,26 +1689,26 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile, if (WithCrypto && (msg->security == 0) && !(flags & (SENDBATCH | SENDMAILX | SENDPOSTPONED | SENDRESEND))) { - if (OPT_CRYPT_AUTOSIGN) + if (CryptAutosign) msg->security |= SIGN; - if (OPT_CRYPT_AUTOENCRYPT) + if (CryptAutoencrypt) msg->security |= ENCRYPT; - if (OPT_CRYPT_REPLYENCRYPT && cur && (cur->security & ENCRYPT)) + if (CryptReplyencrypt && cur && (cur->security & ENCRYPT)) msg->security |= ENCRYPT; - if (OPT_CRYPT_REPLYSIGN && cur && (cur->security & SIGN)) + if (CryptReplysign && cur && (cur->security & SIGN)) msg->security |= SIGN; - if (OPT_CRYPT_REPLYSIGNENCRYPTED && cur && (cur->security & ENCRYPT)) + if (CryptReplysignencrypted && cur && (cur->security & ENCRYPT)) msg->security |= SIGN; if ((WithCrypto & APPLICATION_PGP) && - ((msg->security & (ENCRYPT | SIGN)) || OPT_CRYPT_OPPORTUNISTIC_ENCRYPT)) + ((msg->security & (ENCRYPT | SIGN)) || CryptOpportunisticEncrypt)) { - if (OPT_PGP_AUTOINLINE) + if (PgpAutoinline) msg->security |= INLINE; - if (OPT_PGP_REPLYINLINE && cur && (cur->security & INLINE)) + if (PgpReplyinline && cur && (cur->security & INLINE)) msg->security |= INLINE; } - if (msg->security || OPT_CRYPT_OPPORTUNISTIC_ENCRYPT) + if (msg->security || CryptOpportunisticEncrypt) { /* * When replying / forwarding, use the original message's @@ -1724,12 +1721,11 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile, */ if (cur) { - if ((WithCrypto & APPLICATION_PGP) && OPT_CRYPT_AUTOPGP && - (cur->security & APPLICATION_PGP)) + if ((WithCrypto & APPLICATION_PGP) && CryptAutopgp && (cur->security & APPLICATION_PGP)) { msg->security |= APPLICATION_PGP; } - else if ((WithCrypto & APPLICATION_SMIME) && OPT_CRYPT_AUTOSMIME && + else if ((WithCrypto & APPLICATION_SMIME) && CryptAutosmime && (cur->security & APPLICATION_SMIME)) { msg->security |= APPLICATION_SMIME; @@ -1742,15 +1738,15 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile, */ if (!(msg->security & (APPLICATION_SMIME | APPLICATION_PGP))) { - if ((WithCrypto & APPLICATION_SMIME) && OPT_CRYPT_AUTOSMIME && OPT_SMIME_IS_DEFAULT) + if ((WithCrypto & APPLICATION_SMIME) && CryptAutosmime && SmimeIsDefault) { msg->security |= APPLICATION_SMIME; } - else if ((WithCrypto & APPLICATION_PGP) && OPT_CRYPT_AUTOPGP) + else if ((WithCrypto & APPLICATION_PGP) && CryptAutopgp) { msg->security |= APPLICATION_PGP; } - else if ((WithCrypto & APPLICATION_SMIME) && OPT_CRYPT_AUTOSMIME) + else if ((WithCrypto & APPLICATION_SMIME) && CryptAutosmime) { msg->security |= APPLICATION_SMIME; } @@ -1758,10 +1754,10 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile, } /* opportunistic encrypt relies on SMIME or PGP already being selected */ - if (OPT_CRYPT_OPPORTUNISTIC_ENCRYPT) + if (CryptOpportunisticEncrypt) { - /* If something has already enabled encryption, e.g. OPT_CRYPT_AUTOENCRYPT - * or OPT_CRYPT_REPLYENCRYPT, then don't enable opportunistic encrypt for + /* If something has already enabled encryption, e.g. CryptAutoencrypt + * or CryptReplyencrypt, then don't enable opportunistic encrypt for * the message. */ if (!(msg->security & ENCRYPT)) @@ -1779,7 +1775,7 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile, /* specify a default fcc. if we are in batchmode, only save a copy of * the message if the value of $copy is yes or ask-yes */ - if (!fcc[0] && !(flags & (SENDPOSTPONEDFCC)) && (!(flags & SENDBATCH) || (OPT_COPY & 0x1))) + if (!fcc[0] && !(flags & (SENDPOSTPONEDFCC)) && (!(flags & SENDBATCH) || (Copy & 0x1))) { /* set the default FCC */ if (!msg->env->from) @@ -1823,7 +1819,7 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile, if (msg->content->next) msg->content = mutt_make_multipart(msg->content); - if (WithCrypto && OPT_POSTPONE_ENCRYPT && (msg->security & ENCRYPT)) + if (WithCrypto && PostponeEncrypt && (msg->security & ENCRYPT)) { char *encrypt_as = NULL; @@ -1913,11 +1909,10 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile, } if (!msg->env->subject && !(flags & SENDBATCH) && - (i = query_quadoption(OPT_ABORT_NOSUBJECT, - _("No subject, abort sending?"))) != MUTT_NO) + (i = query_quadoption(AbortNosubject, _("No subject, abort sending?"))) != MUTT_NO) { /* if the abort is automatic, print an error message */ - if (OPT_ABORT_NOSUBJECT == MUTT_YES) + if (AbortNosubject == MUTT_YES) mutt_error(_("No subject specified.")); goto main_loop; } @@ -1935,13 +1930,12 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile, } #endif - if (OPT_ABORT_NOATTACH != MUTT_NO && !msg->content->next && + if (AbortNoattach != MUTT_NO && !msg->content->next && search_attach_keyword(msg->content->filename) && - query_quadoption(OPT_ABORT_NOATTACH, - _("No attachments, cancel sending?")) != MUTT_NO) + query_quadoption(AbortNoattach, _("No attachments, cancel sending?")) != MUTT_NO) { /* if the abort is automatic, print an error message */ - if (OPT_ABORT_NOATTACH == MUTT_YES) + if (AbortNoattach == MUTT_YES) { mutt_error(_( "Message contains text matching \"$attach_keyword\". Not sending.")); @@ -2033,11 +2027,11 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile, struct Body *save_sig = NULL; struct Body *save_parts = NULL; - if (WithCrypto && (msg->security & (ENCRYPT | SIGN)) && OPT_FCC_CLEAR) + if (WithCrypto && (msg->security & (ENCRYPT | SIGN)) && FccClear) msg->content = clear_content; /* check to see if the user wants copies of all attachments */ - if (query_quadoption(OPT_FCC_ATTACH, _("Save attachments in Fcc?")) != MUTT_YES && + if (query_quadoption(FccAttach, _("Save attachments in Fcc?")) != MUTT_YES && msg->content->type == TYPEMULTIPART) { if (WithCrypto && (msg->security & (ENCRYPT | SIGN)) && @@ -2154,7 +2148,7 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile, (flags & SENDNEWS) ? _("Article posted.") : /* USE_NNTP */ _("Mail sent.")); #ifdef USE_NOTMUCH - if (OPT_NM_RECORD) + if (NmRecord) nm_record_message(ctx, finalpath, cur); #endif } diff --git a/sendlib.c b/sendlib.c index 03c9c0739..d9a9ebb96 100644 --- a/sendlib.c +++ b/sendlib.c @@ -1256,13 +1256,13 @@ static void set_encoding(struct Body *b, struct Content *info) { char *chsname = mutt_get_body_charset(send_charset, sizeof(send_charset), b); if ((info->lobin && (mutt_str_strncasecmp(chsname, "iso-2022", 8) != 0)) || - info->linemax > 990 || (info->from && OPT_ENCODE_FROM)) + info->linemax > 990 || (info->from && EncodeFrom)) { b->encoding = ENCQUOTEDPRINTABLE; } else if (info->hibin) { - b->encoding = OPT_ALLOW_8BIT ? ENC8BIT : ENCQUOTEDPRINTABLE; + b->encoding = Allow8bit ? ENC8BIT : ENCQUOTEDPRINTABLE; } else { @@ -1273,7 +1273,7 @@ static void set_encoding(struct Body *b, struct Content *info) { if (info->lobin || info->hibin) { - if (OPT_ALLOW_8BIT && !info->lobin) + if (Allow8bit && !info->lobin) b->encoding = ENC8BIT; else mutt_message_to_7bit(b, NULL); @@ -1365,7 +1365,7 @@ struct Body *mutt_make_message_attach(struct Context *ctx, struct Header *hdr, i if (WithCrypto) { - if ((OPT_MIME_FORWARD_DECODE || OPT_FORWARD_DECRYPT) && (hdr->security & ENCRYPT)) + if ((MimeForwardDecode || ForwardDecrypt) && (hdr->security & ENCRYPT)) { if (!crypt_valid_passphrase(hdr->security)) return NULL; @@ -1391,8 +1391,8 @@ struct Body *mutt_make_message_attach(struct Context *ctx, struct Header *hdr, i chflags = CH_XMIT; cmflags = 0; - /* If we are attaching a message, ignore OPT_MIME_FORWARD_DECODE */ - if (!attach_msg && OPT_MIME_FORWARD_DECODE) + /* If we are attaching a message, ignore MimeForwardDecode */ + if (!attach_msg && MimeForwardDecode) { chflags |= CH_MIME | CH_TXTPLAIN; cmflags = MUTT_CM_DECODE | MUTT_CM_CHARCONV; @@ -1401,7 +1401,7 @@ struct Body *mutt_make_message_attach(struct Context *ctx, struct Header *hdr, i if ((WithCrypto & APPLICATION_SMIME)) pgp &= ~SMIMEENCRYPT; } - else if (WithCrypto && OPT_FORWARD_DECRYPT && (hdr->security & ENCRYPT)) + else if (WithCrypto && ForwardDecrypt && (hdr->security & ENCRYPT)) { if ((WithCrypto & APPLICATION_PGP) && mutt_is_multipart_encrypted(hdr->content)) { @@ -1483,7 +1483,7 @@ struct Body *mutt_make_file_attach(const char *path) att = mutt_new_body(); att->filename = mutt_str_strdup(path); - if (MimeTypeQueryCommand && *MimeTypeQueryCommand && OPT_MIME_TYPE_QUERY_FIRST) + if (MimeTypeQueryCommand && *MimeTypeQueryCommand && MimeTypeQueryFirst) run_mime_type_query(att); /* Attempt to determine the appropriate content-type based on the filename @@ -1492,7 +1492,7 @@ struct Body *mutt_make_file_attach(const char *path) if (!att->subtype) mutt_lookup_mime_type(att, path); - if (!att->subtype && MimeTypeQueryCommand && *MimeTypeQueryCommand && !OPT_MIME_TYPE_QUERY_FIRST) + if (!att->subtype && MimeTypeQueryCommand && *MimeTypeQueryCommand && !MimeTypeQueryFirst) { run_mime_type_query(att); } @@ -1938,7 +1938,7 @@ int mutt_write_one_header(FILE *fp, const char *tag, const char *value, char *v = mutt_str_strdup(value); bool display = (flags & CH_DISPLAY); - if (!display || OPT_WEED) + if (!display || Weed) v = unfold_header(v); /* when not displaying, use sane wrap value */ @@ -2033,7 +2033,7 @@ int mutt_write_rfc822_header(FILE *fp, struct Envelope *env, if (mode == 0 && !privacy) fputs(mutt_date_make_date(buffer, sizeof(buffer)), fp); - /* OPT_USE_FROM is not consulted here so that we can still write a From: + /* UseFrom 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) @@ -2074,7 +2074,7 @@ int mutt_write_rfc822_header(FILE *fp, struct Envelope *env, if (env->bcc) { - if (mode != 0 || OPT_WRITE_BCC) + if (mode != 0 || WriteBcc) { fputs("Bcc: ", fp); mutt_write_address_list(env->bcc, fp, 5, 0); @@ -2099,7 +2099,7 @@ int mutt_write_rfc822_header(FILE *fp, struct Envelope *env, if (env->x_comment_to) fprintf(fp, "X-Comment-To: %s\n", env->x_comment_to); - else if (mode == 1 && OPT_NEWS_SEND && OPT_X_COMMENT_TO) + else if (mode == 1 && OPT_NEWS_SEND && XCommentTo) fputs("X-Comment-To: \n", fp); #endif @@ -2184,7 +2184,7 @@ int mutt_write_rfc822_header(FILE *fp, struct Envelope *env, } } - if (mode == 0 && !privacy && OPT_USER_AGENT && !has_agent) + if (mode == 0 && !privacy && UserAgent && !has_agent) { /* Add a vanity header */ fprintf(fp, "User-Agent: NeoMutt/%s%s\n", PACKAGE_VERSION, GitVer); @@ -2230,7 +2230,7 @@ const char *mutt_fqdn(short may_hide_host) { p = Hostname; - if (may_hide_host && OPT_HIDDEN_HOST) + if (may_hide_host && HiddenHost) { p = strchr(Hostname, '.'); if (p) @@ -2560,10 +2560,10 @@ int mutt_invoke_sendmail(struct Address *from, struct Address *to, struct Addres } } - if (eightbit && OPT_USE_8BITMIME) + if (eightbit && Use8bitmime) args = add_option(args, &argslen, &argsmax, "-B8BITMIME"); - if (OPT_USE_ENVELOPE_FROM) + if (UseEnvelopeFrom) { if (EnvelopeFromAddress) { @@ -2688,7 +2688,7 @@ void mutt_prepare_envelope(struct Envelope *env, int final) if (env->subject) #ifdef USE_NNTP - if (!OPT_NEWS_SEND || OPT_MIME_SUBJECT) + if (!OPT_NEWS_SEND || MimeSubject) #endif { rfc2047_encode_string32(&env->subject); @@ -2746,7 +2746,7 @@ static int bounce_message(FILE *fp, struct Header *h, struct Address *to, int ch_flags = CH_XMIT | CH_NONEWLINE | CH_NOQFROM; char *msgid_str = NULL; - if (!OPT_BOUNCE_DELIVERED) + if (!BounceDelivered) ch_flags |= CH_WEED_DELIVERED; fseeko(fp, h->offset, SEEK_SET); diff --git a/sidebar.c b/sidebar.c index 05806aeaf..8fcf07063 100644 --- a/sidebar.c +++ b/sidebar.c @@ -349,7 +349,7 @@ static int cb_qsort_sbe(const void *a, const void *b) */ static void update_entries_visibility(void) { - short new_only = OPT_SIDEBAR_NEW_MAIL_ONLY; + short new_only = SidebarNewMailOnly; struct SbEntry *sbe = NULL; for (int i = 0; i < EntryCount; i++) { @@ -482,7 +482,7 @@ static int select_next_new(void) entry++; if (entry == EntryCount) { - if (OPT_SIDEBAR_NEXT_NEW_WRAP) + if (SidebarNextNewWrap) entry = 0; else return false; @@ -537,7 +537,7 @@ static bool select_prev_new(void) entry--; if (entry < 0) { - if (OPT_SIDEBAR_NEXT_NEW_WRAP) + if (SidebarNextNewWrap) entry = EntryCount - 1; else return false; @@ -644,7 +644,7 @@ static bool prepare_sidebar(int page_size) /* If OPTSIDEBARNEMAILONLY is set, some entries may be hidden so we * need to scan for the framing interval */ - if (OPT_SIDEBAR_NEW_MAIL_ONLY) + if (SidebarNewMailOnly) { TopIndex = BotIndex = -1; while (BotIndex < HilIndex) @@ -715,7 +715,7 @@ static int draw_divider(int num_rows, int num_cols) altchar = SB_DIV_USER; /* User config */ } - if (OPT_ASCII_CHARS && (altchar != SB_DIV_ASCII)) + if (AsciiChars && (altchar != SB_DIV_ASCII)) { /* $ascii_chars overrides Unicode divider chars */ if (altchar == SB_DIV_UTF8) @@ -741,7 +741,7 @@ static int draw_divider(int num_rows, int num_cols) SETCOLOR(MT_COLOR_DIVIDER); - int col = OPT_SIDEBAR_ON_RIGHT ? 0 : (SidebarWidth - delim_len); + int col = SidebarOnRight ? 0 : (SidebarWidth - delim_len); for (int i = 0; i < num_rows; i++) { @@ -778,7 +778,7 @@ static void fill_empty_space(int first_row, int num_rows, int div_width, int num /* Fill the remaining rows with blank space */ NORMAL_COLOR; - if (!OPT_SIDEBAR_ON_RIGHT) + if (!SidebarOnRight) div_width = 0; for (int r = 0; r < num_rows; r++) { @@ -853,7 +853,7 @@ static void draw_sidebar(int num_rows, int num_cols, int div_width) } int col = 0; - if (OPT_SIDEBAR_ON_RIGHT) + if (SidebarOnRight) col = div_width; mutt_window_move(MuttSidebarWindow, row, col); @@ -887,7 +887,7 @@ static void draw_sidebar(int num_rows, int num_cols, int div_width) /* calculate depth of current folder and generate its display name with indented spaces */ int sidebar_folder_depth = 0; char *sidebar_folder_name = NULL; - if (OPT_SIDEBAR_SHORT_PATH) + if (SidebarShortPath) { /* disregard a trailing separator, so strlen() - 2 */ sidebar_folder_name = b->path; @@ -919,7 +919,7 @@ static void draw_sidebar(int num_rows, int num_cols, int div_width) { sidebar_folder_name = b->desc; } - else if (maildir_is_prefix && OPT_SIDEBAR_FOLDER_INDENT) + else if (maildir_is_prefix && SidebarFolderIndent) { const char *tmp_folder_name = NULL; int lastsep = 0; @@ -935,7 +935,7 @@ static void draw_sidebar(int num_rows, int num_cols, int div_width) } if (sidebar_folder_depth > 0) { - if (OPT_SIDEBAR_SHORT_PATH) + if (SidebarShortPath) tmp_folder_name += lastsep; /* basename */ int sfn_len = mutt_str_strlen(tmp_folder_name) + sidebar_folder_depth * mutt_str_strlen(SidebarIndentString) + 1; @@ -965,7 +965,7 @@ static void draw_sidebar(int num_rows, int num_cols, int div_width) */ void mutt_sb_draw(void) { - if (!OPT_SIDEBAR_VISIBLE) + if (!SidebarVisible) return; #ifdef USE_SLANG_CURSES @@ -1011,7 +1011,7 @@ void mutt_sb_draw(void) */ void mutt_sb_change_mailbox(int op) { - if (!OPT_SIDEBAR_VISIBLE) + if (!SidebarVisible) return; if (HilIndex < 0) /* It'll get reset on the next draw */ @@ -1084,7 +1084,7 @@ void mutt_sb_set_buffystats(const struct Context *ctx) */ const char *mutt_sb_get_highlight(void) { - if (!OPT_SIDEBAR_VISIBLE) + if (!SidebarVisible) return NULL; if (!EntryCount || HilIndex < 0) diff --git a/signal.c b/signal.c index c716c0da6..0e7bbd3ee 100644 --- a/signal.c +++ b/signal.c @@ -73,7 +73,7 @@ static void sighandler(int sig) switch (sig) { case SIGTSTP: /* user requested a suspend */ - if (!OPT_SUSPEND) + if (!Suspend) break; IsEndwin = isendwin(); curs_set(1); diff --git a/smtp.c b/smtp.c index 510d494a0..a8c3ebe79 100644 --- a/smtp.c +++ b/smtp.c @@ -341,7 +341,7 @@ static int smtp_helo(struct Connection *conn) if (conn->account.flags & MUTT_ACCT_USER) Esmtp = 1; #ifdef USE_SSL - if (OPT_SSL_FORCE_TLS || OPT_SSL_STARTTLS != MUTT_NO) + if (SslForceTls || SslStarttls != MUTT_NO) Esmtp = 1; #endif } @@ -593,10 +593,10 @@ static int smtp_open(struct Connection *conn) #ifdef USE_SSL if (conn->ssf) rc = MUTT_NO; - else if (OPT_SSL_FORCE_TLS) + else if (SslForceTls) rc = MUTT_YES; else if (mutt_bit_isset(Capabilities, STARTTLS) && - (rc = query_quadoption(OPT_SSL_STARTTLS, + (rc = query_quadoption(SslStarttls, _("Secure connection with TLS?"))) == MUTT_ABORT) return rc; diff --git a/sort.c b/sort.c index 173358fff..8ae27a920 100644 --- a/sort.c +++ b/sort.c @@ -117,7 +117,7 @@ const char *mutt_get_name(struct Address *a) if (a) { - if (OPT_REVERSE_ALIAS && (ali = alias_reverse_lookup(a)) && ali->personal) + if (ReverseAlias && (ali = alias_reverse_lookup(a)) && ali->personal) return ali->personal; else if (a->personal) return a->personal; @@ -328,7 +328,7 @@ void mutt_sort_headers(struct Context *ctx, int init) if (!ctx->quiet) mutt_message(_("Sorting mailbox...")); - if (OPT_NEED_RESCORE && OPT_SCORE) + if (OPT_NEED_RESCORE && Score) { for (int i = 0; i < ctx->msgcount; i++) mutt_score_message(ctx, ctx->hdrs[i], 1); diff --git a/thread.c b/thread.c index 87ea72d6e..7f5ff5e1c 100644 --- a/thread.c +++ b/thread.c @@ -64,7 +64,7 @@ static int need_display_subject(struct Context *ctx, struct Header *hdr) struct MuttThread *tmp = NULL, *tree = hdr->thread; /* if the user disabled subject hiding, display it */ - if (!OPT_HIDE_THREAD_SUBJECT) + if (!HideThreadSubject) return 1; /* if our subject is different from our parent's, display it */ @@ -147,8 +147,8 @@ static void linearize_tree(struct Context *ctx) static void calculate_visibility(struct Context *ctx, int *max_depth) { struct MuttThread *tmp = NULL, *tree = ctx->tree; - int hide_top_missing = OPT_HIDE_TOP_MISSING && !OPT_HIDE_MISSING; - int hide_top_limited = OPT_HIDE_TOP_LIMITED && !OPT_HIDE_LIMITED; + int hide_top_missing = HideTopMissing && !HideMissing; + int hide_top_limited = HideTopLimited && !HideLimited; int depth = 0; /* we walk each level backwards to make it easier to compute next_subtree_visible */ @@ -185,13 +185,13 @@ static void calculate_visibility(struct Context *ctx, int *max_depth) else { tree->visible = false; - tree->deep = !OPT_HIDE_LIMITED; + tree->deep = !HideLimited; } } else { tree->visible = false; - tree->deep = !OPT_HIDE_MISSING; + tree->deep = !HideMissing; } tree->next_subtree_visible = tree->next && (tree->next->next_subtree_visible || tree->next->subtree_visible); @@ -262,7 +262,7 @@ void mutt_draw_tree(struct Context *ctx) 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 = OPT_NARROW_TREE ? 1 : 2; + int depth = 0, start_depth = 0, max_depth = 0, width = NarrowTree ? 1 : 2; struct MuttThread *nextdisp = NULL, *pseudo = NULL, *parent = NULL, *tree = ctx->tree; /* Do the visibility calculations and free the old thread chars. @@ -278,9 +278,9 @@ void mutt_draw_tree(struct Context *ctx) 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 && !OPT_HIDE_LIMITED) + else if (parent->message && !HideLimited) myarrow[0] = MUTT_TREE_HIDDEN; - else if (!parent->message && !OPT_HIDE_MISSING) + else if (!parent->message && !HideMissing) myarrow[0] = MUTT_TREE_MISSING; else myarrow[0] = vtee; @@ -390,13 +390,13 @@ static void make_subject_list(struct ListHead *subjects, struct MuttThread *cur, if (dateptr) { - thisdate = OPT_THREAD_RECEIVED ? cur->message->received : cur->message->date_sent; + thisdate = ThreadReceived ? 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) || (!OPT_SORT_RE))) + if (env->real_subj && ((env->real_subj != env->subject) || (!SortRe))) { struct ListNode *np; STAILQ_FOREACH(np, subjects, entries) @@ -446,10 +446,9 @@ static struct MuttThread *find_subject(struct Context *ctx, struct MuttThread *c !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 >= (OPT_THREAD_RECEIVED ? tmp->message->received : tmp->message->date_sent)) && - (!last || (OPT_THREAD_RECEIVED ? - (last->message->received < tmp->message->received) : - (last->message->date_sent < tmp->message->date_sent))) && + (date >= (ThreadReceived ? tmp->message->received : tmp->message->date_sent)) && + (!last || (ThreadReceived ? (last->message->received < tmp->message->received) : + (last->message->date_sent < tmp->message->date_sent))) && tmp->message->env->real_subj && (mutt_str_strcmp(np->data, tmp->message->env->real_subj) == 0)) { @@ -827,7 +826,7 @@ void mutt_sort_threads(struct Context *ctx, int init) if (!cur->thread) { - if ((!init || OPT_DUPLICATE_THREADS) && cur->env->message_id) + if ((!init || DuplicateThreads) && cur->env->message_id) thread = mutt_hash_find(ctx->thread_hash, cur->env->message_id); else thread = NULL; @@ -871,7 +870,7 @@ void mutt_sort_threads(struct Context *ctx, int init) } else { - new = (OPT_DUPLICATE_THREADS ? thread : NULL); + new = (DuplicateThreads ? thread : NULL); thread = mutt_mem_calloc(1, sizeof(struct MuttThread)); thread->message = cur; @@ -998,7 +997,7 @@ void mutt_sort_threads(struct Context *ctx, int init) check_subjects(ctx, init); - if (!OPT_STRICT_THREADS) + if (!StrictThreads) pseudo_threads(ctx); if (ctx->tree)