From 5723a28c024aa47b1d97e7da08378f19a0691c80 Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Mon, 4 Sep 2017 18:12:10 +0100 Subject: [PATCH] rename: OPT_* to match their config item Rename lots of constants to match the user-facing config names. e.g. "forward_decode" OPT_FORW_DECODE -> OPT_FORWARD_DECODE "imap_servernoise" OPT_IMAP_SERVER_NOISE -> OPT_IMAP_SERVERNOISE --- browser.c | 6 +- commands.c | 2 +- compose.c | 8 +-- curs_lib.c | 6 +- curs_main.c | 22 +++--- edit.c | 6 +- handler.c | 8 +-- hcache/kc.c | 2 +- hcache/qdbm.c | 2 +- hcache/tc.c | 2 +- history.c | 10 +-- imap/browse.c | 2 +- imap/command.c | 2 +- imap/imap.c | 8 +-- imap/message.c | 2 +- init.c | 2 +- init.h | 156 +++++++++++++++++++++---------------------- main.c | 4 +- mh.c | 2 +- mutt.h | 24 +++---- mutt_ssl.c | 26 ++++---- mutt_ssl_gnutls.c | 16 ++--- muttlib.c | 6 +- mx.c | 8 +-- ncrypt/crypt.c | 2 +- ncrypt/crypt_gpgme.c | 2 +- ncrypt/gnupgparse.c | 16 ++--- ncrypt/pgp.c | 8 +-- ncrypt/smime.c | 4 +- newsrc.c | 6 +- nntp.c | 20 +++--- options.h | 132 ++++++++++++++++++------------------ pager.c | 12 ++-- pattern.c | 4 +- pop_lib.c | 2 +- recvattach.c | 2 +- recvcmd.c | 18 ++--- rfc2047.c | 4 +- rfc2231.c | 2 +- send.c | 84 +++++++++++------------ sendlib.c | 16 ++--- sidebar.c | 10 +-- smtp.c | 4 +- sort.c | 2 +- thread.c | 4 +- 45 files changed, 343 insertions(+), 343 deletions(-) diff --git a/browser.c b/browser.c index 585773438e5..f95553a71cc 100644 --- a/browser.c +++ b/browser.c @@ -1505,10 +1505,10 @@ void _mutt_select_file(char *f, size_t flen, int flags, char ***files, int *numf #ifdef USE_IMAP case OP_BROWSER_TOGGLE_LSUB: - if (option(OPT_IMAP_LSUB)) - unset_option(OPT_IMAP_LSUB); + if (option(OPT_IMAP_LIST_SUBSCRIBED)) + unset_option(OPT_IMAP_LIST_SUBSCRIBED); else - set_option(OPT_IMAP_LSUB); + set_option(OPT_IMAP_LIST_SUBSCRIBED); mutt_unget_event(0, OP_CHECK_NEW); break; diff --git a/commands.c b/commands.c index 3bfaabb3522..ccba7bc9f20 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_VERIFY_SIG, _("Verify PGP signature?")) == MUTT_YES) + if (query_quadoption(OPT_CRYPT_VERIFY_SIG, _("Verify PGP signature?")) == MUTT_YES) { cmflags |= MUTT_CM_VERIFY; } diff --git a/compose.c b/compose.c index 75a5292e51e..85a929744f0 100644 --- a/compose.c +++ b/compose.c @@ -423,7 +423,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 (option(OPT_XCOMMENT_TO)) + if (option(OPT_X_COMMENT_TO)) { mutt_window_mvprintw(MuttIndexWindow, HDR_BCC, 0, "%*s", HeaderPadding[HDR_XCOMMENTTO], Prompts[HDR_XCOMMENTTO]); @@ -894,7 +894,7 @@ int mutt_compose_menu(struct Header *msg, /* structure for new message */ } break; case OP_COMPOSE_EDIT_X_COMMENT_TO: - if (news && option(OPT_XCOMMENT_TO)) + if (news && option(OPT_X_COMMENT_TO)) { if (msg->env->x_comment_to) strfcpy(buf, msg->env->x_comment_to, sizeof(buf)); @@ -945,7 +945,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_strcmp("builtin", Editor) != 0) && !option(OPT_EDIT_HDRS)) + if (Editor && (mutt_strcmp("builtin", Editor) != 0) && !option(OPT_EDIT_HEADERS)) { mutt_edit_file(Editor, msg->content->filename); mutt_update_encoding(msg->content); @@ -957,7 +957,7 @@ int mutt_compose_menu(struct Header *msg, /* structure for new message */ case OP_COMPOSE_EDIT_HEADERS: if ((mutt_strcmp("builtin", Editor) != 0) && (op == OP_COMPOSE_EDIT_HEADERS || - (op == OP_COMPOSE_EDIT_MESSAGE && option(OPT_EDIT_HDRS)))) + (op == OP_COMPOSE_EDIT_MESSAGE && option(OPT_EDIT_HEADERS)))) { char *tag = NULL, *err = NULL; mutt_env_to_local(msg->env); diff --git a/curs_lib.c b/curs_lib.c index a269d78332f..cc37a06a7a0 100644 --- a/curs_lib.c +++ b/curs_lib.c @@ -159,7 +159,7 @@ struct Event mutt_getch(void) return timeout; } - if ((ch & 0x80) && option(OPT_METAKEY)) + if ((ch & 0x80) && option(OPT_META_KEY)) { /* send ALT-x as ESC-x */ ch &= ~0x80; @@ -664,7 +664,7 @@ void mutt_reflow_windows(void) option(OPT_STATUS_ON_TOP) ? MuttStatusWindow->rows : MuttHelpWindow->rows; #ifdef USE_SIDEBAR - if (option(OPT_SIDEBAR)) + if (option(OPT_SIDEBAR_VISIBLE)) { memcpy(MuttSidebarWindow, MuttIndexWindow, sizeof(struct MuttWindow)); MuttSidebarWindow->cols = SidebarWidth; @@ -700,7 +700,7 @@ static void reflow_message_window_rows(int mw_rows) LINES - MuttStatusWindow->rows - MuttHelpWindow->rows - MuttMessageWindow->rows, 0); #ifdef USE_SIDEBAR - if (option(OPT_SIDEBAR)) + if (option(OPT_SIDEBAR_VISIBLE)) MuttSidebarWindow->rows = MuttIndexWindow->rows; #endif diff --git a/curs_main.c b/curs_main.c index d78227c027b..044fbc70034 100644 --- a/curs_main.c +++ b/curs_main.c @@ -505,7 +505,7 @@ static int main_change_folder(struct Menu *menu, int op, char *buf, size_t bufsz mutt_folder_hook(buf); if ((Context = mx_open_mailbox( - buf, (option(OPT_READONLY) || op == OP_MAIN_CHANGE_FOLDER_READONLY) ? MUTT_READONLY : 0, + buf, (option(OPT_READ_ONLY) || op == OP_MAIN_CHANGE_FOLDER_READONLY) ? MUTT_READONLY : 0, NULL)) != NULL) { menu->current = ci_first_message(); @@ -2004,7 +2004,7 @@ int mutt_index_menu(void) case OP_MAIN_CHANGE_GROUP_READONLY: unset_option(OPT_NEWS); #endif - if (attach_msg || option(OPT_READONLY) || + if (attach_msg || option(OPT_READ_ONLY) || #ifdef USE_NNTP op == OP_MAIN_CHANGE_GROUP_READONLY || #endif @@ -2139,7 +2139,7 @@ int mutt_index_menu(void) menu->current = mutt_thread_next_unread(Context, CURHDR); } - if (option(OPT_PGP_AUTO_DEC) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))) + if (option(OPT_PGP_AUTO_DECODE) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))) mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw); int hint = Context->hdrs[Context->v2r[menu->current]]->index; @@ -2858,7 +2858,7 @@ int mutt_index_menu(void) /* L10N: CHECK_ACL */ CHECK_ACL(MUTT_ACL_INSERT, _("Cannot edit message")); - if (option(OPT_PGP_AUTO_DEC) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))) + if (option(OPT_PGP_AUTO_DECODE) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))) mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw); mutt_edit_message(Context, tag ? NULL : CURHDR); menu->redraw = REDRAW_FULL; @@ -2870,7 +2870,7 @@ int mutt_index_menu(void) CHECK_MSGCOUNT; CHECK_VISIBLE; CHECK_ATTACH; - if (option(OPT_PGP_AUTO_DEC) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))) + if (option(OPT_PGP_AUTO_DECODE) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))) mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw); ci_send_message(SENDFORWARD, NULL, NULL, Context, tag ? NULL : CURHDR); menu->redraw = REDRAW_FULL; @@ -2885,7 +2885,7 @@ int mutt_index_menu(void) CHECK_MSGCOUNT; CHECK_VISIBLE; CHECK_ATTACH; - if (option(OPT_PGP_AUTO_DEC) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))) + if (option(OPT_PGP_AUTO_DECODE) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))) mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw); ci_send_message(SENDREPLY | SENDGROUPREPLY, NULL, NULL, Context, tag ? NULL : CURHDR); menu->redraw = REDRAW_FULL; @@ -2919,7 +2919,7 @@ int mutt_index_menu(void) CHECK_ATTACH; CHECK_MSGCOUNT; CHECK_VISIBLE; - if (option(OPT_PGP_AUTO_DEC) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))) + if (option(OPT_PGP_AUTO_DECODE) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))) mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw); ci_send_message(SENDREPLY | SENDLISTREPLY, NULL, NULL, Context, tag ? NULL : CURHDR); menu->redraw = REDRAW_FULL; @@ -3104,11 +3104,11 @@ int mutt_index_menu(void) CHECK_ATTACH; if (op != OP_FOLLOWUP || !CURHDR->env->followup_to || (mutt_strcasecmp(CURHDR->env->followup_to, "poster") != 0) || - query_quadoption(OPT_FOLLOW_UP_TO_POSTER, + query_quadoption(OPT_FOLLOWUP_TO_POSTER, _("Reply by mail as poster prefers?")) != MUTT_YES) { if (Context && Context->magic == MUTT_NNTP && - !((struct NntpData *) Context->data)->allowed && query_quadoption(OPT_TO_MODERATED, _("Posting to this group not allowed, may be moderated. Continue?")) != MUTT_YES) + !((struct NntpData *) Context->data)->allowed && query_quadoption(OPT_POST_MODERATED, _("Posting to this group not allowed, may be moderated. Continue?")) != MUTT_YES) break; if (op == OP_POST) ci_send_message(SENDNEWS, NULL, NULL, Context, NULL); @@ -3128,7 +3128,7 @@ int mutt_index_menu(void) CHECK_ATTACH; CHECK_MSGCOUNT; CHECK_VISIBLE; - if (option(OPT_PGP_AUTO_DEC) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))) + if (option(OPT_PGP_AUTO_DECODE) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))) mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw); ci_send_message(SENDREPLY, NULL, NULL, Context, tag ? NULL : CURHDR); menu->redraw = REDRAW_FULL; @@ -3256,7 +3256,7 @@ int mutt_index_menu(void) break; case OP_SIDEBAR_TOGGLE_VISIBLE: - toggle_option(OPT_SIDEBAR); + toggle_option(OPT_SIDEBAR_VISIBLE); mutt_reflow_windows(); break; diff --git a/edit.c b/edit.c index ad0ba65652d..2728b44d166 100644 --- a/edit.c +++ b/edit.c @@ -286,7 +286,7 @@ static void be_edit_header(struct Envelope *e, int force) addch('\n'); } - if ((!e->cc && option(OPT_ASK_CC)) || force) + if ((!e->cc && option(OPT_ASKCC)) || force) { addstr("Cc: "); tmp[0] = '\0'; @@ -307,7 +307,7 @@ static void be_edit_header(struct Envelope *e, int force) addch('\n'); } - if (option(OPT_ASK_BCC) || force) + if (option(OPT_ASKBCC) || force) { addstr("Bcc: "); tmp[0] = '\0'; @@ -458,7 +458,7 @@ int mutt_builtin_editor(const char *path, struct Header *msg, struct Header *cur buf = NULL; bufmax = buflen = 0; - if (option(OPT_EDIT_HDRS)) + if (option(OPT_EDIT_HEADERS)) { mutt_env_to_local(msg->env); mutt_edit_headers(NONULL(Visual), path, msg, NULL, 0); diff --git a/handler.c b/handler.c index f8a962f867f..55fc74d221a 100644 --- a/handler.c +++ b/handler.c @@ -1366,7 +1366,7 @@ static int multipart_handler(struct Body *a, struct State *s) NONULL(p->subtype)); } - if ((s->flags & MUTT_REPLYING) && (option(OPT_INCLUDE_ONLY_FIRST)) && (s->flags & MUTT_FIRSTDONE)) + if ((s->flags & MUTT_REPLYING) && (option(OPT_INCLUDE_ONLYFIRST)) && (s->flags & MUTT_FIRSTDONE)) break; } @@ -1937,7 +1937,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 ((!option(OPT_HONOR_DISP) || (b->disposition != DISPATTACH || option(OPT_VIEW_ATTACH))) && + if ((!option(OPT_HONOR_DISPOSITION) || (b->disposition != DISPATTACH || option(OPT_VIEW_ATTACH))) && (plaintext || handler)) { rc = run_decode_and_handler(b, s, handler, plaintext); @@ -1946,10 +1946,10 @@ int mutt_body_handler(struct Body *b, struct State *s) if we're not already being called from there */ else if ((s->flags & MUTT_DISPLAY) || (b->disposition == DISPATTACH && !option(OPT_VIEW_ATTACH) && - option(OPT_HONOR_DISP) && (plaintext || handler))) + option(OPT_HONOR_DISPOSITION) && (plaintext || handler))) { state_mark_attach(s); - if (option(OPT_HONOR_DISP) && b->disposition == DISPATTACH) + if (option(OPT_HONOR_DISPOSITION) && b->disposition == DISPATTACH) fputs(_("[-- This is an attachment "), s->fpout); else state_printf(s, _("[-- %s/%s is unsupported "), TYPE(b), b->subtype); diff --git a/hcache/kc.c b/hcache/kc.c index a6414ac52d5..466889abe7d 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, option(OPT_HCACHE_COMPRESS) ? "lc" : "l"); + path, option(OPT_HEADER_CACHE_COMPRESS) ? "lc" : "l"); if ((printfresult < 0) || (printfresult >= sizeof(kcdbpath))) { return NULL; diff --git a/hcache/qdbm.c b/hcache/qdbm.c index a2a5ada6aeb..0848970f221 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 (option(OPT_HCACHE_COMPRESS)) + if (option(OPT_HEADER_CACHE_COMPRESS)) flags |= VL_OZCOMP; return vlopen(path, flags, VL_CMPLEX); diff --git a/hcache/tc.c b/hcache/tc.c index a9087cd33cb..414c94fd4c3 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 (option(OPT_HCACHE_COMPRESS)) + if (option(OPT_HEADER_CACHE_COMPRESS)) tcbdbtune(db, 0, 0, 0, -1, -1, BDBTDEFLATE); if (tcbdbopen(db, path, BDBOWRITER | BDBOCREAT)) return db; diff --git a/history.c b/history.c index 88985787ee3..bd53879177e 100644 --- a/history.c +++ b/history.c @@ -199,7 +199,7 @@ static void shrink_histfile(void) if ((f = fopen(HistFile, "r")) == NULL) return; - if (option(OPT_HIST_REMOVE_DUPS)) + if (option(OPT_HISTORY_REMOVE_DUPS)) for (hclass = 0; hclass < HC_LAST; hclass++) dup_hashes[hclass] = hash_create(MAX(10, SaveHist * 2), MUTT_HASH_STRDUP_KEYS); @@ -216,7 +216,7 @@ static void shrink_histfile(void) if (hclass >= HC_LAST) continue; *p = '\0'; - if (option(OPT_HIST_REMOVE_DUPS) && (dup_hash_inc(dup_hashes[hclass], linebuf + read) > 1)) + if (option(OPT_HISTORY_REMOVE_DUPS) && (dup_hash_inc(dup_hashes[hclass], linebuf + read) > 1)) { regen_file = true; continue; @@ -253,7 +253,7 @@ static void shrink_histfile(void) if (hclass >= HC_LAST) continue; *p = '\0'; - if (option(OPT_HIST_REMOVE_DUPS) && + if (option(OPT_HISTORY_REMOVE_DUPS) && (dup_hash_dec(dup_hashes[hclass], linebuf + read) > 0)) continue; *p = '|'; @@ -276,7 +276,7 @@ static void shrink_histfile(void) safe_fclose(&tmp); unlink(tmpfname); } - if (option(OPT_HIST_REMOVE_DUPS)) + if (option(OPT_HISTORY_REMOVE_DUPS)) for (hclass = 0; hclass < HC_LAST; hclass++) hash_destroy(&dup_hashes[hclass], NULL); } @@ -401,7 +401,7 @@ void mutt_history_add(enum HistoryClass hclass, const char *s, int save) */ if (*s != ' ' && (!h->hist[prev] || (mutt_strcmp(h->hist[prev], s) != 0))) { - if (option(OPT_HIST_REMOVE_DUPS)) + if (option(OPT_HISTORY_REMOVE_DUPS)) remove_history_dups(hclass, s); if (save && SaveHist) save_history(hclass, s); diff --git a/imap/browse.c b/imap/browse.c index a6b78f74f5b..a86c58c843f 100644 --- a/imap/browse.c +++ b/imap/browse.c @@ -193,7 +193,7 @@ int imap_browse(char *path, struct BrowserState *state) save_lsub = option(OPT_IMAP_CHECK_SUBSCRIBED); unset_option(OPT_IMAP_CHECK_SUBSCRIBED); - strfcpy(list_cmd, option(OPT_IMAP_LSUB) ? "LSUB" : "LIST", sizeof(list_cmd)); + strfcpy(list_cmd, option(OPT_IMAP_LIST_SUBSCRIBED) ? "LSUB" : "LIST", sizeof(list_cmd)); if (!(idata = imap_conn_find(&(mx.account), 0))) goto fail; diff --git a/imap/command.c b/imap/command.c index a26b43aed16..1364a0bcf8e 100644 --- a/imap/command.c +++ b/imap/command.c @@ -820,7 +820,7 @@ static int cmd_handle_untagged(struct ImapData *idata) return -1; } - else if (option(OPT_IMAP_SERVER_NOISE) && (mutt_strncasecmp("NO", s, 2) == 0)) + else if (option(OPT_IMAP_SERVERNOISE) && (mutt_strncasecmp("NO", s, 2) == 0)) { mutt_debug(2, "Handling untagged NO\n"); diff --git a/imap/imap.c b/imap/imap.c index f22d04d6491..ceecbc8a546 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -474,7 +474,7 @@ int imap_open_connection(struct ImapData *idata) if (option(OPT_SSL_FORCE_TLS)) rc = MUTT_YES; - else if ((rc = query_quadoption(OPT_SSL_START_TLS, + else if ((rc = query_quadoption(OPT_SSL_STARTTLS, _("Secure connection with TLS?"))) == MUTT_ABORT) goto err_close_conn; if (rc == MUTT_YES) @@ -842,7 +842,7 @@ static int imap_open_mailbox_append(struct Context *ctx, int flags) return -1; snprintf(buf, sizeof(buf), _("Create %s?"), mailbox); - if (option(OPT_CONFIRM_CREATE) && mutt_yesorno(buf, 1) != MUTT_YES) + if (option(OPT_CONFIRMCREATE) && mutt_yesorno(buf, 1) != MUTT_YES) return -1; if (imap_create_mailbox(idata, mailbox) < 0) @@ -2150,7 +2150,7 @@ int imap_complete(char *dest, size_t dlen, char *path) list[0] = '\0'; /* fire off command */ - snprintf(buf, sizeof(buf), "%s \"\" \"%s%%\"", option(OPT_IMAP_LSUB) ? "LSUB" : "LIST", list); + snprintf(buf, sizeof(buf), "%s \"\" \"%s%%\"", option(OPT_IMAP_LIST_SUBSCRIBED) ? "LSUB" : "LIST", list); imap_cmd_start(idata, buf); @@ -2276,7 +2276,7 @@ int imap_fast_trash(struct Context *ctx, char *dest) break; mutt_debug(3, "imap_fast_trash: server suggests TRYCREATE\n"); snprintf(prompt, sizeof(prompt), _("Create %s?"), mbox); - if (option(OPT_CONFIRM_CREATE) && mutt_yesorno(prompt, 1) != MUTT_YES) + if (option(OPT_CONFIRMCREATE) && mutt_yesorno(prompt, 1) != MUTT_YES) { mutt_clear_error(); goto out; diff --git a/imap/message.c b/imap/message.c index a262a516b5d..c84086cfad8 100644 --- a/imap/message.c +++ b/imap/message.c @@ -1320,7 +1320,7 @@ int imap_copy_messages(struct Context *ctx, struct Header *h, char *dest, int de break; mutt_debug(3, "imap_copy_messages: server suggests TRYCREATE\n"); snprintf(prompt, sizeof(prompt), _("Create %s?"), mbox); - if (option(OPT_CONFIRM_CREATE) && mutt_yesorno(prompt, 1) != MUTT_YES) + if (option(OPT_CONFIRMCREATE) && mutt_yesorno(prompt, 1) != MUTT_YES) { mutt_clear_error(); goto out; diff --git a/init.c b/init.c index 1b489809fa5..01a18e159b3 100644 --- a/init.c +++ b/init.c @@ -4446,7 +4446,7 @@ void mutt_init(int skip_sys_rc, struct ListHead *commands) mutt_read_histfile(); #ifdef USE_NOTMUCH - if (option(OPT_VIRT_SPOOL_FILE)) + if (option(OPT_VIRTUAL_SPOOLFILE)) { /* 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 550151422bb..41257fde5bb 100644 --- a/init.h +++ b/init.h @@ -83,7 +83,7 @@ struct Buffer; struct Option MuttVars[] = { /*++*/ - { "abort_noattach", DT_QUAD, R_NONE, OPT_ATTACH, MUTT_NO }, + { "abort_noattach", DT_QUAD, R_NONE, OPT_ABORT_NOATTACH, MUTT_NO }, /* ** .pp ** If set to \fIyes\fP, when composing messages containing the regular expression @@ -96,7 +96,7 @@ struct Option MuttVars[] = { ** set attach_keyword = "\\" ** .te */ - { "abort_nosubject", DT_QUAD, R_NONE, OPT_SUBJECT, MUTT_ASKYES }, + { "abort_nosubject", DT_QUAD, R_NONE, OPT_ABORT_NOSUBJECT, MUTT_ASKYES }, /* ** .pp ** If set to \fIyes\fP, when composing messages and no subject is given @@ -104,7 +104,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, OPT_ABORT, MUTT_YES }, + { "abort_unmodified", DT_QUAD, R_NONE, OPT_ABORT_UNMODIFIED, MUTT_YES }, /* ** .pp ** If set to \fIyes\fP, composition will automatically abort after @@ -177,26 +177,26 @@ struct Option MuttVars[] = { ** If \fIset\fP, Mutt will use plain ASCII characters when displaying thread ** and attachment trees, instead of the default \fIACS\fP characters. */ - { "askbcc", DT_BOOL, R_NONE, OPT_ASK_BCC, 0 }, + { "askbcc", DT_BOOL, R_NONE, OPT_ASKBCC, 0 }, /* ** .pp ** If \fIset\fP, Mutt will prompt you for blind-carbon-copy (Bcc) recipients ** before editing an outgoing message. */ - { "askcc", DT_BOOL, R_NONE, OPT_ASK_CC, 0 }, + { "askcc", DT_BOOL, R_NONE, OPT_ASKCC, 0 }, /* ** .pp ** If \fIset\fP, Mutt will prompt you for carbon-copy (Cc) recipients before ** editing the body of an outgoing message. */ #ifdef USE_NNTP - { "ask_follow_up", DT_BOOL, R_NONE, OPT_ASK_FOLLOWUP, 0 }, + { "ask_follow_up", DT_BOOL, R_NONE, OPT_ASK_FOLLOW_UP, 0 }, /* ** .pp ** If set, Mutt will prompt you for follow-up groups before editing ** the body of an outgoing message. */ - { "ask_x_comment_to", DT_BOOL, R_NONE, OPT_ASK_XCOMMENTTO, 0 }, + { "ask_x_comment_to", DT_BOOL, R_NONE, OPT_ASK_X_COMMENT_TO, 0 }, /* ** .pp ** If set, Mutt will prompt you for x-comment-to field before editing @@ -318,7 +318,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, OPT_AUTO_EDIT, 0 }, + { "autoedit", DT_BOOL, R_NONE, OPT_AUTOEDIT, 0 }, /* ** .pp ** When \fIset\fP along with $$edit_headers, Mutt will skip the initial @@ -369,7 +369,7 @@ struct Option MuttVars[] = { ** visual terminals don't permit making the cursor invisible. */ #ifdef USE_NNTP - { "catchup_newsgroup", DT_QUAD, R_NONE, OPT_CATCHUP, MUTT_ASKYES }, + { "catchup_newsgroup", DT_QUAD, R_NONE, OPT_CATCHUP_NEWSGROUP, MUTT_ASKYES }, /* ** .pp ** If this variable is \fIset\fP, Mutt will mark all articles in newsgroup @@ -479,13 +479,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, OPT_CONFIRM_APPEND, 1 }, + { "confirmappend", DT_BOOL, R_NONE, OPT_CONFIRMAPPEND, 1 }, /* ** .pp ** When \fIset\fP, Mutt will prompt for confirmation when appending messages to ** an existing mailbox. */ - { "confirmcreate", DT_BOOL, R_NONE, OPT_CONFIRM_CREATE, 1 }, + { "confirmcreate", DT_BOOL, R_NONE, OPT_CONFIRMCREATE, 1 }, /* ** .pp ** When \fIset\fP, Mutt will prompt for confirmation when saving messages to a @@ -511,7 +511,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, OPT_CRYPT_AUTO_ENCRYPT, 0 }, + { "crypt_autoencrypt", DT_BOOL, R_NONE, OPT_CRYPT_AUTOENCRYPT, 0 }, /* ** .pp ** Setting this variable will cause Mutt to always attempt to PGP @@ -523,7 +523,7 @@ struct Option MuttVars[] = { ** settings can be overridden by use of the smime menu instead. ** (Crypto only) */ - { "crypt_autopgp", DT_BOOL, R_NONE, OPT_CRYPT_AUTO_PGP, 1 }, + { "crypt_autopgp", DT_BOOL, R_NONE, OPT_CRYPT_AUTOPGP, 1 }, /* ** .pp ** This variable controls whether or not mutt may automatically enable @@ -532,7 +532,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, OPT_CRYPT_AUTO_SIGN, 0 }, + { "crypt_autosign", DT_BOOL, R_NONE, OPT_CRYPT_AUTOSIGN, 0 }, /* ** .pp ** Setting this variable will cause Mutt to always attempt to @@ -543,7 +543,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, OPT_CRYPT_AUTO_SMIME, 1 }, + { "crypt_autosmime", DT_BOOL, R_NONE, OPT_CRYPT_AUTOSMIME, 1 }, /* ** .pp ** This variable controls whether or not mutt may automatically enable @@ -551,7 +551,7 @@ struct Option MuttVars[] = { ** $$crypt_replyencrypt, ** $$crypt_autosign, $$crypt_replysign and $$smime_is_default. */ - { "crypt_confirmhook", DT_BOOL, R_NONE, OPT_CRYPT_CONFIRM_HOOK, 1 }, + { "crypt_confirmhook", DT_BOOL, R_NONE, OPT_CRYPT_CONFIRMHOOK, 1 }, /* ** .pp ** If set, then you will be prompted for confirmation of keys when using @@ -581,7 +581,7 @@ struct Option MuttVars[] = { ** (Crypto only) */ { "pgp_replyencrypt", DT_SYNONYM, R_NONE, UL "crypt_replyencrypt", 1 }, - { "crypt_replyencrypt", DT_BOOL, R_NONE, OPT_CRYPT_REPLY_ENCRYPT, 1 }, + { "crypt_replyencrypt", DT_BOOL, R_NONE, OPT_CRYPT_REPLYENCRYPT, 1 }, /* ** .pp ** If \fIset\fP, automatically PGP or OpenSSL encrypt replies to messages which are @@ -589,7 +589,7 @@ struct Option MuttVars[] = { ** (Crypto only) */ { "pgp_replysign", DT_SYNONYM, R_NONE, UL "crypt_replysign", 0 }, - { "crypt_replysign", DT_BOOL, R_NONE, OPT_CRYPT_REPLY_SIGN, 0 }, + { "crypt_replysign", DT_BOOL, R_NONE, OPT_CRYPT_REPLYSIGN, 0 }, /* ** .pp ** If \fIset\fP, automatically PGP or OpenSSL sign replies to messages which are @@ -600,7 +600,7 @@ struct Option MuttVars[] = { ** (Crypto only) */ { "pgp_replysignencrypted", DT_SYNONYM, R_NONE, UL "crypt_replysignencrypted", 0 }, - { "crypt_replysignencrypted", DT_BOOL, R_NONE, OPT_CRYPT_REPLY_SIGN_ENCRYPTED, 0 }, + { "crypt_replysignencrypted", DT_BOOL, R_NONE, OPT_CRYPT_REPLYSIGNENCRYPTED, 0 }, /* ** .pp ** If \fIset\fP, automatically PGP or OpenSSL sign replies to messages @@ -640,7 +640,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, OPT_VERIFY_SIG, MUTT_YES }, + { "crypt_verify_sig", DT_QUAD, R_NONE, OPT_CRYPT_VERIFY_SIG, MUTT_YES }, /* ** .pp ** If \fI``yes''\fP, always attempt to verify PGP or S/MIME signatures. @@ -762,7 +762,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, OPT_DUP_THREADS, 1 }, + { "duplicate_threads", DT_BOOL, R_RESORT|R_RESORT_INIT|R_INDEX, OPT_DUPLICATE_THREADS, 1 }, /* ** .pp ** This variable controls whether mutt, when $$sort is set to \fIthreads\fP, threads @@ -770,7 +770,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, OPT_EDIT_HDRS, 0 }, + { "edit_headers", DT_BOOL, R_NONE, OPT_EDIT_HEADERS, 0 }, /* ** .pp ** This option allows you to edit the header of your outgoing messages @@ -915,7 +915,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, OPT_FOLLOW_UP_TO, 1 }, + { "followup_to", DT_BOOL, R_NONE, OPT_FOLLOWUP_TO, 1 }, /* ** .pp ** Controls whether or not the ``Mail-Followup-To:'' header field is @@ -937,7 +937,7 @@ struct Option MuttVars[] = { ** of the same email for you. */ #ifdef USE_NNTP - { "followup_to_poster", DT_QUAD, R_NONE, OPT_FOLLOW_UP_TO_POSTER, MUTT_ASKYES }, + { "followup_to_poster", DT_QUAD, R_NONE, OPT_FOLLOWUP_TO_POSTER, MUTT_ASKYES }, /* ** .pp ** If this variable is \fIset\fP and the keyword "poster" is present in @@ -971,7 +971,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, OPT_FORW_DECODE, 1 }, + { "forward_decode", DT_BOOL, R_NONE, OPT_FORWARD_DECODE, 1 }, /* ** .pp ** Controls the decoding of complex MIME messages into \fCtext/plain\fP when @@ -982,7 +982,7 @@ struct Option MuttVars[] = { { "forw_decode", DT_SYNONYM, R_NONE, UL "forward_decode", 0 }, /* */ - { "forward_decrypt", DT_BOOL, R_NONE, OPT_FORW_DECRYPT, 1 }, + { "forward_decrypt", DT_BOOL, R_NONE, OPT_FORWARD_DECRYPT, 1 }, /* ** .pp ** Controls the handling of encrypted messages when forwarding a message. @@ -994,7 +994,7 @@ struct Option MuttVars[] = { { "forw_decrypt", DT_SYNONYM, R_NONE, UL "forward_decrypt", 0 }, /* */ - { "forward_edit", DT_QUAD, R_NONE, OPT_FORW_EDIT, MUTT_YES }, + { "forward_edit", DT_QUAD, R_NONE, OPT_FORWARD_EDIT, MUTT_YES }, /* ** .pp ** This quadoption controls whether or not the user is automatically @@ -1010,7 +1010,7 @@ struct Option MuttVars[] = { { "forw_format", DT_SYNONYM, R_NONE, UL "forward_format", 0 }, /* */ - { "forward_quote", DT_BOOL, R_NONE, OPT_FORW_QUOTE, 0 }, + { "forward_quote", DT_BOOL, R_NONE, OPT_FORWARD_QUOTE, 0 }, /* ** .pp ** When \fIset\fP, forwarded messages included in the main body of the @@ -1020,7 +1020,7 @@ struct Option MuttVars[] = { { "forw_quote", DT_SYNONYM, R_NONE, UL "forward_quote", 0 }, /* */ - { "forward_references", DT_BOOL, R_NONE, OPT_FORW_REF, 0 }, + { "forward_references", DT_BOOL, R_NONE, OPT_FORWARD_REFERENCES, 0 }, /* ** .pp ** When \fIset\fP, forwarded messages set the ``In-Reply-To:'' and @@ -1133,7 +1133,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, OPT_HCACHE_COMPRESS, 1 }, + { "header_cache_compress", DT_BOOL, R_NONE, OPT_HEADER_CACHE_COMPRESS, 1 }, /* ** .pp ** When mutt is compiled with qdbm, tokyocabinet or kyotocabinet @@ -1234,14 +1234,14 @@ struct Option MuttVars[] = { ** .pp ** Also see $$save_history. */ - { "history_remove_dups", DT_BOOL, R_NONE, OPT_HIST_REMOVE_DUPS, 0 }, + { "history_remove_dups", DT_BOOL, R_NONE, OPT_HISTORY_REMOVE_DUPS, 0 }, /* ** .pp ** When \fIset\fP, all of the string history will be scanned for duplicates ** when a new entry is added. Duplicate entries in the $$history_file will ** also be removed when it is periodically compacted. */ - { "honor_disposition", DT_BOOL, R_NONE, OPT_HONOR_DISP, 0 }, + { "honor_disposition", DT_BOOL, R_NONE, OPT_HONOR_DISPOSITION, 0 }, /* ** .pp ** When \fIset\fP, Mutt will not display attachments with a @@ -1252,7 +1252,7 @@ struct Option MuttVars[] = { ** If \fIunset\fP, Mutt will render all MIME parts it can ** properly transform to plain text. */ - { "honor_followup_to", DT_QUAD, R_NONE, OPT_MF_UP_TO, MUTT_YES }, + { "honor_followup_to", DT_QUAD, R_NONE, OPT_HONOR_FOLLOWUP_TO, MUTT_YES }, /* ** .pp ** This variable controls whether or not a Mail-Followup-To header is @@ -1292,7 +1292,7 @@ struct Option MuttVars[] = { ** UTF-8 encoded domains. (IDN only) */ #endif /* HAVE_LIBIDN */ - { "ignore_linear_white_space", DT_BOOL, R_NONE, OPT_IGNORE_LWS, 0 }, + { "ignore_linear_white_space", DT_BOOL, R_NONE, OPT_IGNORE_LINEAR_WHITE_SPACE, 0 }, /* ** .pp ** This option replaces linear-white-space between encoded-word @@ -1390,7 +1390,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, OPT_IMAP_LSUB, 0 }, + { "imap_list_subscribed", DT_BOOL, R_NONE, OPT_IMAP_LIST_SUBSCRIBED, 0 }, /* ** .pp ** This variable configures whether IMAP folder browsing will look for @@ -1451,7 +1451,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, OPT_IMAP_SERVER_NOISE, 1 }, + { "imap_servernoise", DT_BOOL, R_NONE, OPT_IMAP_SERVERNOISE, 1 }, /* ** .pp ** When \fIset\fP, mutt will display warning messages from the IMAP @@ -1484,7 +1484,7 @@ struct Option MuttVars[] = { ** Controls whether or not a copy of the message(s) you are replying to ** is included in your reply. */ - { "include_onlyfirst", DT_BOOL, R_NONE, OPT_INCLUDE_ONLY_FIRST, 0 }, + { "include_onlyfirst", DT_BOOL, R_NONE, OPT_INCLUDE_ONLYFIRST, 0 }, /* ** .pp ** Controls whether or not Mutt includes only the first attachment @@ -1712,7 +1712,7 @@ struct Option MuttVars[] = { ** DOING!\fP */ #ifdef USE_HCACHE - { "maildir_header_cache_verify", DT_BOOL, R_NONE, OPT_HCACHE_VERIFY, 1 }, + { "maildir_header_cache_verify", DT_BOOL, R_NONE, OPT_MAILDIR_HEADER_CACHE_VERIFY, 1 }, /* ** .pp ** Check for Maildir unaware programs other than mutt having modified maildir @@ -1839,7 +1839,7 @@ struct Option MuttVars[] = { { "msg_format", DT_SYNONYM, R_NONE, UL "message_format", 0 }, /* */ - { "meta_key", DT_BOOL, R_NONE, OPT_METAKEY, 0 }, + { "meta_key", DT_BOOL, R_NONE, OPT_META_KEY, 0 }, /* ** .pp ** If \fIset\fP, forces Mutt to interpret keystrokes with the high bit (bit 8) @@ -1850,7 +1850,7 @@ struct Option MuttVars[] = { ** high bit from \fC0xf8\fP is \fC0x78\fP, which is the ASCII character ** ``x''. */ - { "metoo", DT_BOOL, R_NONE, OPT_ME_TOO, 0 }, + { "metoo", DT_BOOL, R_NONE, OPT_METOO, 0 }, /* ** .pp ** If \fIunset\fP, Mutt will remove your address (see the ``$alternates'' @@ -1882,7 +1882,7 @@ struct Option MuttVars[] = { ** .pp ** The name of the MH sequence used for unseen messages. */ - { "mime_forward", DT_QUAD, R_NONE, OPT_MIME_FWD, MUTT_NO }, + { "mime_forward", DT_QUAD, R_NONE, OPT_MIME_FORWARD, MUTT_NO }, /* ** .pp ** When \fIset\fP, the message you are forwarding will be attached as a @@ -1894,7 +1894,7 @@ struct Option MuttVars[] = { ** .pp ** Also see $$forward_decode and $$mime_forward_decode. */ - { "mime_forward_decode", DT_BOOL, R_NONE, OPT_MIME_FORW_DECODE, 0 }, + { "mime_forward_decode", DT_BOOL, R_NONE, OPT_MIME_FORWARD_DECODE, 0 }, /* ** .pp ** Controls the decoding of complex MIME messages into \fCtext/plain\fP when @@ -1904,7 +1904,7 @@ struct Option MuttVars[] = { { "mime_fwd", DT_SYNONYM, R_NONE, UL "mime_forward", 0 }, /* */ - { "mime_forward_rest", DT_QUAD, R_NONE, OPT_MIME_FWD_REST, MUTT_YES }, + { "mime_forward_rest", DT_QUAD, R_NONE, OPT_MIME_FORWARD_REST, MUTT_YES }, /* ** .pp ** When forwarding multiple attachments of a MIME message from the attachment @@ -2066,13 +2066,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, OPT_LIST_GROUP, 1 }, + { "nntp_listgroup", DT_BOOL, R_NONE, OPT_NNTP_LISTGROUP, 1 }, /* ** .pp ** This variable controls whether or not existence of each article is ** checked when newsgroup is entered. */ - { "nntp_load_description", DT_BOOL, R_NONE, OPT_LOAD_DESC, 1 }, + { "nntp_load_description", DT_BOOL, R_NONE, OPT_NNTP_LOAD_DESCRIPTION, 1 }, /* ** .pp ** This variable controls whether or not descriptions for each newsgroup @@ -2141,7 +2141,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, OPT_NOTMUCH_RECORD, 0 }, + { "nm_record", DT_BOOL, R_NONE, OPT_NM_RECORD, 0 }, /* ** .pp ** This variable specifies if the mutt record should indexed by notmuch. @@ -2231,7 +2231,7 @@ struct Option MuttVars[] = { ** when you are at the end of a message and invoke the \fC\fP ** function. */ - { "pgp_auto_decode", DT_BOOL, R_NONE, OPT_PGP_AUTO_DEC, 0 }, + { "pgp_auto_decode", DT_BOOL, R_NONE, OPT_PGP_AUTO_DECODE, 0 }, /* ** .pp ** If \fIset\fP, mutt will automatically attempt to decrypt traditional PGP @@ -2242,7 +2242,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, OPT_PGP_AUTO_INLINE, 0 }, + { "pgp_autoinline", DT_BOOL, R_NONE, OPT_PGP_AUTOINLINE, 0 }, /* ** .pp ** This option controls whether Mutt generates old-style inline @@ -2392,7 +2392,7 @@ struct Option MuttVars[] = { ** even for bad signatures. ** (PGP only) */ - { "pgp_ignore_subkeys", DT_BOOL, R_NONE, OPT_PGP_IGNORE_SUB, 1 }, + { "pgp_ignore_subkeys", DT_BOOL, R_NONE, OPT_PGP_IGNORE_SUBKEYS, 1 }, /* ** .pp ** Setting this variable will cause Mutt to ignore OpenPGP subkeys. Instead, @@ -2471,7 +2471,7 @@ struct Option MuttVars[] = { ** (PGP only) */ { "pgp_auto_traditional", DT_SYNONYM, R_NONE, UL "pgp_replyinline", 0 }, - { "pgp_replyinline", DT_BOOL, R_NONE, OPT_PGP_REPLY_INLINE, 0 }, + { "pgp_replyinline", DT_BOOL, R_NONE, OPT_PGP_REPLYINLINE, 0 }, /* ** .pp ** Setting this variable will cause Mutt to always attempt to @@ -2494,7 +2494,7 @@ struct Option MuttVars[] = { ** (PGP only) ** */ - { "pgp_retainable_sigs", DT_BOOL, R_NONE, OPT_PGP_RETAINABLE_SIG, 0 }, + { "pgp_retainable_sigs", DT_BOOL, R_NONE, OPT_PGP_RETAINABLE_SIGS, 0 }, /* ** .pp ** If \fIset\fP, signed and encrypted messages will consist of nested @@ -2578,7 +2578,7 @@ struct Option MuttVars[] = { ** not used. ** (PGP only) */ - { "pgp_use_gpg_agent", DT_BOOL, R_NONE, OPT_USE_GPG_AGENT, 0 }, + { "pgp_use_gpg_agent", DT_BOOL, R_NONE, OPT_PGP_USE_GPG_AGENT, 0 }, /* ** .pp ** If \fIset\fP, mutt will use a possibly-running \fCgpg-agent(1)\fP process. @@ -2719,7 +2719,7 @@ struct Option MuttVars[] = { /* */ #ifdef USE_NNTP - { "post_moderated", DT_QUAD, R_NONE, OPT_TO_MODERATED, MUTT_ASKYES }, + { "post_moderated", DT_QUAD, R_NONE, OPT_POST_MODERATED, MUTT_ASKYES }, /* ** .pp ** If set to \fIyes\fP, Mutt will post article to newsgroup that have @@ -2898,7 +2898,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, OPT_READONLY, 0 }, + { "read_only", DT_BOOL, R_NONE, OPT_READ_ONLY, 0 }, /* ** .pp ** If \fIset\fP, all folders are opened in read-only mode. @@ -3036,7 +3036,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, OPT_REV_ALIAS, 0 }, + { "reverse_alias", DT_BOOL, R_BOTH, OPT_REVERSE_ALIAS, 0 }, /* ** .pp ** This variable controls whether or not Mutt will display the ``personal'' @@ -3056,7 +3056,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, OPT_REV_NAME, 0 }, + { "reverse_name", DT_BOOL, R_BOTH, OPT_REVERSE_NAME, 0 }, /* ** .pp ** It may sometimes arrive that you receive mail to a certain machine, @@ -3070,7 +3070,7 @@ struct Option MuttVars[] = { ** .pp ** Also see the ``$alternates'' command. */ - { "reverse_realname", DT_BOOL, R_BOTH, OPT_REV_REAL, 1 }, + { "reverse_realname", DT_BOOL, R_BOTH, OPT_REVERSE_REALNAME, 1 }, /* ** .pp ** This variable fine-tunes the behavior of the $$reverse_name feature. @@ -3078,7 +3078,7 @@ struct Option MuttVars[] = { ** possibly including eventual real names. When it is \fIunset\fP, mutt will ** override any such real names with the setting of the $$realname variable. */ - { "rfc2047_parameters", DT_BOOL, R_NONE, OPT_RFC2047_PARAMS, 0 }, + { "rfc2047_parameters", DT_BOOL, R_NONE, OPT_RFC2047_PARAMETERS, 0 }, /* ** .pp ** When this variable is \fIset\fP, Mutt will decode RFC2047-encoded MIME @@ -3219,7 +3219,7 @@ struct Option MuttVars[] = { ** shell from \fC/etc/passwd\fP is used. */ #ifdef USE_NNTP - { "save_unsubscribed", DT_BOOL, R_NONE, OPT_SAVE_UNSUB, 0 }, + { "save_unsubscribed", DT_BOOL, R_NONE, OPT_SAVE_UNSUBSCRIBED, 0 }, /* ** .pp ** When \fIset\fP, info about unsubscribed newsgroups will be saved into @@ -3312,7 +3312,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, OPT_SIDEBAR_NEWMAIL_ONLY, 0 }, + { "sidebar_new_mail_only", DT_BOOL, R_SIDEBAR, OPT_SIDEBAR_NEW_MAIL_ONLY, 0 }, /* ** .pp ** When set, the sidebar will only display mailboxes containing new, or @@ -3368,7 +3368,7 @@ struct Option MuttVars[] = { ** You may optionally use the ``reverse-'' prefix to specify reverse sorting ** order (example: ``\fCset sort_browser=reverse-date\fP''). */ - { "sidebar_visible", DT_BOOL, R_REFLOW, OPT_SIDEBAR, 0 }, + { "sidebar_visible", DT_BOOL, R_REFLOW, OPT_SIDEBAR_VISIBLE, 0 }, /* ** .pp ** This specifies whether or not to show sidebar. The sidebar shows a list of @@ -3436,7 +3436,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, OPT_WRAP, 1 }, + { "smart_wrap", DT_BOOL, R_PAGER_FLOW, OPT_SMART_WRAP, 1 }, /* ** .pp ** Controls the display of lines longer than the screen width in the @@ -3452,7 +3452,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, OPT_ASK_CERT_LABEL, 1 }, + { "smime_ask_cert_label", DT_BOOL, R_NONE, OPT_SMIME_ASK_CERT_LABEL, 1 }, /* ** .pp ** This flag controls whether you want to be asked to enter a label @@ -3506,7 +3506,7 @@ struct Option MuttVars[] = { ** alongside the documentation. ** (S/MIME only) */ - { "smime_decrypt_use_default_key", DT_BOOL, R_NONE, OPT_SDEFAULT_DECRYPT_KEY, 1 }, + { "smime_decrypt_use_default_key", DT_BOOL, R_NONE, OPT_SMIME_DECRYPT_USE_DEFAULT_KEY, 1 }, /* ** .pp ** If \fIset\fP (default) this tells mutt to use the default key for decryption. Otherwise, @@ -3864,7 +3864,7 @@ struct Option MuttVars[] = { ** the default from the GNUTLS library. */ #endif /* USE_SSL_GNUTLS */ - { "ssl_starttls", DT_QUAD, R_NONE, OPT_SSL_START_TLS, MUTT_YES }, + { "ssl_starttls", DT_QUAD, R_NONE, OPT_SSL_STARTTLS, MUTT_YES }, /* ** .pp ** If \fIset\fP (the default), mutt will attempt to use \fCSTARTTLS\fP on servers @@ -3872,7 +3872,7 @@ struct Option MuttVars[] = { ** use \fCSTARTTLS\fP regardless of the server's capabilities. */ #ifdef USE_SSL_OPENSSL - { "ssl_use_sslv2", DT_BOOL, R_NONE, OPT_SSLV2, 0 }, + { "ssl_use_sslv2", DT_BOOL, R_NONE, OPT_SSL_USE_SSLV2, 0 }, /* ** .pp ** This variable specifies whether to attempt to use SSLv2 in the @@ -3880,33 +3880,33 @@ struct Option MuttVars[] = { ** considered fundamentally insecure and are no longer recommended. */ #endif /* defined USE_SSL_OPENSSL */ - { "ssl_use_sslv3", DT_BOOL, R_NONE, OPT_SSLV3, 0 }, + { "ssl_use_sslv3", DT_BOOL, R_NONE, OPT_SSL_USE_SSLV3, 0 }, /* ** .pp ** This variable specifies whether to attempt to use SSLv3 in the ** SSL authentication process. Note that SSLv2 and SSLv3 are now ** considered fundamentally insecure and are no longer recommended. */ - { "ssl_use_tlsv1", DT_BOOL, R_NONE, OPT_TLSV1, 1 }, + { "ssl_use_tlsv1", DT_BOOL, R_NONE, OPT_SSL_USE_TLSV1, 1 }, /* ** .pp ** This variable specifies whether to attempt to use TLSv1.0 in the ** SSL authentication process. */ - { "ssl_use_tlsv1_1", DT_BOOL, R_NONE, OPT_TLSV1_1, 1 }, + { "ssl_use_tlsv1_1", DT_BOOL, R_NONE, OPT_SSL_USE_TLSV1_1, 1 }, /* ** .pp ** This variable specifies whether to attempt to use TLSv1.1 in the ** SSL authentication process. */ - { "ssl_use_tlsv1_2", DT_BOOL, R_NONE, OPT_TLSV1_2, 1 }, + { "ssl_use_tlsv1_2", DT_BOOL, R_NONE, OPT_SSL_USE_TLSV1_2, 1 }, /* ** .pp ** This variable specifies whether to attempt to use TLSv1.2 in the ** SSL authentication process. */ #ifdef USE_SSL_OPENSSL - { "ssl_usesystemcerts", DT_BOOL, R_NONE, OPT_SSL_SYSTEM_CERTS, 1 }, + { "ssl_usesystemcerts", DT_BOOL, R_NONE, OPT_SSL_USESYSTEMCERTS, 1 }, /* ** .pp ** If set to \fIyes\fP, mutt will use CA certificates in the @@ -3932,7 +3932,7 @@ struct Option MuttVars[] = { */ #ifdef USE_SSL_OPENSSL #ifdef HAVE_SSL_PARTIAL_CHAIN - { "ssl_verify_partial_chains", DT_BOOL, R_NONE, OPT_SSL_VERIFY_PARTIAL, 0 }, + { "ssl_verify_partial_chains", DT_BOOL, R_NONE, OPT_SSL_VERIFY_PARTIAL_CHAINS, 0 }, /* ** .pp ** This option should not be changed from the default unless you understand @@ -4087,7 +4087,7 @@ struct Option MuttVars[] = { ** .pp ** Note that $$indent_string is ignored when this option is \fIset\fP. */ - { "thorough_search", DT_BOOL, R_NONE, OPT_THOROUGH_SRC, 1 }, + { "thorough_search", DT_BOOL, R_NONE, OPT_THOROUGH_SEARCH, 1 }, /* ** .pp ** Affects the \fC~b\fP and \fC~h\fP search operations described in @@ -4244,7 +4244,7 @@ struct Option MuttVars[] = { ** remain collapsed. the presence of the new message will still affect ** index sorting, though. */ - { "use_8bitmime", DT_BOOL, R_NONE, OPT_USE_8BIT_MIME, 0 }, + { "use_8bitmime", DT_BOOL, R_NONE, OPT_USE_8BITMIME, 0 }, /* ** .pp ** \fBWarning:\fP do not set this variable unless you are using a version @@ -4261,7 +4261,7 @@ struct Option MuttVars[] = { ** ``@host'' portion) with the value of $$hostname. If \fIunset\fP, no ** addresses will be qualified. */ - { "use_envelope_from", DT_BOOL, R_NONE, OPT_ENV_FROM, 0 }, + { "use_envelope_from", DT_BOOL, R_NONE, OPT_USE_ENVELOPE_FROM, 0 }, /* ** .pp ** When \fIset\fP, mutt will set the \fIenvelope\fP sender of the message. @@ -4294,7 +4294,7 @@ struct Option MuttVars[] = { ** Normally, the default should work. */ #endif /* HAVE_GETADDRINFO */ - { "user_agent", DT_BOOL, R_NONE, OPT_XMAILER, 1 }, + { "user_agent", DT_BOOL, R_NONE, OPT_USER_AGENT, 1 }, /* ** .pp ** When \fIset\fP, mutt will add a ``User-Agent:'' header to outgoing @@ -4315,7 +4315,7 @@ 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, OPT_VIRT_SPOOL_FILE, 0 }, + { "virtual_spoolfile", DT_BOOL, R_NONE, OPT_VIRTUAL_SPOOLFILE, 0 }, /* ** .pp ** When \fIset\fP, mutt will use the first defined virtual mailbox (see @@ -4420,7 +4420,7 @@ struct Option MuttVars[] = { ** various kinds of conversion. */ #ifdef USE_NNTP - { "x_comment_to", DT_BOOL, R_NONE, OPT_XCOMMENT_TO, 0 }, + { "x_comment_to", DT_BOOL, R_NONE, OPT_X_COMMENT_TO, 0 }, /* ** .pp ** If \fIset\fP, Mutt will add ``X-Comment-To:'' field (that contains full diff --git a/main.c b/main.c index 789697943e1..0a9d2b5dfb7 100644 --- a/main.c +++ b/main.c @@ -593,7 +593,7 @@ int main(int argc, char **argv, char **env) msg->env->to = rfc822_parse_adrlist(msg->env->to, argv[i]); } - if (!draftFile && option(OPT_AUTO_EDIT) && !msg->env->to && !msg->env->cc) + if (!draftFile && option(OPT_AUTOEDIT) && !msg->env->to && !msg->env->cc) { if (!option(OPT_NO_CURSES)) mutt_endwin(NULL); @@ -927,7 +927,7 @@ int main(int argc, char **argv, char **env) mutt_startup_shutdown_hook(MUTT_STARTUPHOOK); if ((Context = mx_open_mailbox( - folder, ((flags & MUTT_RO) || option(OPT_READONLY)) ? MUTT_READONLY : 0, NULL)) || + folder, ((flags & MUTT_RO) || option(OPT_READ_ONLY)) ? MUTT_READONLY : 0, NULL)) || !explicit_folder) { #ifdef USE_SIDEBAR diff --git a/mh.c b/mh.c index 8c1a484915e..d2267a8c9b1 100644 --- a/mh.c +++ b/mh.c @@ -1164,7 +1164,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 (option(OPT_HCACHE_VERIFY)) + if (option(OPT_MAILDIR_HEADER_CACHE_VERIFY)) { ret = stat(fn, &lastchanged); } diff --git a/mutt.h b/mutt.h index ba61b87244d..12574990742 100644 --- a/mutt.h +++ b/mutt.h @@ -238,16 +238,16 @@ enum QuadOptionResponse */ enum QuadOptionVars { - OPT_ABORT, + OPT_ABORT_UNMODIFIED, OPT_BOUNCE, OPT_COPY, OPT_DELETE, - OPT_FORW_EDIT, + OPT_FORWARD_EDIT, OPT_FCC_ATTACH, OPT_INCLUDE, - OPT_MF_UP_TO, - OPT_MIME_FWD, - OPT_MIME_FWD_REST, + OPT_HONOR_FOLLOWUP_TO, + OPT_MIME_FORWARD, + OPT_MIME_FORWARD_REST, OPT_MOVE, OPT_PGP_MIME_AUTO, /* ask to revert to PGP/MIME when inline fails */ OPT_SMIME_ENCRYPT_SELF, @@ -262,16 +262,16 @@ enum QuadOptionVars OPT_REPLY_TO, OPT_RECALL, #ifdef USE_SSL - OPT_SSL_START_TLS, + OPT_SSL_STARTTLS, #endif - OPT_SUBJECT, - OPT_VERIFY_SIG, /* verify PGP signatures */ + OPT_ABORT_NOSUBJECT, + OPT_CRYPT_VERIFY_SIG, /* verify PGP signatures */ #ifdef USE_NNTP - OPT_TO_MODERATED, - OPT_CATCHUP, - OPT_FOLLOW_UP_TO_POSTER, + OPT_POST_MODERATED, + OPT_CATCHUP_NEWSGROUP, + OPT_FOLLOWUP_TO_POSTER, #endif - OPT_ATTACH, /* forgotten attachment detector */ + OPT_ABORT_NOATTACH, /* forgotten attachment detector */ /* THIS MUST BE THE LAST VALUE. */ OPT_QUAD_MAX, }; diff --git a/mutt_ssl.c b/mutt_ssl.c index a98cc95a420..3d721dbc6c6 100644 --- a/mutt_ssl.c +++ b/mutt_ssl.c @@ -154,7 +154,7 @@ static int ssl_set_verify_partial(SSL_CTX *ctx) #ifdef HAVE_SSL_PARTIAL_CHAIN X509_VERIFY_PARAM *param = NULL; - if (option(OPT_SSL_VERIFY_PARTIAL)) + if (option(OPT_SSL_VERIFY_PARTIAL_CHAINS)) { param = X509_VERIFY_PARAM_new(); if (param) @@ -846,7 +846,7 @@ static int interactive_check_cert(X509 *cert, int idx, int len, SSL *ssl, int al /* The leaf/host certificate can't be skipped. */ #ifdef HAVE_SSL_PARTIAL_CHAIN - if ((idx != 0) && (option(OPT_SSL_VERIFY_PARTIAL))) + if ((idx != 0) && (option(OPT_SSL_VERIFY_PARTIAL_CHAINS))) allow_skip = 1; #endif @@ -995,7 +995,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 (option(OPT_SSL_VERIFY_PARTIAL)) + if (option(OPT_SSL_VERIFY_PARTIAL_CHAINS)) { if (skip_mode && preverify_ok && (pos == last_pos) && last_cert) { @@ -1160,7 +1160,7 @@ static int ssl_socket_open(struct Connection *conn) } /* disable SSL protocols as needed */ - if (!option(OPT_TLSV1)) + if (!option(OPT_SSL_USE_TLSV1)) { SSL_CTX_set_options(data->ctx, SSL_OP_NO_TLSv1); } @@ -1168,27 +1168,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 (!option(OPT_TLSV1_1)) + if (!option(OPT_SSL_USE_TLSV1_1)) { SSL_CTX_set_options(data->ctx, SSL_OP_NO_TLSv1_1); } #endif #ifdef SSL_OP_NO_TLSv1_2 - if (!option(OPT_TLSV1_2)) + if (!option(OPT_SSL_USE_TLSV1_2)) { SSL_CTX_set_options(data->ctx, SSL_OP_NO_TLSv1_2); } #endif - if (!option(OPT_SSLV2)) + if (!option(OPT_SSL_USE_SSLV2)) { SSL_CTX_set_options(data->ctx, SSL_OP_NO_SSLv2); } - if (!option(OPT_SSLV3)) + if (!option(OPT_SSL_USE_SSLV3)) { SSL_CTX_set_options(data->ctx, SSL_OP_NO_SSLv3); } - if (option(OPT_SSL_SYSTEM_CERTS)) + if (option(OPT_SSL_USESYSTEMCERTS)) { if (!SSL_CTX_set_default_verify_paths(data->ctx)) { @@ -1258,15 +1258,15 @@ int mutt_ssl_starttls(struct Connection *conn) goto bail_ssldata; } #ifdef SSL_OP_NO_TLSv1_2 - if (!option(OPT_TLSV1_2)) + if (!option(OPT_SSL_USE_TLSV1_2)) ssl_options |= SSL_OP_NO_TLSv1_2; #endif #ifdef SSL_OP_NO_TLSv1_1 - if (!option(OPT_TLSV1_1)) + if (!option(OPT_SSL_USE_TLSV1_1)) ssl_options |= SSL_OP_NO_TLSv1_1; #endif #ifdef SSL_OP_NO_TLSv1 - if (!option(OPT_TLSV1)) + if (!option(OPT_SSL_USE_TLSV1)) ssl_options |= SSL_OP_NO_TLSv1; #endif /* these are always set */ @@ -1282,7 +1282,7 @@ int mutt_ssl_starttls(struct Connection *conn) goto bail_ctx; } - if (option(OPT_SSL_SYSTEM_CERTS)) + if (option(OPT_SSL_USESYSTEMCERTS)) { if (!SSL_CTX_set_default_verify_paths(ssldata->ctx)) { diff --git a/mutt_ssl_gnutls.c b/mutt_ssl_gnutls.c index 9637cb7f46f..30ea2141d2a 100644 --- a/mutt_ssl_gnutls.c +++ b/mutt_ssl_gnutls.c @@ -936,22 +936,22 @@ static int tls_set_priority(struct TlsSockData *data) else safe_strcat(priority, priority_size, "NORMAL"); - if (!option(OPT_TLSV1_2)) + if (!option(OPT_SSL_USE_TLSV1_2)) { nproto--; safe_strcat(priority, priority_size, ":-VERS-TLS1.2"); } - if (!option(OPT_TLSV1_1)) + if (!option(OPT_SSL_USE_TLSV1_1)) { nproto--; safe_strcat(priority, priority_size, ":-VERS-TLS1.1"); } - if (!option(OPT_TLSV1)) + if (!option(OPT_SSL_USE_TLSV1)) { nproto--; safe_strcat(priority, priority_size, ":-VERS-TLS1.0"); } - if (!option(OPT_SSLV3)) + if (!option(OPT_SSL_USE_SSLV3)) { nproto--; safe_strcat(priority, priority_size, ":-VERS-SSL3.0"); @@ -987,13 +987,13 @@ static int tls_set_priority(struct TlsSockData *data) { size_t nproto = 0; /* number of tls/ssl protocols */ - if (option(OPT_TLSV1_2)) + if (option(OPT_SSL_USE_TLSV1_2)) protocol_priority[nproto++] = GNUTLS_TLS1_2; - if (option(OPT_TLSV1_1)) + if (option(OPT_SSL_USE_TLSV1_1)) protocol_priority[nproto++] = GNUTLS_TLS1_1; - if (option(OPT_TLSV1)) + if (option(OPT_SSL_USE_TLSV1)) protocol_priority[nproto++] = GNUTLS_TLS1; - if (option(OPT_SSLV3)) + if (option(OPT_SSL_USE_SSLV3)) protocol_priority[nproto++] = GNUTLS_SSL3; protocol_priority[nproto] = 0; diff --git a/muttlib.c b/muttlib.c index 83ef8423fc9..8857ef377f9 100644 --- a/muttlib.c +++ b/muttlib.c @@ -1494,7 +1494,7 @@ int mutt_save_confirm(const char *s, struct stat *st) if (magic > 0 && !mx_access(s, W_OK)) { - if (option(OPT_CONFIRM_APPEND)) + if (option(OPT_CONFIRMAPPEND)) { snprintf(tmp, sizeof(tmp), _("Append messages to %s?"), s); if ((rc = mutt_yesorno(tmp, MUTT_YES)) == MUTT_NO) @@ -1528,7 +1528,7 @@ int mutt_save_confirm(const char *s, struct stat *st) /* pathname does not exist */ if (errno == ENOENT) { - if (option(OPT_CONFIRM_CREATE)) + if (option(OPT_CONFIRMCREATE)) { snprintf(tmp, sizeof(tmp), _("Create %s?"), s); if ((rc = mutt_yesorno(tmp, MUTT_YES)) == MUTT_NO) @@ -1537,7 +1537,7 @@ int mutt_save_confirm(const char *s, struct stat *st) ret = -1; } - /* user confirmed with MUTT_YES or set OPT_CONFIRM_CREATE */ + /* user confirmed with MUTT_YES or set OPT_CONFIRMCREATE */ if (ret == 0) { strncpy(tmp, s, sizeof(tmp) - 1); diff --git a/mx.c b/mx.c index 89c1fd81b17..a4428c793c5 100644 --- a/mx.c +++ b/mx.c @@ -584,12 +584,12 @@ static int trash_append(struct Context *ctx) return 0; /* nothing to be done */ /* avoid the "append messages" prompt */ - opt_confappend = option(OPT_CONFIRM_APPEND); + opt_confappend = option(OPT_CONFIRMAPPEND); if (opt_confappend) - unset_option(OPT_CONFIRM_APPEND); + unset_option(OPT_CONFIRMAPPEND); rc = mutt_save_confirm(TrashPath, &st); if (opt_confappend) - set_option(OPT_CONFIRM_APPEND); + set_option(OPT_CONFIRMAPPEND); if (rc != 0) { mutt_error(_("message(s) not deleted")); @@ -662,7 +662,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, _("Mark all articles read?")); + int rc = query_quadoption(OPT_CATCHUP_NEWSGROUP, _("Mark all articles read?")); if (rc == MUTT_ABORT) { ctx->closing = false; diff --git a/ncrypt/crypt.c b/ncrypt/crypt.c index fefcbc0d443..ba9e5b592c0 100644 --- a/ncrypt/crypt.c +++ b/ncrypt/crypt.c @@ -235,7 +235,7 @@ int mutt_protect(struct Header *msg, char *keylist) } if ((WithCrypto & APPLICATION_PGP) && (msg->security & APPLICATION_PGP) && - (!(flags & ENCRYPT) || option(OPT_PGP_RETAINABLE_SIG))) + (!(flags & ENCRYPT) || option(OPT_PGP_RETAINABLE_SIGS))) { if (!(tmp_pbody = crypt_pgp_sign_message(msg->content))) return -1; diff --git a/ncrypt/crypt_gpgme.c b/ncrypt/crypt_gpgme.c index e08cb15c849..79b16f904c7 100644 --- a/ncrypt/crypt_gpgme.c +++ b/ncrypt/crypt_gpgme.c @@ -4584,7 +4584,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 && option(OPT_CRYPT_CONFIRM_HOOK)) + if (!oppenc_mode && option(OPT_CRYPT_CONFIRMHOOK)) { snprintf(buf, sizeof(buf), _("Use keyID = \"%s\" for %s?"), crypt_hook_val, p->mailbox); diff --git a/ncrypt/gnupgparse.c b/ncrypt/gnupgparse.c index 021a5899730..8ba3a2086d7 100644 --- a/ncrypt/gnupgparse.c +++ b/ncrypt/gnupgparse.c @@ -177,7 +177,7 @@ static struct PgpKeyInfo *parse_pub_line(char *buf, int *is_subkey, struct PgpKe else return NULL; - if (!(is_uid || is_fpr || (*is_subkey && option(OPT_PGP_IGNORE_SUB)))) + if (!(is_uid || is_fpr || (*is_subkey && option(OPT_PGP_IGNORE_SUBKEYS)))) memset(&tmp, 0, sizeof(tmp)); break; @@ -211,7 +211,7 @@ static struct PgpKeyInfo *parse_pub_line(char *buf, int *is_subkey, struct PgpKe break; } - if (!is_uid && !(*is_subkey && option(OPT_PGP_IGNORE_SUB))) + if (!is_uid && !(*is_subkey && option(OPT_PGP_IGNORE_SUBKEYS))) tmp.flags |= flags; break; @@ -220,7 +220,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 && option(OPT_PGP_IGNORE_SUB)) && mutt_atos(p, &tmp.keylen) < 0) + if (!(*is_subkey && option(OPT_PGP_IGNORE_SUBKEYS)) && mutt_atos(p, &tmp.keylen) < 0) goto bail; break; } @@ -228,7 +228,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 && option(OPT_PGP_IGNORE_SUB))) + if (!(*is_subkey && option(OPT_PGP_IGNORE_SUBKEYS))) { int x = 0; if (mutt_atoi(p, &x) < 0) @@ -242,7 +242,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 && option(OPT_PGP_IGNORE_SUB))) + if (!(*is_subkey && option(OPT_PGP_IGNORE_SUBKEYS))) mutt_str_replace(&tmp.keyid, p); break; } @@ -307,7 +307,7 @@ static struct PgpKeyInfo *parse_pub_line(char *buf, int *is_subkey, struct PgpKe } /* ignore user IDs on subkeys */ - if (!is_uid && (*is_subkey && option(OPT_PGP_IGNORE_SUB))) + if (!is_uid && (*is_subkey && option(OPT_PGP_IGNORE_SUBKEYS))) break; mutt_debug(2, "user ID: %s\n", NONULL(p)); @@ -350,7 +350,7 @@ static struct PgpKeyInfo *parse_pub_line(char *buf, int *is_subkey, struct PgpKe } } - if (!is_uid && (!*is_subkey || !option(OPT_PGP_IGNORE_SUB) || + if (!is_uid && (!*is_subkey || !option(OPT_PGP_IGNORE_SUBKEYS) || !((flags & KEYFLAG_DISABLED) || (flags & KEYFLAG_REVOKED) || (flags & KEYFLAG_EXPIRED)))) tmp.flags |= flags; @@ -363,7 +363,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 && option(OPT_PGP_IGNORE_SUB)))) + if (!(is_uid || is_fpr || (*is_subkey && option(OPT_PGP_IGNORE_SUBKEYS)))) k = safe_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 34a9be6768b..fa2d6948c7d 100644 --- a/ncrypt/pgp.c +++ b/ncrypt/pgp.c @@ -109,7 +109,7 @@ bool pgp_use_gpg_agent(void) char *tty = NULL; /* GnuPG 2.1 no longer exports GPG_AGENT_INFO */ - if (!option(OPT_USE_GPG_AGENT)) + if (!option(OPT_PGP_USE_GPG_AGENT)) return false; if ((tty = ttyname(0))) @@ -123,7 +123,7 @@ bool pgp_use_gpg_agent(void) static struct PgpKeyInfo *_pgp_parent(struct PgpKeyInfo *k) { - if ((k->flags & KEYFLAG_SUBKEY) && k->parent && option(OPT_PGP_IGNORE_SUB)) + if ((k->flags & KEYFLAG_SUBKEY) && k->parent && option(OPT_PGP_IGNORE_SUBKEYS)) k = k->parent; return k; @@ -1249,7 +1249,7 @@ char *pgp_find_keys(struct Address *adrlist, int oppenc_mode) { keyID = crypt_hook->data; r = MUTT_YES; - if (!oppenc_mode && option(OPT_CRYPT_CONFIRM_HOOK)) + if (!oppenc_mode && option(OPT_CRYPT_CONFIRMHOOK)) { snprintf(buf, sizeof(buf), _("Use keyID = \"%s\" for %s?"), keyID, p->mailbox); r = mutt_yesorno(buf, MUTT_YES); @@ -1650,7 +1650,7 @@ int pgp_send_menu(struct Header *msg) return msg->security; /* If autoinline and no crypto options set, then set inline. */ - if (option(OPT_PGP_AUTO_INLINE) && + if (option(OPT_PGP_AUTOINLINE) && !((msg->security & APPLICATION_PGP) && (msg->security & (SIGN | ENCRYPT)))) msg->security |= INLINE; diff --git a/ncrypt/smime.c b/ncrypt/smime.c index 928340799ec..1f201ebaf84 100644 --- a/ncrypt/smime.c +++ b/ncrypt/smime.c @@ -823,7 +823,7 @@ void smime_getkeys(struct Envelope *env) struct Address *t = NULL; bool found = false; - if (option(OPT_SDEFAULT_DECRYPT_KEY) && SmimeDefaultKey && *SmimeDefaultKey) + if (option(OPT_SMIME_DECRYPT_USE_DEFAULT_KEY) && SmimeDefaultKey && *SmimeDefaultKey) { snprintf(SmimeKeyToUse, sizeof(SmimeKeyToUse), "%s/%s", NONULL(SmimeKeys), SmimeDefaultKey); @@ -1181,7 +1181,7 @@ void smime_invoke_import(char *infile, char *mailbox) mutt_unlink(tmpfname); buf[0] = '\0'; - if (option(OPT_ASK_CERT_LABEL)) + if (option(OPT_SMIME_ASK_CERT_LABEL)) { if ((mutt_get_field(_("Label for certificate: "), buf, sizeof(buf), 0) != 0) || (buf[0] == 0)) diff --git a/newsrc.c b/newsrc.c index d959870f9ae..489fb561b7c 100644 --- a/newsrc.c +++ b/newsrc.c @@ -674,7 +674,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 || option(OPT_SAVE_UNSUB))) + !(nntp_data->newsrc_ent || nntp_data->subscribed || option(OPT_SAVE_UNSUBSCRIBED))) return NULL; mutt_account_tourl(&nntp_data->nserv->conn->account, &url); @@ -841,7 +841,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 || option(OPT_SAVE_UNSUB)) + else if (nntp_data->newsrc_ent || nntp_data->subscribed || option(OPT_SAVE_UNSUBSCRIBED)) continue; nntp_delete_group_cache(nntp_data); @@ -1199,7 +1199,7 @@ struct NntpData *mutt_newsgroup_unsubscribe(struct NntpServer *nserv, char *grou return NULL; nntp_data->subscribed = false; - if (!option(OPT_SAVE_UNSUB)) + if (!option(OPT_SAVE_UNSUBSCRIBED)) { nntp_data->newsrc_len = 0; FREE(&nntp_data->newsrc_ent); diff --git a/nntp.c b/nntp.c index 35afa5e38ea..c25d45ff153 100644 --- a/nntp.c +++ b/nntp.c @@ -671,7 +671,7 @@ int nntp_open_connection(struct NntpServer *nserv) if (nserv->use_tls == 0) nserv->use_tls = option(OPT_SSL_FORCE_TLS) || - query_quadoption(OPT_SSL_START_TLS, + query_quadoption(OPT_SSL_STARTTLS, _("Secure connection with TLS?")) == MUTT_YES ? 2 : 1; @@ -1236,7 +1236,7 @@ static int nntp_fetch_headers(struct Context *ctx, void *hc, anum_t first, #endif /* fetch list of articles */ - if (option(OPT_LIST_GROUP) && nntp_data->nserv->hasLISTGROUP && !nntp_data->deleted) + if (option(OPT_NNTP_LISTGROUP) && nntp_data->nserv->hasLISTGROUP && !nntp_data->deleted) { if (!ctx->quiet) mutt_message(_("Fetching list of articles...")); @@ -1333,7 +1333,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 (option(OPT_LIST_GROUP) && nntp_data->nserv->hasLISTGROUP) + if (option(OPT_NNTP_LISTGROUP) && nntp_data->nserv->hasLISTGROUP) break; else continue; @@ -1411,7 +1411,7 @@ static int nntp_fetch_headers(struct Context *ctx, void *hc, anum_t first, first_over = current + 1; } - if (!option(OPT_LIST_GROUP) || !nntp_data->nserv->hasLISTGROUP) + if (!option(OPT_NNTP_LISTGROUP) || !nntp_data->nserv->hasLISTGROUP) current = first_over; /* fetch overview information */ @@ -1480,7 +1480,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 && !option(OPT_SAVE_UNSUB)) + if (!nntp_data->newsrc_ent && !nntp_data->subscribed && !option(OPT_SAVE_UNSUBSCRIBED)) ctx->readonly = true; /* select newsgroup */ @@ -1501,7 +1501,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 && !option(OPT_SAVE_UNSUB)) + if (nntp_data->newsrc_ent && !nntp_data->subscribed && !option(OPT_SAVE_UNSUBSCRIBED)) { FREE(&nntp_data->newsrc_ent); nntp_data->newsrc_len = 0; @@ -1526,7 +1526,7 @@ static int nntp_open_mailbox(struct Context *ctx) nntp_data->deleted = false; /* get description if empty */ - if (option(OPT_LOAD_DESC) && !nntp_data->desc) + if (option(OPT_NNTP_LOAD_DESCRIPTION) && !nntp_data->desc) { if (get_description(nntp_data, NULL, NULL) < 0) { @@ -1541,7 +1541,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 || option(OPT_SAVE_UNSUB))) + (nntp_data->newsrc_ent || nntp_data->subscribed || option(OPT_SAVE_UNSUBSCRIBED))) nntp_data->bcache = mutt_bcache_open(&nserv->conn->account, nntp_data->group); /* strip off extra articles if adding context is greater than $nntp_context */ @@ -2231,7 +2231,7 @@ int nntp_active_fetch(struct NntpServer *nserv, unsigned int new) } } - if (option(OPT_LOAD_DESC)) + if (option(OPT_NNTP_LOAD_DESCRIPTION)) rc = get_description(&nntp_data, "*", _("Loading descriptions...")); nntp_active_save_cache(nserv); @@ -2327,7 +2327,7 @@ int nntp_check_new_groups(struct NntpServer *nserv) } /* loading descriptions */ - if (option(OPT_LOAD_DESC)) + if (option(OPT_NNTP_LOAD_DESCRIPTION)) { unsigned int count = 0; struct Progress progress; diff --git a/options.h b/options.h index 70b6057e53c..81eef975e76 100644 --- a/options.h +++ b/options.h @@ -32,12 +32,12 @@ enum GlobalBool OPT_ALLOW_ANSI, OPT_ARROW_CURSOR, OPT_ASCII_CHARS, - OPT_ASK_BCC, - OPT_ASK_CC, - OPT_ASK_FOLLOWUP, - OPT_ASK_XCOMMENTTO, + OPT_ASKBCC, + OPT_ASKCC, + OPT_ASK_FOLLOW_UP, + OPT_ASK_X_COMMENT_TO, OPT_ATTACH_SPLIT, - OPT_AUTO_EDIT, + OPT_AUTOEDIT, OPT_AUTO_TAG, OPT_BEEP, OPT_BEEP_NEW, @@ -48,26 +48,26 @@ enum GlobalBool OPT_COLLAPSE_ALL, OPT_COLLAPSE_UNREAD, OPT_COLLAPSE_FLAGGED, - OPT_CONFIRM_APPEND, - OPT_CONFIRM_CREATE, + OPT_CONFIRMAPPEND, + OPT_CONFIRMCREATE, OPT_DELETE_UNTAG, OPT_DIGEST_COLLAPSE, - OPT_DUP_THREADS, - OPT_EDIT_HDRS, + OPT_DUPLICATE_THREADS, + OPT_EDIT_HEADERS, OPT_ENCODE_FROM, - OPT_ENV_FROM, + OPT_USE_ENVELOPE_FROM, OPT_FAST_REPLY, OPT_FCC_CLEAR, OPT_FLAG_SAFE, - OPT_FOLLOW_UP_TO, + OPT_FOLLOWUP_TO, OPT_FORCE_NAME, - OPT_FORW_DECODE, - OPT_FORW_QUOTE, - OPT_FORW_REF, + OPT_FORWARD_DECODE, + OPT_FORWARD_QUOTE, + OPT_FORWARD_REFERENCES, #ifdef USE_HCACHE - OPT_HCACHE_VERIFY, + OPT_MAILDIR_HEADER_CACHE_VERIFY, #if defined(HAVE_QDBM) || defined(HAVE_TC) || defined(HAVE_KC) - OPT_HCACHE_COMPRESS, + OPT_HEADER_CACHE_COMPRESS, #endif /* HAVE_QDBM */ #endif OPT_HDRS, @@ -80,36 +80,36 @@ enum GlobalBool OPT_HIDE_THREAD_SUBJECT, OPT_HIDE_TOP_LIMITED, OPT_HIDE_TOP_MISSING, - OPT_HIST_REMOVE_DUPS, - OPT_HONOR_DISP, - OPT_IGNORE_LWS, + OPT_HISTORY_REMOVE_DUPS, + OPT_HONOR_DISPOSITION, + OPT_IGNORE_LINEAR_WHITE_SPACE, OPT_IGNORE_LIST_REPLY_TO, #ifdef USE_IMAP OPT_IMAP_CHECK_SUBSCRIBED, OPT_IMAP_IDLE, - OPT_IMAP_LSUB, + OPT_IMAP_LIST_SUBSCRIBED, OPT_IMAP_PASSIVE, OPT_IMAP_PEEK, - OPT_IMAP_SERVER_NOISE, + OPT_IMAP_SERVERNOISE, #endif #ifdef USE_SSL #ifndef USE_SSL_GNUTLS - OPT_SSL_SYSTEM_CERTS, - OPT_SSLV2, + OPT_SSL_USESYSTEMCERTS, + OPT_SSL_USE_SSLV2, #endif /* USE_SSL_GNUTLS */ - OPT_SSLV3, - OPT_TLSV1, - OPT_TLSV1_1, - OPT_TLSV1_2, + OPT_SSL_USE_SSLV3, + OPT_SSL_USE_TLSV1, + OPT_SSL_USE_TLSV1_1, + OPT_SSL_USE_TLSV1_2, OPT_SSL_FORCE_TLS, OPT_SSL_VERIFY_DATES, OPT_SSL_VERIFY_HOST, #if defined(USE_SSL_OPENSSL) && defined(HAVE_SSL_PARTIAL_CHAIN) - OPT_SSL_VERIFY_PARTIAL, + OPT_SSL_VERIFY_PARTIAL_CHAINS, #endif /* USE_SSL_OPENSSL */ #endif /* defined(USE_SSL) */ OPT_IMPLICIT_AUTOVIEW, - OPT_INCLUDE_ONLY_FIRST, + OPT_INCLUDE_ONLYFIRST, OPT_KEEP_FLAGGED, OPT_KEYWORDS_LEGACY, OPT_KEYWORDS_STANDARD, @@ -125,10 +125,10 @@ enum GlobalBool #if defined(USE_IMAP) || defined(USE_POP) OPT_MESSAGE_CACHE_CLEAN, #endif - OPT_METAKEY, /**< interpret ALT-x as ESC-x */ - OPT_ME_TOO, + OPT_META_KEY, /**< interpret ALT-x as ESC-x */ + OPT_METOO, OPT_MH_PURGE, - OPT_MIME_FORW_DECODE, + OPT_MIME_FORWARD_DECODE, OPT_MIME_TYPE_QUERY_FIRST, #ifdef USE_NNTP OPT_MIME_SUBJECT, /**< encode subject line with RFC2047 */ @@ -145,7 +145,7 @@ enum GlobalBool OPT_PRINT_DECODE, OPT_PRINT_SPLIT, OPT_PROMPT_AFTER, - OPT_READONLY, + OPT_READ_ONLY, OPT_REFLOW_SPACE_QUOTES, OPT_REFLOW_TEXT, OPT_REPLY_SELF, @@ -153,18 +153,18 @@ enum GlobalBool OPT_RESOLVE, OPT_RESUME_DRAFT_FILES, OPT_RESUME_EDITED_DRAFT_FILES, - OPT_REV_ALIAS, - OPT_REV_NAME, - OPT_REV_REAL, - OPT_RFC2047_PARAMS, + OPT_REVERSE_ALIAS, + OPT_REVERSE_NAME, + OPT_REVERSE_REALNAME, + OPT_RFC2047_PARAMETERS, OPT_SAVE_ADDRESS, OPT_SAVE_EMPTY, OPT_SAVE_NAME, OPT_SCORE, #ifdef USE_SIDEBAR - OPT_SIDEBAR, + OPT_SIDEBAR_VISIBLE, OPT_SIDEBAR_FOLDER_INDENT, - OPT_SIDEBAR_NEWMAIL_ONLY, + OPT_SIDEBAR_NEW_MAIL_ONLY, OPT_SIDEBAR_NEXT_NEW_WRAP, OPT_SIDEBAR_SHORT_PATH, OPT_SIDEBAR_ON_RIGHT, @@ -176,16 +176,16 @@ enum GlobalBool OPT_STRICT_THREADS, OPT_SUSPEND, OPT_TEXT_FLOWED, - OPT_THOROUGH_SRC, + OPT_THOROUGH_SEARCH, OPT_THREAD_RECEIVED, OPT_TILDE, OPT_TS_ENABLED, OPT_UNCOLLAPSE_JUMP, OPT_UNCOLLAPSE_NEW, - OPT_USE_8BIT_MIME, + OPT_USE_8BITMIME, OPT_USE_DOMAIN, OPT_USE_FROM, - OPT_USE_GPG_AGENT, + OPT_PGP_USE_GPG_AGENT, #ifdef HAVE_LIBIDN OPT_IDN_DECODE, OPT_IDN_ENCODE, @@ -195,51 +195,51 @@ enum GlobalBool #endif OPT_WAIT_KEY, OPT_WEED, - OPT_WRAP, + OPT_SMART_WRAP, OPT_WRAP_SEARCH, OPT_WRITE_BCC, /**< write out a bcc header? */ - OPT_XMAILER, + OPT_USER_AGENT, OPT_CRYPT_USE_GPGME, OPT_CRYPT_USE_PKA, /* PGP options */ - OPT_CRYPT_AUTO_SIGN, - OPT_CRYPT_AUTO_ENCRYPT, - OPT_CRYPT_AUTO_PGP, - OPT_CRYPT_AUTO_SMIME, - OPT_CRYPT_CONFIRM_HOOK, + OPT_CRYPT_AUTOSIGN, + OPT_CRYPT_AUTOENCRYPT, + OPT_CRYPT_AUTOPGP, + OPT_CRYPT_AUTOSMIME, + OPT_CRYPT_CONFIRMHOOK, OPT_CRYPT_OPPORTUNISTIC_ENCRYPT, - OPT_CRYPT_REPLY_ENCRYPT, - OPT_CRYPT_REPLY_SIGN, - OPT_CRYPT_REPLY_SIGN_ENCRYPTED, + OPT_CRYPT_REPLYENCRYPT, + OPT_CRYPT_REPLYSIGN, + OPT_CRYPT_REPLYSIGNENCRYPTED, OPT_CRYPT_TIMESTAMP, OPT_SMIME_IS_DEFAULT, OPT_SMIME_SELF_ENCRYPT, - OPT_ASK_CERT_LABEL, - OPT_SDEFAULT_DECRYPT_KEY, - OPT_PGP_IGNORE_SUB, + OPT_SMIME_ASK_CERT_LABEL, + OPT_SMIME_DECRYPT_USE_DEFAULT_KEY, + OPT_PGP_IGNORE_SUBKEYS, OPT_PGP_CHECK_EXIT, OPT_PGP_LONG_IDS, - OPT_PGP_AUTO_DEC, - OPT_PGP_RETAINABLE_SIG, + OPT_PGP_AUTO_DECODE, + OPT_PGP_RETAINABLE_SIGS, OPT_PGP_SELF_ENCRYPT, OPT_PGP_STRICT_ENC, - OPT_FORW_DECRYPT, + OPT_FORWARD_DECRYPT, OPT_PGP_SHOW_UNUSABLE, - OPT_PGP_AUTO_INLINE, - OPT_PGP_REPLY_INLINE, + OPT_PGP_AUTOINLINE, + OPT_PGP_REPLYINLINE, /* news options */ #ifdef USE_NNTP OPT_SHOW_NEW_NEWS, OPT_SHOW_ONLY_UNREAD, - OPT_SAVE_UNSUB, - OPT_LIST_GROUP, - OPT_LOAD_DESC, - OPT_XCOMMENT_TO, + OPT_SAVE_UNSUBSCRIBED, + OPT_NNTP_LISTGROUP, + OPT_NNTP_LOAD_DESCRIPTION, + OPT_X_COMMENT_TO, #endif /* pseudo options */ @@ -274,8 +274,8 @@ enum GlobalBool OPT_NEWS_SEND, /**< (pseudo) used to change behavior when posting */ #endif #ifdef USE_NOTMUCH - OPT_VIRT_SPOOL_FILE, - OPT_NOTMUCH_RECORD, + OPT_VIRTUAL_SPOOLFILE, + OPT_NM_RECORD, #endif OPT_GLOBAL_MAX diff --git a/pager.c b/pager.c index 71ab791b320..d5858ff6ab9 100644 --- a/pager.c +++ b/pager.c @@ -1555,7 +1555,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 (option(OPT_WRAP)) + if (option(OPT_SMART_WRAP)) { if (cnt < b_read) { @@ -2885,7 +2885,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_TO_MODERATED, _("Posting to this group not allowed, may be moderated. Continue?")) != MUTT_YES) + !((struct NntpData *) extra->ctx->data)->allowed && query_quadoption(OPT_POST_MODERATED, _("Posting to this group not allowed, may be moderated. Continue?")) != MUTT_YES) break; ci_send_message(SENDNEWS, NULL, NULL, extra->ctx, NULL); pager_menu->redraw = REDRAW_FULL; @@ -2895,7 +2895,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_TO_MODERATED, _("Posting to this group not allowed, may be moderated. Continue?")) != MUTT_YES) + !((struct NntpData *) extra->ctx->data)->allowed && query_quadoption(OPT_POST_MODERATED, _("Posting to this group not allowed, may be moderated. Continue?")) != MUTT_YES) break; if (IsMsgAttach(extra)) mutt_attach_forward(extra->fp, extra->hdr, extra->actx, extra->bdy, SENDNEWS); @@ -2914,11 +2914,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_strcasecmp(followup_to, "poster") != 0) || - query_quadoption(OPT_FOLLOW_UP_TO_POSTER, + query_quadoption(OPT_FOLLOWUP_TO_POSTER, _("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_TO_MODERATED, _("Posting to this group not allowed, may be moderated. Continue?")) != MUTT_YES) + !((struct NntpData *) extra->ctx->data)->allowed && query_quadoption(OPT_POST_MODERATED, _("Posting to this group not allowed, may be moderated. Continue?")) != MUTT_YES) break; if (IsMsgAttach(extra)) mutt_attach_reply(extra->fp, extra->hdr, extra->actx, extra->bdy, SENDNEWS | SENDREPLY); @@ -3188,7 +3188,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e break; case OP_SIDEBAR_TOGGLE_VISIBLE: - toggle_option(OPT_SIDEBAR); + toggle_option(OPT_SIDEBAR_VISIBLE); mutt_reflow_windows(); break; #endif diff --git a/pattern.c b/pattern.c index 773f5266bbc..8411b36573f 100644 --- a/pattern.c +++ b/pattern.c @@ -943,7 +943,7 @@ static int msg_search(struct Context *ctx, struct Pattern *pat, int msgno) if ((msg = mx_open_message(ctx, msgno)) != NULL) { - if (option(OPT_THOROUGH_SRC)) + if (option(OPT_THOROUGH_SEARCH)) { /* decode the header / body */ memset(&s, 0, sizeof(s)); @@ -1063,7 +1063,7 @@ static int msg_search(struct Context *ctx, struct Pattern *pat, int msgno) mx_close_message(ctx, &msg); - if (option(OPT_THOROUGH_SRC)) + if (option(OPT_THOROUGH_SEARCH)) { safe_fclose(&fp); #ifdef USE_FMEMOPEN diff --git a/pop_lib.c b/pop_lib.c index 9178f88b232..3753bad865d 100644 --- a/pop_lib.c +++ b/pop_lib.c @@ -326,7 +326,7 @@ int pop_open_connection(struct PopData *pop_data) pop_data->use_stls = 2; if (pop_data->use_stls == 0) { - ret = query_quadoption(OPT_SSL_START_TLS, _("Secure connection with TLS?")); + ret = query_quadoption(OPT_SSL_STARTTLS, _("Secure connection with TLS?")); if (ret == MUTT_ABORT) return -2; pop_data->use_stls = 1; diff --git a/recvattach.c b/recvattach.c index 9ff48de0774..b6dcfde4d76 100644 --- a/recvattach.c +++ b/recvattach.c @@ -1339,7 +1339,7 @@ void mutt_view_attachments(struct Header *hdr) if (!CURATTACH->content->hdr->env->followup_to || (mutt_strcasecmp(CURATTACH->content->hdr->env->followup_to, "poster") != 0) || - query_quadoption(OPT_FOLLOW_UP_TO_POSTER, + query_quadoption(OPT_FOLLOWUP_TO_POSTER, _("Reply by mail as poster prefers?")) != MUTT_YES) { mutt_attach_reply(CURATTACH->fp, hdr, actx, menu->tagprefix ? NULL : CURATTACH->content, diff --git a/recvcmd.c b/recvcmd.c index 5d0e31e7bb3..ad36e299b2a 100644 --- a/recvcmd.c +++ b/recvcmd.c @@ -428,7 +428,7 @@ static void attach_forward_bodies(FILE *fp, struct Header *hdr, struct AttachCtx /* prepare the prefix here since we'll need it later. */ - if (option(OPT_FORW_QUOTE)) + if (option(OPT_FORWARD_QUOTE)) { if (!option(OPT_TEXT_FLOWED)) _mutt_make_string(prefix, sizeof(prefix), NONULL(Prefix), Context, parent_hdr, 0); @@ -436,7 +436,7 @@ static void attach_forward_bodies(FILE *fp, struct Header *hdr, struct AttachCtx strfcpy(prefix, ">", sizeof(prefix)); } - include_header(option(OPT_FORW_QUOTE), parent_fp, parent_hdr, tmpfp, prefix); + include_header(option(OPT_FORWARD_QUOTE), parent_fp, parent_hdr, tmpfp, prefix); /* * Now, we have prepared the first part of the message body: The @@ -447,7 +447,7 @@ static void attach_forward_bodies(FILE *fp, struct Header *hdr, struct AttachCtx */ if ((!cur || mutt_can_decode(cur)) && - (rc = query_quadoption(OPT_MIME_FWD, _("Forward as attachments?"))) == MUTT_YES) + (rc = query_quadoption(OPT_MIME_FORWARD, _("Forward as attachments?"))) == MUTT_YES) mime_fwd_all = true; else if (rc == -1) goto bail; @@ -459,7 +459,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)) { - if ((rc = query_quadoption(OPT_MIME_FWD_REST, + if ((rc = query_quadoption(OPT_MIME_FORWARD_REST, _("Can't decode all tagged attachments. " "MIME-forward the others?"))) == MUTT_ABORT) goto bail; @@ -471,7 +471,7 @@ static void attach_forward_bodies(FILE *fp, struct Header *hdr, struct AttachCtx memset(&st, 0, sizeof(st)); - if (option(OPT_FORW_QUOTE)) + if (option(OPT_FORWARD_QUOTE)) st.prefix = prefix; st.flags = MUTT_CHARCONV; if (option(OPT_WEED)) @@ -581,7 +581,7 @@ static void attach_forward_msgs(FILE *fp, struct Header *hdr, tmpbody[0] = '\0'; - if ((rc = query_quadoption(OPT_MIME_FWD, _("Forward MIME encapsulated?"))) == MUTT_NO) + if ((rc = query_quadoption(OPT_MIME_FORWARD, _("Forward MIME encapsulated?"))) == MUTT_NO) { /* no MIME encapsulation */ @@ -593,13 +593,13 @@ static void attach_forward_msgs(FILE *fp, struct Header *hdr, return; } - if (option(OPT_FORW_QUOTE)) + if (option(OPT_FORWARD_QUOTE)) { chflags |= CH_PREFIX; cmflags |= MUTT_CM_PREFIX; } - if (option(OPT_FORW_DECODE)) + if (option(OPT_FORWARD_DECODE)) { cmflags |= MUTT_CM_DECODE | MUTT_CM_CHARCONV; if (option(OPT_WEED)) @@ -826,7 +826,7 @@ void mutt_attach_reply(FILE *fp, struct Header *hdr, struct AttachCtx *actx, if (nattach > 1 && !check_can_decode(actx, cur)) { - if ((rc = query_quadoption(OPT_MIME_FWD_REST, + if ((rc = query_quadoption(OPT_MIME_FORWARD_REST, _("Can't decode all tagged attachments. " "MIME-encapsulate the others?"))) == MUTT_ABORT) return; diff --git a/rfc2047.c b/rfc2047.c index a5a8ddbf269..239dce73d12 100644 --- a/rfc2047.c +++ b/rfc2047.c @@ -804,7 +804,7 @@ void rfc2047_decode(char **pd) if (!(p = find_encoded_word(s, &q))) { /* no encoded words */ - if (option(OPT_IGNORE_LWS)) + if (option(OPT_IGNORE_LINEAR_WHITE_SPACE)) { n = mutt_strlen(s); if (found_encoded && (m = lwslen(s, n)) != 0) @@ -843,7 +843,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 (option(OPT_IGNORE_LWS)) + if (option(OPT_IGNORE_LINEAR_WHITE_SPACE)) { if (found_encoded && (m = lwslen(s, n)) != 0) { diff --git a/rfc2231.c b/rfc2231.c index 346407ce35a..5760c6c97e8 100644 --- a/rfc2231.c +++ b/rfc2231.c @@ -241,7 +241,7 @@ void rfc2231_decode_parameters(struct Parameter **headp) * Internet Gateways. So we actually decode it. */ - if (option(OPT_RFC2047_PARAMS) && p->value && strstr(p->value, "=?")) + if (option(OPT_RFC2047_PARAMETERS) && p->value && strstr(p->value, "=?")) rfc2047_decode(&p->value); else if (AssumedCharset && *AssumedCharset) convert_nonmime_string(&p->value); diff --git a/send.c b/send.c index 032ba819054..92587cecb89 100644 --- a/send.c +++ b/send.c @@ -267,7 +267,7 @@ static int edit_envelope(struct Envelope *en, int flags) strfcpy(buf, en->followup_to, sizeof(buf)); else buf[0] = 0; - if (option(OPT_ASK_FOLLOWUP) && mutt_get_field("Followup-To: ", buf, sizeof(buf), 0) != 0) + if (option(OPT_ASK_FOLLOW_UP) && mutt_get_field("Followup-To: ", buf, sizeof(buf), 0) != 0) return -1; FREE(&en->followup_to); en->followup_to = safe_strdup(buf); @@ -276,7 +276,7 @@ static int edit_envelope(struct Envelope *en, int flags) strfcpy(buf, en->x_comment_to, sizeof(buf)); else buf[0] = 0; - if (option(OPT_XCOMMENT_TO) && option(OPT_ASK_XCOMMENTTO) && + if (option(OPT_X_COMMENT_TO) && option(OPT_ASK_X_COMMENT_TO) && mutt_get_field("X-Comment-To: ", buf, sizeof(buf), 0) != 0) return -1; FREE(&en->x_comment_to); @@ -287,9 +287,9 @@ static int edit_envelope(struct Envelope *en, int flags) { if (edit_address(&en->to, _("To: ")) == -1 || en->to == NULL) return -1; - if (option(OPT_ASK_CC) && edit_address(&en->cc, _("Cc: ")) == -1) + if (option(OPT_ASKCC) && edit_address(&en->cc, _("Cc: ")) == -1) return -1; - if (option(OPT_ASK_BCC) && edit_address(&en->bcc, _("Bcc: ")) == -1) + if (option(OPT_ASKBCC) && edit_address(&en->bcc, _("Bcc: ")) == -1) return -1; if (option(OPT_REPLY_WITH_XORIG) && (flags & (SENDREPLY | SENDLISTREPLY | SENDGROUPREPLY)) && (edit_address(&en->from, "From: ") == -1)) @@ -320,7 +320,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_SUBJECT, _("No subject, abort?")) != MUTT_NO)) + (!buf[0] && query_quadoption(OPT_ABORT_NOSUBJECT, _("No subject, abort?")) != MUTT_NO)) { mutt_message(_("No subject, aborting.")); return -1; @@ -440,7 +440,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) && option(OPT_FORW_DECODE)) + if (WithCrypto && (cur->security & ENCRYPT) && option(OPT_FORWARD_DECODE)) { /* make sure we have the user's passphrase before proceeding... */ if (!crypt_valid_passphrase(cur->security)) @@ -449,7 +449,7 @@ static int include_forward(struct Context *ctx, struct Header *cur, FILE *out) mutt_forward_intro(ctx, cur, out); - if (option(OPT_FORW_DECODE)) + if (option(OPT_FORWARD_DECODE)) { cmflags |= MUTT_CM_DECODE | MUTT_CM_CHARCONV; if (option(OPT_WEED)) @@ -458,7 +458,7 @@ static int include_forward(struct Context *ctx, struct Header *cur, FILE *out) cmflags |= MUTT_CM_WEED; } } - if (option(OPT_FORW_QUOTE)) + if (option(OPT_FORWARD_QUOTE)) cmflags |= MUTT_CM_PREFIX; /* wrapping headers for forwarding is considered a display @@ -612,7 +612,7 @@ int mutt_fetch_recips(struct Envelope *out, struct Envelope *in, int flags) in->mail_followup_to->mailbox, in->mail_followup_to->next ? ",..." : ""); - if ((hmfupto = query_quadoption(OPT_MF_UP_TO, prompt)) == MUTT_ABORT) + if ((hmfupto = query_quadoption(OPT_HONOR_FOLLOWUP_TO, prompt)) == MUTT_ABORT) return -1; } @@ -663,7 +663,7 @@ static void add_message_id(struct ListHead *head, struct Envelope *e) void mutt_fix_reply_recipients(struct Envelope *env) { - if (!option(OPT_ME_TOO)) + if (!option(OPT_METOO)) { /* the order is important here. do the CC: first so that if the * the user is the only recipient, it ends up on the TO: field @@ -722,7 +722,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 (option(OPT_NEWS_SEND) && option(OPT_XCOMMENT_TO) && curenv->from) + if (option(OPT_NEWS_SEND) && option(OPT_X_COMMENT_TO) && curenv->from) env->x_comment_to = safe_strdup(mutt_get_name(curenv->from)); #endif } @@ -824,7 +824,7 @@ static int envelope_defaults(struct Envelope *env, struct Context *ctx, else if (flags & SENDFORWARD) { mutt_make_forward_subject(env, ctx, cur); - if (option(OPT_FORW_REF)) + if (option(OPT_FORWARD_REFERENCES)) make_reference_headers(tag ? NULL : curenv, env, ctx); } @@ -878,7 +878,7 @@ static int generate_body(FILE *tempfp, struct Header *msg, int flags, } else if (flags & SENDFORWARD) { - if ((i = query_quadoption(OPT_MIME_FWD, _("Forward as attachment?"))) == MUTT_YES) + if ((i = query_quadoption(OPT_MIME_FORWARD, _("Forward as attachment?"))) == MUTT_YES) { struct Body *last = msg->content; @@ -952,7 +952,7 @@ void mutt_set_followup_to(struct Envelope *e) * it hasn't already been set */ - if (!option(OPT_FOLLOW_UP_TO)) + if (!option(OPT_FOLLOWUP_TO)) return; #ifdef USE_NNTP if (option(OPT_NEWS_SEND)) @@ -1042,7 +1042,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 (!option(OPT_REV_REAL)) + if (!option(OPT_REVERSE_REALNAME)) FREE(&tmp->personal); } return tmp; @@ -1452,7 +1452,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 && option(OPT_REV_NAME) && !(flags & (SENDPOSTPONED | SENDRESEND))) + if (cur && option(OPT_REVERSE_NAME) && !(flags & (SENDPOSTPONED | SENDRESEND))) { /* we shouldn't have to worry about freeing `msg->env->from' before * setting it here since this code will only execute when doing some @@ -1480,7 +1480,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_REV_NAME handling, and we don't use + * then it theoretically comes from OPT_REVERSE_NAME handling, and we don't use * the `X-Orig-To header'. */ if (cur->env->x_original_to && !msg->env->from) @@ -1515,7 +1515,7 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile, msg->env->newsgroups = safe_strdup(((struct NntpData *) ctx->data)->group); #endif - if (!(flags & (SENDMAILX | SENDBATCH)) && !(option(OPT_AUTO_EDIT) && option(OPT_EDIT_HDRS)) && + if (!(flags & (SENDMAILX | SENDBATCH)) && !(option(OPT_AUTOEDIT) && option(OPT_EDIT_HEADERS)) && !((flags & SENDREPLY) && option(OPT_FAST_REPLY))) { if (edit_envelope(msg->env, flags) == -1) @@ -1632,8 +1632,8 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile, * recipients. */ if (!(flags & SENDKEY) && - ((flags & SENDFORWARD) == 0 || (option(OPT_EDIT_HDRS) && option(OPT_AUTO_EDIT)) || - query_quadoption(OPT_FORW_EDIT, _("Edit forwarded message?")) == MUTT_YES)) + ((flags & SENDFORWARD) == 0 || (option(OPT_EDIT_HEADERS) && option(OPT_AUTOEDIT)) || + query_quadoption(OPT_FORWARD_EDIT, _("Edit forwarded message?")) == MUTT_YES)) { /* If the this isn't a text message, look for a mailcap edit command */ if (mutt_needs_mailcap(msg->content)) @@ -1643,7 +1643,7 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile, } else if (!Editor || (mutt_strcmp("builtin", Editor) == 0)) mutt_builtin_editor(msg->content->filename, msg, cur); - else if (option(OPT_EDIT_HDRS)) + else if (option(OPT_EDIT_HEADERS)) { mutt_env_to_local(msg->env); mutt_edit_headers(Editor, msg->content->filename, msg, fcc, sizeof(fcc)); @@ -1683,7 +1683,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, _("Abort unmodified message?")) == MUTT_YES) + query_quadoption(OPT_ABORT_UNMODIFIED, _("Abort unmodified message?")) == MUTT_YES) { mutt_message(_("Aborted unmodified message.")); goto cleanup; @@ -1709,22 +1709,22 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile, if (WithCrypto && (msg->security == 0) && !(flags & (SENDBATCH | SENDMAILX | SENDPOSTPONED | SENDRESEND))) { - if (option(OPT_CRYPT_AUTO_SIGN)) + if (option(OPT_CRYPT_AUTOSIGN)) msg->security |= SIGN; - if (option(OPT_CRYPT_AUTO_ENCRYPT)) + if (option(OPT_CRYPT_AUTOENCRYPT)) msg->security |= ENCRYPT; - if (option(OPT_CRYPT_REPLY_ENCRYPT) && cur && (cur->security & ENCRYPT)) + if (option(OPT_CRYPT_REPLYENCRYPT) && cur && (cur->security & ENCRYPT)) msg->security |= ENCRYPT; - if (option(OPT_CRYPT_REPLY_SIGN) && cur && (cur->security & SIGN)) + if (option(OPT_CRYPT_REPLYSIGN) && cur && (cur->security & SIGN)) msg->security |= SIGN; - if (option(OPT_CRYPT_REPLY_SIGN_ENCRYPTED) && cur && (cur->security & ENCRYPT)) + if (option(OPT_CRYPT_REPLYSIGNENCRYPTED) && cur && (cur->security & ENCRYPT)) msg->security |= SIGN; if ((WithCrypto & APPLICATION_PGP) && ((msg->security & (ENCRYPT | SIGN)) || option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT))) { - if (option(OPT_PGP_AUTO_INLINE)) + if (option(OPT_PGP_AUTOINLINE)) msg->security |= INLINE; - if (option(OPT_PGP_REPLY_INLINE) && cur && (cur->security & INLINE)) + if (option(OPT_PGP_REPLYINLINE) && cur && (cur->security & INLINE)) msg->security |= INLINE; } @@ -1741,10 +1741,10 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile, */ if (cur) { - if ((WithCrypto & APPLICATION_PGP) && option(OPT_CRYPT_AUTO_PGP) && + if ((WithCrypto & APPLICATION_PGP) && option(OPT_CRYPT_AUTOPGP) && (cur->security & APPLICATION_PGP)) msg->security |= APPLICATION_PGP; - else if ((WithCrypto & APPLICATION_SMIME) && option(OPT_CRYPT_AUTO_SMIME) && + else if ((WithCrypto & APPLICATION_SMIME) && option(OPT_CRYPT_AUTOSMIME) && (cur->security & APPLICATION_SMIME)) msg->security |= APPLICATION_SMIME; } @@ -1755,12 +1755,12 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile, */ if (!(msg->security & (APPLICATION_SMIME | APPLICATION_PGP))) { - if ((WithCrypto & APPLICATION_SMIME) && option(OPT_CRYPT_AUTO_SMIME) && + if ((WithCrypto & APPLICATION_SMIME) && option(OPT_CRYPT_AUTOSMIME) && option(OPT_SMIME_IS_DEFAULT)) msg->security |= APPLICATION_SMIME; - else if ((WithCrypto & APPLICATION_PGP) && option(OPT_CRYPT_AUTO_PGP)) + else if ((WithCrypto & APPLICATION_PGP) && option(OPT_CRYPT_AUTOPGP)) msg->security |= APPLICATION_PGP; - else if ((WithCrypto & APPLICATION_SMIME) && option(OPT_CRYPT_AUTO_SMIME)) + else if ((WithCrypto & APPLICATION_SMIME) && option(OPT_CRYPT_AUTOSMIME)) msg->security |= APPLICATION_SMIME; } } @@ -1768,8 +1768,8 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile, /* opportunistic encrypt relies on SMIME or PGP already being selected */ if (option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT)) { - /* If something has already enabled encryption, e.g. OPT_CRYPT_AUTO_ENCRYPT - * or OPT_CRYPT_REPLY_ENCRYPT, then don't enable opportunistic encrypt for + /* If something has already enabled encryption, e.g. OPT_CRYPT_AUTOENCRYPT + * or OPT_CRYPT_REPLYENCRYPT, then don't enable opportunistic encrypt for * the message. */ if (!(msg->security & ENCRYPT)) @@ -1922,10 +1922,10 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile, } if (!msg->env->subject && !(flags & SENDBATCH) && - (i = query_quadoption(OPT_SUBJECT, _("No subject, abort sending?"))) != MUTT_NO) + (i = query_quadoption(OPT_ABORT_NOSUBJECT, _("No subject, abort sending?"))) != MUTT_NO) { /* if the abort is automatic, print an error message */ - if (quadoption(OPT_SUBJECT) == MUTT_YES) + if (quadoption(OPT_ABORT_NOSUBJECT) == MUTT_YES) mutt_error(_("No subject specified.")); goto main_loop; } @@ -1943,12 +1943,12 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile, } #endif - if (quadoption(OPT_ATTACH) != MUTT_NO && !msg->content->next && + if (quadoption(OPT_ABORT_NOATTACH) != MUTT_NO && !msg->content->next && search_attach_keyword(msg->content->filename) && - query_quadoption(OPT_ATTACH, _("No attachments, cancel sending?")) != MUTT_NO) + query_quadoption(OPT_ABORT_NOATTACH, _("No attachments, cancel sending?")) != MUTT_NO) { /* if the abort is automatic, print an error message */ - if (quadoption(OPT_ATTACH) == MUTT_YES) + if (quadoption(OPT_ABORT_NOATTACH) == MUTT_YES) { mutt_error(_( "Message contains text matching \"$attach_keyword\". Not sending.")); @@ -2161,7 +2161,7 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile, (flags & SENDNEWS) ? _("Article posted.") : /* USE_NNTP */ _("Mail sent.")); #ifdef USE_NOTMUCH - if (option(OPT_NOTMUCH_RECORD)) + if (option(OPT_NM_RECORD)) nm_record_message(ctx, finalpath, cur); #endif } diff --git a/sendlib.c b/sendlib.c index f3c353a7bd6..3c0df155f3a 100644 --- a/sendlib.c +++ b/sendlib.c @@ -1337,7 +1337,7 @@ struct Body *mutt_make_message_attach(struct Context *ctx, struct Header *hdr, i if (WithCrypto) { - if ((option(OPT_MIME_FORW_DECODE) || option(OPT_FORW_DECRYPT)) && (hdr->security & ENCRYPT)) + if ((option(OPT_MIME_FORWARD_DECODE) || option(OPT_FORWARD_DECRYPT)) && (hdr->security & ENCRYPT)) { if (!crypt_valid_passphrase(hdr->security)) return NULL; @@ -1362,8 +1362,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_FORW_DECODE */ - if (!attach_msg && option(OPT_MIME_FORW_DECODE)) + /* If we are attaching a message, ignore OPT_MIME_FORWARD_DECODE */ + if (!attach_msg && option(OPT_MIME_FORWARD_DECODE)) { chflags |= CH_MIME | CH_TXTPLAIN; cmflags = MUTT_CM_DECODE | MUTT_CM_CHARCONV; @@ -1372,7 +1372,7 @@ struct Body *mutt_make_message_attach(struct Context *ctx, struct Header *hdr, i if ((WithCrypto & APPLICATION_SMIME)) pgp &= ~SMIMEENCRYPT; } - else if (WithCrypto && option(OPT_FORW_DECRYPT) && (hdr->security & ENCRYPT)) + else if (WithCrypto && option(OPT_FORWARD_DECRYPT) && (hdr->security & ENCRYPT)) { if ((WithCrypto & APPLICATION_PGP) && mutt_is_multipart_encrypted(hdr->content)) { @@ -2108,7 +2108,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 && option(OPT_NEWS_SEND) && option(OPT_XCOMMENT_TO)) + else if (mode == 1 && option(OPT_NEWS_SEND) && option(OPT_X_COMMENT_TO)) fputs("X-Comment-To: \n", fp); #endif @@ -2192,7 +2192,7 @@ int mutt_write_rfc822_header(FILE *fp, struct Envelope *env, } } - if (mode == 0 && !privacy && option(OPT_XMAILER) && !has_agent) + if (mode == 0 && !privacy && option(OPT_USER_AGENT) && !has_agent) { /* Add a vanity header */ fprintf(fp, "User-Agent: NeoMutt/%s%s (%s)\n", PACKAGE_VERSION, GitVer, MUTT_VERSION); @@ -2563,10 +2563,10 @@ int mutt_invoke_sendmail(struct Address *from, struct Address *to, struct Addres } } - if (eightbit && option(OPT_USE_8BIT_MIME)) + if (eightbit && option(OPT_USE_8BITMIME)) args = add_option(args, &argslen, &argsmax, "-B8BITMIME"); - if (option(OPT_ENV_FROM)) + if (option(OPT_USE_ENVELOPE_FROM)) { if (EnvFrom) { diff --git a/sidebar.c b/sidebar.c index 70a4847c500..81c6ae4802c 100644 --- a/sidebar.c +++ b/sidebar.c @@ -341,7 +341,7 @@ static int cb_qsort_sbe(const void *a, const void *b) */ static void update_entries_visibility(void) { - short new_only = option(OPT_SIDEBAR_NEWMAIL_ONLY); + short new_only = option(OPT_SIDEBAR_NEW_MAIL_ONLY); struct SbEntry *sbe = NULL; for (int i = 0; i < EntryCount; i++) { @@ -630,7 +630,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 (option(OPT_SIDEBAR_NEWMAIL_ONLY)) + if (option(OPT_SIDEBAR_NEW_MAIL_ONLY)) { TopIndex = BotIndex = -1; while (BotIndex < HilIndex) @@ -940,7 +940,7 @@ static void draw_sidebar(int num_rows, int num_cols, int div_width) */ void mutt_sb_draw(void) { - if (!option(OPT_SIDEBAR)) + if (!option(OPT_SIDEBAR_VISIBLE)) return; #ifdef USE_SLANG_CURSES @@ -986,7 +986,7 @@ void mutt_sb_draw(void) */ void mutt_sb_change_mailbox(int op) { - if (!option(OPT_SIDEBAR)) + if (!option(OPT_SIDEBAR_VISIBLE)) return; if (HilIndex < 0) /* It'll get reset on the next draw */ @@ -1059,7 +1059,7 @@ void mutt_sb_set_buffystats(const struct Context *ctx) */ const char *mutt_sb_get_highlight(void) { - if (!option(OPT_SIDEBAR)) + if (!option(OPT_SIDEBAR_VISIBLE)) return NULL; if (!EntryCount || HilIndex < 0) diff --git a/smtp.c b/smtp.c index bef7e926d3d..2dc9e3681ac 100644 --- a/smtp.c +++ b/smtp.c @@ -340,7 +340,7 @@ static int smtp_helo(struct Connection *conn) if (conn->account.flags & MUTT_ACCT_USER) Esmtp = 1; #ifdef USE_SSL - if (option(OPT_SSL_FORCE_TLS) || quadoption(OPT_SSL_START_TLS) != MUTT_NO) + if (option(OPT_SSL_FORCE_TLS) || quadoption(OPT_SSL_STARTTLS) != MUTT_NO) Esmtp = 1; #endif } @@ -591,7 +591,7 @@ static int smtp_open(struct Connection *conn) else if (option(OPT_SSL_FORCE_TLS)) rc = MUTT_YES; else if (mutt_bit_isset(Capabilities, STARTTLS) && - (rc = query_quadoption(OPT_SSL_START_TLS, + (rc = query_quadoption(OPT_SSL_STARTTLS, _("Secure connection with TLS?"))) == MUTT_ABORT) return rc; diff --git a/sort.c b/sort.c index 3f79397fa29..e41c5bb3cad 100644 --- a/sort.c +++ b/sort.c @@ -110,7 +110,7 @@ const char *mutt_get_name(struct Address *a) if (a) { - if (option(OPT_REV_ALIAS) && (ali = alias_reverse_lookup(a)) && ali->personal) + if (option(OPT_REVERSE_ALIAS) && (ali = alias_reverse_lookup(a)) && ali->personal) return ali->personal; else if (a->personal) return a->personal; diff --git a/thread.c b/thread.c index 8e9d5351c5c..b090e22c825 100644 --- a/thread.c +++ b/thread.c @@ -817,7 +817,7 @@ void mutt_sort_threads(struct Context *ctx, int init) if (!cur->thread) { - if ((!init || option(OPT_DUP_THREADS)) && cur->env->message_id) + if ((!init || option(OPT_DUPLICATE_THREADS)) && cur->env->message_id) thread = hash_find(ctx->thread_hash, cur->env->message_id); else thread = NULL; @@ -861,7 +861,7 @@ void mutt_sort_threads(struct Context *ctx, int init) } else { - new = (option(OPT_DUP_THREADS) ? thread : NULL); + new = (option(OPT_DUPLICATE_THREADS) ? thread : NULL); thread = safe_calloc(1, sizeof(struct MuttThread)); thread->message = cur;