]> granicus.if.org Git - neomutt/commitdiff
rename: global boolean variables (insert underscores)
authorRichard Russon <rich@flatcap.org>
Thu, 27 Jul 2017 18:16:40 +0000 (19:16 +0100)
committerRichard Russon <rich@flatcap.org>
Thu, 3 Aug 2017 15:21:24 +0000 (16:21 +0100)
Rename constants for better legibility, such as:
    OPTNOCURSES -> OPT_NO_CURSES

81 files changed:
account.c
addrbook.c
alias.c
attach.c
browser.c
buffy.c
buffy.h
color.c
commands.c
complete.c
compose.c
compress.c
copy.c
curs_lib.c
curs_main.c
edit.c
editmsg.c
flags.c
handler.c
hcache/kc.c
hcache/qdbm.c
hcache/tc.c
hdrline.c
headers.c
help.c
history.c
hook.c
imap/browse.c
imap/command.c
imap/imap.c
imap/message.c
imap/util.c
init.c
init.h
keymap.c
main.c
mbox.c
menu.c
mh.c
mutt_curses.h
mutt_idna.c
mutt_sasl.c
mutt_socket.c
mutt_ssl.c
mutt_ssl_gnutls.c
muttlib.c
mx.c
ncrypt/crypt.c
ncrypt/crypt_gpgme.c
ncrypt/cryptglue.c
ncrypt/gnupgparse.c
ncrypt/pgp.c
ncrypt/pgpkey.c
ncrypt/smime.c
newsrc.c
nntp.c
options.h
pager.c
parse.c
pattern.c
pop.c
pop_auth.c
pop_lib.c
postpone.c
protos.h
recvattach.c
recvcmd.c
remailer.c
rfc1524.c
rfc2047.c
rfc2231.c
rfc3676.c
score.c
send.c
sendlib.c
sidebar.c
signal.c
smtp.c
sort.c
status.c
thread.c

index 15356c8210df99e76f86da0f4940646ae1a442eb..6cd5067774b11f40ed20774c5d63f250ed9ca37a 100644 (file)
--- a/account.c
+++ b/account.c
@@ -193,7 +193,7 @@ int mutt_account_getuser(struct Account *account)
   else if ((account->type == MUTT_ACCT_TYPE_NNTP) && NntpUser)
     strfcpy(account->user, NntpUser, sizeof(account->user));
 #endif
-  else if (option(OPTNOCURSES))
+  else if (option(OPT_NO_CURSES))
     return -1;
   /* prompt (defaults to unix username), copy into account->user */
   else
@@ -262,7 +262,7 @@ int mutt_account_getpass(struct Account *account)
   else if ((account->type == MUTT_ACCT_TYPE_NNTP) && NntpPass)
     strfcpy(account->pass, NntpPass, sizeof(account->pass));
 #endif
-  else if (option(OPTNOCURSES))
+  else if (option(OPT_NO_CURSES))
     return -1;
   else
   {
index 4a0ebce7116d71fd4a09e58076389e323f456739..31660df4d9d356753ed1aa3fb5d56111310f57aa 100644 (file)
@@ -217,7 +217,7 @@ new_aliases:
         {
           AliasTable[menu->current]->self->del = (op == OP_DELETE);
           menu->redraw |= REDRAW_CURRENT;
-          if (option(OPTRESOLVE) && menu->current < menu->max - 1)
+          if (option(OPT_RESOLVE) && menu->current < menu->max - 1)
           {
             menu->current++;
             menu->redraw |= REDRAW_INDEX;
diff --git a/alias.c b/alias.c
index fc478fea7c37f59a2c9719bd54b073400bf878fb..a7f14fb446aa1149f08b413105306af277b07d5b 100644 (file)
--- a/alias.c
+++ b/alias.c
@@ -126,7 +126,7 @@ static struct Address *expand_aliases_r(struct Address *a, struct List **expn)
     last->next = NULL;
   }
 
-  if (option(OPTUSEDOMAIN) && (fqdn = mutt_fqdn(1)))
+  if (option(OPT_USE_DOMAIN) && (fqdn = mutt_fqdn(1)))
   {
     /* now qualify all local addresses */
     rfc822_qualify(head, fqdn);
index bfc5ca32048629b21f16edf3a0ccafdd99f0f45c..657edf57f3215f431d5ae323282d102f1da60cad 100644 (file)
--- a/attach.c
+++ b/attach.c
@@ -517,7 +517,7 @@ int mutt_view_attachment(FILE *fp, struct Body *a, int flag, struct Header *hdr,
                    _("---Command: %-30.30s Attachment: %s"), command, type);
       }
 
-      if ((mutt_wait_filter(thepid) || (entry->needsterminal && option(OPTWAITKEY))) && !use_pager)
+      if ((mutt_wait_filter(thepid) || (entry->needsterminal && option(OPT_WAIT_KEY))) && !use_pager)
         mutt_any_key_to_continue(NULL);
 
       if (tempfd != -1)
@@ -528,7 +528,7 @@ int mutt_view_attachment(FILE *fp, struct Body *a, int flag, struct Header *hdr,
     else
     {
       /* interactive command */
-      if (mutt_system(command) || (entry->needsterminal && option(OPTWAITKEY)))
+      if (mutt_system(command) || (entry->needsterminal && option(OPT_WAIT_KEY)))
         mutt_any_key_to_continue(NULL);
     }
   }
@@ -578,14 +578,14 @@ int mutt_view_attachment(FILE *fp, struct Body *a, int flag, struct Header *hdr,
     else
     {
       /* Use built-in handler */
-      set_option(OPTVIEWATTACH); /* disable the "use 'v' to view this part"
+      set_option(OPT_VIEW_ATTACH); /* disable the "use 'v' to view this part"
                                    * message in case of error */
       if (mutt_decode_save_attachment(fp, a, pagerfile, MUTT_DISPLAY, 0))
       {
-        unset_option(OPTVIEWATTACH);
+        unset_option(OPT_VIEW_ATTACH);
         goto return_error;
       }
-      unset_option(OPTVIEWATTACH);
+      unset_option(OPT_VIEW_ATTACH);
     }
 
     if (a->description)
@@ -729,7 +729,7 @@ bail:
   if (mutt_wait_filter(thepid) != 0)
     rv = 0;
 
-  if (rv == 0 || option(OPTWAITKEY))
+  if (rv == 0 || option(OPT_WAIT_KEY))
     mutt_any_key_to_continue(NULL);
   return rv;
 }
@@ -1028,12 +1028,12 @@ int mutt_print_attachment(FILE *fp, struct Body *a)
       mutt_copy_stream(ifp, fpout);
       safe_fclose(&fpout);
       safe_fclose(&ifp);
-      if (mutt_wait_filter(thepid) || option(OPTWAITKEY))
+      if (mutt_wait_filter(thepid) || option(OPT_WAIT_KEY))
         mutt_any_key_to_continue(NULL);
     }
     else
     {
-      if (mutt_system(command) || option(OPTWAITKEY))
+      if (mutt_system(command) || option(OPT_WAIT_KEY))
         mutt_any_key_to_continue(NULL);
     }
 
@@ -1087,7 +1087,7 @@ int mutt_print_attachment(FILE *fp, struct Body *a)
       safe_fclose(&fpout);
       safe_fclose(&ifp);
 
-      if (mutt_wait_filter(thepid) != 0 || option(OPTWAITKEY))
+      if (mutt_wait_filter(thepid) != 0 || option(OPT_WAIT_KEY))
         mutt_any_key_to_continue(NULL);
       rc = 1;
     }
index 1249f4bf2069dee9e268fb6593ce7fc120feac49..33f7b382140370d6e28a376d60dfcb473fe69a65 100644 (file)
--- a/browser.c
+++ b/browser.c
@@ -248,7 +248,7 @@ static void browser_sort(struct BrowserState *state)
 #ifdef USE_NNTP
     case SORT_SIZE:
     case SORT_DATE:
-      if (option(OPTNEWS))
+      if (option(OPT_NEWS))
         return;
 #endif
     default:
@@ -559,7 +559,7 @@ static const char *newsgroup_format_str(char *dest, size_t destlen, size_t col,
         snprintf(tmp, sizeof(tmp), "%%%sd", fmt);
         snprintf(dest, destlen, tmp, Context->new);
       }
-      else if (option(OPTMARKOLD) &&
+      else if (option(OPT_MARK_OLD) &&
                folder->ff->nd->last_cached >= folder->ff->nd->first_message &&
                folder->ff->nd->last_cached <= folder->ff->nd->last_message)
       {
@@ -637,7 +637,7 @@ static void add_folder(struct Menu *m, struct BrowserState *state, const char *n
   (state->entry)[state->entrylen].imap = false;
 #endif
 #ifdef USE_NNTP
-  if (option(OPTNEWS))
+  if (option(OPT_NEWS))
     (state->entry)[state->entrylen].nd = (struct NntpData *) data;
 #endif
   (state->entrylen)++;
@@ -662,7 +662,7 @@ static int examine_directory(struct Menu *menu, struct BrowserState *state,
                              char *d, const char *prefix)
 {
 #ifdef USE_NNTP
-  if (option(OPTNEWS))
+  if (option(OPT_NEWS))
   {
     struct NntpServer *nserv = CurrentNewsSrv;
 
@@ -789,7 +789,7 @@ static int examine_mailboxes(struct Menu *menu, struct BrowserState *state)
   char buffer[LONG_STRING];
 
 #ifdef USE_NNTP
-  if (option(OPTNEWS))
+  if (option(OPT_NEWS))
   {
     struct NntpServer *nserv = CurrentNewsSrv;
 
@@ -800,7 +800,7 @@ static int examine_mailboxes(struct Menu *menu, struct BrowserState *state)
       struct NntpData *nntp_data = nserv->groups_list[i];
       if (nntp_data &&
           (nntp_data->new || (nntp_data->subscribed &&
-                              (nntp_data->unread || !option(OPTSHOWONLYUNREAD)))))
+                              (nntp_data->unread || !option(OPT_SHOW_ONLY_UNREAD)))))
         add_folder(menu, state, nntp_data->group, NULL, NULL, NULL, nntp_data);
     }
   }
@@ -878,7 +878,7 @@ static int examine_mailboxes(struct Menu *menu, struct BrowserState *state)
 static int select_file_search(struct Menu *menu, regex_t *re, int n)
 {
 #ifdef USE_NNTP
-  if (option(OPTNEWS))
+  if (option(OPT_NEWS))
     return (regexec(re, ((struct FolderFile *) menu->data)[n].desc, 0, NULL, 0));
 #endif
   return (regexec(re, ((struct FolderFile *) menu->data)[n].name, 0, NULL, 0));
@@ -899,7 +899,7 @@ static void folder_entry(char *s, size_t slen, struct Menu *menu, int num)
   folder.num = num;
 
 #ifdef USE_NNTP
-  if (option(OPTNEWS))
+  if (option(OPT_NEWS))
     mutt_expando_format(s, slen, 0, MuttIndexWindow->cols, NONULL(GroupFormat), newsgroup_format_str,
                       (unsigned long) &folder, MUTT_FORMAT_ARROWCURSOR);
   else
@@ -959,7 +959,7 @@ static void init_menu(struct BrowserState *state, struct Menu *menu,
   menu->tagged = 0;
 
 #ifdef USE_NNTP
-  if (option(OPTNEWS))
+  if (option(OPT_NEWS))
   {
     if (buffy)
       snprintf(title, titlelen, _("Subscribed newsgroups"));
@@ -1086,7 +1086,7 @@ void _mutt_select_file(char *f, size_t flen, int flags, char ***files, int *numf
   memset(&state, 0, sizeof(struct BrowserState));
 
 #ifdef USE_NNTP
-  if (option(OPTNEWS))
+  if (option(OPT_NEWS))
   {
     if (*f)
       strfcpy(prefix, f, sizeof(prefix));
@@ -1303,7 +1303,7 @@ void _mutt_select_file(char *f, size_t flen, int flags, char ***files, int *numf
 
   menu->help = mutt_compile_help(helpstr, sizeof(helpstr), MENU_FOLDER,
 #ifdef USE_NNTP
-                                 option(OPTNEWS) ? FolderNewsHelp :
+                                 option(OPT_NEWS) ? FolderNewsHelp :
 #endif
                                                    FolderHelp);
   mutt_push_current_menu(menu);
@@ -1441,7 +1441,7 @@ void _mutt_select_file(char *f, size_t flen, int flags, char ***files, int *numf
           }
         }
 
-        if (buffy || option(OPTNEWS)) /* USE_NNTP */
+        if (buffy || option(OPT_NEWS)) /* USE_NNTP */
         {
           strfcpy(f, state.entry[menu->current].name, flen);
           mutt_expand_path(f, flen);
@@ -1503,10 +1503,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(OPTIMAPLSUB))
-          unset_option(OPTIMAPLSUB);
+        if (option(OPT_IMAP_LSUB))
+          unset_option(OPT_IMAP_LSUB);
         else
-          set_option(OPTIMAPLSUB);
+          set_option(OPT_IMAP_LSUB);
 
         mutt_unget_event(0, OP_CHECK_NEW);
         break;
@@ -1598,7 +1598,7 @@ void _mutt_select_file(char *f, size_t flen, int flags, char ***files, int *numf
       case OP_CHANGE_DIRECTORY:
 
 #ifdef USE_NNTP
-        if (option(OPTNEWS))
+        if (option(OPT_NEWS))
           break;
 #endif
 
@@ -1909,7 +1909,7 @@ void _mutt_select_file(char *f, size_t flen, int flags, char ***files, int *numf
 #ifdef USE_NNTP
       case OP_CATCHUP:
       case OP_UNCATCHUP:
-        if (option(OPTNEWS))
+        if (option(OPT_NEWS))
         {
           struct FolderFile *ff = &state.entry[menu->current];
           int rc;
@@ -1938,7 +1938,7 @@ void _mutt_select_file(char *f, size_t flen, int flags, char ***files, int *numf
         break;
 
       case OP_LOAD_ACTIVE:
-        if (option(OPTNEWS))
+        if (option(OPT_NEWS))
         {
           struct NntpServer *nserv = CurrentNewsSrv;
           unsigned int j;
@@ -1973,7 +1973,7 @@ void _mutt_select_file(char *f, size_t flen, int flags, char ***files, int *numf
 #ifdef USE_NNTP
       case OP_SUBSCRIBE_PATTERN:
       case OP_UNSUBSCRIBE_PATTERN:
-        if (option(OPTNEWS))
+        if (option(OPT_NEWS))
         {
           struct NntpServer *nserv = CurrentNewsSrv;
           regex_t *rx = safe_malloc(sizeof(regex_t));
diff --git a/buffy.c b/buffy.c
index d96d43618c41636e937ebba2edfe6360e026e441..811cbba08c25233eb6b3fa4bdadad394c78e0098 100644 (file)
--- a/buffy.c
+++ b/buffy.c
@@ -200,7 +200,7 @@ static int buffy_maildir_check_dir(struct Buffy *mailbox, const char *dir_name,
   /* when $mail_check_recent is set, if the new/ directory hasn't been modified since
    * the user last exited the mailbox, then we know there is no recent mail.
    */
-  if (check_new && option(OPTMAILCHECKRECENT))
+  if (check_new && option(OPT_MAIL_CHECK_RECENT))
   {
     if (stat(path, &sb) == 0 && sb.st_mtime < mailbox->last_visited)
     {
@@ -239,7 +239,7 @@ static int buffy_maildir_check_dir(struct Buffy *mailbox, const char *dir_name,
         mailbox->msg_unread++;
       if (check_new)
       {
-        if (option(OPTMAILCHECKRECENT))
+        if (option(OPT_MAIL_CHECK_RECENT))
         {
           snprintf(msgpath, sizeof(msgpath), "%s/%s", path, de->d_name);
           /* ensure this message was received since leaving this mailbox */
@@ -279,7 +279,7 @@ static int buffy_maildir_check(struct Buffy *mailbox, int check_stats)
 
   rc = buffy_maildir_check_dir(mailbox, "new", check_new, check_stats);
 
-  check_new = !rc && option(OPTMAILDIRCHECKCUR);
+  check_new = !rc && option(OPT_MAILDIR_CHECK_CUR);
   if (check_new || check_stats)
     if (buffy_maildir_check_dir(mailbox, "cur", check_new, check_stats))
       rc = 1;
@@ -300,7 +300,7 @@ static int buffy_mbox_check(struct Buffy *mailbox, struct stat *sb, int check_st
   int new_or_changed;
   struct Context ctx;
 
-  if (option(OPTCHECKMBOXSIZE))
+  if (option(OPT_CHECK_MBOX_SIZE))
     new_or_changed = sb->st_size > mailbox->size;
   else
     new_or_changed = sb->st_mtime > sb->st_atime ||
@@ -309,13 +309,13 @@ static int buffy_mbox_check(struct Buffy *mailbox, struct stat *sb, int check_st
 
   if (new_or_changed)
   {
-    if (!option(OPTMAILCHECKRECENT) || sb->st_mtime > mailbox->last_visited)
+    if (!option(OPT_MAIL_CHECK_RECENT) || sb->st_mtime > mailbox->last_visited)
     {
       rc = 1;
       mailbox->new = true;
     }
   }
-  else if (option(OPTCHECKMBOXSIZE))
+  else if (option(OPT_CHECK_MBOX_SIZE))
   {
     /* some other program has deleted mail from the folder */
     mailbox->size = (off_t) sb->st_size;
@@ -432,7 +432,7 @@ static void buffy_check(struct Buffy *tmp, struct stat *contex_sb, int check_sta
 #endif
     }
   }
-  else if (option(OPTCHECKMBOXSIZE) && Context && Context->path)
+  else if (option(OPT_CHECK_MBOX_SIZE) && Context && Context->path)
     tmp->size = (off_t) sb.st_size; /* update the size of current folder */
 
 #ifdef USE_SIDEBAR
@@ -480,7 +480,7 @@ void mutt_buffy_cleanup(const char *buf, struct stat *st)
 {
   struct utimbuf ut;
 
-  if (option(OPTCHECKMBOXSIZE))
+  if (option(OPT_CHECK_MBOX_SIZE))
   {
     struct Buffy *b = mutt_find_mailbox(buf);
     if (b && !b->new)
@@ -606,7 +606,7 @@ int mutt_parse_mailboxes(struct Buffer *path, struct Buffer *s,
        * reading it), the size is set to 0 so that later when we check we see
        * that it increased. without check_mbox_size we probably don't care.
        */
-      if (option(OPTCHECKMBOXSIZE) && stat((*b)->path, &sb) == 0 &&
+      if (option(OPT_CHECK_MBOX_SIZE) && stat((*b)->path, &sb) == 0 &&
           !test_new_folder((*b)->path))
       {
         /* some systems out there don't have an off_t type */
@@ -705,7 +705,7 @@ int mutt_buffy_check(bool force)
   if (!force && (t - BuffyTime < BuffyTimeout))
     return BuffyCount;
 
-  if (option(OPTMAILCHECKSTATS) && (t - BuffyStatsTime >= BuffyCheckStatsInterval))
+  if (option(OPT_MAIL_CHECK_STATS) && (t - BuffyStatsTime >= BuffyCheckStatsInterval))
   {
     check_stats = true;
     BuffyStatsTime = t;
diff --git a/buffy.h b/buffy.h
index d967fb2ee372e34db765575e28f202731d9312d0..d37ccc7a4a90217de11a24f0befe840755c6d8a6 100644 (file)
--- a/buffy.h
+++ b/buffy.h
@@ -48,7 +48,7 @@ struct Buffy
   struct Buffy *next;
   bool new; /**< mailbox has new mail */
 
-  /* These next three are only set when OPTMAILCHECKSTATS is set */
+  /* These next three are only set when OPT_MAIL_CHECK_STATS is set */
   int msg_count;             /**< total number of messages */
   int msg_unread;            /**< number of unread messages */
   int msg_flagged;           /**< number of flagged messages */
diff --git a/color.c b/color.c
index 498f36639ada51df2da80ad6a9fb13607dfae486..1fd778f86b02b7cac0d955d807f974597286c6b4 100644 (file)
--- a/color.c
+++ b/color.c
@@ -348,7 +348,7 @@ int mutt_combine_color(int fg_attr, int bg_attr)
   if ((fg == COLOR_DEFAULT) && (bg == COLOR_DEFAULT))
     return A_NORMAL;
 #ifdef HAVE_USE_DEFAULT_COLORS
-  if (!option(OPTNOCURSES) && has_colors() &&
+  if (!option(OPT_NO_CURSES) && has_colors() &&
       ((fg == COLOR_DEFAULT) || (bg == COLOR_DEFAULT)) && use_default_colors() != OK)
   {
     mutt_error(_("default colors not supported."));
@@ -417,7 +417,7 @@ static int parse_color_name(const char *s, int *col, int *attr, int is_fg, struc
   {
     s += 5;
     *col = strtol(s, &eptr, 10);
-    if (!*s || *eptr || *col < 0 || (*col >= COLORS && !option(OPTNOCURSES) && has_colors()))
+    if (!*s || *eptr || *col < 0 || (*col >= COLORS && !option(OPT_NO_CURSES) && has_colors()))
     {
       snprintf(err->data, err->dsize, _("%s: color not supported by term"), s);
       return -1;
@@ -548,7 +548,7 @@ static int _mutt_parse_uncolor(struct Buffer *buf, struct Buffer *s, unsigned lo
   if (
 #ifdef HAVE_COLOR
       /* we're running without curses */
-      option(OPTNOCURSES) || /* we're parsing an uncolor command, and have no colors */
+      option(OPT_NO_CURSES) || /* we're parsing an uncolor command, and have no colors */
       (parse_uncolor && !has_colors())
       /* we're parsing an unmono command, and have colors */
       || (!parse_uncolor && has_colors())
@@ -585,7 +585,7 @@ static int _mutt_parse_uncolor(struct Buffer *buf, struct Buffer *s, unsigned lo
     do_uncolor(buf, s, &ColorIndexTagList, &do_cache, parse_uncolor);
 #endif
 
-  if (do_cache && !option(OPTNOCURSES))
+  if (do_cache && !option(OPT_NO_CURSES))
   {
     mutt_set_menu_redraw_full(MENU_MAIN);
     /* force re-caching of index colors */
@@ -885,7 +885,7 @@ static int _mutt_parse_color(struct Buffer *buf, struct Buffer *s, struct Buffer
 
 #ifdef HAVE_COLOR
 #ifdef HAVE_USE_DEFAULT_COLORS
-  if (!option(OPTNOCURSES) && has_colors()
+  if (!option(OPT_NO_CURSES) && has_colors()
       /* delay use_default_colors() until needed, since it initializes things */
       && (fg == COLOR_DEFAULT || bg == COLOR_DEFAULT) && use_default_colors() != OK)
   {
@@ -995,7 +995,7 @@ int mutt_parse_color(struct Buffer *buff, struct Buffer *s, unsigned long data,
 {
   bool dry_run = false;
 
-  if (option(OPTNOCURSES) || !has_colors())
+  if (option(OPT_NO_CURSES) || !has_colors())
     dry_run = true;
 
   return _mutt_parse_color(buff, s, err, parse_color_pair, dry_run);
@@ -1009,10 +1009,10 @@ int mutt_parse_mono(struct Buffer *buff, struct Buffer *s, unsigned long data,
   bool dry_run = false;
 
 #ifdef HAVE_COLOR
-  if (option(OPTNOCURSES) || has_colors())
+  if (option(OPT_NO_CURSES) || has_colors())
     dry_run = true;
 #else
-  if (option(OPTNOCURSES))
+  if (option(OPT_NO_CURSES))
     dry_run = true;
 #endif
 
index a9b3ffedeb294c178fd2322d3f03b52f00e094c4..77a4243c23d552e4141a4d2d561afb64a3e72cac 100644 (file)
@@ -159,7 +159,7 @@ int mutt_display_message(struct Header *cur)
     fputs("\n\n", fpout);
   }
 
-  chflags = (option(OPTWEED) ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE | CH_FROM | CH_DISPLAY;
+  chflags = (option(OPT_WEED) ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE | CH_FROM | CH_DISPLAY;
 #ifdef USE_NOTMUCH
   if (Context->magic == MUTT_NOTMUCH)
     chflags |= CH_VIRTUAL;
@@ -238,11 +238,11 @@ int mutt_display_message(struct Header *cur)
     if ((r = mutt_system(buf)) == -1)
       mutt_error(_("Error running \"%s\"!"), buf);
     unlink(tempfile);
-    if (!option(OPTNOCURSES))
+    if (!option(OPT_NO_CURSES))
       keypad(stdscr, true);
     if (r != -1)
       mutt_set_flag(Context, cur, MUTT_READ, 1);
-    if (r != -1 && option(OPTPROMPTAFTER))
+    if (r != -1 && option(OPT_PROMPT_AFTER))
     {
       mutt_unget_event(mutt_any_key_to_continue(_("Command: ")), 0);
       rc = km_dokey(MENU_PAGER);
@@ -351,7 +351,7 @@ static void pipe_set_flags(int decode, int print, int *cmflags, int *chflags)
     *cmflags |= MUTT_CM_DECODE | MUTT_CM_CHARCONV;
     *chflags |= CH_DECODE | CH_REORDER;
 
-    if (option(OPTWEED))
+    if (option(OPT_WEED))
     {
       *chflags |= CH_WEED;
       *cmflags |= MUTT_CM_WEED;
@@ -412,11 +412,11 @@ static int _mutt_pipe_message(struct Header *h, char *cmd, int decode,
       return 1;
     }
 
-    set_option(OPTKEEPQUIET);
+    set_option(OPT_KEEP_QUIET);
     pipe_msg(h, fpout, decode, print);
     safe_fclose(&fpout);
     rc = mutt_wait_filter(thepid);
-    unset_option(OPTKEEPQUIET);
+    unset_option(OPT_KEEP_QUIET);
   }
   else
   { /* handle tagged messages */
@@ -447,7 +447,7 @@ static int _mutt_pipe_message(struct Header *h, char *cmd, int decode,
             mutt_perror(_("Can't create filter process"));
             return 1;
           }
-          set_option(OPTKEEPQUIET);
+          set_option(OPT_KEEP_QUIET);
           pipe_msg(Context->hdrs[Context->v2r[i]], fpout, decode, print);
           /* add the message separator */
           if (sep)
@@ -455,7 +455,7 @@ static int _mutt_pipe_message(struct Header *h, char *cmd, int decode,
           safe_fclose(&fpout);
           if (mutt_wait_filter(thepid) != 0)
             rc = 1;
-          unset_option(OPTKEEPQUIET);
+          unset_option(OPT_KEEP_QUIET);
         }
       }
     }
@@ -467,7 +467,7 @@ static int _mutt_pipe_message(struct Header *h, char *cmd, int decode,
         mutt_perror(_("Can't create filter process"));
         return 1;
       }
-      set_option(OPTKEEPQUIET);
+      set_option(OPT_KEEP_QUIET);
       for (i = 0; i < Context->vcount; i++)
       {
         if (Context->hdrs[Context->v2r[i]]->tagged)
@@ -482,11 +482,11 @@ static int _mutt_pipe_message(struct Header *h, char *cmd, int decode,
       safe_fclose(&fpout);
       if (mutt_wait_filter(thepid) != 0)
         rc = 1;
-      unset_option(OPTKEEPQUIET);
+      unset_option(OPT_KEEP_QUIET);
     }
   }
 
-  if (rc || option(OPTWAITKEY))
+  if (rc || option(OPT_WAIT_KEY))
     mutt_any_key_to_continue(NULL);
   return rc;
 }
@@ -501,7 +501,7 @@ void mutt_pipe_message(struct Header *h)
     return;
 
   mutt_expand_path(buffer, sizeof(buffer));
-  _mutt_pipe_message(h, buffer, option(OPTPIPEDECODE), 0, option(OPTPIPESPLIT), PipeSep);
+  _mutt_pipe_message(h, buffer, option(OPT_PIPE_DECODE), 0, option(OPT_PIPE_SPLIT), PipeSep);
 }
 
 void mutt_print_message(struct Header *h)
@@ -516,8 +516,8 @@ void mutt_print_message(struct Header *h)
                        h ? _("Print message?") : _("Print tagged messages?")) != MUTT_YES)
     return;
 
-  if (_mutt_pipe_message(h, PrintCmd, option(OPTPRINTDECODE), 1,
-                         option(OPTPRINTSPLIT), "\f") == 0)
+  if (_mutt_pipe_message(h, PrintCmd, option(OPT_PRINT_DECODE), 1,
+                         option(OPT_PRINT_SPLIT), "\f") == 0)
     mutt_message(h ? _("Message printed") : _("Messages printed"));
   else
     mutt_message(h ? _("Message could not be printed") :
@@ -610,7 +610,7 @@ void mutt_shell_escape(void)
       mutt_window_clearline(MuttMessageWindow, 0);
       mutt_endwin(NULL);
       fflush(stdout);
-      if (mutt_system(buf) != 0 || option(OPTWAITKEY))
+      if (mutt_system(buf) != 0 || option(OPT_WAIT_KEY))
         mutt_any_key_to_continue(NULL);
       mutt_buffy_check(true);
     }
@@ -704,7 +704,7 @@ static void set_copy_flags(struct Header *hdr, int decode, int decrypt,
     {
       *chflags |= CH_DECODE; /* then decode RFC2047 headers, */
 
-      if (option(OPTWEED))
+      if (option(OPT_WEED))
       {
         *chflags |= CH_WEED; /* and respect $weed. */
         *cmflags |= MUTT_CM_WEED;
@@ -730,7 +730,7 @@ int _mutt_save_message(struct Header *h, struct Context *ctx, int delete, int de
   {
     mutt_set_flag(Context, h, MUTT_DELETE, 1);
     mutt_set_flag(Context, h, MUTT_PURGE, 1);
-    if (option(OPTDELETEUNTAG))
+    if (option(OPT_DELETE_UNTAG))
       mutt_set_flag(Context, h, MUTT_TAG, 0);
   }
 
index f8a50680f57cd06e2ca267c7b15d97b3215d64d9..a8d162825a2128276984f85b0f3c74c6728e2a69 100644 (file)
@@ -64,7 +64,7 @@ int mutt_complete(char *s, size_t slen)
   mutt_debug(2, "mutt_complete: completing %s\n", s);
 
 #ifdef USE_NNTP
-  if (option(OPTNEWS))
+  if (option(OPT_NEWS))
   {
     struct NntpServer *nserv = CurrentNewsSrv;
     unsigned int n = 0;
index c755daebf3362ab61641b13321348d6b6491d6dc..bee7836d598780c10ba2b2ddd48fcd8a1286c00f 100644 (file)
--- a/compose.c
+++ b/compose.c
@@ -280,7 +280,7 @@ static void redraw_crypt_lines(struct Header *msg)
       addstr(_(" (S/MIME)"));
   }
 
-  if (option(OPTCRYPTOPPORTUNISTICENCRYPT) && (msg->security & OPPENCRYPT))
+  if (option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT) && (msg->security & OPPENCRYPT))
     addstr(_(" (OppEnc mode)"));
 
   mutt_window_clrtoeol(MuttIndexWindow);
@@ -400,7 +400,7 @@ static void draw_envelope(struct Header *msg, char *fcc)
 {
   draw_envelope_addr(HDR_FROM, msg->env->from);
 #ifdef USE_NNTP
-  if (!option(OPTNEWSSEND))
+  if (!option(OPT_NEWS_SEND))
   {
 #endif
     draw_envelope_addr(HDR_TO, msg->env->to);
@@ -416,7 +416,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(OPTXCOMMENTTO))
+    if (option(OPT_XCOMMENT_TO))
     {
       mutt_window_mvprintw(MuttIndexWindow, HDR_BCC, 0, "%*s",
                            HeaderPadding[HDR_XCOMMENTTO], Prompts[HDR_XCOMMENTTO]);
@@ -725,7 +725,7 @@ int mutt_compose_menu(struct Header *msg, /* structure for new message */
 #ifdef USE_NNTP
   int news = 0; /* is it a news article ? */
 
-  if (option(OPTNEWSSEND))
+  if (option(OPT_NEWS_SEND))
     news++;
 #endif
 
@@ -756,7 +756,7 @@ int mutt_compose_menu(struct Header *msg, /* structure for new message */
   while (loop)
   {
 #ifdef USE_NNTP
-    unset_option(OPTNEWS); /* for any case */
+    unset_option(OPT_NEWS); /* for any case */
 #endif
     switch (op = mutt_menu_loop(menu))
     {
@@ -770,7 +770,7 @@ int mutt_compose_menu(struct Header *msg, /* structure for new message */
           break;
 #endif
         edit_address_list(HDR_TO, &msg->env->to);
-        if (option(OPTCRYPTOPPORTUNISTICENCRYPT))
+        if (option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT))
         {
           crypt_opportunistic_encrypt(msg);
           redraw_crypt_lines(msg);
@@ -783,7 +783,7 @@ int mutt_compose_menu(struct Header *msg, /* structure for new message */
           break;
 #endif
         edit_address_list(HDR_BCC, &msg->env->bcc);
-        if (option(OPTCRYPTOPPORTUNISTICENCRYPT))
+        if (option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT))
         {
           crypt_opportunistic_encrypt(msg);
           redraw_crypt_lines(msg);
@@ -796,7 +796,7 @@ int mutt_compose_menu(struct Header *msg, /* structure for new message */
           break;
 #endif
         edit_address_list(HDR_CC, &msg->env->cc);
-        if (option(OPTCRYPTOPPORTUNISTICENCRYPT))
+        if (option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT))
         {
           crypt_opportunistic_encrypt(msg);
           redraw_crypt_lines(msg);
@@ -841,7 +841,7 @@ int mutt_compose_menu(struct Header *msg, /* structure for new message */
         }
         break;
       case OP_COMPOSE_EDIT_X_COMMENT_TO:
-        if (news && option(OPTXCOMMENTTO))
+        if (news && option(OPT_XCOMMENT_TO))
         {
           if (msg->env->x_comment_to)
             strfcpy(buf, msg->env->x_comment_to, sizeof(buf));
@@ -892,7 +892,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(OPTEDITHDRS))
+        if (Editor && (mutt_strcmp("builtin", Editor) != 0) && !option(OPT_EDIT_HDRS))
         {
           mutt_edit_file(Editor, msg->content->filename);
           mutt_update_encoding(msg->content);
@@ -904,7 +904,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(OPTEDITHDRS))))
+             (op == OP_COMPOSE_EDIT_MESSAGE && option(OPT_EDIT_HDRS))))
         {
           char *tag = NULL, *err = NULL;
           mutt_env_to_local(msg->env);
@@ -914,7 +914,7 @@ int mutt_compose_menu(struct Header *msg, /* structure for new message */
             mutt_error(_("Bad IDN in \"%s\": '%s'"), tag, err);
             FREE(&err);
           }
-          if (option(OPTCRYPTOPPORTUNISTICENCRYPT))
+          if (option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT))
             crypt_opportunistic_encrypt(msg);
         }
         else
@@ -1030,14 +1030,14 @@ int mutt_compose_menu(struct Header *msg, /* structure for new message */
         prompt = _("Open mailbox to attach message from");
 
 #ifdef USE_NNTP
-        unset_option(OPTNEWS);
+        unset_option(OPT_NEWS);
         if (op == OP_COMPOSE_ATTACH_NEWS_MESSAGE)
         {
           if (!(CurrentNewsSrv = nntp_select_server(NewsServer, 0)))
             break;
 
           prompt = _("Open newsgroup to attach message from");
-          set_option(OPTNEWS);
+          set_option(OPT_NEWS);
         }
 #endif
 
@@ -1054,7 +1054,7 @@ int mutt_compose_menu(struct Header *msg, /* structure for new message */
           break;
 
 #ifdef USE_NNTP
-        if (option(OPTNEWS))
+        if (option(OPT_NEWS))
           nntp_expand_path(fname, sizeof(fname), &CurrentNewsSrv->conn->account);
         else
 #endif
@@ -1066,7 +1066,7 @@ int mutt_compose_menu(struct Header *msg, /* structure for new message */
           if (!mx_is_pop(fname))
 #endif
 #ifdef USE_NNTP
-            if (!mx_is_nntp(fname) && !option(OPTNEWS))
+            if (!mx_is_nntp(fname) && !option(OPT_NEWS))
 #endif
               /* check to make sure the file exists and is readable */
               if (access(fname, R_OK) == -1)
@@ -1097,10 +1097,10 @@ int mutt_compose_menu(struct Header *msg, /* structure for new message */
         oldSortAux = SortAux;
 
         Context = ctx;
-        set_option(OPTATTACHMSG);
+        set_option(OPT_ATTACH_MSG);
         mutt_message(_("Tag the messages you want to attach!"));
         close = mutt_index_menu();
-        unset_option(OPTATTACHMSG);
+        unset_option(OPT_ATTACH_MSG);
 
         if (!Context)
         {
index 9845a2173eeff739c9c4622421cade194b12fe23..9553589843f207939883c1dea45f21faa9b92dcb 100644 (file)
@@ -607,7 +607,7 @@ static int comp_close_mailbox(struct Context *ctx)
   if (!ctx->append)
   {
     /* If the file was removed, remove the compressed folder too */
-    if ((access(ctx->path, F_OK) != 0) && !option(OPTSAVEEMPTY))
+    if ((access(ctx->path, F_OK) != 0) && !option(OPT_SAVE_EMPTY))
     {
       remove(ctx->realpath);
     }
diff --git a/copy.c b/copy.c
index c28818bc28bdeb2e2f3cb61867379b4593319b3f..372b3767d1be43d6266fb6d954deeb550f59ecc2 100644 (file)
--- a/copy.c
+++ b/copy.c
@@ -451,7 +451,7 @@ int mutt_copy_header(FILE *in, struct Header *h, FILE *out, int flags, const cha
   {
     /* Add some fake headers based on notmuch data */
     char *folder = nm_header_get_folder(h);
-    if (folder && !(option(OPTWEED) && mutt_matches_ignore("folder")))
+    if (folder && !(option(OPT_WEED) && mutt_matches_ignore("folder")))
     {
       char buf[LONG_STRING];
       strfcpy(buf, folder, sizeof(buf));
@@ -462,7 +462,7 @@ int mutt_copy_header(FILE *in, struct Header *h, FILE *out, int flags, const cha
       fputc('\n', out);
     }
     char *tags = nm_header_get_tags(h);
-    if (tags && !(option(OPTWEED) && mutt_matches_ignore("tags")))
+    if (tags && !(option(OPT_WEED) && mutt_matches_ignore("tags")))
     {
       fputs("Tags: ", out);
       fputs(tags, out);
@@ -556,7 +556,7 @@ int _mutt_copy_message(FILE *fpout, FILE *fpin, struct Header *hdr,
 
   if (flags & MUTT_CM_PREFIX)
   {
-    if (option(OPTTEXTFLOWED))
+    if (option(OPT_TEXT_FLOWED))
       strfcpy(prefix, ">", sizeof(prefix));
     else
       _mutt_make_string(prefix, sizeof(prefix), NONULL(Prefix), Context, hdr, 0);
index d42ace32a8a432b0893fd01ca027f5a6a0bbf2a3..10c118477812ab8f7e6da78c5191ab076a7ec139 100644 (file)
  */
 
 /* These are used for macros and exec/push commands.
- * They can be temporarily ignored by setting OPTIGNOREMACROEVENTS
+ * They can be temporarily ignored by setting OPT_IGNORE_MACRO_EVENTS
  */
 static size_t MacroBufferCount = 0;
 static size_t MacroBufferLen = 0;
 static struct Event *MacroEvents;
 
 /* These are used in all other "normal" situations, and are not
- * ignored when setting OPTIGNOREMACROEVENTS
+ * ignored when setting OPT_IGNORE_MACRO_EVENTS
  */
 static size_t UngetCount = 0;
 static size_t UngetLen = 0;
@@ -90,11 +90,11 @@ static void reflow_message_window_rows(int mw_rows);
 void mutt_refresh(void)
 {
   /* don't refresh when we are waiting for a child. */
-  if (option(OPTKEEPQUIET))
+  if (option(OPT_KEEP_QUIET))
     return;
 
   /* don't refresh in the middle of macros unless necessary */
-  if (MacroBufferCount && !option(OPTFORCEREFRESH) && !option(OPTIGNOREMACROEVENTS))
+  if (MacroBufferCount && !option(OPT_FORCE_REFRESH) && !option(OPT_IGNORE_MACRO_EVENTS))
     return;
 
   /* else */
@@ -125,7 +125,7 @@ struct Event mutt_getch(void)
   if (UngetCount)
     return UngetKeyEvents[--UngetCount];
 
-  if (!option(OPTIGNOREMACROEVENTS) && MacroBufferCount)
+  if (!option(OPT_IGNORE_MACRO_EVENTS) && MacroBufferCount)
     return MacroEvents[--MacroBufferCount];
 
   SigInt = 0;
@@ -157,7 +157,7 @@ struct Event mutt_getch(void)
     return timeout;
   }
 
-  if ((ch & 0x80) && option(OPTMETAKEY))
+  if ((ch & 0x80) && option(OPT_METAKEY))
   {
     /* send ALT-x as ESC-x */
     ch &= ~0x80;
@@ -209,9 +209,9 @@ int mutt_get_field_unbuffered(char *msg, char *buf, size_t buflen, int flags)
 {
   int rc;
 
-  set_option(OPTIGNOREMACROEVENTS);
+  set_option(OPT_IGNORE_MACRO_EVENTS);
   rc = mutt_get_field(msg, buf, buflen, flags);
-  unset_option(OPTIGNOREMACROEVENTS);
+  unset_option(OPT_IGNORE_MACRO_EVENTS);
 
   return rc;
 }
@@ -219,7 +219,7 @@ int mutt_get_field_unbuffered(char *msg, char *buf, size_t buflen, int flags)
 void mutt_clear_error(void)
 {
   Errorbuf[0] = 0;
-  if (!option(OPTNOCURSES))
+  if (!option(OPT_NO_CURSES))
     mutt_window_clearline(MuttMessageWindow, 0);
 }
 
@@ -409,7 +409,7 @@ static void curses_message(int error, const char *fmt, va_list ap)
   mutt_simple_format(Errorbuf, sizeof(Errorbuf), 0, MuttMessageWindow->cols,
                      FMT_LEFT, 0, scratch, sizeof(scratch), 0);
 
-  if (!option(OPTKEEPQUIET))
+  if (!option(OPT_KEEP_QUIET))
   {
     if (error)
       BEEP();
@@ -421,9 +421,9 @@ static void curses_message(int error, const char *fmt, va_list ap)
   }
 
   if (error)
-    set_option(OPTMSGERR);
+    set_option(OPT_MSG_ERR);
   else
-    unset_option(OPTMSGERR);
+    unset_option(OPT_MSG_ERR);
 }
 
 void mutt_curses_error(const char *fmt, ...)
@@ -451,7 +451,7 @@ void mutt_progress_init(struct Progress *progress, const char *msg,
 
   if (!progress)
     return;
-  if (option(OPTNOCURSES))
+  if (option(OPT_NO_CURSES))
     return;
 
   memset(progress, 0, sizeof(struct Progress));
@@ -550,7 +550,7 @@ void mutt_progress_update(struct Progress *progress, long pos, int percent)
   struct timeval tv = { 0, 0 };
   unsigned int now = 0;
 
-  if (option(OPTNOCURSES))
+  if (option(OPT_NO_CURSES))
     return;
 
   if (!progress->inc)
@@ -636,21 +636,21 @@ void mutt_free_windows(void)
 
 void mutt_reflow_windows(void)
 {
-  if (option(OPTNOCURSES))
+  if (option(OPT_NO_CURSES))
     return;
 
   mutt_debug(2, "In mutt_reflow_windows\n");
 
   MuttStatusWindow->rows = 1;
   MuttStatusWindow->cols = COLS;
-  MuttStatusWindow->row_offset = option(OPTSTATUSONTOP) ? 0 : LINES - 2;
+  MuttStatusWindow->row_offset = option(OPT_STATUS_ON_TOP) ? 0 : LINES - 2;
   MuttStatusWindow->col_offset = 0;
 
   memcpy(MuttHelpWindow, MuttStatusWindow, sizeof(struct MuttWindow));
-  if (!option(OPTHELP))
+  if (!option(OPT_HELP))
     MuttHelpWindow->rows = 0;
   else
-    MuttHelpWindow->row_offset = option(OPTSTATUSONTOP) ? LINES - 2 : 0;
+    MuttHelpWindow->row_offset = option(OPT_STATUS_ON_TOP) ? LINES - 2 : 0;
 
   memcpy(MuttMessageWindow, MuttStatusWindow, sizeof(struct MuttWindow));
   MuttMessageWindow->row_offset = LINES - 1;
@@ -659,16 +659,16 @@ void mutt_reflow_windows(void)
   MuttIndexWindow->rows = MAX(
       LINES - MuttStatusWindow->rows - MuttHelpWindow->rows - MuttMessageWindow->rows, 0);
   MuttIndexWindow->row_offset =
-      option(OPTSTATUSONTOP) ? MuttStatusWindow->rows : MuttHelpWindow->rows;
+      option(OPT_STATUS_ON_TOP) ? MuttStatusWindow->rows : MuttHelpWindow->rows;
 
 #ifdef USE_SIDEBAR
-  if (option(OPTSIDEBAR))
+  if (option(OPT_SIDEBAR))
   {
     memcpy(MuttSidebarWindow, MuttIndexWindow, sizeof(struct MuttWindow));
     MuttSidebarWindow->cols = SidebarWidth;
     MuttIndexWindow->cols -= SidebarWidth;
 
-    if (option(OPTSIDEBARONRIGHT))
+    if (option(OPT_SIDEBAR_ON_RIGHT))
     {
       MuttSidebarWindow->col_offset = COLS - SidebarWidth;
     }
@@ -689,16 +689,16 @@ static void reflow_message_window_rows(int mw_rows)
   MuttMessageWindow->rows = mw_rows;
   MuttMessageWindow->row_offset = LINES - mw_rows;
 
-  MuttStatusWindow->row_offset = option(OPTSTATUSONTOP) ? 0 : LINES - mw_rows - 1;
+  MuttStatusWindow->row_offset = option(OPT_STATUS_ON_TOP) ? 0 : LINES - mw_rows - 1;
 
-  if (option(OPTHELP))
-    MuttHelpWindow->row_offset = option(OPTSTATUSONTOP) ? LINES - mw_rows - 1 : 0;
+  if (option(OPT_HELP))
+    MuttHelpWindow->row_offset = option(OPT_STATUS_ON_TOP) ? LINES - mw_rows - 1 : 0;
 
   MuttIndexWindow->rows = MAX(
       LINES - MuttStatusWindow->rows - MuttHelpWindow->rows - MuttMessageWindow->rows, 0);
 
 #ifdef USE_SIDEBAR
-  if (option(OPTSIDEBAR))
+  if (option(OPT_SIDEBAR))
     MuttSidebarWindow->rows = MuttIndexWindow->rows;
 #endif
 
@@ -797,10 +797,10 @@ void mutt_window_getyx(struct MuttWindow *win, int *y, int *x)
 
 void mutt_show_error(void)
 {
-  if (option(OPTKEEPQUIET))
+  if (option(OPT_KEEP_QUIET))
     return;
 
-  SETCOLOR(option(OPTMSGERR) ? MT_COLOR_ERROR : MT_COLOR_MESSAGE);
+  SETCOLOR(option(OPT_MSG_ERR) ? MT_COLOR_ERROR : MT_COLOR_MESSAGE);
   mutt_window_mvaddstr(MuttMessageWindow, 0, 0, Errorbuf);
   NORMAL_COLOR;
   mutt_window_clrtoeol(MuttMessageWindow);
@@ -810,7 +810,7 @@ void mutt_endwin(const char *msg)
 {
   int e = errno;
 
-  if (!option(OPTNOCURSES))
+  if (!option(OPT_NO_CURSES))
   {
     /* at least in some situations (screen + xterm under SuSE11/12) endwin()
      * doesn't properly flush the screen without an explicit call.
index 6675326f0e138e681eff757a3f18e9c59793cff7..855a76d8c910b47ec30d870d959fcd6fd11903f7 100644 (file)
@@ -128,7 +128,7 @@ static const char *No_visible = N_("No visible messages.");
   }
 
 #define CHECK_ATTACH                                                           \
-  if (option(OPTATTACHMSG))                                                    \
+  if (option(OPT_ATTACH_MSG))                                                    \
   {                                                                            \
     mutt_flushinp();                                                           \
     mutt_error(_(Function_not_permitted_in_attach_message_mode));              \
@@ -140,8 +140,8 @@ static const char *No_visible = N_("No visible messages.");
 #define FLAGGED(h) mutt_thread_contains_flagged(Context, h)
 
 #define CAN_COLLAPSE(header)                                                   \
-  ((option(OPTCOLLAPSEUNREAD) || !UNREAD(header)) &&                           \
-   (option(OPTCOLLAPSEFLAGGED) || !FLAGGED(header)))
+  ((option(OPT_COLLAPSE_UNREAD) || !UNREAD(header)) &&                           \
+   (option(OPT_COLLAPSE_FLAGGED) || !FLAGGED(header)))
 
 /* de facto standard escapes for tsl/fsl */
 static char *tsl = "\033]0;";
@@ -153,7 +153,7 @@ static char *fsl = "\007";
  * @param toggle toggle collapsed state
  *
  * This function is called by the OP_MAIN_COLLAPSE_ALL command and on folder
- * enter if the OPTCOLLAPSEALL option is set. In the first case, the @a toggle
+ * enter if the OPT_COLLAPSE_ALL option is set. In the first case, the @a toggle
  * parameter is 1 to actually toggle collapsed/uncollapsed state on all
  * threads. In the second case, the @a toggle parameter is 0, actually turning
  * this function into a one-way collapse.
@@ -372,7 +372,7 @@ void update_index(struct Menu *menu, struct Context *ctx, int check, int oldcoun
   }
 
   /* save the list of new messages */
-  if (option(OPTUNCOLLAPSENEW) && oldcount && check != MUTT_REOPENED &&
+  if (option(OPT_UNCOLLAPSE_NEW) && oldcount && check != MUTT_REOPENED &&
       ((Sort & SORT_MASK) == SORT_THREADS))
   {
     save_new = safe_malloc(sizeof(struct Header *) * (ctx->msgcount - oldcount));
@@ -384,7 +384,7 @@ void update_index(struct Menu *menu, struct Context *ctx, int check, int oldcoun
   mutt_sort_headers(ctx, (check == MUTT_REOPENED));
 
   /* uncollapse threads with new mail */
-  if (option(OPTUNCOLLAPSENEW) && ((Sort & SORT_MASK) == SORT_THREADS))
+  if (option(OPT_UNCOLLAPSE_NEW) && ((Sort & SORT_MASK) == SORT_THREADS))
   {
     if (check == MUTT_REOPENED)
     {
@@ -440,9 +440,9 @@ static int main_change_folder(struct Menu *menu, int op, char *buf, size_t bufsz
                               int *oldcount, int *index_hint, int flags)
 {
 #ifdef USE_NNTP
-  if (option(OPTNEWS))
+  if (option(OPT_NEWS))
   {
-    unset_option(OPTNEWS);
+    unset_option(OPT_NEWS);
     nntp_expand_path(buf, bufsz, &CurrentNewsSrv->conn->account);
   }
   else
@@ -477,7 +477,7 @@ static int main_change_folder(struct Menu *menu, int op, char *buf, size_t bufsz
         update_index(menu, Context, check, *oldcount, *index_hint);
 
       FREE(&new_last_folder);
-      set_option(OPTSEARCHINVALID);
+      set_option(OPT_SEARCH_INVALID);
       menu->redraw |= REDRAW_INDEX | REDRAW_STATUS;
       return 0;
     }
@@ -500,7 +500,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(OPTREADONLY) || op == OP_MAIN_CHANGE_FOLDER_READONLY) ? MUTT_READONLY : 0,
+           buf, (option(OPT_READONLY) || op == OP_MAIN_CHANGE_FOLDER_READONLY) ? MUTT_READONLY : 0,
            NULL)) != NULL)
   {
     menu->current = ci_first_message();
@@ -508,7 +508,7 @@ static int main_change_folder(struct Menu *menu, int op, char *buf, size_t bufsz
   else
     menu->current = 0;
 
-  if (((Sort & SORT_MASK) == SORT_THREADS) && option(OPTCOLLAPSEALL))
+  if (((Sort & SORT_MASK) == SORT_THREADS) && option(OPT_COLLAPSE_ALL))
     collapse_all(menu, 0);
 
 #ifdef USE_SIDEBAR
@@ -518,7 +518,7 @@ static int main_change_folder(struct Menu *menu, int op, char *buf, size_t bufsz
   mutt_clear_error();
   mutt_buffy_check(true); /* force the buffy check after we have changed the folder */
   menu->redraw = REDRAW_FULL;
-  set_option(OPTSEARCHINVALID);
+  set_option(OPT_SEARCH_INVALID);
 
   return 0;
 }
@@ -881,7 +881,7 @@ static void index_menu_redraw(struct Menu *menu)
     mutt_draw_statusline(MuttStatusWindow->cols, buf, sizeof(buf));
     NORMAL_COLOR;
     menu->redraw &= ~REDRAW_STATUS;
-    if (option(OPTTSENABLED) && TSSupported)
+    if (option(OPT_TS_ENABLED) && TSSupported)
     {
       menu_status_line(buf, sizeof(buf), menu, NONULL(TSStatusFormat));
       mutt_ts_status(buf);
@@ -915,7 +915,7 @@ int mutt_index_menu(void)
   int index_hint;  /* used to restore cursor position */
   bool do_buffy_notify = true;
   int close = 0; /* did we OP_QUIT or OP_EXIT out of this menu? */
-  int attach_msg = option(OPTATTACHMSG);
+  int attach_msg = option(OPT_ATTACH_MSG);
 
   menu = mutt_new_menu(MENU_MAIN);
   menu->make_entry = index_make_entry;
@@ -933,7 +933,7 @@ int mutt_index_menu(void)
   if (!attach_msg)
     mutt_buffy_check(true); /* force the buffy check after we enter the folder */
 
-  if (((Sort & SORT_MASK) == SORT_THREADS) && option(OPTCOLLAPSEALL))
+  if (((Sort & SORT_MASK) == SORT_THREADS) && option(OPT_COLLAPSE_ALL))
   {
     collapse_all(menu, 0);
     menu->redraw = REDRAW_FULL;
@@ -951,17 +951,17 @@ int mutt_index_menu(void)
      * any 'op' below could do mutt_enter_command(), either here or
      * from any new menu launched, and change $sort/$sort_aux
      */
-    if (option(OPTNEEDRESORT) && Context && Context->msgcount && menu->current >= 0)
+    if (option(OPT_NEED_RESORT) && Context && Context->msgcount && menu->current >= 0)
       resort_index(menu);
 
     menu->max = Context ? Context->vcount : 0;
     oldcount = Context ? Context->msgcount : 0;
 
-    if (option(OPTREDRAWTREE) && Context && Context->msgcount && (Sort & SORT_MASK) == SORT_THREADS)
+    if (option(OPT_REDRAW_TREE) && Context && Context->msgcount && (Sort & SORT_MASK) == SORT_THREADS)
     {
       mutt_draw_tree(Context);
       menu->redraw |= REDRAW_STATUS;
-      unset_option(OPTREDRAWTREE);
+      unset_option(OPT_REDRAW_TREE);
     }
 
     if (Context)
@@ -989,7 +989,7 @@ int mutt_index_menu(void)
           menu->redraw = REDRAW_FULL;
         }
 
-        set_option(OPTSEARCHINVALID);
+        set_option(OPT_SEARCH_INVALID);
       }
       else if (check == MUTT_NEW_MAIL || check == MUTT_REOPENED || check == MUTT_FLAGS)
       {
@@ -1004,7 +1004,7 @@ int mutt_index_menu(void)
             if (!Context->hdrs[i]->read)
             {
               mutt_message(_("New mail in this mailbox."));
-              if (option(OPTBEEPNEW))
+              if (option(OPT_BEEP_NEW))
                 beep();
               if (NewMailCmd)
               {
@@ -1030,7 +1030,7 @@ int mutt_index_menu(void)
         menu->redraw = REDRAW_FULL;
         menu->max = Context->vcount;
 
-        set_option(OPTSEARCHINVALID);
+        set_option(OPT_SEARCH_INVALID);
       }
     }
 
@@ -1045,7 +1045,7 @@ int mutt_index_menu(void)
         if (mutt_buffy_notify())
         {
           menu->redraw |= REDRAW_STATUS;
-          if (option(OPTBEEPNEW))
+          if (option(OPT_BEEP_NEW))
             beep();
           if (NewMailCmd)
           {
@@ -1078,9 +1078,9 @@ int mutt_index_menu(void)
       else
         menu->oldcurrent = -1;
 
-      if (option(OPTARROWCURSOR))
+      if (option(OPT_ARROW_CURSOR))
         mutt_window_move(MuttIndexWindow, menu->current - menu->top + menu->offset, 2);
-      else if (option(OPTBRAILLEFRIENDLY))
+      else if (option(OPT_BRAILLE_FRIENDLY))
         mutt_window_move(MuttIndexWindow, menu->current - menu->top + menu->offset, 0);
       else
         mutt_window_move(MuttIndexWindow, menu->current - menu->top + menu->offset,
@@ -1151,7 +1151,7 @@ int mutt_index_menu(void)
         tag = true;
         continue;
       }
-      else if (option(OPTAUTOTAG) && Context && Context->tagged)
+      else if (option(OPT_AUTO_TAG) && Context && Context->tagged)
         tag = true;
 
       mutt_clear_error();
@@ -1167,7 +1167,7 @@ int mutt_index_menu(void)
     }
 
 #ifdef USE_NNTP
-    unset_option(OPTNEWS); /* for any case */
+    unset_option(OPT_NEWS); /* for any case */
 #endif
 
 #ifdef USE_NOTMUCH
@@ -1520,14 +1520,14 @@ int mutt_index_menu(void)
           {
             snprintf(buf2, sizeof(buf2), "!~R!~D~s%s",
                      Context->pattern ? Context->pattern : ".*");
-            set_option(OPTHIDEREAD);
+            set_option(OPT_HIDE_READ);
           }
           else
           {
             strfcpy(buf2, Context->pattern + 8, sizeof(buf2));
             if (!*buf2 || (strncmp(buf2, ".*", 2) == 0))
               snprintf(buf2, sizeof(buf2), "~A");
-            unset_option(OPTHIDEREAD);
+            unset_option(OPT_HIDE_READ);
           }
           FREE(&Context->pattern);
           Context->pattern = safe_strdup(buf2);
@@ -1586,7 +1586,7 @@ int mutt_index_menu(void)
               update_index(menu, Context, check, oldcount, index_hint);
 
             menu->redraw = REDRAW_FULL; /* new mail arrived? */
-            set_option(OPTSEARCHINVALID);
+            set_option(OPT_SEARCH_INVALID);
           }
         }
         break;
@@ -1618,7 +1618,7 @@ int mutt_index_menu(void)
           if (Context && Context->msgcount)
           {
             resort_index(menu);
-            set_option(OPTSEARCHINVALID);
+            set_option(OPT_SEARCH_INVALID);
           }
           if (menu->menu == MENU_PAGER)
           {
@@ -1633,7 +1633,7 @@ int mutt_index_menu(void)
 
         CHECK_MSGCOUNT;
         CHECK_VISIBLE;
-        if (tag && !option(OPTAUTOTAG))
+        if (tag && !option(OPT_AUTO_TAG))
         {
           for (j = 0; j < Context->vcount; j++)
             mutt_set_flag(Context, Context->hdrs[Context->v2r[j]], MUTT_TAG, 0);
@@ -1649,7 +1649,7 @@ int mutt_index_menu(void)
                                              Context->last_tag);
 
           menu->redraw |= REDRAW_STATUS;
-          if (option(OPTRESOLVE) && menu->current < Context->vcount - 1)
+          if (option(OPT_RESOLVE) && menu->current < Context->vcount - 1)
           {
             menu->current++;
             menu->redraw |= REDRAW_MOTION_RESYNCH;
@@ -1711,7 +1711,7 @@ int mutt_index_menu(void)
         {
           if (mx_close_mailbox(Context, &index_hint) != 0)
           {
-            set_option(OPTSEARCHINVALID);
+            set_option(OPT_SEARCH_INVALID);
             menu->redraw = REDRAW_FULL;
             break;
           }
@@ -1719,7 +1719,7 @@ int mutt_index_menu(void)
         }
         imap_logout_all();
         mutt_message(_("Logged out of IMAP servers."));
-        set_option(OPTSEARCHINVALID);
+        set_option(OPT_SEARCH_INVALID);
         menu->redraw = REDRAW_FULL;
         break;
 #endif
@@ -1762,7 +1762,7 @@ int mutt_index_menu(void)
                   break;
                 }
               }
-            set_option(OPTSEARCHINVALID);
+            set_option(OPT_SEARCH_INVALID);
           }
           else if (check == MUTT_NEW_MAIL || check == MUTT_REOPENED)
             update_index(menu, Context, check, oc, index_hint);
@@ -1915,7 +1915,7 @@ int mutt_index_menu(void)
             op = OP_DISPLAY_MESSAGE;
             continue;
           }
-          if (option(OPTRESOLVE))
+          if (option(OPT_RESOLVE))
           {
             if ((menu->current = ci_next_undeleted(menu->current)) == -1)
             {
@@ -1999,9 +1999,9 @@ int mutt_index_menu(void)
 #ifdef USE_NNTP
       case OP_MAIN_CHANGE_GROUP:
       case OP_MAIN_CHANGE_GROUP_READONLY:
-        unset_option(OPTNEWS);
+        unset_option(OPT_NEWS);
 #endif
-        if (attach_msg || option(OPTREADONLY) ||
+        if (attach_msg || option(OPT_READONLY) ||
 #ifdef USE_NNTP
             op == OP_MAIN_CHANGE_GROUP_READONLY ||
 #endif
@@ -2064,7 +2064,7 @@ int mutt_index_menu(void)
 #ifdef USE_NNTP
           if (op == OP_MAIN_CHANGE_GROUP || op == OP_MAIN_CHANGE_GROUP_READONLY)
           {
-            set_option(OPTNEWS);
+            set_option(OPT_NEWS);
             CurrentNewsSrv = nntp_select_server(NewsServer, 0);
             if (!CurrentNewsSrv)
               break;
@@ -2124,19 +2124,19 @@ int mutt_index_menu(void)
          * again while reading the message.
          */
         if (op == OP_DISPLAY_HEADERS)
-          toggle_option(OPTWEED);
+          toggle_option(OPT_WEED);
 
-        unset_option(OPTNEEDRESORT);
+        unset_option(OPT_NEED_RESORT);
 
         if ((Sort & SORT_MASK) == SORT_THREADS && CURHDR->collapsed)
         {
           mutt_uncollapse_thread(Context, CURHDR);
           mutt_set_virtual(Context);
-          if (option(OPTUNCOLLAPSEJUMP))
+          if (option(OPT_UNCOLLAPSE_JUMP))
             menu->current = mutt_thread_next_unread(Context, CURHDR);
         }
 
-        if (option(OPTPGPAUTODEC) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
+        if (option(OPT_PGP_AUTO_DEC) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
           mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw);
         int hint = Context->hdrs[Context->v2r[menu->current]]->index;
 
@@ -2147,7 +2147,7 @@ int mutt_index_menu(void)
 
         if ((op = mutt_display_message(CURHDR)) < 0)
         {
-          unset_option(OPTNEEDRESORT);
+          unset_option(OPT_NEED_RESORT);
           break;
         }
 
@@ -2383,7 +2383,7 @@ int mutt_index_menu(void)
           menu->redraw |= REDRAW_STATUS;
           if (tag)
             menu->redraw |= REDRAW_INDEX;
-          else if (option(OPTRESOLVE))
+          else if (option(OPT_RESOLVE))
           {
             if ((menu->current = ci_next_undeleted(menu->current)) == -1)
             {
@@ -2517,7 +2517,7 @@ int mutt_index_menu(void)
         else
         {
           mutt_set_flag(Context, CURHDR, MUTT_FLAG, !CURHDR->flagged);
-          if (option(OPTRESOLVE))
+          if (option(OPT_RESOLVE))
           {
             if ((menu->current = ci_next_undeleted(menu->current)) == -1)
             {
@@ -2563,7 +2563,7 @@ int mutt_index_menu(void)
           else
             mutt_set_flag(Context, CURHDR, MUTT_READ, 1);
 
-          if (option(OPTRESOLVE))
+          if (option(OPT_RESOLVE))
           {
             if ((menu->current = ci_next_undeleted(menu->current)) == -1)
             {
@@ -2661,7 +2661,7 @@ int mutt_index_menu(void)
           menu->redraw |= REDRAW_STATUS;
           if (tag)
             menu->redraw |= REDRAW_INDEX;
-          else if (option(OPTRESOLVE))
+          else if (option(OPT_RESOLVE))
           {
             if ((menu->current = ci_next_undeleted(menu->current)) == -1)
             {
@@ -2690,7 +2690,7 @@ int mutt_index_menu(void)
         {
           menu->current = mutt_uncollapse_thread(Context, CURHDR);
           mutt_set_virtual(Context);
-          if (option(OPTUNCOLLAPSEJUMP))
+          if (option(OPT_UNCOLLAPSE_JUMP))
             menu->current = mutt_thread_next_unread(Context, CURHDR);
         }
         else if (CAN_COLLAPSE(CURHDR))
@@ -2756,7 +2756,7 @@ int mutt_index_menu(void)
         {
           mutt_tag_set_flag(MUTT_DELETE, 1);
           mutt_tag_set_flag(MUTT_PURGE, (op == OP_PURGE_MESSAGE));
-          if (option(OPTDELETEUNTAG))
+          if (option(OPT_DELETE_UNTAG))
             mutt_tag_set_flag(MUTT_TAG, 0);
           menu->redraw |= REDRAW_INDEX;
         }
@@ -2764,9 +2764,9 @@ int mutt_index_menu(void)
         {
           mutt_set_flag(Context, CURHDR, MUTT_DELETE, 1);
           mutt_set_flag(Context, CURHDR, MUTT_PURGE, (op == OP_PURGE_MESSAGE));
-          if (option(OPTDELETEUNTAG))
+          if (option(OPT_DELETE_UNTAG))
             mutt_set_flag(Context, CURHDR, MUTT_TAG, 0);
-          if (option(OPTRESOLVE))
+          if (option(OPT_RESOLVE))
           {
             if ((menu->current = ci_next_undeleted(menu->current)) == -1)
             {
@@ -2809,9 +2809,9 @@ int mutt_index_menu(void)
               break;
           }
 
-          if (option(OPTDELETEUNTAG))
+          if (option(OPT_DELETE_UNTAG))
             mutt_thread_set_flag(CURHDR, MUTT_TAG, 0, subthread);
-          if (option(OPTRESOLVE))
+          if (option(OPT_RESOLVE))
             if ((menu->current = ci_next_undeleted(menu->current)) == -1)
               menu->current = menu->oldcurrent;
           menu->redraw |= REDRAW_INDEX | REDRAW_STATUS;
@@ -2854,7 +2854,7 @@ int mutt_index_menu(void)
         /* L10N: CHECK_ACL */
         CHECK_ACL(MUTT_ACL_INSERT, _("Cannot edit message"));
 
-        if (option(OPTPGPAUTODEC) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
+        if (option(OPT_PGP_AUTO_DEC) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
           mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw);
         mutt_edit_message(Context, tag ? NULL : CURHDR);
         menu->redraw = REDRAW_FULL;
@@ -2866,7 +2866,7 @@ int mutt_index_menu(void)
         CHECK_MSGCOUNT;
         CHECK_VISIBLE;
         CHECK_ATTACH;
-        if (option(OPTPGPAUTODEC) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
+        if (option(OPT_PGP_AUTO_DEC) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
           mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw);
         ci_send_message(SENDFORWARD, NULL, NULL, Context, tag ? NULL : CURHDR);
         menu->redraw = REDRAW_FULL;
@@ -2881,7 +2881,7 @@ int mutt_index_menu(void)
         CHECK_MSGCOUNT;
         CHECK_VISIBLE;
         CHECK_ATTACH;
-        if (option(OPTPGPAUTODEC) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
+        if (option(OPT_PGP_AUTO_DEC) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
           mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw);
         ci_send_message(SENDREPLY | SENDGROUPREPLY, NULL, NULL, Context, tag ? NULL : CURHDR);
         menu->redraw = REDRAW_FULL;
@@ -2915,7 +2915,7 @@ int mutt_index_menu(void)
         CHECK_ATTACH;
         CHECK_MSGCOUNT;
         CHECK_VISIBLE;
-        if (option(OPTPGPAUTODEC) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
+        if (option(OPT_PGP_AUTO_DEC) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
           mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw);
         ci_send_message(SENDREPLY | SENDLISTREPLY, NULL, NULL, Context, tag ? NULL : CURHDR);
         menu->redraw = REDRAW_FULL;
@@ -2970,7 +2970,7 @@ int mutt_index_menu(void)
         /* in an IMAP folder index with imap_peek=no, piping could change
          * new or old messages status to read. Redraw what's needed.
          */
-        if (Context->magic == MUTT_IMAP && !option(OPTIMAPPEEK))
+        if (Context->magic == MUTT_IMAP && !option(OPT_IMAP_PEEK))
         {
           menu->redraw |= (tag ? REDRAW_INDEX : REDRAW_CURRENT) | REDRAW_STATUS;
         }
@@ -2988,7 +2988,7 @@ int mutt_index_menu(void)
         /* in an IMAP folder index with imap_peek=no, printing could change
          * new or old messages status to read. Redraw what's needed.
          */
-        if (Context->magic == MUTT_IMAP && !option(OPTIMAPPEEK))
+        if (Context->magic == MUTT_IMAP && !option(OPT_IMAP_PEEK))
         {
           menu->redraw |= (tag ? REDRAW_INDEX : REDRAW_CURRENT) | REDRAW_STATUS;
         }
@@ -3009,7 +3009,7 @@ int mutt_index_menu(void)
 
         if (rc != -1)
         {
-          if (option(OPTRESOLVE))
+          if (option(OPT_RESOLVE))
           {
             if ((menu->current = (op == OP_MAIN_READ_THREAD ?
                                       mutt_next_thread(CURHDR) :
@@ -3124,7 +3124,7 @@ int mutt_index_menu(void)
         CHECK_ATTACH;
         CHECK_MSGCOUNT;
         CHECK_VISIBLE;
-        if (option(OPTPGPAUTODEC) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
+        if (option(OPT_PGP_AUTO_DEC) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
           mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw);
         ci_send_message(SENDREPLY, NULL, NULL, Context, tag ? NULL : CURHDR);
         menu->redraw = REDRAW_FULL;
@@ -3145,7 +3145,7 @@ int mutt_index_menu(void)
 
         if (rc != -1)
         {
-          if (option(OPTRESOLVE))
+          if (option(OPT_RESOLVE))
           {
             if (op == OP_TAG_THREAD)
               menu->current = mutt_next_thread(CURHDR);
@@ -3177,7 +3177,7 @@ int mutt_index_menu(void)
         {
           mutt_set_flag(Context, CURHDR, MUTT_DELETE, 0);
           mutt_set_flag(Context, CURHDR, MUTT_PURGE, 0);
-          if (option(OPTRESOLVE) && menu->current < Context->vcount - 1)
+          if (option(OPT_RESOLVE) && menu->current < Context->vcount - 1)
           {
             menu->current++;
             menu->redraw |= REDRAW_MOTION_RESYNCH;
@@ -3203,7 +3203,7 @@ int mutt_index_menu(void)
                                     op == OP_UNDELETE_THREAD ? 0 : 1);
         if (rc != -1)
         {
-          if (option(OPTRESOLVE))
+          if (option(OPT_RESOLVE))
           {
             if (op == OP_UNDELETE_THREAD)
               menu->current = mutt_next_thread(CURHDR);
@@ -3252,7 +3252,7 @@ int mutt_index_menu(void)
         break;
 
       case OP_SIDEBAR_TOGGLE_VISIBLE:
-        toggle_option(OPTSIDEBAR);
+        toggle_option(OPT_SIDEBAR);
         mutt_reflow_windows();
         break;
 
diff --git a/edit.c b/edit.c
index 19b5e8093db1bcb1e640c7198869ff691badcea1..c69593d1c1b562481c578b4b973db2d76266bf5f 100644 (file)
--- a/edit.c
+++ b/edit.c
@@ -284,7 +284,7 @@ static void be_edit_header(struct Envelope *e, int force)
     addch('\n');
   }
 
-  if ((!e->cc && option(OPTASKCC)) || force)
+  if ((!e->cc && option(OPT_ASK_CC)) || force)
   {
     addstr("Cc: ");
     tmp[0] = 0;
@@ -305,7 +305,7 @@ static void be_edit_header(struct Envelope *e, int force)
     addch('\n');
   }
 
-  if (option(OPTASKBCC) || force)
+  if (option(OPT_ASK_BCC) || force)
   {
     addstr("Bcc: ");
     tmp[0] = 0;
@@ -456,7 +456,7 @@ int mutt_builtin_editor(const char *path, struct Header *msg, struct Header *cur
             buf = NULL;
             bufmax = buflen = 0;
 
-            if (option(OPTEDITHDRS))
+            if (option(OPT_EDIT_HDRS))
             {
               mutt_env_to_local(msg->env);
               mutt_edit_headers(NONULL(Visual), path, msg, NULL, 0);
index be33f90e457c73fb06a77d237906a32ec42a48f5..e419a5585b5bca4c14d0b23ea4f0783882cf9ae6 100644 (file)
--- a/editmsg.c
+++ b/editmsg.c
@@ -208,7 +208,7 @@ bail:
     mutt_set_flag(Context, cur, MUTT_PURGE, 1);
     mutt_set_flag(Context, cur, MUTT_READ, 1);
 
-    if (option(OPTDELETEUNTAG))
+    if (option(OPT_DELETE_UNTAG))
       mutt_set_flag(Context, cur, MUTT_TAG, 0);
   }
   else if (rc == -1)
diff --git a/flags.c b/flags.c
index 7c92c394f41eab4fcd6d1613339bff96d7ae34bc..ceb7a2fb3ede92aa6d55fb3db3bac1c4b056ec76 100644 (file)
--- a/flags.c
+++ b/flags.c
@@ -59,7 +59,7 @@ void _mutt_set_flag(struct Context *ctx, struct Header *h, int flag, int bf, int
 
       if (bf)
       {
-        if (!h->deleted && !ctx->readonly && (!h->flagged || !option(OPTFLAGSAFE)))
+        if (!h->deleted && !ctx->readonly && (!h->flagged || !option(OPT_FLAG_SAFE)))
         {
           h->deleted = true;
           update = true;
index f16162f7905c87f7ac210e52c12d36ed0b72ac3b..83fbe998d19667b707c51341961f54536ee1fb2c 100644 (file)
--- a/handler.c
+++ b/handler.c
@@ -1008,7 +1008,7 @@ static int is_autoview(struct Body *b)
 
   snprintf(type, sizeof(type), "%s/%s", TYPE(b), b->subtype);
 
-  if (option(OPTIMPLICITAUTOVIEW))
+  if (option(OPT_IMPLICIT_AUTOVIEW))
   {
     /* $implicit_autoview is essentially the same as "auto_view *" */
     is_av = 1;
@@ -1174,7 +1174,7 @@ static int alternative_handler(struct Body *a, struct State *s)
 
   if (choice)
   {
-    if (s->flags & MUTT_DISPLAY && !option(OPTWEED))
+    if (s->flags & MUTT_DISPLAY && !option(OPT_WEED))
     {
       fseeko(s->fpin, choice->hdr_offset, SEEK_SET);
       mutt_copy_bytes(s->fpin, s->fpout, choice->offset - choice->hdr_offset);
@@ -1250,7 +1250,7 @@ static int message_handler(struct Body *a, struct State *s)
   {
     mutt_copy_hdr(s->fpin, s->fpout, off_start, b->parts->offset,
                   (((s->flags & MUTT_WEED) ||
-                    ((s->flags & (MUTT_DISPLAY | MUTT_PRINTING)) && option(OPTWEED))) ?
+                    ((s->flags & (MUTT_DISPLAY | MUTT_PRINTING)) && option(OPT_WEED))) ?
                        (CH_WEED | CH_REORDER) :
                        0) |
                       (s->prefix ? CH_PREFIX : 0) | CH_DECODE | CH_FROM |
@@ -1342,7 +1342,7 @@ static int multipart_handler(struct Body *a, struct State *s)
       }
       state_puts(" --]\n", s);
       print_part_line(s, p, 0);
-      if (!option(OPTWEED))
+      if (!option(OPT_WEED))
       {
         fseeko(s->fpin, p->hdr_offset, SEEK_SET);
         mutt_copy_bytes(s->fpin, s->fpout, p->offset - p->hdr_offset);
@@ -1361,7 +1361,7 @@ static int multipart_handler(struct Body *a, struct State *s)
                  NONULL(p->subtype));
     }
 
-    if ((s->flags & MUTT_REPLYING) && (option(OPTINCLUDEONLYFIRST)) && (s->flags & MUTT_FIRSTDONE))
+    if ((s->flags & MUTT_REPLYING) && (option(OPT_INCLUDE_ONLY_FIRST)) && (s->flags & MUTT_FIRSTDONE))
       break;
   }
 
@@ -1561,7 +1561,7 @@ static int external_body_handler(struct Body *b, struct State *s)
       }
 
       mutt_copy_hdr(s->fpin, s->fpout, ftello(s->fpin), b->parts->offset,
-                    (option(OPTWEED) ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE, NULL);
+                    (option(OPT_WEED) ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE, NULL);
     }
   }
   else if (expiration && expire < time(NULL))
@@ -1576,7 +1576,7 @@ static int external_body_handler(struct Body *b, struct State *s)
                         s);
 
       mutt_copy_hdr(s->fpin, s->fpout, ftello(s->fpin), b->parts->offset,
-                    (option(OPTWEED) ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE | CH_DISPLAY,
+                    (option(OPT_WEED) ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE | CH_DISPLAY,
                     NULL);
     }
   }
@@ -1591,7 +1591,7 @@ static int external_body_handler(struct Body *b, struct State *s)
       state_printf(
           s, _("[-- and the indicated access-type %s is unsupported --]\n"), access_type);
       mutt_copy_hdr(s->fpin, s->fpout, ftello(s->fpin), b->parts->offset,
-                    (option(OPTWEED) ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE | CH_DISPLAY,
+                    (option(OPT_WEED) ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE | CH_DISPLAY,
                     NULL);
     }
   }
@@ -1658,7 +1658,7 @@ static int text_plain_handler(struct Body *b, struct State *s)
 
   while ((buf = mutt_read_line(buf, &sz, s->fpin, NULL, 0)))
   {
-    if ((mutt_strcmp(buf, "-- ") != 0) && option(OPTTEXTFLOWED))
+    if ((mutt_strcmp(buf, "-- ") != 0) && option(OPT_TEXT_FLOWED))
     {
       l = mutt_strlen(buf);
       while (l > 0 && buf[l - 1] == ' ')
@@ -1865,7 +1865,7 @@ int mutt_body_handler(struct Body *b, struct State *s)
        */
       if ((WithCrypto & APPLICATION_PGP) && mutt_is_application_pgp(b))
         handler = crypt_pgp_application_pgp_handler;
-      else if (option(OPTREFLOWTEXT) &&
+      else if (option(OPT_REFLOW_TEXT) &&
                (ascii_strcasecmp("flowed", mutt_get_parameter("format", b->parameter)) == 0))
         handler = rfc3676_handler;
       else
@@ -1919,7 +1919,7 @@ int mutt_body_handler(struct Body *b, struct State *s)
   }
   else if (WithCrypto && b->type == TYPEAPPLICATION)
   {
-    if (option(OPTDONTHANDLEPGPKEYS) && (ascii_strcasecmp("pgp-keys", b->subtype) == 0))
+    if (option(OPT_DONT_HANDLE_PGP_KEYS) && (ascii_strcasecmp("pgp-keys", b->subtype) == 0))
     {
       /* pass raw part through for key extraction */
       plaintext = true;
@@ -1932,7 +1932,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(OPTHONORDISP) || (b->disposition != DISPATTACH || option(OPTVIEWATTACH))) &&
+  if ((!option(OPT_HONOR_DISP) || (b->disposition != DISPATTACH || option(OPT_VIEW_ATTACH))) &&
       (plaintext || handler))
   {
     rc = run_decode_and_handler(b, s, handler, plaintext);
@@ -1940,15 +1940,15 @@ int mutt_body_handler(struct Body *b, struct State *s)
   /* print hint to use attachment menu for disposition == attachment
      if we're not already being called from there */
   else if ((s->flags & MUTT_DISPLAY) ||
-           (b->disposition == DISPATTACH && !option(OPTVIEWATTACH) &&
-            option(OPTHONORDISP) && (plaintext || handler)))
+           (b->disposition == DISPATTACH && !option(OPT_VIEW_ATTACH) &&
+            option(OPT_HONOR_DISP) && (plaintext || handler)))
   {
     state_mark_attach(s);
-    if (option(OPTHONORDISP) && b->disposition == DISPATTACH)
+    if (option(OPT_HONOR_DISP) && b->disposition == DISPATTACH)
       fputs(_("[-- This is an attachment "), s->fpout);
     else
       state_printf(s, _("[-- %s/%s is unsupported "), TYPE(b), b->subtype);
-    if (!option(OPTVIEWATTACH))
+    if (!option(OPT_VIEW_ATTACH))
     {
       char keystroke[SHORT_STRING];
 
index 2fa05fbaf11ad200b480ba2c1fa8c21e404d2d50..879404d5b8c50a1c04156e86fc1191b014c80229 100644 (file)
@@ -38,7 +38,7 @@ static void *hcache_kyotocabinet_open(const char *path)
 
   printfresult =
       snprintf(kcdbpath, sizeof(kcdbpath), "%s#type=kct#opts=%s#rcomp=lex",
-               path, option(OPTHCACHECOMPRESS) ? "lc" : "l");
+               path, option(OPT_HCACHE_COMPRESS) ? "lc" : "l");
   if ((printfresult < 0) || (printfresult >= sizeof(kcdbpath)))
   {
     return NULL;
index f4815eaec5856cc36370db34db6b00547e59edc6..fa4f020c83e9b77074226d273d66fcb7016c126f 100644 (file)
@@ -35,7 +35,7 @@ static void *hcache_qdbm_open(const char *path)
 {
   int flags = VL_OWRITER | VL_OCREAT;
 
-  if (option(OPTHCACHECOMPRESS))
+  if (option(OPT_HCACHE_COMPRESS))
     flags |= VL_OZCOMP;
 
   return vlopen(path, flags, VL_CMPLEX);
index 32e698c0482fcc380cbdaa5c4a6c6b8b8fe07e45..75bffada7362ef6b3614af95694812295be7687f 100644 (file)
@@ -36,7 +36,7 @@ static void *hcache_tokyocabinet_open(const char *path)
   TCBDB *db = tcbdbnew();
   if (!db)
     return NULL;
-  if (option(OPTHCACHECOMPRESS))
+  if (option(OPT_HCACHE_COMPRESS))
     tcbdbtune(db, 0, 0, 0, -1, -1, BDBTDEFLATE);
   if (tcbdbopen(db, path, BDBOWRITER | BDBOCREAT))
     return db;
index 557965c22f6a5e4bc6a9b4669b685335b871e35d..d2d94a18e621d69c9b4e71c9444faf8648a2984a 100644 (file)
--- a/hdrline.c
+++ b/hdrline.c
@@ -992,7 +992,7 @@ static const char *hdr_format_str(char *dest, size_t destlen, size_t col, int co
       if (!optional)
       {
         make_from_addr(hdr->env, buf2, sizeof(buf2), 1);
-        if (!option(OPTSAVEADDRESS) && (p = strpbrk(buf2, "%@")))
+        if (!option(OPT_SAVE_ADDRESS) && (p = strpbrk(buf2, "%@")))
           *p = 0;
         mutt_format_s(dest, destlen, prefix, buf2);
       }
index 7c29cb2d9219e8e429e43f755def9829143d142c..e4899233b15649e4c74a5b752df5403568811745 100644 (file)
--- a/headers.c
+++ b/headers.c
@@ -128,7 +128,7 @@ void mutt_edit_headers(const char *editor, const char *body, struct Header *msg,
      we can simply compare strings as we don't generate References for
      multiple Message-Ids in IRT anyways */
 #ifdef USE_NNTP
-  if (!option(OPTNEWSSEND))
+  if (!option(OPT_NEWS_SEND))
 #endif
     if (msg->env->in_reply_to &&
         (!n->in_reply_to ||
diff --git a/help.c b/help.c
index b5c3a90e9d007cc8dec71b6ae8d565ee05344e56..86a1c55f56165a1d76001e850e4d7f5f7378a5df 100644 (file)
--- a/help.c
+++ b/help.c
@@ -278,7 +278,7 @@ static void format_line(FILE *f, int ismacro, const char *t1, const char *t2, co
         else
         {
           n += col - MuttIndexWindow->cols;
-          if (option(OPTMARKERS))
+          if (option(OPT_MARKERS))
             n++;
         }
         col = pad(f, n, col_b);
index 4a05ee549d36f32d35490c3e2d0060e3660a8ead..88985787ee307cf2ff3334f77362f2ca6b0ce99a 100644 (file)
--- a/history.c
+++ b/history.c
@@ -199,7 +199,7 @@ static void shrink_histfile(void)
   if ((f = fopen(HistFile, "r")) == NULL)
     return;
 
-  if (option(OPTHISTREMOVEDUPS))
+  if (option(OPT_HIST_REMOVE_DUPS))
     for (hclass = 0; hclass < HC_LAST; hclass++)
       dup_hashes[hclass] = hash_create(MAX(10, SaveHist * 2), MUTT_HASH_STRDUP_KEYS);
 
@@ -216,7 +216,7 @@ static void shrink_histfile(void)
     if (hclass >= HC_LAST)
       continue;
     *p = '\0';
-    if (option(OPTHISTREMOVEDUPS) && (dup_hash_inc(dup_hashes[hclass], linebuf + read) > 1))
+    if (option(OPT_HIST_REMOVE_DUPS) && (dup_hash_inc(dup_hashes[hclass], linebuf + read) > 1))
     {
       regen_file = true;
       continue;
@@ -253,7 +253,7 @@ static void shrink_histfile(void)
       if (hclass >= HC_LAST)
         continue;
       *p = '\0';
-      if (option(OPTHISTREMOVEDUPS) &&
+      if (option(OPT_HIST_REMOVE_DUPS) &&
           (dup_hash_dec(dup_hashes[hclass], linebuf + read) > 0))
         continue;
       *p = '|';
@@ -276,7 +276,7 @@ cleanup:
     safe_fclose(&tmp);
     unlink(tmpfname);
   }
-  if (option(OPTHISTREMOVEDUPS))
+  if (option(OPT_HIST_REMOVE_DUPS))
     for (hclass = 0; hclass < HC_LAST; hclass++)
       hash_destroy(&dup_hashes[hclass], NULL);
 }
@@ -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(OPTHISTREMOVEDUPS))
+      if (option(OPT_HIST_REMOVE_DUPS))
         remove_history_dups(hclass, s);
       if (save && SaveHist)
         save_history(hclass, s);
diff --git a/hook.c b/hook.c
index 0db8af77731e535cf0503bff1c7e0e5edf5896f7..acc2d509a3e785f5031ce544b995ad37d85ab9c5 100644 (file)
--- a/hook.c
+++ b/hook.c
@@ -503,12 +503,12 @@ void mutt_select_fcc(char *path, size_t pathlen, struct Header *hdr)
 
   if (addr_hook(path, pathlen, MUTT_FCCHOOK, NULL, hdr) != 0)
   {
-    if ((option(OPTSAVENAME) || option(OPTFORCENAME)) && (env->to || env->cc || env->bcc))
+    if ((option(OPT_SAVE_NAME) || option(OPT_FORCE_NAME)) && (env->to || env->cc || env->bcc))
     {
       adr = env->to ? env->to : (env->cc ? env->cc : env->bcc);
       mutt_safe_path(buf, sizeof(buf), adr);
       mutt_concat_path(path, NONULL(Maildir), buf, pathlen);
-      if (!option(OPTFORCENAME) && mx_access(path, W_OK) != 0)
+      if (!option(OPT_FORCE_NAME) && mx_access(path, W_OK) != 0)
         strfcpy(path, NONULL(Outbox), pathlen);
     }
     else
index 85364dc35f29792a76ca24d17f951078b2ffeb78..5d1daef3665c54ca1f6f67212d1197c47432330b 100644 (file)
@@ -189,9 +189,9 @@ int imap_browse(char *path, struct BrowserState *state)
     return -1;
   }
 
-  save_lsub = option(OPTIMAPCHECKSUBSCRIBED);
-  unset_option(OPTIMAPCHECKSUBSCRIBED);
-  strfcpy(list_cmd, option(OPTIMAPLSUB) ? "LSUB" : "LIST", sizeof(list_cmd));
+  save_lsub = option(OPT_IMAP_CHECK_SUBSCRIBED);
+  unset_option(OPT_IMAP_CHECK_SUBSCRIBED);
+  strfcpy(list_cmd, option(OPT_IMAP_LSUB) ? "LSUB" : "LIST", sizeof(list_cmd));
 
   if (!(idata = imap_conn_find(&(mx.account), 0)))
     goto fail;
@@ -320,14 +320,14 @@ int imap_browse(char *path, struct BrowserState *state)
   mutt_clear_error();
 
   if (save_lsub)
-    set_option(OPTIMAPCHECKSUBSCRIBED);
+    set_option(OPT_IMAP_CHECK_SUBSCRIBED);
 
   FREE(&mx.mbox);
   return 0;
 
 fail:
   if (save_lsub)
-    set_option(OPTIMAPCHECKSUBSCRIBED);
+    set_option(OPT_IMAP_CHECK_SUBSCRIBED);
   FREE(&mx.mbox);
   return -1;
 }
index 4c8e2899a4d1005380fc8a3c90c5cf2bc66e3f1c..dac5d5fcd3e0ab7bf2dd77305be687b8b58a8012 100644 (file)
@@ -437,7 +437,7 @@ static void cmd_parse_lsub(struct ImapData *idata, char *s)
     return;
   }
 
-  if (!option(OPTIMAPCHECKSUBSCRIBED))
+  if (!option(OPT_IMAP_CHECK_SUBSCRIBED))
     return;
 
   idata->cmdtype = IMAP_CT_LIST;
@@ -672,7 +672,7 @@ static void cmd_parse_status(struct ImapData *idata, char *s)
         mutt_debug(3, "Found %s in buffy list (OV: %d ON: %d U: %d)\n", mailbox,
                    olduv, oldun, status->unseen);
 
-        if (option(OPTMAILCHECKRECENT))
+        if (option(OPT_MAIL_CHECK_RECENT))
         {
           if (olduv && olduv == status->uidvalidity)
           {
@@ -820,7 +820,7 @@ static int cmd_handle_untagged(struct ImapData *idata)
 
     return -1;
   }
-  else if (option(OPTIMAPSERVERNOISE) && (ascii_strncasecmp("NO", s, 2) == 0))
+  else if (option(OPT_IMAP_SERVER_NOISE) && (ascii_strncasecmp("NO", s, 2) == 0))
   {
     mutt_debug(2, "Handling untagged NO\n");
 
index 9627d63565ccc23674e4e91dc820cee686a05a92..98937e2cea449ad8549c3c627d4c7801818ca9e4 100644 (file)
@@ -87,7 +87,7 @@ int imap_access(const char *path)
   if (imap_parse_path(path, &mx))
     return -1;
 
-  if (!(idata = imap_conn_find(&mx.account, option(OPTIMAPPASSIVE) ? MUTT_IMAP_CONN_NONEW : 0)))
+  if (!(idata = imap_conn_find(&mx.account, option(OPT_IMAP_PASSIVE) ? MUTT_IMAP_CONN_NONEW : 0)))
   {
     FREE(&mx.mbox);
     return -1;
@@ -172,7 +172,7 @@ int imap_delete_mailbox(struct Context *ctx, struct ImapMbox *mx)
 
   if (!ctx || !ctx->data)
   {
-    if (!(idata = imap_conn_find(&mx->account, option(OPTIMAPPASSIVE) ? MUTT_IMAP_CONN_NONEW : 0)))
+    if (!(idata = imap_conn_find(&mx->account, option(OPT_IMAP_PASSIVE) ? MUTT_IMAP_CONN_NONEW : 0)))
     {
       FREE(&mx->mbox);
       return -1;
@@ -436,7 +436,7 @@ struct ImapData *imap_conn_find(const struct Account *account, int flags)
     /* get root delimiter, '/' as default */
     idata->delim = '/';
     imap_exec(idata, "LIST \"\" \"\"", IMAP_CMD_QUEUE);
-    if (option(OPTIMAPCHECKSUBSCRIBED))
+    if (option(OPT_IMAP_CHECK_SUBSCRIBED))
       imap_exec(idata, "LSUB \"\" \"*\"", IMAP_CMD_QUEUE);
     /* we may need the root delimiter before we open a mailbox */
     imap_exec(idata, NULL, IMAP_CMD_FAIL_OK);
@@ -468,11 +468,11 @@ int imap_open_connection(struct ImapData *idata)
 #ifdef USE_SSL
     /* Attempt STARTTLS if available and desired. */
     if (!idata->conn->ssf &&
-        (option(OPTSSLFORCETLS) || mutt_bit_isset(idata->capabilities, STARTTLS)))
+        (option(OPT_SSL_FORCE_TLS) || mutt_bit_isset(idata->capabilities, STARTTLS)))
     {
       int rc;
 
-      if (option(OPTSSLFORCETLS))
+      if (option(OPT_SSL_FORCE_TLS))
         rc = MUTT_YES;
       else if ((rc = query_quadoption(OPT_SSLSTARTTLS,
                                       _("Secure connection with TLS?"))) == MUTT_ABORT)
@@ -499,7 +499,7 @@ int imap_open_connection(struct ImapData *idata)
       }
     }
 
-    if (option(OPTSSLFORCETLS) && !idata->conn->ssf)
+    if (option(OPT_SSL_FORCE_TLS) && !idata->conn->ssf)
     {
       mutt_error(_("Encrypted connection unavailable"));
       mutt_sleep(1);
@@ -850,7 +850,7 @@ static int imap_open_mailbox_append(struct Context *ctx, int flags)
     return -1;
 
   snprintf(buf, sizeof(buf), _("Create %s?"), mailbox);
-  if (option(OPTCONFIRMCREATE) && mutt_yesorno(buf, 1) != MUTT_YES)
+  if (option(OPT_CONFIRM_CREATE) && mutt_yesorno(buf, 1) != MUTT_YES)
     return -1;
 
   if (imap_create_mailbox(idata, mailbox) < 0)
@@ -1408,7 +1408,7 @@ int imap_sync_mailbox(struct Context *ctx, int expunge)
     idata->state = IMAP_AUTHENTICATED;
   }
 
-  if (option(OPTMESSAGECACHECLEAN))
+  if (option(OPT_MESSAGE_CACHE_CLEAN))
     imap_cache_clean(idata);
 
   rc = 0;
@@ -1506,7 +1506,7 @@ int imap_check(struct ImapData *idata, int force)
   int result = 0;
 
   /* try IDLE first, unless force is set */
-  if (!force && option(OPTIMAPIDLE) && mutt_bit_isset(idata->capabilities, IDLE) &&
+  if (!force && option(OPT_IMAP_IDLE) && mutt_bit_isset(idata->capabilities, IDLE) &&
       (idata->state != IMAP_IDLE || time(NULL) >= idata->lastread + ImapKeepalive))
   {
     if (imap_cmd_idle(idata) < 0)
@@ -1573,7 +1573,7 @@ static int imap_get_mailbox(const char *path, struct ImapData **hidata, char *bu
     mutt_debug(1, "imap_get_mailbox: Error parsing %s\n", path);
     return -1;
   }
-  if (!(*hidata = imap_conn_find(&(mx.account), option(OPTIMAPPASSIVE) ? MUTT_IMAP_CONN_NONEW : 0)) ||
+  if (!(*hidata = imap_conn_find(&(mx.account), option(OPT_IMAP_PASSIVE) ? MUTT_IMAP_CONN_NONEW : 0)) ||
       (*hidata)->state < IMAP_AUTHENTICATED)
   {
     FREE(&mx.mbox);
@@ -2004,7 +2004,7 @@ int imap_subscribe(char *path, int subscribe)
   if (!*buf)
     strfcpy(buf, "INBOX", sizeof(buf));
 
-  if (option(OPTIMAPCHECKSUBSCRIBED))
+  if (option(OPT_IMAP_CHECK_SUBSCRIBED))
   {
     mutt_buffer_init(&token);
     mutt_buffer_init(&err);
@@ -2159,7 +2159,7 @@ int imap_complete(char *dest, size_t dlen, char *path)
     list[0] = '\0';
 
   /* fire off command */
-  snprintf(buf, sizeof(buf), "%s \"\" \"%s%%\"", option(OPTIMAPLSUB) ? "LSUB" : "LIST", list);
+  snprintf(buf, sizeof(buf), "%s \"\" \"%s%%\"", option(OPT_IMAP_LSUB) ? "LSUB" : "LIST", list);
 
   imap_cmd_start(idata, buf);
 
@@ -2285,7 +2285,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(OPTCONFIRMCREATE) && mutt_yesorno(prompt, 1) != MUTT_YES)
+      if (option(OPT_CONFIRM_CREATE) && mutt_yesorno(prompt, 1) != MUTT_YES)
       {
         mutt_clear_error();
         goto out;
index b1816d6c271356990390a00669e9cc7c9626f32f..b87df6296e878e44e48b195b83490e3bd346ee68 100644 (file)
@@ -186,7 +186,7 @@ static char *msg_parse_flags(struct ImapHeader *h, char *s)
     else if (ascii_strncasecmp("old", s, 3) == 0)
     {
       s += 3;
-      hd->old = option(OPTMARKOLD) ? true : false;
+      hd->old = option(OPT_MARK_OLD) ? true : false;
     }
     else
     {
@@ -908,7 +908,7 @@ int imap_fetch_message(struct Context *ctx, struct Message *msg, int msgno)
 
   snprintf(buf, sizeof(buf), "UID FETCH %u %s", HEADER_DATA(h)->uid,
            (mutt_bit_isset(idata->capabilities, IMAP4REV1) ?
-                (option(OPTIMAPPEEK) ? "BODY.PEEK[]" : "BODY[]") :
+                (option(OPT_IMAP_PEEK) ? "BODY.PEEK[]" : "BODY[]") :
                 "RFC822"));
 
   imap_cmd_start(idata, buf);
@@ -1316,7 +1316,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(OPTCONFIRMCREATE) && mutt_yesorno(prompt, 1) != MUTT_YES)
+      if (option(OPT_CONFIRM_CREATE) && mutt_yesorno(prompt, 1) != MUTT_YES)
       {
         mutt_clear_error();
         goto out;
@@ -1343,7 +1343,7 @@ int imap_copy_messages(struct Context *ctx, struct Header *h, char *dest, int de
         {
           mutt_set_flag(ctx, ctx->hdrs[n], MUTT_DELETE, 1);
           mutt_set_flag(ctx, ctx->hdrs[n], MUTT_PURGE, 1);
-          if (option(OPTDELETEUNTAG))
+          if (option(OPT_DELETE_UNTAG))
             mutt_set_flag(ctx, ctx->hdrs[n], MUTT_TAG, 0);
         }
       }
@@ -1351,7 +1351,7 @@ int imap_copy_messages(struct Context *ctx, struct Header *h, char *dest, int de
     {
       mutt_set_flag(ctx, h, MUTT_DELETE, 1);
       mutt_set_flag(ctx, h, MUTT_PURGE, 1);
-      if (option(OPTDELETEUNTAG))
+      if (option(OPT_DELETE_UNTAG))
         mutt_set_flag(ctx, h, MUTT_TAG, 0);
     }
   }
index 448be2c8de7179260ab9d5738ca1b5efc967a20f..45d864ee17e5dd9610970266009edb04b42306b0 100644 (file)
@@ -919,10 +919,10 @@ int imap_wait_keepalive(pid_t pid)
   sigset_t oldmask;
   int rc;
 
-  short imap_passive = option(OPTIMAPPASSIVE);
+  short imap_passive = option(OPT_IMAP_PASSIVE);
 
-  set_option(OPTIMAPPASSIVE);
-  set_option(OPTKEEPQUIET);
+  set_option(OPT_IMAP_PASSIVE);
+  set_option(OPT_KEEP_QUIET);
 
   sigprocmask(SIG_SETMASK, NULL, &oldmask);
 
@@ -949,9 +949,9 @@ int imap_wait_keepalive(pid_t pid)
   sigaction(SIGALRM, &oldalrm, NULL);
   sigprocmask(SIG_SETMASK, &oldmask, NULL);
 
-  unset_option(OPTKEEPQUIET);
+  unset_option(OPT_KEEP_QUIET);
   if (!imap_passive)
-    unset_option(OPTIMAPPASSIVE);
+    unset_option(OPT_IMAP_PASSIVE);
 
   return rc;
 }
diff --git a/init.c b/init.c
index 9905c34ecf9dab834b065e7cfe17ffb6b4e1658e..8ab89d1b736c9596e50c3cb782042c858be1ed75 100644 (file)
--- a/init.c
+++ b/init.c
@@ -1979,7 +1979,7 @@ static int parse_alias(struct Buffer *buf, struct Buffer *s, unsigned long data,
     tmp->name = safe_strdup(buf->data);
     /* give the main addressbook code a chance */
     if (CurrentMenu == MENU_ALIAS)
-      set_option(OPTMENUCALLER);
+      set_option(OPT_MENU_CALLER);
   }
   else
   {
@@ -2262,13 +2262,13 @@ static void restore_default(struct Option *p)
     mutt_set_menu_redraw(MENU_PAGER, REDRAW_FLOW);
   }
   if (p->flags & R_RESORT_SUB)
-    set_option(OPTSORTSUBTHREADS);
+    set_option(OPT_SORT_SUBTHREADS);
   if (p->flags & R_RESORT)
-    set_option(OPTNEEDRESORT);
+    set_option(OPT_NEED_RESORT);
   if (p->flags & R_RESORT_INIT)
-    set_option(OPTRESORTINIT);
+    set_option(OPT_RESORT_INIT);
   if (p->flags & R_TREE)
-    set_option(OPTREDRAWTREE);
+    set_option(OPT_REDRAW_TREE);
   if (p->flags & R_REFLOW)
     mutt_reflow_windows();
 #ifdef USE_SIDEBAR
@@ -2660,10 +2660,10 @@ static int parse_set(struct Buffer *tmp, struct Buffer *s, unsigned long data,
         for (idx = 0; MuttVars[idx].option; idx++)
           restore_default(&MuttVars[idx]);
         mutt_set_current_menu_redraw_full();
-        set_option(OPTSORTSUBTHREADS);
-        set_option(OPTNEEDRESORT);
-        set_option(OPTRESORTINIT);
-        set_option(OPTREDRAWTREE);
+        set_option(OPT_SORT_SUBTHREADS);
+        set_option(OPT_NEED_RESORT);
+        set_option(OPT_RESORT_INIT);
+        set_option(OPT_REDRAW_TREE);
         return 0;
       }
       else
@@ -2871,7 +2871,7 @@ static int parse_set(struct Buffer *tmp, struct Buffer *s, unsigned long data,
         break;
       }
 
-      if (option(OPTATTACHMSG) &&
+      if (option(OPT_ATTACH_MSG) &&
           (mutt_strcmp(MuttVars[idx].option, "reply_regexp") == 0))
       {
         snprintf(err->data, err->dsize,
@@ -3164,13 +3164,13 @@ static int parse_set(struct Buffer *tmp, struct Buffer *s, unsigned long data,
         mutt_set_menu_redraw(MENU_PAGER, REDRAW_FLOW);
       }
       if (MuttVars[idx].flags & R_RESORT_SUB)
-        set_option(OPTSORTSUBTHREADS);
+        set_option(OPT_SORT_SUBTHREADS);
       if (MuttVars[idx].flags & R_RESORT)
-        set_option(OPTNEEDRESORT);
+        set_option(OPT_NEED_RESORT);
       if (MuttVars[idx].flags & R_RESORT_INIT)
-        set_option(OPTRESORTINIT);
+        set_option(OPT_RESORT_INIT);
       if (MuttVars[idx].flags & R_TREE)
-        set_option(OPTREDRAWTREE);
+        set_option(OPT_REDRAW_TREE);
       if (MuttVars[idx].flags & R_REFLOW)
         mutt_reflow_windows();
 #ifdef USE_SIDEBAR
@@ -4386,13 +4386,13 @@ void mutt_init(int skip_sys_rc, struct List *commands)
   /* Do we have a locale definition? */
   if (((p = getenv("LC_ALL")) != NULL && p[0]) || ((p = getenv("LANG")) != NULL && p[0]) ||
       ((p = getenv("LC_CTYPE")) != NULL && p[0]))
-    set_option(OPTLOCALES);
+    set_option(OPT_LOCALES);
 #endif
 
 #ifdef HAVE_GETSID
   /* Unset suspend by default if we're the session leader */
   if (getsid(0) == getpid())
-    unset_option(OPTSUSPEND);
+    unset_option(OPT_SUSPEND);
 #endif
 
   mutt_init_history();
@@ -4507,7 +4507,7 @@ void mutt_init(int skip_sys_rc, struct List *commands)
   {
     if (config->data)
     {
-      if (!option(OPTNOCURSES))
+      if (!option(OPT_NO_CURSES))
         endwin();
       if (source_rc(config->data, &err) != 0)
       {
@@ -4521,7 +4521,7 @@ void mutt_init(int skip_sys_rc, struct List *commands)
   if (execute_commands(commands) != 0)
     need_pause = 1;
 
-  if (need_pause && !option(OPTNOCURSES))
+  if (need_pause && !option(OPT_NO_CURSES))
   {
     if (mutt_any_key_to_continue(NULL) == -1)
       mutt_exit(1);
@@ -4532,7 +4532,7 @@ void mutt_init(int skip_sys_rc, struct List *commands)
   mutt_read_histfile();
 
 #ifdef USE_NOTMUCH
-  if (option(OPTVIRTSPOOLFILE))
+  if (option(OPT_VIRT_SPOOL_FILE))
   {
     /* Find the first virtual folder and open it */
     for (struct Buffy *b = Incoming; b; b = b->next)
diff --git a/init.h b/init.h
index f61b4f9e69da3dbf819a7d5cac786fbac61edfea..8e90add80c7169d821c93b1be734bc4b91440f5c 100644 (file)
--- a/init.h
+++ b/init.h
@@ -141,13 +141,13 @@ struct Option MuttVars[] = {
   ** .dt %t .dd character which indicates if the alias is tagged for inclusion
   ** .de
   */
-  { "allow_8bit",       DT_BOOL, R_NONE, OPTALLOW8BIT, 1 },
+  { "allow_8bit",       DT_BOOL, R_NONE, OPT_ALLOW_8BIT, 1 },
   /*
   ** .pp
   ** Controls whether 8-bit data is converted to 7-bit using either Quoted-
   ** Printable or Base64 encoding when sending mail.
   */
-  { "allow_ansi",      DT_BOOL, R_NONE, OPTALLOWANSI, 0 },
+  { "allow_ansi",      DT_BOOL, R_NONE, OPT_ALLOW_ANSI, 0 },
   /*
   ** .pp
   ** Controls whether ANSI color codes in messages (and color tags in
@@ -163,7 +163,7 @@ struct Option MuttVars[] = {
   ** and give it the same color as your attachment color (see also
   ** $$crypt_timestamp).
   */
-  { "arrow_cursor",     DT_BOOL, R_MENU, OPTARROWCURSOR, 0 },
+  { "arrow_cursor",     DT_BOOL, R_MENU, OPT_ARROW_CURSOR, 0 },
   /*
   ** .pp
   ** When \fIset\fP, an arrow (``->'') will be used to indicate the current entry
@@ -172,32 +172,32 @@ struct Option MuttVars[] = {
   ** be redrawn on the screen when moving to the next or previous entries
   ** in the menu.
   */
-  { "ascii_chars",      DT_BOOL, R_BOTH, OPTASCIICHARS, 0 },
+  { "ascii_chars",      DT_BOOL, R_BOTH, OPT_ASCII_CHARS, 0 },
   /*
   ** .pp
   ** If \fIset\fP, Mutt will use plain ASCII characters when displaying thread
   ** and attachment trees, instead of the default \fIACS\fP characters.
   */
-  { "askbcc",           DT_BOOL, R_NONE, OPTASKBCC, 0 },
+  { "askbcc",           DT_BOOL, R_NONE, OPT_ASK_BCC, 0 },
   /*
   ** .pp
   ** If \fIset\fP, Mutt will prompt you for blind-carbon-copy (Bcc) recipients
   ** before editing an outgoing message.
   */
-  { "askcc",            DT_BOOL, R_NONE, OPTASKCC, 0 },
+  { "askcc",            DT_BOOL, R_NONE, OPT_ASK_CC, 0 },
   /*
   ** .pp
   ** If \fIset\fP, Mutt will prompt you for carbon-copy (Cc) recipients before
   ** editing the body of an outgoing message.
   */
 #ifdef USE_NNTP
-  { "ask_follow_up",    DT_BOOL, R_NONE, OPTASKFOLLOWUP, 0 },
+  { "ask_follow_up",    DT_BOOL, R_NONE, OPT_ASK_FOLLOWUP, 0 },
   /*
   ** .pp
   ** If set, Mutt will prompt you for follow-up groups before editing
   ** the body of an outgoing message.
   */
-  { "ask_x_comment_to", DT_BOOL, R_NONE, OPTASKXCOMMENTTO, 0 },
+  { "ask_x_comment_to", DT_BOOL, R_NONE, OPT_ASK_XCOMMENTTO, 0 },
   /*
   ** .pp
   ** If set, Mutt will prompt you for x-comment-to field before editing
@@ -283,7 +283,7 @@ struct Option MuttVars[] = {
   ** The separator to add between attachments when operating (saving,
   ** printing, piping, etc) on a list of tagged attachments.
   */
-  { "attach_split",     DT_BOOL, R_NONE, OPTATTACHSPLIT, 1 },
+  { "attach_split",     DT_BOOL, R_NONE, OPT_ATTACH_SPLIT, 1 },
   /*
   ** .pp
   ** If this variable is \fIunset\fP, when operating (saving, printing, piping,
@@ -311,7 +311,7 @@ struct Option MuttVars[] = {
   ** will use your locale environment, so there is no need to set
   ** this except to override that default.
   */
-  { "auto_tag",         DT_BOOL, R_NONE, OPTAUTOTAG, 0 },
+  { "auto_tag",         DT_BOOL, R_NONE, OPT_AUTO_TAG, 0 },
   /*
   ** .pp
   ** When \fIset\fP, functions in the \fIindex\fP menu which affect a message
@@ -319,7 +319,7 @@ struct Option MuttVars[] = {
   ** unset, you must first use the \fC<tag-prefix>\fP function (bound to ``;''
   ** by default) to make the next function apply to all tagged messages.
   */
-  { "autoedit",         DT_BOOL, R_NONE, OPTAUTOEDIT, 0 },
+  { "autoedit",         DT_BOOL, R_NONE, OPT_AUTO_EDIT, 0 },
   /*
   ** .pp
   ** When \fIset\fP along with $$edit_headers, Mutt will skip the initial
@@ -334,12 +334,12 @@ struct Option MuttVars[] = {
   ** .pp
   ** Also see $$fast_reply.
   */
-  { "beep",             DT_BOOL, R_NONE, OPTBEEP, 1 },
+  { "beep",             DT_BOOL, R_NONE, OPT_BEEP, 1 },
   /*
   ** .pp
   ** When this variable is \fIset\fP, mutt will beep when an error occurs.
   */
-  { "beep_new",         DT_BOOL, R_NONE, OPTBEEPNEW, 0 },
+  { "beep_new",         DT_BOOL, R_NONE, OPT_BEEP_NEW, 0 },
   /*
   ** .pp
   ** When this variable is \fIset\fP, mutt will beep whenever it prints a message
@@ -354,13 +354,13 @@ struct Option MuttVars[] = {
   ** message. Setting this variable to \fIno\fP is not generally useful,
   ** and thus not recommended, because you are unable to bounce messages.
   */
-  { "bounce_delivered", DT_BOOL, R_NONE, OPTBOUNCEDELIVERED, 1 },
+  { "bounce_delivered", DT_BOOL, R_NONE, OPT_BOUNCE_DELIVERED, 1 },
   /*
   ** .pp
   ** When this variable is \fIset\fP, mutt will include Delivered-To headers when
   ** bouncing messages.  Postfix users may wish to \fIunset\fP this variable.
   */
-  { "braille_friendly", DT_BOOL, R_NONE, OPTBRAILLEFRIENDLY, 0 },
+  { "braille_friendly", DT_BOOL, R_NONE, OPT_BRAILLE_FRIENDLY, 0 },
   /*
   ** .pp
   ** When this variable is \fIset\fP, mutt will place the cursor at the beginning
@@ -410,7 +410,7 @@ struct Option MuttVars[] = {
   ** \fBNote:\fP It should only be set in case Mutt isn't able to determine the
   ** character set used correctly.
   */
-  { "check_mbox_size",  DT_BOOL, R_NONE, OPTCHECKMBOXSIZE, 0 },
+  { "check_mbox_size",  DT_BOOL, R_NONE, OPT_CHECK_MBOX_SIZE, 0 },
   /*
   ** .pp
   ** When this variable is \fIset\fP, mutt will use file size attribute instead of
@@ -425,7 +425,7 @@ struct Option MuttVars[] = {
   ** mailbox by performing a fast mailbox scan when it is defined.
   ** Afterwards the new mail status is tracked by file size changes.
   */
-  { "check_new",        DT_BOOL, R_NONE, OPTCHECKNEW, 1 },
+  { "check_new",        DT_BOOL, R_NONE, OPT_CHECK_NEW, 1 },
   /*
   ** .pp
   ** \fBNote:\fP this option only affects \fImaildir\fP and \fIMH\fP style
@@ -438,13 +438,13 @@ struct Option MuttVars[] = {
   ** this variable is \fIunset\fP, no check for new mail is performed
   ** while the mailbox is open.
   */
-  { "collapse_unread",  DT_BOOL, R_NONE, OPTCOLLAPSEUNREAD, 1 },
+  { "collapse_unread",  DT_BOOL, R_NONE, OPT_COLLAPSE_UNREAD, 1 },
   /*
   ** .pp
   ** When \fIunset\fP, Mutt will not collapse a thread if it contains any
   ** unread messages.
   */
-  { "collapse_flagged", DT_BOOL, R_NONE, OPTCOLLAPSEFLAGGED, 1 },
+  { "collapse_flagged", DT_BOOL, R_NONE, OPT_COLLAPSE_FLAGGED, 1 },
   /*
   ** .pp
   ** When \fIunset\fP, Mutt will not collapse a thread if it contains any
@@ -480,13 +480,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, OPTCONFIRMAPPEND, 1 },
+  { "confirmappend",    DT_BOOL, R_NONE, OPT_CONFIRM_APPEND, 1 },
   /*
   ** .pp
   ** When \fIset\fP, Mutt will prompt for confirmation when appending messages to
   ** an existing mailbox.
   */
-  { "confirmcreate",    DT_BOOL, R_NONE, OPTCONFIRMCREATE, 1 },
+  { "confirmcreate",    DT_BOOL, R_NONE, OPT_CONFIRM_CREATE, 1 },
   /*
   ** .pp
   ** When \fIset\fP, Mutt will prompt for confirmation when saving messages to a
@@ -512,7 +512,7 @@ struct Option MuttVars[] = {
   ** $$save_name, $$force_name and ``$fcc-hook''.
   */
   { "pgp_autoencrypt",          DT_SYN,  R_NONE, UL "crypt_autoencrypt", 0 },
-  { "crypt_autoencrypt",        DT_BOOL, R_NONE, OPTCRYPTAUTOENCRYPT, 0 },
+  { "crypt_autoencrypt",        DT_BOOL, R_NONE, OPT_CRYPT_AUTO_ENCRYPT, 0 },
   /*
   ** .pp
   ** Setting this variable will cause Mutt to always attempt to PGP
@@ -524,7 +524,7 @@ struct Option MuttVars[] = {
   ** settings can be overridden by use of the smime menu instead.
   ** (Crypto only)
   */
-  { "crypt_autopgp",    DT_BOOL, R_NONE, OPTCRYPTAUTOPGP, 1 },
+  { "crypt_autopgp",    DT_BOOL, R_NONE, OPT_CRYPT_AUTO_PGP, 1 },
   /*
   ** .pp
   ** This variable controls whether or not mutt may automatically enable
@@ -533,7 +533,7 @@ struct Option MuttVars[] = {
   ** $$crypt_autosign, $$crypt_replysign and $$smime_is_default.
   */
   { "pgp_autosign",     DT_SYN,  R_NONE, UL "crypt_autosign", 0 },
-  { "crypt_autosign",   DT_BOOL, R_NONE, OPTCRYPTAUTOSIGN, 0 },
+  { "crypt_autosign",   DT_BOOL, R_NONE, OPT_CRYPT_AUTO_SIGN, 0 },
   /*
   ** .pp
   ** Setting this variable will cause Mutt to always attempt to
@@ -544,7 +544,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, OPTCRYPTAUTOSMIME, 1 },
+  { "crypt_autosmime",  DT_BOOL, R_NONE, OPT_CRYPT_AUTO_SMIME, 1 },
   /*
   ** .pp
   ** This variable controls whether or not mutt may automatically enable
@@ -552,7 +552,7 @@ struct Option MuttVars[] = {
   ** $$crypt_replyencrypt,
   ** $$crypt_autosign, $$crypt_replysign and $$smime_is_default.
   */
-  { "crypt_confirmhook",        DT_BOOL, R_NONE, OPTCRYPTCONFIRMHOOK, 1 },
+  { "crypt_confirmhook",        DT_BOOL, R_NONE, OPT_CRYPT_CONFIRM_HOOK, 1 },
   /*
   ** .pp
   ** If set, then you will be prompted for confirmation of keys when using
@@ -560,7 +560,7 @@ struct Option MuttVars[] = {
   ** be presented.  This is generally considered unsafe, especially where
   ** typos are concerned.
   */
-  { "crypt_opportunistic_encrypt", DT_BOOL, R_NONE, OPTCRYPTOPPORTUNISTICENCRYPT, 0 },
+  { "crypt_opportunistic_encrypt", DT_BOOL, R_NONE, OPT_CRYPT_OPPORTUNISTIC_ENCRYPT, 0 },
   /*
   ** .pp
   ** Setting this variable will cause Mutt to automatically enable and
@@ -582,7 +582,7 @@ struct Option MuttVars[] = {
   ** (Crypto only)
    */
   { "pgp_replyencrypt",         DT_SYN,  R_NONE, UL "crypt_replyencrypt", 1  },
-  { "crypt_replyencrypt",       DT_BOOL, R_NONE, OPTCRYPTREPLYENCRYPT, 1 },
+  { "crypt_replyencrypt",       DT_BOOL, R_NONE, OPT_CRYPT_REPLY_ENCRYPT, 1 },
   /*
   ** .pp
   ** If \fIset\fP, automatically PGP or OpenSSL encrypt replies to messages which are
@@ -590,7 +590,7 @@ struct Option MuttVars[] = {
   ** (Crypto only)
   */
   { "pgp_replysign",    DT_SYN, R_NONE, UL "crypt_replysign", 0 },
-  { "crypt_replysign",  DT_BOOL, R_NONE, OPTCRYPTREPLYSIGN, 0 },
+  { "crypt_replysign",  DT_BOOL, R_NONE, OPT_CRYPT_REPLY_SIGN, 0 },
   /*
   ** .pp
   ** If \fIset\fP, automatically PGP or OpenSSL sign replies to messages which are
@@ -601,7 +601,7 @@ struct Option MuttVars[] = {
   ** (Crypto only)
   */
   { "pgp_replysignencrypted",   DT_SYN,  R_NONE, UL "crypt_replysignencrypted", 0 },
-  { "crypt_replysignencrypted", DT_BOOL, R_NONE, OPTCRYPTREPLYSIGNENCRYPTED, 0 },
+  { "crypt_replysignencrypted", DT_BOOL, R_NONE, OPT_CRYPT_REPLY_SIGN_ENCRYPTED, 0 },
   /*
   ** .pp
   ** If \fIset\fP, automatically PGP or OpenSSL sign replies to messages
@@ -612,7 +612,7 @@ struct Option MuttVars[] = {
   ** to find out whether an encrypted message is also signed.
   ** (Crypto only)
   */
-  { "crypt_timestamp", DT_BOOL, R_NONE, OPTCRYPTTIMESTAMP, 1 },
+  { "crypt_timestamp", DT_BOOL, R_NONE, OPT_CRYPT_TIMESTAMP, 1 },
   /*
   ** .pp
   ** If \fIset\fP, mutt will include a time stamp in the lines surrounding
@@ -621,7 +621,7 @@ struct Option MuttVars[] = {
   ** you may \fIunset\fP this setting.
   ** (Crypto only)
   */
-  { "crypt_use_gpgme",  DT_BOOL, R_NONE, OPTCRYPTUSEGPGME, 0 },
+  { "crypt_use_gpgme",  DT_BOOL, R_NONE, OPT_CRYPT_USE_GPGME, 0 },
   /*
   ** .pp
   ** This variable controls the use of the GPGME-enabled crypto backends.
@@ -633,7 +633,7 @@ struct Option MuttVars[] = {
   ** Note that the GPGME backend does not support creating old-style inline
   ** (traditional) PGP encrypted or signed messages (see $$pgp_autoinline).
   */
-  { "crypt_use_pka", DT_BOOL, R_NONE, OPTCRYPTUSEPKA, 0 },
+  { "crypt_use_pka", DT_BOOL, R_NONE, OPT_CRYPT_USE_PKA, 0 },
   /*
   ** .pp
   ** Controls whether mutt uses PKA
@@ -704,14 +704,14 @@ struct Option MuttVars[] = {
   ** deleting will automatically be purged without prompting.  If set to
   ** \fIno\fP, messages marked for deletion will be kept in the mailbox.
   */
-  { "delete_untag",     DT_BOOL, R_NONE, OPTDELETEUNTAG, 1 },
+  { "delete_untag",     DT_BOOL, R_NONE, OPT_DELETE_UNTAG, 1 },
   /*
   ** .pp
   ** If this option is \fIset\fP, mutt will untag messages when marking them
   ** for deletion.  This applies when you either explicitly delete a message,
   ** or when you save it to another folder.
   */
-  { "digest_collapse",  DT_BOOL, R_NONE, OPTDIGESTCOLLAPSE, 1 },
+  { "digest_collapse",  DT_BOOL, R_NONE, OPT_DIGEST_COLLAPSE, 1 },
   /*
   ** .pp
   ** If this option is \fIset\fP, mutt's received-attachments menu will not show the subparts of
@@ -763,7 +763,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, OPTDUPTHREADS, 1 },
+  { "duplicate_threads",        DT_BOOL, R_RESORT|R_RESORT_INIT|R_INDEX, OPT_DUP_THREADS, 1 },
   /*
   ** .pp
   ** This variable controls whether mutt, when $$sort is set to \fIthreads\fP, threads
@@ -771,7 +771,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, OPTEDITHDRS, 0 },
+  { "edit_headers",     DT_BOOL, R_NONE, OPT_EDIT_HDRS, 0 },
   /*
   ** .pp
   ** This option allows you to edit the header of your outgoing messages
@@ -814,7 +814,7 @@ struct Option MuttVars[] = {
   ** This variable specifies the subject to be used when replying to an email
   ** with an empty subject.  It defaults to "Re: your mail".
   */
-  { "encode_from",      DT_BOOL, R_NONE, OPTENCODEFROM, 0 },
+  { "encode_from",      DT_BOOL, R_NONE, OPT_ENCODE_FROM, 0 },
   /*
   ** .pp
   ** When \fIset\fP, mutt will quoted-printable encode messages when
@@ -842,7 +842,7 @@ struct Option MuttVars[] = {
   ** .pp
   ** Escape character to use for functions in the built-in editor.
   */
-  { "fast_reply",       DT_BOOL, R_NONE, OPTFASTREPLY, 0 },
+  { "fast_reply",       DT_BOOL, R_NONE, OPT_FAST_REPLY, 0 },
   /*
   ** .pp
   ** When \fIset\fP, the initial prompt for recipients and subject are skipped
@@ -858,7 +858,7 @@ struct Option MuttVars[] = {
   ** This variable controls whether or not attachments on outgoing messages
   ** are saved along with the main body of your message.
   */
-  { "fcc_clear",        DT_BOOL, R_NONE, OPTFCCCLEAR, 0 },
+  { "fcc_clear",        DT_BOOL, R_NONE, OPT_FCC_CLEAR, 0 },
   /*
   ** .pp
   ** When this variable is \fIset\fP, FCCs will be stored unencrypted and
@@ -866,7 +866,7 @@ struct Option MuttVars[] = {
   ** signed.
   ** (PGP only)
   */
-  { "flag_safe", DT_BOOL, R_NONE, OPTFLAGSAFE, 0 },
+  { "flag_safe", DT_BOOL, R_NONE, OPT_FLAG_SAFE, 0 },
   /*
   ** .pp
   ** If set, flagged messages cannot be deleted.
@@ -916,7 +916,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, OPTFOLLOWUPTO, 1 },
+  { "followup_to",      DT_BOOL, R_NONE, OPT_FOLLOW_UP_TO, 1 },
   /*
   ** .pp
   ** Controls whether or not the ``Mail-Followup-To:'' header field is
@@ -947,7 +947,7 @@ struct Option MuttVars[] = {
   ** message via mail.
   */
 #endif
-  { "force_name",       DT_BOOL, R_NONE, OPTFORCENAME, 0 },
+  { "force_name",       DT_BOOL, R_NONE, OPT_FORCE_NAME, 0 },
   /*
   ** .pp
   ** This variable is similar to $$save_name, except that Mutt will
@@ -972,7 +972,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, OPTFORWDECODE, 1 },
+  { "forward_decode",   DT_BOOL, R_NONE, OPT_FORW_DECODE, 1 },
   /*
   ** .pp
   ** Controls the decoding of complex MIME messages into \fCtext/plain\fP when
@@ -983,7 +983,7 @@ struct Option MuttVars[] = {
   { "forw_decode",      DT_SYN,  R_NONE, UL "forward_decode", 0 },
   /*
   */
-  { "forward_decrypt",  DT_BOOL, R_NONE, OPTFORWDECRYPT, 1 },
+  { "forward_decrypt",  DT_BOOL, R_NONE, OPT_FORW_DECRYPT, 1 },
   /*
   ** .pp
   ** Controls the handling of encrypted messages when forwarding a message.
@@ -1011,7 +1011,7 @@ struct Option MuttVars[] = {
   { "forw_format",      DT_SYN,  R_NONE, UL "forward_format", 0 },
   /*
   */
-  { "forward_quote",    DT_BOOL, R_NONE, OPTFORWQUOTE, 0 },
+  { "forward_quote",    DT_BOOL, R_NONE, OPT_FORW_QUOTE, 0 },
   /*
   ** .pp
   ** When \fIset\fP, forwarded messages included in the main body of the
@@ -1021,7 +1021,7 @@ struct Option MuttVars[] = {
   { "forw_quote",       DT_SYN,  R_NONE, UL "forward_quote", 0 },
   /*
   */
-  { "forward_references", DT_BOOL, R_NONE, OPTFORWREF, 0 },
+  { "forward_references", DT_BOOL, R_NONE, OPT_FORW_REF, 0 },
   /*
   ** .pp
   ** When \fIset\fP, forwarded messages set the ``In-Reply-To:'' and
@@ -1100,7 +1100,7 @@ struct Option MuttVars[] = {
   { "hdr_format",       DT_SYN,  R_NONE, UL "index_format", 0 },
   /*
   */
-  { "hdrs",             DT_BOOL, R_NONE, OPTHDRS, 1 },
+  { "hdrs",             DT_BOOL, R_NONE, OPT_HDRS, 1 },
   /*
   ** .pp
   ** When \fIunset\fP, the header fields normally added by the ``$my_hdr''
@@ -1108,7 +1108,7 @@ struct Option MuttVars[] = {
   ** composing a new message or replying in order to take effect.  If \fIset\fP,
   ** the user defined header fields are added to every new message.
   */
-  { "header",           DT_BOOL, R_NONE, OPTHEADER, 0 },
+  { "header",           DT_BOOL, R_NONE, OPT_HEADER, 0 },
   /*
   ** .pp
   ** When \fIset\fP, this variable causes Mutt to include the header
@@ -1134,7 +1134,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, OPTHCACHECOMPRESS, 1 },
+  { "header_cache_compress", DT_BOOL, R_NONE, OPT_HCACHE_COMPRESS, 1 },
   /*
   ** .pp
   ** When mutt is compiled with qdbm, tokyocabinet or kyotocabinet
@@ -1157,7 +1157,7 @@ struct Option MuttVars[] = {
   */
 #endif /* HAVE_GDBM || HAVE_BDB */
 #endif /* USE_HCACHE */
-  { "header_color_partial", DT_BOOL, R_PAGER_FLOW, OPTHEADERCOLORPARTIAL, 0 },
+  { "header_color_partial", DT_BOOL, R_PAGER_FLOW, OPT_HEADER_COLOR_PARTIAL, 0 },
   /*
   ** .pp
   ** When \fIset\fP, color header regexps behave like color body regexps:
@@ -1168,7 +1168,7 @@ struct Option MuttVars[] = {
   ** .pp
   ** See ``$color'' for more details.
   */
-  { "help",             DT_BOOL, R_REFLOW, OPTHELP, 1 },
+  { "help",             DT_BOOL, R_REFLOW, OPT_HELP, 1 },
   /*
   ** .pp
   ** When \fIset\fP, help lines describing the bindings for the major functions
@@ -1180,7 +1180,7 @@ struct Option MuttVars[] = {
   ** running.  Since this variable is primarily aimed at new users, neither
   ** of these should present a major problem.
   */
-  { "hidden_host",      DT_BOOL, R_NONE, OPTHIDDENHOST, 0 },
+  { "hidden_host",      DT_BOOL, R_NONE, OPT_HIDDEN_HOST, 0 },
   /*
   ** .pp
   ** When \fIset\fP, mutt will skip the host name part of $$hostname variable
@@ -1188,33 +1188,33 @@ struct Option MuttVars[] = {
   ** affect the generation of Message-IDs, and it will not lead to the
   ** cut-off of first-level domains.
   */
-  { "hide_limited",     DT_BOOL, R_TREE|R_INDEX, OPTHIDELIMITED, 0 },
+  { "hide_limited",     DT_BOOL, R_TREE|R_INDEX, OPT_HIDE_LIMITED, 0 },
   /*
   ** .pp
   ** When \fIset\fP, mutt will not show the presence of messages that are hidden
   ** by limiting, in the thread tree.
   */
-  { "hide_missing",     DT_BOOL, R_TREE|R_INDEX, OPTHIDEMISSING, 1 },
+  { "hide_missing",     DT_BOOL, R_TREE|R_INDEX, OPT_HIDE_MISSING, 1 },
   /*
   ** .pp
   ** When \fIset\fP, mutt will not show the presence of missing messages in the
   ** thread tree.
   */
-  { "hide_thread_subject", DT_BOOL, R_TREE|R_INDEX, OPTHIDETHREADSUBJECT, 1 },
+  { "hide_thread_subject", DT_BOOL, R_TREE|R_INDEX, OPT_HIDE_THREAD_SUBJECT, 1 },
   /*
   ** .pp
   ** When \fIset\fP, mutt will not show the subject of messages in the thread
   ** tree that have the same subject as their parent or closest previously
   ** displayed sibling.
   */
-  { "hide_top_limited", DT_BOOL, R_TREE|R_INDEX, OPTHIDETOPLIMITED, 0 },
+  { "hide_top_limited", DT_BOOL, R_TREE|R_INDEX, OPT_HIDE_TOP_LIMITED, 0 },
   /*
   ** .pp
   ** When \fIset\fP, mutt will not show the presence of messages that are hidden
   ** by limiting, at the top of threads in the thread tree.  Note that when
   ** $$hide_limited is \fIset\fP, this option will have no effect.
   */
-  { "hide_top_missing", DT_BOOL, R_TREE|R_INDEX, OPTHIDETOPMISSING, 1 },
+  { "hide_top_missing", DT_BOOL, R_TREE|R_INDEX, OPT_HIDE_TOP_MISSING, 1 },
   /*
   ** .pp
   ** When \fIset\fP, mutt will not show the presence of missing messages at the
@@ -1235,14 +1235,14 @@ struct Option MuttVars[] = {
   ** .pp
   ** Also see $$save_history.
   */
-  { "history_remove_dups", DT_BOOL, R_NONE, OPTHISTREMOVEDUPS, 0 },
+  { "history_remove_dups", DT_BOOL, R_NONE, OPT_HIST_REMOVE_DUPS, 0 },
   /*
   ** .pp
   ** When \fIset\fP, all of the string history will be scanned for duplicates
   ** when a new entry is added.  Duplicate entries in the $$history_file will
   ** also be removed when it is periodically compacted.
   */
-  { "honor_disposition", DT_BOOL, R_NONE, OPTHONORDISP, 0 },
+  { "honor_disposition", DT_BOOL, R_NONE, OPT_HONOR_DISP, 0 },
   /*
   ** .pp
   ** When \fIset\fP, Mutt will not display attachments with a
@@ -1278,14 +1278,14 @@ struct Option MuttVars[] = {
   ** Also see $$use_domain and $$hidden_host.
   */
 #ifdef HAVE_LIBIDN
-  { "idn_decode",       DT_BOOL, R_MENU, OPTIDNDECODE, 1 },
+  { "idn_decode",       DT_BOOL, R_MENU, OPT_IDN_DECODE, 1 },
   /*
   ** .pp
   ** When \fIset\fP, Mutt will show you international domain names decoded.
   ** Note: You can use IDNs for addresses even if this is \fIunset\fP.
   ** This variable only affects decoding. (IDN only)
   */
-  { "idn_encode",       DT_BOOL, R_MENU, OPTIDNENCODE, 1 },
+  { "idn_encode",       DT_BOOL, R_MENU, OPT_IDN_ENCODE, 1 },
   /*
   ** .pp
   ** When \fIset\fP, Mutt will encode international domain names using
@@ -1293,14 +1293,14 @@ struct Option MuttVars[] = {
   ** UTF-8 encoded domains. (IDN only)
   */
 #endif /* HAVE_LIBIDN */
-  { "ignore_linear_white_space",    DT_BOOL, R_NONE, OPTIGNORELWS, 0 },
+  { "ignore_linear_white_space",    DT_BOOL, R_NONE, OPT_IGNORE_LWS, 0 },
   /*
   ** .pp
   ** This option replaces linear-white-space between encoded-word
   ** and text to a single space to prevent the display of MIME-encoded
   ** ``Subject:'' field from being divided into multiple lines.
   */
-  { "ignore_list_reply_to", DT_BOOL, R_NONE, OPTIGNORELISTREPLYTO, 0 },
+  { "ignore_list_reply_to", DT_BOOL, R_NONE, OPT_IGNORE_LIST_REPLY_TO, 0 },
   /*
   ** .pp
   ** Affects the behavior of the \fC<reply>\fP function when replying to
@@ -1342,7 +1342,7 @@ struct Option MuttVars[] = {
   ** the previous methods are unavailable. If a method is available but
   ** authentication fails, mutt will not connect to the IMAP server.
   */
-  { "imap_check_subscribed",  DT_BOOL, R_NONE, OPTIMAPCHECKSUBSCRIBED, 0 },
+  { "imap_check_subscribed",  DT_BOOL, R_NONE, OPT_IMAP_CHECK_SUBSCRIBED, 0 },
   /*
    ** .pp
    ** When \fIset\fP, mutt will fetch the set of subscribed folders from
@@ -1371,7 +1371,7 @@ struct Option MuttVars[] = {
   ** and not contain the colon, e.g. ``X-BOGOSITY X-SPAM-STATUS'' for the
   ** ``X-Bogosity:'' and ``X-Spam-Status:'' header fields.
   */
-  { "imap_idle",                DT_BOOL, R_NONE, OPTIMAPIDLE, 0 },
+  { "imap_idle",                DT_BOOL, R_NONE, OPT_IMAP_IDLE, 0 },
   /*
   ** .pp
   ** When \fIset\fP, mutt will attempt to use the IMAP IDLE extension
@@ -1391,7 +1391,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, OPTIMAPLSUB, 0 },
+  { "imap_list_subscribed",     DT_BOOL, R_NONE, OPT_IMAP_LSUB, 0 },
   /*
   ** .pp
   ** This variable configures whether IMAP folder browsing will look for
@@ -1416,7 +1416,7 @@ struct Option MuttVars[] = {
   ** fairly secure machine, because the superuser can read your muttrc even
   ** if you are the only one who can read the file.
   */
-  { "imap_passive",             DT_BOOL, R_NONE, OPTIMAPPASSIVE, 1 },
+  { "imap_passive",             DT_BOOL, R_NONE, OPT_IMAP_PASSIVE, 1 },
   /*
   ** .pp
   ** When \fIset\fP, mutt will not open new IMAP connections to check for new
@@ -1425,7 +1425,7 @@ struct Option MuttVars[] = {
   ** user/password pairs on mutt invocation, or if opening the connection
   ** is slow.
   */
-  { "imap_peek", DT_BOOL, R_NONE, OPTIMAPPEEK, 1 },
+  { "imap_peek", DT_BOOL, R_NONE, OPT_IMAP_PEEK, 1 },
   /*
   ** .pp
   ** When \fIset\fP, mutt will avoid implicitly marking your mail as read whenever
@@ -1444,7 +1444,7 @@ struct Option MuttVars[] = {
   ** .pp
   ** \fBNote:\fP Changes to this variable have no effect on open connections.
   */
-  { "imap_servernoise",         DT_BOOL, R_NONE, OPTIMAPSERVERNOISE, 1 },
+  { "imap_servernoise",         DT_BOOL, R_NONE, OPT_IMAP_SERVER_NOISE, 1 },
   /*
   ** .pp
   ** When \fIset\fP, mutt will display warning messages from the IMAP
@@ -1462,7 +1462,7 @@ struct Option MuttVars[] = {
   ** This variable defaults to your user name on the local machine.
   */
 #endif
-  { "implicit_autoview", DT_BOOL,R_NONE, OPTIMPLICITAUTOVIEW, 0 },
+  { "implicit_autoview", DT_BOOL,R_NONE, OPT_IMPLICIT_AUTOVIEW, 0 },
   /*
   ** .pp
   ** If set to ``yes'', mutt will look for a mailcap entry with the
@@ -1477,7 +1477,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, OPTINCLUDEONLYFIRST, 0 },
+  { "include_onlyfirst",        DT_BOOL, R_NONE, OPT_INCLUDE_ONLY_FIRST, 0 },
   /*
   ** .pp
   ** Controls whether or not Mutt includes only the first attachment
@@ -1626,14 +1626,14 @@ struct Option MuttVars[] = {
   ** .pp
   ** How to invoke ispell (GNU's spell-checking software).
   */
-  { "keep_flagged", DT_BOOL, R_NONE, OPTKEEPFLAGGED, 0 },
+  { "keep_flagged", DT_BOOL, R_NONE, OPT_KEEP_FLAGGED, 0 },
   /*
   ** .pp
   ** If \fIset\fP, read messages marked as flagged will not be moved
   ** from your spool mailbox to your $$mbox mailbox, or as a result of
   ** a ``$mbox-hook'' command.
   */
-  { "keywords_legacy", DT_BOOL, R_NONE, OPTKEYWORDSLEGACY, 1 },
+  { "keywords_legacy", DT_BOOL, R_NONE, OPT_KEYWORDS_LEGACY, 1 },
   /*
   ** .pp
   ** If \fIset\fP, keywords/labels/tags will be written to whatever
@@ -1644,7 +1644,7 @@ struct Option MuttVars[] = {
   ** ``$$keywords_standard'' are \fCfalse\fP, mutt will save keywords
   ** to legacy headers to ensure that it does not lose your labels.
   */
-  { "keywords_standard", DT_BOOL, R_NONE, OPTKEYWORDSSTANDARD, 0 },
+  { "keywords_standard", DT_BOOL, R_NONE, OPT_KEYWORDS_STANDARD, 0 },
   /*
   ** .pp
   ** If \fIset\fP, keywords/labels/tags will be written to the
@@ -1661,7 +1661,7 @@ struct Option MuttVars[] = {
   ** This variable configures how often (in seconds) mutt should look for
   ** new mail. Also see the $$timeout variable.
   */
-  { "mail_check_recent",DT_BOOL, R_NONE, OPTMAILCHECKRECENT, 1 },
+  { "mail_check_recent",DT_BOOL, R_NONE, OPT_MAIL_CHECK_RECENT, 1 },
   /*
   ** .pp
   ** When \fIset\fP, Mutt will only notify you about new mail that has been received
@@ -1672,7 +1672,7 @@ struct Option MuttVars[] = {
   ** When \fI$$mark_old\fP is set, Mutt does not consider the mailbox to contain new
   ** mail if only old messages exist.
   */
-  { "mail_check_stats", DT_BOOL, R_NONE, OPTMAILCHECKSTATS, 0 },
+  { "mail_check_stats", DT_BOOL, R_NONE, OPT_MAIL_CHECK_STATS, 0 },
   /*
   ** .pp
   ** When \fIset\fP, mutt will periodically calculate message
@@ -1694,7 +1694,7 @@ struct Option MuttVars[] = {
   ** This variable specifies which files to consult when attempting to
   ** display MIME bodies not directly supported by Mutt.
   */
-  { "mailcap_sanitize", DT_BOOL, R_NONE, OPTMAILCAPSANITIZE, 1 },
+  { "mailcap_sanitize", DT_BOOL, R_NONE, OPT_MAILCAP_SANITIZE, 1 },
   /*
   ** .pp
   ** If \fIset\fP, mutt will restrict possible characters in mailcap % expandos
@@ -1705,7 +1705,7 @@ struct Option MuttVars[] = {
   ** DOING!\fP
   */
 #ifdef USE_HCACHE
-  { "maildir_header_cache_verify", DT_BOOL, R_NONE, OPTHCACHEVERIFY, 1 },
+  { "maildir_header_cache_verify", DT_BOOL, R_NONE, OPT_HCACHE_VERIFY, 1 },
   /*
   ** .pp
   ** Check for Maildir unaware programs other than mutt having modified maildir
@@ -1714,7 +1714,7 @@ struct Option MuttVars[] = {
   ** folders).
   */
 #endif
-  { "maildir_trash", DT_BOOL, R_NONE, OPTMAILDIRTRASH, 0 },
+  { "maildir_trash", DT_BOOL, R_NONE, OPT_MAILDIR_TRASH, 0 },
   /*
   ** .pp
   ** If \fIset\fP, messages marked as deleted will be saved with the maildir
@@ -1722,7 +1722,7 @@ struct Option MuttVars[] = {
   ** to maildir-style mailboxes.  Setting it will have no effect on other
   ** mailbox types.
   */
-  { "maildir_check_cur", DT_BOOL, R_NONE, OPTMAILDIRCHECKCUR, 0 },
+  { "maildir_check_cur", DT_BOOL, R_NONE, OPT_MAILDIR_CHECK_CUR, 0 },
   /*
   ** .pp
   ** If \fIset\fP, mutt will poll both the new and cur directories of
@@ -1739,7 +1739,7 @@ struct Option MuttVars[] = {
   ** automatically generated with \fI<mark-message>a\fP will be composed
   ** from this prefix and the letter \fIa\fP.
   */
-  { "mark_old",         DT_BOOL, R_BOTH, OPTMARKOLD, 1 },
+  { "mark_old",         DT_BOOL, R_BOTH, OPT_MARK_OLD, 1 },
   /*
   ** .pp
   ** Controls whether or not mutt marks \fInew\fP \fBunread\fP
@@ -1748,7 +1748,7 @@ struct Option MuttVars[] = {
   ** will show up with an ``O'' next to them in the index menu,
   ** indicating that they are old.
   */
-  { "markers",          DT_BOOL, R_PAGER_FLOW, OPTMARKERS, 1 },
+  { "markers",          DT_BOOL, R_PAGER_FLOW, OPT_MARKERS, 1 },
   /*
   ** .pp
   ** Controls the display of wrapped lines in the internal pager. If set, a
@@ -1784,14 +1784,14 @@ struct Option MuttVars[] = {
   ** This variable controls the number of lines of context that are given
   ** when scrolling through menus. (Similar to $$pager_context.)
   */
-  { "menu_move_off",    DT_BOOL, R_NONE, OPTMENUMOVEOFF, 1 },
+  { "menu_move_off",    DT_BOOL, R_NONE, OPT_MENU_MOVE_OFF, 1 },
   /*
   ** .pp
   ** When \fIunset\fP, the bottom entry of menus will never scroll up past
   ** the bottom of the screen, unless there are less entries than lines.
   ** When \fIset\fP, the bottom entry may move off the bottom.
   */
-  { "menu_scroll",      DT_BOOL, R_NONE, OPTMENUSCROLL, 0 },
+  { "menu_scroll",      DT_BOOL, R_NONE, OPT_MENU_SCROLL, 0 },
   /*
   ** .pp
   ** When \fIset\fP, menus will be scrolled up or down one line when you
@@ -1800,7 +1800,7 @@ struct Option MuttVars[] = {
   ** (useful for slow links to avoid many redraws).
   */
 #if defined(USE_IMAP) || defined(USE_POP)
-  { "message_cache_clean", DT_BOOL, R_NONE, OPTMESSAGECACHECLEAN, 0 },
+  { "message_cache_clean", DT_BOOL, R_NONE, OPT_MESSAGE_CACHE_CLEAN, 0 },
   /*
   ** .pp
   ** If \fIset\fP, mutt will clean out obsolete entries from the message cache when
@@ -1832,7 +1832,7 @@ struct Option MuttVars[] = {
   { "msg_format",       DT_SYN,  R_NONE, UL "message_format", 0 },
   /*
   */
-  { "meta_key",         DT_BOOL, R_NONE, OPTMETAKEY, 0 },
+  { "meta_key",         DT_BOOL, R_NONE, OPT_METAKEY, 0 },
   /*
   ** .pp
   ** If \fIset\fP, forces Mutt to interpret keystrokes with the high bit (bit 8)
@@ -1843,13 +1843,13 @@ struct Option MuttVars[] = {
   ** high bit from \fC0xf8\fP is \fC0x78\fP, which is the ASCII character
   ** ``x''.
   */
-  { "metoo",            DT_BOOL, R_NONE, OPTMETOO, 0 },
+  { "metoo",            DT_BOOL, R_NONE, OPT_ME_TOO, 0 },
   /*
   ** .pp
   ** If \fIunset\fP, Mutt will remove your address (see the ``$alternates''
   ** command) from the list of recipients when replying to a message.
   */
-  { "mh_purge",         DT_BOOL, R_NONE, OPTMHPURGE, 0 },
+  { "mh_purge",         DT_BOOL, R_NONE, OPT_MH_PURGE, 0 },
   /*
   ** .pp
   ** When \fIunset\fP, mutt will mimic mh's behavior and rename deleted messages
@@ -1887,7 +1887,7 @@ struct Option MuttVars[] = {
   ** .pp
   ** Also see $$forward_decode and $$mime_forward_decode.
   */
-  { "mime_forward_decode", DT_BOOL, R_NONE, OPTMIMEFORWDECODE, 0 },
+  { "mime_forward_decode", DT_BOOL, R_NONE, OPT_MIME_FORW_DECODE, 0 },
   /*
   ** .pp
   ** Controls the decoding of complex MIME messages into \fCtext/plain\fP when
@@ -1905,7 +1905,7 @@ struct Option MuttVars[] = {
   ** be attached to the newly composed message if this option is \fIset\fP.
   */
 #ifdef USE_NNTP
-  { "mime_subject",     DT_BOOL, R_NONE, OPTMIMESUBJECT, 1 },
+  { "mime_subject",     DT_BOOL, R_NONE, OPT_MIME_SUBJECT, 1 },
   /*
   ** .pp
   ** If \fIunset\fP, 8-bit ``subject:'' line in article header will not be
@@ -1943,7 +1943,7 @@ struct Option MuttVars[] = {
   ** from your spool mailbox to your $$mbox mailbox, or as a result of
   ** a ``$mbox-hook'' command.
   */
-  { "narrow_tree",      DT_BOOL, R_TREE|R_INDEX, OPTNARROWTREE, 0 },
+  { "narrow_tree",      DT_BOOL, R_TREE|R_INDEX, OPT_NARROW_TREE, 0 },
   /*
   ** .pp
   ** This variable, when \fIset\fP, makes the thread tree narrower, allowing
@@ -2033,13 +2033,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, OPTLISTGROUP, 1 },
+  { "nntp_listgroup",   DT_BOOL, R_NONE, OPT_LIST_GROUP, 1 },
   /*
   ** .pp
   ** This variable controls whether or not existence of each article is
   ** checked when newsgroup is entered.
   */
-  { "nntp_load_description", DT_BOOL, R_NONE, OPTLOADDESC, 1 },
+  { "nntp_load_description", DT_BOOL, R_NONE, OPT_LOAD_DESC, 1 },
   /*
   ** .pp
   ** This variable controls whether or not descriptions for each newsgroup
@@ -2108,7 +2108,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, OPTNOTMUCHRECORD, 0 },
+  { "nm_record", DT_BOOL, R_NONE, OPT_NOTMUCH_RECORD, 0 },
   /*
    ** .pp
    ** This variable specifies if the mutt record should indexed by notmuch.
@@ -2191,14 +2191,14 @@ struct Option MuttVars[] = {
   ** is less than $$pager_index_lines, then the index will only use as
   ** many lines as it needs.
   */
-  { "pager_stop",       DT_BOOL, R_NONE, OPTPAGERSTOP, 0 },
+  { "pager_stop",       DT_BOOL, R_NONE, OPT_PAGER_STOP, 0 },
   /*
   ** .pp
   ** When \fIset\fP, the internal-pager will \fBnot\fP move to the next message
   ** when you are at the end of a message and invoke the \fC<next-page>\fP
   ** function.
   */
-  { "pgp_auto_decode", DT_BOOL, R_NONE, OPTPGPAUTODEC, 0 },
+  { "pgp_auto_decode", DT_BOOL, R_NONE, OPT_PGP_AUTO_DEC, 0 },
   /*
   ** .pp
   ** If \fIset\fP, mutt will automatically attempt to decrypt traditional PGP
@@ -2209,7 +2209,7 @@ struct Option MuttVars[] = {
   ** check the message for traditional pgp.
   */
   { "pgp_create_traditional",   DT_SYN, R_NONE, UL "pgp_autoinline", 0 },
-  { "pgp_autoinline",           DT_BOOL, R_NONE, OPTPGPAUTOINLINE, 0 },
+  { "pgp_autoinline",           DT_BOOL, R_NONE, OPT_PGP_AUTO_INLINE, 0 },
   /*
   ** .pp
   ** This option controls whether Mutt generates old-style inline
@@ -2229,7 +2229,7 @@ struct Option MuttVars[] = {
   ** \fBdeprecated\fP.
   ** (PGP only)
   */
-  { "pgp_check_exit",   DT_BOOL, R_NONE, OPTPGPCHECKEXIT, 1 },
+  { "pgp_check_exit",   DT_BOOL, R_NONE, OPT_PGP_CHECK_EXIT, 1 },
   /*
   ** .pp
   ** If \fIset\fP, mutt will check the exit code of the PGP subprocess when
@@ -2359,7 +2359,7 @@ struct Option MuttVars[] = {
   ** even for bad signatures.
   ** (PGP only)
   */
-  { "pgp_ignore_subkeys", DT_BOOL, R_NONE, OPTPGPIGNORESUB, 1 },
+  { "pgp_ignore_subkeys", DT_BOOL, R_NONE, OPT_PGP_IGNORE_SUB, 1 },
   /*
   ** .pp
   ** Setting this variable will cause Mutt to ignore OpenPGP subkeys. Instead,
@@ -2417,7 +2417,7 @@ struct Option MuttVars[] = {
   ** possible \fCprintf(3)\fP-like sequences.
   ** (PGP only)
   */
-  { "pgp_long_ids",     DT_BOOL, R_NONE, OPTPGPLONGIDS, 1 },
+  { "pgp_long_ids",     DT_BOOL, R_NONE, OPT_PGP_LONG_IDS, 1 },
   /*
   ** .pp
   ** If \fIset\fP, use 64 bit PGP key IDs, if \fIunset\fP use the normal 32 bit key IDs.
@@ -2438,7 +2438,7 @@ struct Option MuttVars[] = {
   ** (PGP only)
   */
   { "pgp_auto_traditional",     DT_SYN, R_NONE, UL "pgp_replyinline", 0 },
-  { "pgp_replyinline",          DT_BOOL, R_NONE, OPTPGPREPLYINLINE, 0 },
+  { "pgp_replyinline",          DT_BOOL, R_NONE, OPT_PGP_REPLY_INLINE, 0 },
   /*
   ** .pp
   ** Setting this variable will cause Mutt to always attempt to
@@ -2461,7 +2461,7 @@ struct Option MuttVars[] = {
   ** (PGP only)
   **
   */
-  { "pgp_retainable_sigs", DT_BOOL, R_NONE, OPTPGPRETAINABLESIG, 0 },
+  { "pgp_retainable_sigs", DT_BOOL, R_NONE, OPT_PGP_RETAINABLE_SIG, 0 },
   /*
   ** .pp
   ** If \fIset\fP, signed and encrypted messages will consist of nested
@@ -2472,7 +2472,7 @@ struct Option MuttVars[] = {
   ** removed, while the inner \fCmultipart/signed\fP part is retained.
   ** (PGP only)
   */
-  { "pgp_self_encrypt",    DT_BOOL, R_NONE, OPTPGPSELFENCRYPT, 0 },
+  { "pgp_self_encrypt",    DT_BOOL, R_NONE, OPT_PGP_SELF_ENCRYPT, 0 },
   /*
   ** .pp
   ** When \fIset\fP, PGP encrypted messages will also be encrypted
@@ -2487,7 +2487,7 @@ struct Option MuttVars[] = {
   ** It should be in keyid or fingerprint form (e.g. 0x00112233).
   ** (PGP only)
   */
-  { "pgp_show_unusable", DT_BOOL, R_NONE, OPTPGPSHOWUNUSABLE, 1 },
+  { "pgp_show_unusable", DT_BOOL, R_NONE, OPT_PGP_SHOW_UNUSABLE, 1 },
   /*
   ** .pp
   ** If \fIset\fP, mutt will display non-usable keys on the PGP key selection
@@ -2529,7 +2529,7 @@ struct Option MuttVars[] = {
   ** ``reverse-''.
   ** (PGP only)
   */
-  { "pgp_strict_enc",   DT_BOOL, R_NONE, OPTPGPSTRICTENC, 1 },
+  { "pgp_strict_enc",   DT_BOOL, R_NONE, OPT_PGP_STRICT_ENC, 1 },
   /*
   ** .pp
   ** If \fIset\fP, Mutt will automatically encode PGP/MIME signed messages as
@@ -2545,7 +2545,7 @@ struct Option MuttVars[] = {
   ** not used.
   ** (PGP only)
   */
-  { "pgp_use_gpg_agent", DT_BOOL, R_NONE, OPTUSEGPGAGENT, 0 },
+  { "pgp_use_gpg_agent", DT_BOOL, R_NONE, OPT_USE_GPG_AGENT, 0 },
   /*
   ** .pp
   ** If \fIset\fP, mutt will use a possibly-running \fCgpg-agent(1)\fP process.
@@ -2572,7 +2572,7 @@ struct Option MuttVars[] = {
   ** possible \fCprintf(3)\fP-like sequences.
   ** (PGP only)
   */
-  { "pipe_decode",      DT_BOOL, R_NONE, OPTPIPEDECODE, 0 },
+  { "pipe_decode",      DT_BOOL, R_NONE, OPT_PIPE_DECODE, 0 },
   /*
   ** .pp
   ** Used in connection with the \fC<pipe-message>\fP command.  When \fIunset\fP,
@@ -2586,7 +2586,7 @@ struct Option MuttVars[] = {
   ** The separator to add between messages when piping a list of tagged
   ** messages to an external Unix command.
   */
-  { "pipe_split",       DT_BOOL, R_NONE, OPTPIPESPLIT, 0 },
+  { "pipe_split",       DT_BOOL, R_NONE, OPT_PIPE_SPLIT, 0 },
   /*
   ** .pp
   ** Used in connection with the \fC<pipe-message>\fP function following
@@ -2597,7 +2597,7 @@ struct Option MuttVars[] = {
   ** and the $$pipe_sep separator is added after each message.
   */
 #ifdef USE_POP
-  { "pop_auth_try_all", DT_BOOL, R_NONE, OPTPOPAUTHTRYALL, 1 },
+  { "pop_auth_try_all", DT_BOOL, R_NONE, OPT_POP_AUTH_TRY_ALL, 1 },
   /*
   ** .pp
   ** If \fIset\fP, Mutt will try all available authentication methods.
@@ -2645,7 +2645,7 @@ struct Option MuttVars[] = {
   ** .pp
   ** where ``[...]'' denotes an optional part.
   */
-  { "pop_last",         DT_BOOL, R_NONE, OPTPOPLAST, 0 },
+  { "pop_last",         DT_BOOL, R_NONE, OPT_POP_LAST, 0 },
   /*
   ** .pp
   ** If this variable is \fIset\fP, mutt will try to use the ``\fCLAST\fP'' POP command
@@ -2712,7 +2712,7 @@ struct Option MuttVars[] = {
   ** .pp
   ** Also see the $$postpone variable.
   */
-  { "postpone_encrypt",    DT_BOOL, R_NONE, OPTPOSTPONEENCRYPT, 0 },
+  { "postpone_encrypt",    DT_BOOL, R_NONE, OPT_POSTPONE_ENCRYPT, 0 },
   /*
   ** .pp
   ** When \fIset\fP, postponed messages that are marked for encryption will be
@@ -2763,7 +2763,7 @@ struct Option MuttVars[] = {
   { "print_cmd",        DT_SYN,  R_NONE, UL "print_command", 0 },
   /*
   */
-  { "print_decode",     DT_BOOL, R_NONE, OPTPRINTDECODE, 1 },
+  { "print_decode",     DT_BOOL, R_NONE, OPT_PRINT_DECODE, 1 },
   /*
   ** .pp
   ** Used in connection with the \fC<print-message>\fP command.  If this
@@ -2774,7 +2774,7 @@ struct Option MuttVars[] = {
   ** some advanced printer filter which is able to properly format
   ** e-mail messages for printing.
   */
-  { "print_split",      DT_BOOL, R_NONE, OPTPRINTSPLIT,  0 },
+  { "print_split",      DT_BOOL, R_NONE, OPT_PRINT_SPLIT,  0 },
   /*
   ** .pp
   ** Used in connection with the \fC<print-message>\fP command.  If this option
@@ -2787,7 +2787,7 @@ struct Option MuttVars[] = {
   ** Those who use the \fCenscript\fP(1) program's mail-printing mode will
   ** most likely want to \fIset\fP this option.
   */
-  { "prompt_after",     DT_BOOL, R_NONE, OPTPROMPTAFTER, 1 },
+  { "prompt_after",     DT_BOOL, R_NONE, OPT_PROMPT_AFTER, 1 },
   /*
   ** .pp
   ** If you use an \fIexternal\fP $$pager, setting this variable will
@@ -2865,7 +2865,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, OPTREADONLY, 0 },
+  { "read_only",        DT_BOOL, R_NONE, OPT_READONLY, 0 },
   /*
   ** .pp
   ** If \fIset\fP, all folders are opened in read-only mode.
@@ -2903,7 +2903,7 @@ struct Option MuttVars[] = {
   ** The value of \fI$$record\fP is overridden by the $$force_name and
   ** $$save_name variables, and the ``$fcc-hook'' command.
   */
-  { "reflow_space_quotes",      DT_BOOL, R_NONE, OPTREFLOWSPACEQUOTES, 1 },
+  { "reflow_space_quotes",      DT_BOOL, R_NONE, OPT_REFLOW_SPACE_QUOTES, 1 },
   /*
   ** .pp
   ** This option controls how quotes from format=flowed messages are displayed
@@ -2914,7 +2914,7 @@ struct Option MuttVars[] = {
   ** \fBNote:\fP If $$reflow_text is \fIunset\fP, this option has no effect.
   ** Also, this option does not affect replies when $$text_flowed is \fIset\fP.
   */
-  { "reflow_text",      DT_BOOL, R_NONE, OPTREFLOWTEXT, 1 },
+  { "reflow_text",      DT_BOOL, R_NONE, OPT_REFLOW_TEXT, 1 },
   /*
   ** .pp
   ** When \fIset\fP, Mutt will reformat paragraphs in text/plain
@@ -2942,7 +2942,7 @@ struct Option MuttVars[] = {
   ** and replying. The default value corresponds to the English "Re:" and
   ** the German "Aw:".
   */
-  { "reply_self",       DT_BOOL, R_NONE, OPTREPLYSELF, 0 },
+  { "reply_self",       DT_BOOL, R_NONE, OPT_REPLY_SELF, 0 },
   /*
   ** .pp
   ** If \fIunset\fP and you are replying to a message sent by you, Mutt will
@@ -2961,7 +2961,7 @@ struct Option MuttVars[] = {
   ** header field to the list address and you want to send a private
   ** message to the author of a message.
   */
-  { "reply_with_xorig", DT_BOOL, R_NONE, OPTREPLYWITHXORIG, 0 },
+  { "reply_with_xorig", DT_BOOL, R_NONE, OPT_REPLY_WITH_XORIG, 0 },
   /*
   ** .pp
   ** This variable provides a toggle. When active, the From: header will be
@@ -2971,14 +2971,14 @@ struct Option MuttVars[] = {
   ** Assuming `fast_reply' is disabled, this option will prompt the user with a
   ** prefilled From: header.
   */
-  { "resolve",          DT_BOOL, R_NONE, OPTRESOLVE, 1 },
+  { "resolve",          DT_BOOL, R_NONE, OPT_RESOLVE, 1 },
   /*
   ** .pp
   ** When \fIset\fP, the cursor will be automatically advanced to the next
   ** (possibly undeleted) message whenever a command that modifies the
   ** current message is executed.
   */
-  { "resume_draft_files", DT_BOOL, R_NONE, OPTRESUMEDRAFTFILES, 0 },
+  { "resume_draft_files", DT_BOOL, R_NONE, OPT_RESUME_DRAFT_FILES, 0 },
   /*
   ** .pp
   ** If \fIset\fP, draft files (specified by \fC-H\fP on the command
@@ -2987,7 +2987,7 @@ struct Option MuttVars[] = {
   ** evaluated; no alias expansion takes place; user-defined headers
   ** and signatures are not added to the message.
   */
-  { "resume_edited_draft_files", DT_BOOL, R_NONE, OPTRESUMEEDITEDDRAFTFILES, 1 },
+  { "resume_edited_draft_files", DT_BOOL, R_NONE, OPT_RESUME_EDITED_DRAFT_FILES, 1 },
   /*
   ** .pp
   ** If \fIset\fP, draft files previously edited (via \fC-E -H\fP on
@@ -3003,7 +3003,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, OPTREVALIAS, 0 },
+  { "reverse_alias",    DT_BOOL, R_BOTH, OPT_REV_ALIAS, 0 },
   /*
   ** .pp
   ** This variable controls whether or not Mutt will display the ``personal''
@@ -3023,7 +3023,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, OPTREVNAME, 0 },
+  { "reverse_name",     DT_BOOL, R_BOTH, OPT_REV_NAME, 0 },
   /*
   ** .pp
   ** It may sometimes arrive that you receive mail to a certain machine,
@@ -3037,7 +3037,7 @@ struct Option MuttVars[] = {
   ** .pp
   ** Also see the ``$alternates'' command.
   */
-  { "reverse_realname", DT_BOOL, R_BOTH, OPTREVREAL, 1 },
+  { "reverse_realname", DT_BOOL, R_BOTH, OPT_REV_REAL, 1 },
   /*
   ** .pp
   ** This variable fine-tunes the behavior of the $$reverse_name feature.
@@ -3045,7 +3045,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, OPTRFC2047PARAMS, 0 },
+  { "rfc2047_parameters", DT_BOOL, R_NONE, OPT_RFC2047_PARAMS, 0 },
   /*
   ** .pp
   ** When this variable is \fIset\fP, Mutt will decode RFC2047-encoded MIME
@@ -3066,14 +3066,14 @@ struct Option MuttVars[] = {
   ** that mutt \fIgenerates\fP this kind of encoding.  Instead, mutt will
   ** unconditionally use the encoding specified in RFC2231.
   */
-  { "save_address",     DT_BOOL, R_NONE, OPTSAVEADDRESS, 0 },
+  { "save_address",     DT_BOOL, R_NONE, OPT_SAVE_ADDRESS, 0 },
   /*
   ** .pp
   ** If \fIset\fP, mutt will take the sender's full address when choosing a
   ** default folder for saving a mail. If $$save_name or $$force_name
   ** is \fIset\fP too, the selection of the Fcc folder will be changed as well.
   */
-  { "save_empty",       DT_BOOL, R_NONE, OPTSAVEEMPTY, 1 },
+  { "save_empty",       DT_BOOL, R_NONE, OPT_SAVE_EMPTY, 1 },
   /*
   ** .pp
   ** When \fIunset\fP, mailboxes which contain no saved messages will be removed
@@ -3089,7 +3089,7 @@ struct Option MuttVars[] = {
   ** This variable controls the size of the history (per category) saved in the
   ** $$history_file file.
   */
-  { "save_name",        DT_BOOL, R_NONE, OPTSAVENAME, 0 },
+  { "save_name",        DT_BOOL, R_NONE, OPT_SAVE_NAME, 0 },
   /*
   ** .pp
   ** This variable controls how copies of outgoing messages are saved.
@@ -3102,7 +3102,7 @@ struct Option MuttVars[] = {
   ** .pp
   ** Also see the $$force_name variable.
   */
-  { "score",            DT_BOOL, R_NONE, OPTSCORE, 1 },
+  { "score",            DT_BOOL, R_NONE, OPT_SCORE, 1 },
   /*
   ** .pp
   ** When this variable is \fIunset\fP, scoring is turned off.  This can
@@ -3186,13 +3186,13 @@ struct Option MuttVars[] = {
   ** shell from \fC/etc/passwd\fP is used.
   */
 #ifdef USE_NNTP
-  { "save_unsubscribed", DT_BOOL, R_NONE, OPTSAVEUNSUB, 0 },
+  { "save_unsubscribed", DT_BOOL, R_NONE, OPT_SAVE_UNSUB, 0 },
   /*
   ** .pp
   ** When \fIset\fP, info about unsubscribed newsgroups will be saved into
   ** ``newsrc'' file and into cache.
   */
-  { "show_new_news",    DT_BOOL, R_NONE, OPTSHOWNEWNEWS, 1 },
+  { "show_new_news",    DT_BOOL, R_NONE, OPT_SHOW_NEW_NEWS, 1 },
   /*
   ** .pp
   ** If \fIset\fP, news server will be asked for new newsgroups on entering
@@ -3200,7 +3200,7 @@ struct Option MuttVars[] = {
   ** Also controls whether or not number of new articles of subscribed
   ** newsgroups will be then checked.
   */
-  { "show_only_unread", DT_BOOL, R_NONE, OPTSHOWONLYUNREAD, 0 },
+  { "show_only_unread", DT_BOOL, R_NONE, OPT_SHOW_ONLY_UNREAD, 0 },
   /*
   ** .pp
   ** If \fIset\fP, only subscribed newsgroups that contain unread articles
@@ -3233,7 +3233,7 @@ struct Option MuttVars[] = {
   ** visible) and the other Mutt panels. ASCII and Unicode line-drawing
   ** characters are supported.
   */
-  { "sidebar_folder_indent", DT_BOOL, R_SIDEBAR, OPTSIDEBARFOLDERINDENT, 0 },
+  { "sidebar_folder_indent", DT_BOOL, R_SIDEBAR, OPT_SIDEBAR_FOLDER_INDENT, 0 },
   /*
   ** .pp
   ** Set this to indent mailboxes in the sidebar.
@@ -3279,7 +3279,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, OPTSIDEBARNEWMAILONLY, 0 },
+  { "sidebar_new_mail_only", DT_BOOL, R_SIDEBAR, OPT_SIDEBAR_NEWMAIL_ONLY, 0 },
   /*
   ** .pp
   ** When set, the sidebar will only display mailboxes containing new, or
@@ -3287,7 +3287,7 @@ struct Option MuttVars[] = {
   ** .pp
   ** \fBSee also:\fP $sidebar_whitelist.
   */
-  { "sidebar_next_new_wrap", DT_BOOL, R_NONE, OPTSIDEBARNEXTNEWWRAP, 0 },
+  { "sidebar_next_new_wrap", DT_BOOL, R_NONE, OPT_SIDEBAR_NEXT_NEW_WRAP, 0 },
   /*
   ** .pp
   ** When set, the \fC<sidebar-next-new>\fP command will not stop and the end of
@@ -3295,12 +3295,12 @@ struct Option MuttVars[] = {
   ** \fC<sidebar-prev-new>\fP command is similarly affected, wrapping around to
   ** the end of the list.
   */
-  { "sidebar_on_right", DT_BOOL, R_BOTH|R_REFLOW, OPTSIDEBARONRIGHT, 0 },
+  { "sidebar_on_right", DT_BOOL, R_BOTH|R_REFLOW, OPT_SIDEBAR_ON_RIGHT, 0 },
   /*
   ** .pp
   ** When set, the sidebar will appear on the right-hand side of the screen.
   */
-  { "sidebar_short_path", DT_BOOL, R_SIDEBAR, OPTSIDEBARSHORTPATH, 0 },
+  { "sidebar_short_path", DT_BOOL, R_SIDEBAR, OPT_SIDEBAR_SHORT_PATH, 0 },
   /*
   ** .pp
   ** By default the sidebar will show the mailbox's path, relative to the
@@ -3335,7 +3335,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, OPTSIDEBAR, 0 },
+  { "sidebar_visible", DT_BOOL, R_REFLOW, OPT_SIDEBAR, 0 },
   /*
   ** .pp
   ** This specifies whether or not to show sidebar. The sidebar shows a list of
@@ -3351,7 +3351,7 @@ struct Option MuttVars[] = {
   ** Chinese characters.
   */
 #endif
-  { "sig_dashes",       DT_BOOL, R_NONE, OPTSIGDASHES, 1 },
+  { "sig_dashes",       DT_BOOL, R_NONE, OPT_SIG_DASHES, 1 },
   /*
   ** .pp
   ** If \fIset\fP, a line containing ``-- '' (note the trailing space) will be inserted before your
@@ -3361,7 +3361,7 @@ struct Option MuttVars[] = {
   ** detect your signature.  For example, Mutt has the ability to highlight
   ** the signature in a different color in the built-in pager.
   */
-  { "sig_on_top",       DT_BOOL, R_NONE, OPTSIGONTOP, 0 },
+  { "sig_on_top",       DT_BOOL, R_NONE, OPT_SIG_ON_TOP, 0 },
   /*
   ** .pp
   ** If \fIset\fP, the signature will be included before any quoted or forwarded
@@ -3403,7 +3403,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, OPTWRAP, 1 },
+  { "smart_wrap",       DT_BOOL, R_PAGER_FLOW, OPT_WRAP, 1 },
   /*
   ** .pp
   ** Controls the display of lines longer than the screen width in the
@@ -3419,7 +3419,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, OPTASKCERTLABEL, 1 },
+  { "smime_ask_cert_label",     DT_BOOL, R_NONE, OPT_ASK_CERT_LABEL, 1 },
   /*
   ** .pp
   ** This flag controls whether you want to be asked to enter a label
@@ -3473,7 +3473,7 @@ struct Option MuttVars[] = {
   ** alongside the documentation.
   ** (S/MIME only)
   */
-  { "smime_decrypt_use_default_key",    DT_BOOL, R_NONE, OPTSDEFAULTDECRYPTKEY, 1 },
+  { "smime_decrypt_use_default_key",    DT_BOOL, R_NONE, OPT_SDEFAULT_DECRYPT_KEY, 1 },
   /*
   ** .pp
   ** If \fIset\fP (default) this tells mutt to use the default key for decryption. Otherwise,
@@ -3550,7 +3550,7 @@ struct Option MuttVars[] = {
   ** possible \fCprintf(3)\fP-like sequences.
   ** (S/MIME only)
   */
-  { "smime_is_default", DT_BOOL,  R_NONE, OPTSMIMEISDEFAULT, 0 },
+  { "smime_is_default", DT_BOOL,  R_NONE, OPT_SMIME_IS_DEFAULT, 0 },
   /*
   ** .pp
   ** The default behavior of mutt is to use PGP on all auto-sign/encryption
@@ -3581,7 +3581,7 @@ struct Option MuttVars[] = {
   ** possible \fCprintf(3)\fP-like sequences.
   ** (S/MIME only)
   */
-  { "smime_self_encrypt",    DT_BOOL, R_NONE, OPTSMIMESELFENCRYPT, 0 },
+  { "smime_self_encrypt",    DT_BOOL, R_NONE, OPT_SMIME_SELF_ENCRYPT, 0 },
   /*
   ** .pp
   ** When \fIset\fP, S/MIME encrypted messages will also be encrypted
@@ -3762,7 +3762,7 @@ struct Option MuttVars[] = {
   ** You may optionally use the ``reverse-'' prefix to specify reverse sorting
   ** order (example: ``\fCset sort_browser=reverse-date\fP'').
   */
-  { "sort_re",          DT_BOOL, R_INDEX|R_RESORT|R_RESORT_INIT, OPTSORTRE, 1 },
+  { "sort_re",          DT_BOOL, R_INDEX|R_RESORT|R_RESORT_INIT, OPT_SORT_RE, 1 },
   /*
   ** .pp
   ** This variable is only useful when sorting by mailboxes in sidebar. By default,
@@ -3813,7 +3813,7 @@ struct Option MuttVars[] = {
   ** The file containing a client certificate and its associated private
   ** key.
   */
-  { "ssl_force_tls",            DT_BOOL, R_NONE, OPTSSLFORCETLS, 0 },
+  { "ssl_force_tls",            DT_BOOL, R_NONE, OPT_SSL_FORCE_TLS, 0 },
   /*
    ** .pp
    ** If this variable is \fIset\fP, Mutt will require that all connections
@@ -3839,7 +3839,7 @@ struct Option MuttVars[] = {
   ** use \fCSTARTTLS\fP regardless of the server's capabilities.
   */
 # ifdef USE_SSL_OPENSSL
-  { "ssl_use_sslv2", DT_BOOL, R_NONE, OPTSSLV2, 0 },
+  { "ssl_use_sslv2", DT_BOOL, R_NONE, OPT_SSLV2, 0 },
   /*
   ** .pp
   ** This variable specifies whether to attempt to use SSLv2 in the
@@ -3847,33 +3847,33 @@ struct Option MuttVars[] = {
   ** considered fundamentally insecure and are no longer recommended.
   */
 # endif /* defined USE_SSL_OPENSSL */
-  { "ssl_use_sslv3", DT_BOOL, R_NONE, OPTSSLV3, 0 },
+  { "ssl_use_sslv3", DT_BOOL, R_NONE, OPT_SSLV3, 0 },
   /*
   ** .pp
   ** This variable specifies whether to attempt to use SSLv3 in the
   ** SSL authentication process. Note that SSLv2 and SSLv3 are now
   ** considered fundamentally insecure and are no longer recommended.
   */
-  { "ssl_use_tlsv1", DT_BOOL, R_NONE, OPTTLSV1, 1 },
+  { "ssl_use_tlsv1", DT_BOOL, R_NONE, OPT_TLSV1, 1 },
   /*
   ** .pp
   ** This variable specifies whether to attempt to use TLSv1.0 in the
   ** SSL authentication process.
   */
-  { "ssl_use_tlsv1_1", DT_BOOL, R_NONE, OPTTLSV1_1, 1 },
+  { "ssl_use_tlsv1_1", DT_BOOL, R_NONE, OPT_TLSV1_1, 1 },
   /*
   ** .pp
   ** This variable specifies whether to attempt to use TLSv1.1 in the
   ** SSL authentication process.
   */
-  { "ssl_use_tlsv1_2", DT_BOOL, R_NONE, OPTTLSV1_2, 1 },
+  { "ssl_use_tlsv1_2", DT_BOOL, R_NONE, OPT_TLSV1_2, 1 },
   /*
   ** .pp
   ** This variable specifies whether to attempt to use TLSv1.2 in the
   ** SSL authentication process.
   */
 #ifdef USE_SSL_OPENSSL
-  { "ssl_usesystemcerts", DT_BOOL, R_NONE, OPTSSLSYSTEMCERTS, 1 },
+  { "ssl_usesystemcerts", DT_BOOL, R_NONE, OPT_SSL_SYSTEM_CERTS, 1 },
   /*
   ** .pp
   ** If set to \fIyes\fP, mutt will use CA certificates in the
@@ -3881,7 +3881,7 @@ struct Option MuttVars[] = {
   ** is signed by a trusted CA.
   */
 #endif
-  { "ssl_verify_dates", DT_BOOL, R_NONE, OPTSSLVERIFYDATES, 1 },
+  { "ssl_verify_dates", DT_BOOL, R_NONE, OPT_SSL_VERIFY_DATES, 1 },
   /*
   ** .pp
   ** If \fIset\fP (the default), mutt will not automatically accept a server
@@ -3889,7 +3889,7 @@ struct Option MuttVars[] = {
   ** only unset this for particular known hosts, using the
   ** \fC$<account-hook>\fP function.
   */
-  { "ssl_verify_host", DT_BOOL, R_NONE, OPTSSLVERIFYHOST, 1 },
+  { "ssl_verify_host", DT_BOOL, R_NONE, OPT_SSL_VERIFY_HOST, 1 },
   /*
   ** .pp
   ** If \fIset\fP (the default), mutt will not automatically accept a server
@@ -3899,7 +3899,7 @@ struct Option MuttVars[] = {
   */
 # ifdef USE_SSL_OPENSSL
 #  ifdef HAVE_SSL_PARTIAL_CHAIN
-  { "ssl_verify_partial_chains", DT_BOOL, R_NONE, OPTSSLVERIFYPARTIAL, 0 },
+  { "ssl_verify_partial_chains", DT_BOOL, R_NONE, OPT_SSL_VERIFY_PARTIAL, 0 },
   /*
   ** .pp
   ** This option should not be changed from the default unless you understand
@@ -4017,14 +4017,14 @@ struct Option MuttVars[] = {
   ** will replace any dots in the expansion by underscores. This might be helpful
   ** with IMAP folders that don't like dots in folder names.
   */
-  { "status_on_top",    DT_BOOL, R_REFLOW, OPTSTATUSONTOP, 0 },
+  { "status_on_top",    DT_BOOL, R_REFLOW, OPT_STATUS_ON_TOP, 0 },
   /*
   ** .pp
   ** Setting this variable causes the ``status bar'' to be displayed on
   ** the first line of the screen rather than near the bottom. If $$help
   ** is \fIset\fP, too it'll be placed at the bottom.
   */
-  { "strict_threads",   DT_BOOL, R_RESORT|R_RESORT_INIT|R_INDEX, OPTSTRICTTHREADS, 0 },
+  { "strict_threads",   DT_BOOL, R_RESORT|R_RESORT_INIT|R_INDEX, OPT_STRICT_THREADS, 0 },
   /*
   ** .pp
   ** If \fIset\fP, threading will only make use of the ``In-Reply-To'' and
@@ -4036,14 +4036,14 @@ struct Option MuttVars[] = {
   ** $$sort_re for a less drastic way of controlling this
   ** behavior.
   */
-  { "suspend",          DT_BOOL, R_NONE, OPTSUSPEND, 1 },
+  { "suspend",          DT_BOOL, R_NONE, OPT_SUSPEND, 1 },
   /*
   ** .pp
   ** When \fIunset\fP, mutt won't stop when the user presses the terminal's
   ** \fIsusp\fP key, usually ``^Z''. This is useful if you run mutt
   ** inside an xterm using a command like ``\fCxterm -e mutt\fP''.
   */
-  { "text_flowed",      DT_BOOL, R_NONE, OPTTEXTFLOWED,  0 },
+  { "text_flowed",      DT_BOOL, R_NONE, OPT_TEXT_FLOWED,  0 },
   /*
   ** .pp
   ** When \fIset\fP, mutt will generate ``format=flowed'' bodies with a content type
@@ -4054,7 +4054,7 @@ struct Option MuttVars[] = {
   ** .pp
   ** Note that $$indent_string is ignored when this option is \fIset\fP.
   */
-  { "thorough_search",  DT_BOOL, R_NONE, OPTTHOROUGHSRC, 1 },
+  { "thorough_search",  DT_BOOL, R_NONE, OPT_THOROUGH_SRC, 1 },
   /*
   ** .pp
   ** Affects the \fC~b\fP and \fC~h\fP search operations described in
@@ -4068,13 +4068,13 @@ struct Option MuttVars[] = {
   ** raw message received (for example quoted-printable encoded or with encoded
   ** headers) which may lead to incorrect search results.
   */
-  { "thread_received",  DT_BOOL, R_RESORT|R_RESORT_INIT|R_INDEX, OPTTHREADRECEIVED, 0 },
+  { "thread_received",  DT_BOOL, R_RESORT|R_RESORT_INIT|R_INDEX, OPT_THREAD_RECEIVED, 0 },
   /*
   ** .pp
   ** When \fIset\fP, mutt uses the date received rather than the date sent
   ** to thread messages by subject.
   */
-  { "tilde",            DT_BOOL, R_PAGER, OPTTILDE, 0 },
+  { "tilde",            DT_BOOL, R_PAGER, OPT_TILDE, 0 },
   /*
   ** .pp
   ** When \fIset\fP, the internal-pager will pad blank lines to the bottom of the
@@ -4164,7 +4164,7 @@ struct Option MuttVars[] = {
   ** This string is identical in formatting to the one used by
   ** ``$$status_format''.
   */
-  { "ts_enabled",        DT_BOOL,  R_BOTH, OPTTSENABLED, 0 },
+  { "ts_enabled",        DT_BOOL,  R_BOTH, OPT_TS_ENABLED, 0 },
   /* The default must be off to force in the validity checking. */
   /*
   ** .pp
@@ -4197,13 +4197,13 @@ struct Option MuttVars[] = {
   ** tunnel commands per connection.
   */
 #endif
-  { "uncollapse_jump",  DT_BOOL, R_NONE, OPTUNCOLLAPSEJUMP, 0 },
+  { "uncollapse_jump",  DT_BOOL, R_NONE, OPT_UNCOLLAPSE_JUMP, 0 },
   /*
   ** .pp
   ** When \fIset\fP, Mutt will jump to the next unread message, if any,
   ** when the current thread is \fIun\fPcollapsed.
   */
-  { "uncollapse_new",   DT_BOOL, R_NONE, OPTUNCOLLAPSENEW, 1 },
+  { "uncollapse_new",   DT_BOOL, R_NONE, OPT_UNCOLLAPSE_NEW, 1 },
   /*
   ** .pp
   ** When \fIset\fP, Mutt will automatically uncollapse any collapsed thread
@@ -4211,7 +4211,7 @@ struct Option MuttVars[] = {
   ** remain collapsed. the presence of the new message will still affect
   ** index sorting, though.
   */
-  { "use_8bitmime",     DT_BOOL, R_NONE, OPTUSE8BITMIME, 0 },
+  { "use_8bitmime",     DT_BOOL, R_NONE, OPT_USE_8BIT_MIME, 0 },
   /*
   ** .pp
   ** \fBWarning:\fP do not set this variable unless you are using a version
@@ -4221,14 +4221,14 @@ struct Option MuttVars[] = {
   ** When \fIset\fP, Mutt will invoke $$sendmail with the \fC-B8BITMIME\fP
   ** flag when sending 8-bit messages to enable ESMTP negotiation.
   */
-  { "use_domain",       DT_BOOL, R_NONE, OPTUSEDOMAIN, 1 },
+  { "use_domain",       DT_BOOL, R_NONE, OPT_USE_DOMAIN, 1 },
   /*
   ** .pp
   ** When \fIset\fP, Mutt will qualify all local addresses (ones without the
   ** ``@host'' portion) with the value of $$hostname.  If \fIunset\fP, no
   ** addresses will be qualified.
   */
-  { "use_envelope_from",        DT_BOOL, R_NONE, OPTENVFROM, 0 },
+  { "use_envelope_from",        DT_BOOL, R_NONE, OPT_ENV_FROM, 0 },
   /*
    ** .pp
    ** When \fIset\fP, mutt will set the \fIenvelope\fP sender of the message.
@@ -4244,7 +4244,7 @@ struct Option MuttVars[] = {
   { "envelope_from",    DT_SYN,  R_NONE, UL "use_envelope_from", 0 },
   /*
   */
-  { "use_from",         DT_BOOL, R_NONE, OPTUSEFROM, 1 },
+  { "use_from",         DT_BOOL, R_NONE, OPT_USE_FROM, 1 },
   /*
   ** .pp
   ** When \fIset\fP, Mutt will generate the ``From:'' header field when
@@ -4253,7 +4253,7 @@ struct Option MuttVars[] = {
   ** command.
   */
 #ifdef HAVE_GETADDRINFO
-  { "use_ipv6",         DT_BOOL, R_NONE, OPTUSEIPV6, 1 },
+  { "use_ipv6",         DT_BOOL, R_NONE, OPT_USE_IPV6, 1 },
   /*
   ** .pp
   ** When \fIset\fP, Mutt will look for IPv6 addresses of hosts it tries to
@@ -4261,7 +4261,7 @@ struct Option MuttVars[] = {
   ** Normally, the default should work.
   */
 #endif /* HAVE_GETADDRINFO */
-  { "user_agent",       DT_BOOL, R_NONE, OPTXMAILER, 1 },
+  { "user_agent",       DT_BOOL, R_NONE, OPT_XMAILER, 1 },
   /*
   ** .pp
   ** When \fIset\fP, mutt will add a ``User-Agent:'' header to outgoing
@@ -4282,14 +4282,14 @@ struct Option MuttVars[] = {
   ** folders to your personal taste.  This string uses many of the same
   ** expandos as $$folder_format.
   */
-  { "virtual_spoolfile", DT_BOOL, R_NONE, OPTVIRTSPOOLFILE, 0 },
+  { "virtual_spoolfile", DT_BOOL, R_NONE, OPT_VIRT_SPOOL_FILE, 0 },
   /*
   ** .pp
   ** When \fIset\fP, mutt will use the first defined virtual mailbox (see
   ** virtual-mailboxes) as a spool file.
   */
 #endif
-  { "wait_key",         DT_BOOL, R_NONE, OPTWAITKEY, 1 },
+  { "wait_key",         DT_BOOL, R_NONE, OPT_WAIT_KEY, 1 },
   /*
   ** .pp
   ** Controls whether Mutt will ask you to press a key after an external command
@@ -4304,7 +4304,7 @@ struct Option MuttVars[] = {
   ** When \fIset\fP, Mutt will always ask for a key. When \fIunset\fP, Mutt will wait
   ** for a key only if the external command returned a non-zero status.
   */
-  { "weed",             DT_BOOL, R_NONE, OPTWEED, 1 },
+  { "weed",             DT_BOOL, R_NONE, OPT_WEED, 1 },
   /*
   ** .pp
   ** When \fIset\fP, mutt will weed headers when displaying, forwarding,
@@ -4331,7 +4331,7 @@ struct Option MuttVars[] = {
   ** recommends a line length of 78 (the default), so \fBplease only change
   ** this setting when you know what you're doing\fP.
   */
-  { "wrap_search",      DT_BOOL, R_NONE, OPTWRAPSEARCH, 1 },
+  { "wrap_search",      DT_BOOL, R_NONE, OPT_WRAP_SEARCH, 1 },
   /*
   ** .pp
   ** Controls whether searches wrap around the end.
@@ -4344,7 +4344,7 @@ struct Option MuttVars[] = {
   ** .pp
   ** (DEPRECATED) Equivalent to setting $$wrap with a negative value.
   */
-  { "write_bcc",        DT_BOOL, R_NONE, OPTWRITEBCC, 1 },
+  { "write_bcc",        DT_BOOL, R_NONE, OPT_WRITE_BCC, 1 },
   /*
   ** .pp
   ** Controls whether mutt writes out the ``Bcc:'' header when preparing
@@ -4387,14 +4387,14 @@ struct Option MuttVars[] = {
   ** various kinds of conversion.
   */
 #ifdef USE_NNTP
-  { "x_comment_to",     DT_BOOL, R_NONE, OPTXCOMMENTTO, 0 },
+  { "x_comment_to",     DT_BOOL, R_NONE, OPT_XCOMMENT_TO, 0 },
   /*
   ** .pp
   ** If \fIset\fP, Mutt will add ``X-Comment-To:'' field (that contains full
   ** name of original article author) to article that followuped to newsgroup.
   */
 #endif
-  { "collapse_all",     DT_BOOL, R_NONE, OPTCOLLAPSEALL, 0 },
+  { "collapse_all",     DT_BOOL, R_NONE, OPT_COLLAPSE_ALL, 0 },
   /*
   ** .pp
   ** When \fIset\fP, Mutt will collapse all threads when entering a folder.
index 2810b430dcec6eaebab1fae727f5d743bc367578..87fe8f2143836aae3a5822754132cf81abb62fff 100644 (file)
--- a/keymap.c
+++ b/keymap.c
@@ -579,7 +579,7 @@ gotkey:
       if (map->op != OP_MACRO)
         return map->op;
 
-      if (option(OPTIGNOREMACROEVENTS))
+      if (option(OPT_IGNORE_MACRO_EVENTS))
       {
         mutt_error(_("Macros are currently disabled."));
         return -1;
diff --git a/main.c b/main.c
index e7a72bcec2abd6a37a382c4ad2f6f1510af7b6ca..fd784dac1929fe1912b8cdf58b909cc969e59043 100644 (file)
--- a/main.c
+++ b/main.c
@@ -446,7 +446,7 @@ int main(int argc, char **argv, char **env)
   /* Check for a batch send. */
   if (!isatty(0) || queries || alias_queries || dump_variables || batch_mode)
   {
-    set_option(OPTNOCURSES);
+    set_option(OPT_NO_CURSES);
     sendflags = SENDBATCH;
   }
 
@@ -456,7 +456,7 @@ int main(int argc, char **argv, char **env)
 
   /* This must come before mutt_init() because curses needs to be started
      before calling the init_pair() function to set the color scheme.  */
-  if (!option(OPTNOCURSES))
+  if (!option(OPT_NO_CURSES))
   {
     start_curses();
 
@@ -506,7 +506,7 @@ int main(int argc, char **argv, char **env)
     return rv;
   }
 
-  if (!option(OPTNOCURSES))
+  if (!option(OPT_NO_CURSES))
   {
     SETCOLOR(MT_COLOR_NORMAL);
     clear();
@@ -515,7 +515,7 @@ int main(int argc, char **argv, char **env)
   }
 
   /* Create the Maildir directory if it doesn't exist. */
-  if (!option(OPTNOCURSES) && Maildir)
+  if (!option(OPT_NO_CURSES) && Maildir)
   {
     struct stat sb;
     char fpath[_POSIX_PATH_MAX];
@@ -547,7 +547,7 @@ int main(int argc, char **argv, char **env)
 
   if (sendflags & SENDPOSTPONED)
   {
-    if (!option(OPTNOCURSES))
+    if (!option(OPT_NO_CURSES))
       mutt_flushinp();
     ci_send_message(SENDPOSTPONED, NULL, NULL, NULL, NULL);
     mutt_free_windows();
@@ -563,7 +563,7 @@ int main(int argc, char **argv, char **env)
     int rv = 0;
     char expanded_infile[_POSIX_PATH_MAX];
 
-    if (!option(OPTNOCURSES))
+    if (!option(OPT_NO_CURSES))
       mutt_flushinp();
 
     if (!msg)
@@ -577,7 +577,7 @@ int main(int argc, char **argv, char **env)
       {
         if (url_parse_mailto(msg->env, &bodytext, argv[i]) < 0)
         {
-          if (!option(OPTNOCURSES))
+          if (!option(OPT_NO_CURSES))
             mutt_endwin(NULL);
           fputs(_("Failed to parse mailto: link\n"), stderr);
           exit(1);
@@ -587,9 +587,9 @@ int main(int argc, char **argv, char **env)
         msg->env->to = rfc822_parse_adrlist(msg->env->to, argv[i]);
     }
 
-    if (!draftFile && option(OPTAUTOEDIT) && !msg->env->to && !msg->env->cc)
+    if (!draftFile && option(OPT_AUTO_EDIT) && !msg->env->to && !msg->env->cc)
     {
-      if (!option(OPTNOCURSES))
+      if (!option(OPT_NO_CURSES))
         mutt_endwin(NULL);
       fputs(_("No recipients specified.\n"), stderr);
       exit(1);
@@ -628,7 +628,7 @@ int main(int argc, char **argv, char **env)
           mutt_expand_path(expanded_infile, sizeof(expanded_infile));
           if ((fin = fopen(expanded_infile, "r")) == NULL)
           {
-            if (!option(OPTNOCURSES))
+            if (!option(OPT_NO_CURSES))
               mutt_endwin(NULL);
             perror(expanded_infile);
             exit(1);
@@ -647,7 +647,7 @@ int main(int argc, char **argv, char **env)
 
         if ((fout = safe_fopen(tempfile, "w")) == NULL)
         {
-          if (!option(OPTNOCURSES))
+          if (!option(OPT_NO_CURSES))
             mutt_endwin(NULL);
           perror(tempfile);
           safe_fclose(&fin);
@@ -666,7 +666,7 @@ int main(int argc, char **argv, char **env)
 
         if ((fin = fopen(tempfile, "r")) == NULL)
         {
-          if (!option(OPTNOCURSES))
+          if (!option(OPT_NO_CURSES))
             mutt_endwin(NULL);
           perror(tempfile);
           FREE(&tempfile);
@@ -707,13 +707,13 @@ int main(int argc, char **argv, char **env)
 
         mutt_prepare_template(fin, NULL, msg, context_hdr, 0);
 
-        /* Scan for mutt header to set OPTRESUMEDRAFTFILES */
+        /* Scan for mutt header to set OPT_RESUME_DRAFT_FILES */
         for (last_uhp = &msg->env->userhdrs, uh = *last_uhp; uh; uh = *last_uhp)
         {
           if (ascii_strncasecmp("X-Mutt-Resume-Draft:", uh->data, 20) == 0)
           {
-            if (option(OPTRESUMEEDITEDDRAFTFILES))
-              set_option(OPTRESUMEDRAFTFILES);
+            if (option(OPT_RESUME_EDITED_DRAFT_FILES))
+              set_option(OPT_RESUME_DRAFT_FILES);
 
             *last_uhp = uh->next;
             uh->next = NULL;
@@ -767,7 +767,7 @@ int main(int argc, char **argv, char **env)
           msg->content = a = mutt_make_file_attach(t->data);
         if (!a)
         {
-          if (!option(OPTNOCURSES))
+          if (!option(OPT_NO_CURSES))
             mutt_endwin(NULL);
           fprintf(stderr, _("%s: unable to attach file.\n"), t->data);
           mutt_free_list(&attach);
@@ -788,14 +788,14 @@ int main(int argc, char **argv, char **env)
       {
         if (truncate(expanded_infile, 0) == -1)
         {
-          if (!option(OPTNOCURSES))
+          if (!option(OPT_NO_CURSES))
             mutt_endwin(NULL);
           perror(expanded_infile);
           exit(1);
         }
         if ((fout = safe_fopen(expanded_infile, "a")) == NULL)
         {
-          if (!option(OPTNOCURSES))
+          if (!option(OPT_NO_CURSES))
             mutt_endwin(NULL);
           perror(expanded_infile);
           exit(1);
@@ -814,12 +814,12 @@ int main(int argc, char **argv, char **env)
         }
 
         mutt_write_rfc822_header(fout, msg->env, msg->content, -1, 0);
-        if (option(OPTRESUMEEDITEDDRAFTFILES))
+        if (option(OPT_RESUME_EDITED_DRAFT_FILES))
           fprintf(fout, "X-Mutt-Resume-Draft: 1\n");
         fputc('\n', fout);
         if ((mutt_write_mime_body(msg->content, fout) == -1))
         {
-          if (!option(OPTNOCURSES))
+          if (!option(OPT_NO_CURSES))
             mutt_endwin(NULL);
           safe_fclose(&fout);
           exit(1);
@@ -838,7 +838,7 @@ int main(int argc, char **argv, char **env)
     }
 
     mutt_free_windows();
-    if (!option(OPTNOCURSES))
+    if (!option(OPT_NO_CURSES))
       mutt_endwin(NULL);
 
     if (rv)
@@ -861,7 +861,7 @@ int main(int argc, char **argv, char **env)
 #ifdef USE_NNTP
       if (flags & MUTT_NEWS)
       {
-        set_option(OPTNEWS);
+        set_option(OPT_NEWS);
         if (!(CurrentNewsSrv = nntp_select_server(NewsServer, 0)))
         {
           mutt_endwin(Errorbuf);
@@ -894,9 +894,9 @@ int main(int argc, char **argv, char **env)
     }
 
 #ifdef USE_NNTP
-    if (option(OPTNEWS))
+    if (option(OPT_NEWS))
     {
-      unset_option(OPTNEWS);
+      unset_option(OPT_NEWS);
       nntp_expand_path(folder, sizeof(folder), &CurrentNewsSrv->conn->account);
     }
     else
@@ -924,7 +924,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(OPTREADONLY)) ? MUTT_READONLY : 0, NULL)) ||
+             folder, ((flags & MUTT_RO) || option(OPT_READONLY)) ? MUTT_READONLY : 0, NULL)) ||
         !explicit_folder)
     {
 #ifdef USE_SIDEBAR
diff --git a/mbox.c b/mbox.c
index 9c186f5d95eb708606feb1281b2390797ff0d480..4c062517a707534aaabaf6e5872d2f90141d8645 100644 (file)
--- a/mbox.c
+++ b/mbox.c
@@ -1000,7 +1000,7 @@ void mbox_reset_atime(struct Context *ctx, struct stat *st)
    * When $mbox_check_recent is set, existing new mail is ignored, so do not
    * reset the atime to mtime-1 to signal new mail.
    */
-  if (!option(OPTMAILCHECKRECENT) && utimebuf.actime >= utimebuf.modtime && mbox_has_new(ctx))
+  if (!option(OPT_MAIL_CHECK_RECENT) && utimebuf.actime >= utimebuf.modtime && mbox_has_new(ctx))
     utimebuf.actime = utimebuf.modtime - 1;
 
   utime(ctx->path, &utimebuf);
@@ -1332,7 +1332,7 @@ static int mbox_sync_mailbox(struct Context *ctx, int *index_hint)
   unlink(tempfile); /* remove partial copy of the mailbox */
   mutt_unblock_signals();
 
-  if (option(OPTCHECKMBOXSIZE))
+  if (option(OPT_CHECK_MBOX_SIZE))
   {
     tmp = mutt_find_mailbox(ctx->path);
     if (tmp && tmp->new == false)
diff --git a/menu.c b/menu.c
index b9d0fbdd10ed53008fa5d4b354c40b7a246cb092..8885cd5ecaec06e31c760fbce0b6efb8ce32c090 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -120,7 +120,7 @@ static void print_enriched_string(int index, int attr, unsigned char *s, int do_
         switch (*s)
         {
           case MUTT_TREE_LLCORNER:
-            if (option(OPTASCIICHARS))
+            if (option(OPT_ASCII_CHARS))
               addch('`');
 #ifdef WACS_LLCORNER
             else
@@ -133,7 +133,7 @@ static void print_enriched_string(int index, int attr, unsigned char *s, int do_
 #endif
             break;
           case MUTT_TREE_ULCORNER:
-            if (option(OPTASCIICHARS))
+            if (option(OPT_ASCII_CHARS))
               addch(',');
 #ifdef WACS_ULCORNER
             else
@@ -146,7 +146,7 @@ static void print_enriched_string(int index, int attr, unsigned char *s, int do_
 #endif
             break;
           case MUTT_TREE_LTEE:
-            if (option(OPTASCIICHARS))
+            if (option(OPT_ASCII_CHARS))
               addch('|');
 #ifdef WACS_LTEE
             else
@@ -159,7 +159,7 @@ static void print_enriched_string(int index, int attr, unsigned char *s, int do_
 #endif
             break;
           case MUTT_TREE_HLINE:
-            if (option(OPTASCIICHARS))
+            if (option(OPT_ASCII_CHARS))
               addch('-');
 #ifdef WACS_HLINE
             else
@@ -172,7 +172,7 @@ static void print_enriched_string(int index, int attr, unsigned char *s, int do_
 #endif
             break;
           case MUTT_TREE_VLINE:
-            if (option(OPTASCIICHARS))
+            if (option(OPT_ASCII_CHARS))
               addch('|');
 #ifdef WACS_VLINE
             else
@@ -185,7 +185,7 @@ static void print_enriched_string(int index, int attr, unsigned char *s, int do_
 #endif
             break;
           case MUTT_TREE_TTEE:
-            if (option(OPTASCIICHARS))
+            if (option(OPT_ASCII_CHARS))
               addch('-');
 #ifdef WACS_TTEE
             else
@@ -198,7 +198,7 @@ static void print_enriched_string(int index, int attr, unsigned char *s, int do_
 #endif
             break;
           case MUTT_TREE_BTEE:
-            if (option(OPTASCIICHARS))
+            if (option(OPT_ASCII_CHARS))
               addch('-');
 #ifdef WACS_BTEE
             else
@@ -284,7 +284,7 @@ static void menu_make_entry(char *s, int l, struct Menu *menu, int i)
 static void menu_pad_string(struct Menu *menu, char *s, size_t n)
 {
   char *scratch = safe_strdup(s);
-  int shift = option(OPTARROWCURSOR) ? 3 : 0;
+  int shift = option(OPT_ARROW_CURSOR) ? 3 : 0;
   int cols = menu->indexwin->cols - shift;
 
   mutt_simple_format(s, n, cols, cols, FMT_LEFT, ' ', scratch, mutt_strlen(scratch), 1);
@@ -302,7 +302,7 @@ void menu_redraw_full(struct Menu *menu)
   move(0, 0);
   clrtobot();
 
-  if (option(OPTHELP))
+  if (option(OPT_HELP))
   {
     SETCOLOR(MT_COLOR_STATUS);
     mutt_window_move(menu->helpwin, 0, 0);
@@ -362,7 +362,7 @@ void menu_redraw_index(struct Menu *menu)
       if (i == menu->current)
       {
         SETCOLOR(MT_COLOR_INDICATOR);
-        if (option(OPTARROWCURSOR))
+        if (option(OPT_ARROW_CURSOR))
         {
           addstr("->");
           ATTRSET(attr);
@@ -371,7 +371,7 @@ void menu_redraw_index(struct Menu *menu)
         else
           do_color = false;
       }
-      else if (option(OPTARROWCURSOR))
+      else if (option(OPT_ARROW_CURSOR))
         addstr("   ");
 
       print_enriched_string(i, attr, (unsigned char *) buf, do_color);
@@ -399,7 +399,7 @@ void menu_redraw_motion(struct Menu *menu)
   mutt_window_move(menu->indexwin, menu->oldcurrent + menu->offset - menu->top, 0);
   ATTRSET(menu->color(menu->oldcurrent));
 
-  if (option(OPTARROWCURSOR))
+  if (option(OPT_ARROW_CURSOR))
   {
     /* clear the pointer */
     addstr("  ");
@@ -447,7 +447,7 @@ void menu_redraw_current(struct Menu *menu)
   menu_pad_string(menu, buf, sizeof(buf));
 
   SETCOLOR(MT_COLOR_INDICATOR);
-  if (option(OPTARROWCURSOR))
+  if (option(OPT_ARROW_CURSOR))
   {
     addstr("->");
     ATTRSET(attr);
@@ -465,10 +465,10 @@ static void menu_redraw_prompt(struct Menu *menu)
 {
   if (menu->dialog)
   {
-    if (option(OPTMSGERR))
+    if (option(OPT_MSG_ERR))
     {
       mutt_sleep(1);
-      unset_option(OPTMSGERR);
+      unset_option(OPT_MSG_ERR);
     }
 
     if (*Errorbuf)
@@ -484,7 +484,7 @@ void menu_check_recenter(struct Menu *menu)
   int c = MIN(MenuContext, menu->pagelen / 2);
   int old_top = menu->top;
 
-  if (!option(OPTMENUMOVEOFF) && menu->max <= menu->pagelen) /* less entries than lines */
+  if (!option(OPT_MENU_MOVE_OFF) && menu->max <= menu->pagelen) /* less entries than lines */
   {
     if (menu->top != 0)
     {
@@ -494,7 +494,7 @@ void menu_check_recenter(struct Menu *menu)
   }
   else
   {
-    if (option(OPTMENUSCROLL) || (menu->pagelen <= 0) || (c < MenuContext))
+    if (option(OPT_MENU_SCROLL) || (menu->pagelen <= 0) || (c < MenuContext))
     {
       if (menu->current < menu->top + c)
         menu->top = menu->current - c;
@@ -513,7 +513,7 @@ void menu_check_recenter(struct Menu *menu)
     }
   }
 
-  if (!option(OPTMENUMOVEOFF)) /* make entries stick to bottom */
+  if (!option(OPT_MENU_MOVE_OFF)) /* make entries stick to bottom */
     menu->top = MIN(menu->top, menu->max - menu->pagelen);
   menu->top = MAX(menu->top, 0);
 
@@ -553,7 +553,7 @@ void menu_next_line(struct Menu *menu)
     int c = MIN(MenuContext, menu->pagelen / 2);
 
     if (menu->top + 1 < menu->max - c &&
-        (option(OPTMENUMOVEOFF) ||
+        (option(OPT_MENU_MOVE_OFF) ||
          (menu->max > menu->pagelen && menu->top < menu->max - menu->pagelen)))
     {
       menu->top++;
@@ -606,7 +606,7 @@ static void menu_length_jump(struct Menu *menu, int jumplen)
       menu->top += jumplen;
 
       /* jumped too long? */
-      if ((neg || !option(OPTMENUMOVEOFF)) && DIRECTION * menu->top > tmp)
+      if ((neg || !option(OPT_MENU_MOVE_OFF)) && DIRECTION * menu->top > tmp)
         menu->top = tmp;
 
       /* need to move the cursor? */
@@ -974,7 +974,7 @@ search_next:
     r += search_dir;
   }
 
-  if (option(OPTWRAPSEARCH) && wrap++ == 0)
+  if (option(OPT_WRAP_SEARCH) && wrap++ == 0)
   {
     r = search_dir == 1 ? 0 : menu->max - 1;
     goto search_next;
@@ -1083,9 +1083,9 @@ int mutt_menu_loop(struct Menu *menu)
 
   while (true)
   {
-    if (option(OPTMENUCALLER))
+    if (option(OPT_MENU_CALLER))
     {
-      unset_option(OPTMENUCALLER);
+      unset_option(OPT_MENU_CALLER);
       return OP_NULL;
     }
 
@@ -1110,9 +1110,9 @@ int mutt_menu_loop(struct Menu *menu)
     menu->oldcurrent = menu->current;
 
     /* move the cursor out of the way */
-    if (option(OPTARROWCURSOR))
+    if (option(OPT_ARROW_CURSOR))
       mutt_window_move(menu->indexwin, menu->current - menu->top + menu->offset, 2);
-    else if (option(OPTBRAILLEFRIENDLY))
+    else if (option(OPT_BRAILLE_FRIENDLY))
       mutt_window_move(menu->indexwin, menu->current - menu->top + menu->offset, 0);
     else
       mutt_window_move(menu->indexwin, menu->current - menu->top + menu->offset,
@@ -1151,7 +1151,7 @@ int mutt_menu_loop(struct Menu *menu)
         i = -1;
       }
     }
-    else if (menu->tagged && option(OPTAUTOTAG))
+    else if (menu->tagged && option(OPT_AUTO_TAG))
       menu->tagprefix = 1;
 
     mutt_curs_set(1);
@@ -1259,7 +1259,7 @@ int mutt_menu_loop(struct Menu *menu)
       case OP_TAG:
         if (menu->tag && !menu->dialog)
         {
-          if (menu->tagprefix && !option(OPTAUTOTAG))
+          if (menu->tagprefix && !option(OPT_AUTO_TAG))
           {
             for (i = 0; i < menu->max; i++)
               menu->tagged += menu->tag(menu, i, 0);
@@ -1269,7 +1269,7 @@ int mutt_menu_loop(struct Menu *menu)
           {
             int j = menu->tag(menu, menu->current, -1);
             menu->tagged += j;
-            if (j && option(OPTRESOLVE) && menu->current < menu->max - 1)
+            if (j && option(OPT_RESOLVE) && menu->current < menu->max - 1)
             {
               menu->current++;
               menu->redraw |= REDRAW_MOTION_RESYNCH;
diff --git a/mh.c b/mh.c
index e5f337507f39d80eb282d9a61de1a0ede06c5400..834d267efa648bbc3f4850165ab7bb8c85218a48 100644 (file)
--- a/mh.c
+++ b/mh.c
@@ -306,7 +306,7 @@ int mh_buffy(struct Buffy *mailbox, int check_stats)
 
   /* when $mail_check_recent is set and the .mh_sequences file hasn't changed
    * since the last mailbox visit, there is no "new mail" */
-  if (option(OPTMAILCHECKRECENT) && mh_sequences_changed(mailbox) <= 0)
+  if (option(OPT_MAIL_CHECK_RECENT) && mh_sequences_changed(mailbox) <= 0)
   {
     rc = 0;
     check_new = 0;
@@ -338,7 +338,7 @@ int mh_buffy(struct Buffy *mailbox, int check_stats)
       {
         /* if the first unseen message we encounter was in the mailbox during the
            last visit, don't notify about it */
-        if (!option(OPTMAILCHECKRECENT) || mh_already_notified(mailbox, i) == 0)
+        if (!option(OPT_MAIL_CHECK_RECENT) || mh_already_notified(mailbox, i) == 0)
         {
           mailbox->new = true;
           rc = 1;
@@ -720,7 +720,7 @@ void maildir_parse_flags(struct Header *h, const char *path)
           break;
 
         case 'T': /* trashed */
-          if (!h->flagged || !option(OPTFLAGSAFE))
+          if (!h->flagged || !option(OPT_FLAG_SAFE))
           {
             h->trash = true;
             h->deleted = true;
@@ -839,7 +839,7 @@ static int maildir_parse_dir(struct Context *ctx, struct Maildir ***last,
   if (subdir)
   {
     snprintf(buf, sizeof(buf), "%s/%s", ctx->path, subdir);
-    is_old = option(OPTMARKOLD) ? (mutt_strcmp("cur", subdir) == 0) : false;
+    is_old = option(OPT_MARK_OLD) ? (mutt_strcmp("cur", subdir) == 0) : false;
   }
   else
     strfcpy(buf, ctx->path, sizeof(buf));
@@ -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(OPTHCACHEVERIFY))
+    if (option(OPT_HCACHE_VERIFY))
     {
       ret = stat(fn, &lastchanged);
     }
@@ -1895,10 +1895,10 @@ int mh_sync_mailbox_message(struct Context *ctx, int msgno)
   char path[_POSIX_PATH_MAX], tmp[_POSIX_PATH_MAX];
   struct Header *h = ctx->hdrs[msgno];
 
-  if (h->deleted && (ctx->magic != MUTT_MAILDIR || !option(OPTMAILDIRTRASH)))
+  if (h->deleted && (ctx->magic != MUTT_MAILDIR || !option(OPT_MAILDIR_TRASH)))
   {
     snprintf(path, sizeof(path), "%s/%s", ctx->path, h->path);
-    if (ctx->magic == MUTT_MAILDIR || (option(OPTMHPURGE) && ctx->magic == MUTT_MH))
+    if (ctx->magic == MUTT_MAILDIR || (option(OPT_MH_PURGE) && ctx->magic == MUTT_MH))
     {
 #ifdef USE_HCACHE
       if (hc)
@@ -1931,7 +1931,7 @@ int mh_sync_mailbox_message(struct Context *ctx, int msgno)
   }
   else if (h->changed || h->attach_del || h->xlabel_changed ||
            (ctx->magic == MUTT_MAILDIR &&
-            (option(OPTMAILDIRTRASH) || h->trash) && (h->deleted != h->trash)))
+            (option(OPT_MAILDIR_TRASH) || h->trash) && (h->deleted != h->trash)))
   {
     if (ctx->magic == MUTT_MAILDIR)
     {
@@ -2036,7 +2036,7 @@ static int maildir_check_mailbox(struct Context *ctx, int *index_hint)
   /* XXX seems like this check belongs in mx_check_mailbox()
    * rather than here.
    */
-  if (!option(OPTCHECKNEW))
+  if (!option(OPT_CHECK_NEW))
     return 0;
 
   snprintf(buf, sizeof(buf), "%s/new", ctx->path);
@@ -2185,7 +2185,7 @@ static int mh_check_mailbox(struct Context *ctx, int *index_hint)
   int i;
   struct MhData *data = mh_data(ctx);
 
-  if (!option(OPTCHECKNEW))
+  if (!option(OPT_CHECK_NEW))
     return 0;
 
   strfcpy(buf, ctx->path, sizeof(buf));
@@ -2342,7 +2342,7 @@ static int mh_sync_mailbox(struct Context *ctx, int *index_hint)
   {
     for (i = 0, j = 0; i < ctx->msgcount; i++)
     {
-      if (!ctx->hdrs[i]->deleted || (ctx->magic == MUTT_MAILDIR && option(OPTMAILDIRTRASH)))
+      if (!ctx->hdrs[i]->deleted || (ctx->magic == MUTT_MAILDIR && option(OPT_MAILDIR_TRASH)))
         ctx->hdrs[i]->index = j++;
     }
   }
index 3d242b738718dfd84b6cb31d26fb7f110bc46d90..988bc05ecef1a15f9a2a8cef053f914285aacd7d 100644 (file)
@@ -80,7 +80,7 @@
 #define BEEP()                                                                 \
   do                                                                           \
   {                                                                            \
-    if (option(OPTBEEP))                                                       \
+    if (option(OPT_BEEP))                                                       \
       beep();                                                                  \
   } while (0)
 
index ddd401ca11489d73a59d3a5d722144d81734d1ca..2cc371af73e37f44bdb1958b3c605c884c0735e2 100644 (file)
@@ -107,7 +107,7 @@ static char *intl_to_local(char *orig_user, char *orig_domain, int flags)
 
 #ifdef HAVE_LIBIDN
   is_idn_encoded = check_idn(local_domain);
-  if (is_idn_encoded && option(OPTIDNDECODE))
+  if (is_idn_encoded && option(OPT_IDN_DECODE))
   {
     if (idna_to_unicode_8z8z(local_domain, &tmp, IDNA_ALLOW_UNASSIGNED) != IDNA_SUCCESS)
       goto cleanup;
@@ -162,7 +162,7 @@ static char *intl_to_local(char *orig_user, char *orig_domain, int flags)
      * produce a non-matching domain!  Thus we only want to do the
      * idna_to_ascii_8z() if the original domain was IDNA encoded.
      */
-    if (is_idn_encoded && option(OPTIDNDECODE))
+    if (is_idn_encoded && option(OPT_IDN_DECODE))
     {
       if (idna_to_ascii_8z(reversed_domain, &tmp, IDNA_ALLOW_UNASSIGNED) != IDNA_SUCCESS)
       {
@@ -214,7 +214,7 @@ static char *local_to_intl(char *user, char *domain)
     goto cleanup;
 
 #ifdef HAVE_LIBIDN
-  if (option(OPTIDNENCODE))
+  if (option(OPT_IDN_ENCODE))
   {
     if (idna_to_ascii_8z(intl_domain, &tmp, IDNA_ALLOW_UNASSIGNED) != IDNA_SUCCESS)
       goto cleanup;
index 81ef916fa8b996006994c7b271458da4c0bbe3e5..584d8da606a6df5536d16bd6fbc89c111a8cd99a 100644 (file)
@@ -389,7 +389,7 @@ int mutt_sasl_interact(sasl_interact_t *interaction)
 
     snprintf(prompt, sizeof(prompt), "%s: ", interaction->prompt);
     resp[0] = '\0';
-    if (option(OPTNOCURSES) || mutt_get_field(prompt, resp, sizeof(resp), 0))
+    if (option(OPT_NO_CURSES) || mutt_get_field(prompt, resp, sizeof(resp), 0))
       return SASL_FAIL;
 
     interaction->len = mutt_strlen(resp) + 1;
index 7174dddc5004bfe4c5128017d06952548191b74e..d525791a71637169129e1de00f050fad61890950 100644 (file)
@@ -466,7 +466,7 @@ int raw_socket_open(struct Connection *conn)
   /* we accept v4 or v6 STREAM sockets */
   memset(&hints, 0, sizeof(hints));
 
-  if (option(OPTUSEIPV6))
+  if (option(OPT_USE_IPV6))
     hints.ai_family = AF_UNSPEC;
   else
     hints.ai_family = AF_INET;
@@ -485,7 +485,7 @@ int raw_socket_open(struct Connection *conn)
   host_idna = conn->account.host;
 #endif
 
-  if (!option(OPTNOCURSES))
+  if (!option(OPT_NO_CURSES))
     mutt_message(_("Looking up %s..."), conn->account.host);
 
   rc = getaddrinfo(host_idna, port, &hints, &res);
@@ -501,7 +501,7 @@ int raw_socket_open(struct Connection *conn)
     return -1;
   }
 
-  if (!option(OPTNOCURSES))
+  if (!option(OPT_NO_CURSES))
     mutt_message(_("Connecting to %s..."), conn->account.host);
 
   rc = -1;
@@ -543,7 +543,7 @@ int raw_socket_open(struct Connection *conn)
   host_idna = conn->account.host;
 #endif
 
-  if (!option(OPTNOCURSES))
+  if (!option(OPT_NO_CURSES))
     mutt_message(_("Looking up %s..."), conn->account.host);
 
   he = gethostbyname(host_idna);
@@ -559,7 +559,7 @@ int raw_socket_open(struct Connection *conn)
     return -1;
   }
 
-  if (!option(OPTNOCURSES))
+  if (!option(OPT_NO_CURSES))
     mutt_message(_("Connecting to %s..."), conn->account.host);
 
   rc = -1;
index bbef1ad7d2d6a146aa812848ac12350f48aa32d1..9338d551a9126d87881b8881ac20c6a0c9886c53 100644 (file)
@@ -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(OPTSSLVERIFYPARTIAL))
+  if (option(OPT_SSL_VERIFY_PARTIAL))
   {
     param = X509_VERIFY_PARAM_new();
     if (param)
@@ -416,7 +416,7 @@ static bool compare_certificates(X509 *cert, X509 *peercert,
 
 static bool check_certificate_expiration(X509 *peercert, bool silent)
 {
-  if (option(OPTSSLVERIFYDATES) != MUTT_NO)
+  if (option(OPT_SSL_VERIFY_DATES) != MUTT_NO)
   {
     if (X509_cmp_current_time(X509_get_notBefore(peercert)) >= 0)
     {
@@ -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(OPTSSLVERIFYPARTIAL)))
+  if ((idx != 0) && (option(OPT_SSL_VERIFY_PARTIAL)))
     allow_skip = 1;
 #endif
 
@@ -887,7 +887,7 @@ static int interactive_check_cert(X509 *cert, int idx, int len, SSL *ssl, int al
   menu->help = helpstr;
 
   done = 0;
-  set_option(OPTIGNOREMACROEVENTS);
+  set_option(OPT_IGNORE_MACRO_EVENTS);
   while (!done)
   {
     switch (mutt_menu_loop(menu))
@@ -931,7 +931,7 @@ static int interactive_check_cert(X509 *cert, int idx, int len, SSL *ssl, int al
         break;
     }
   }
-  unset_option(OPTIGNOREMACROEVENTS);
+  unset_option(OPT_IGNORE_MACRO_EVENTS);
   mutt_pop_current_menu(menu);
   mutt_menu_destroy(&menu);
   mutt_debug(2, "ssl interactive_check_cert: done=%d\n", done);
@@ -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(OPTSSLVERIFYPARTIAL))
+  if (option(OPT_SSL_VERIFY_PARTIAL))
   {
     if (skip_mode && preverify_ok && (pos == last_pos) && last_cert)
     {
@@ -1026,7 +1026,7 @@ static int ssl_verify_callback(int preverify_ok, X509_STORE_CTX *ctx)
 
   /* check hostname only for the leaf certificate */
   buf[0] = 0;
-  if (pos == 0 && option(OPTSSLVERIFYHOST) != MUTT_NO)
+  if (pos == 0 && option(OPT_SSL_VERIFY_HOST) != MUTT_NO)
   {
     if (!check_host(cert, host, buf, sizeof(buf)))
     {
@@ -1160,7 +1160,7 @@ static int ssl_socket_open(struct Connection *conn)
   }
 
   /* disable SSL protocols as needed */
-  if (!option(OPTTLSV1))
+  if (!option(OPT_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(OPTTLSV1_1))
+  if (!option(OPT_TLSV1_1))
   {
     SSL_CTX_set_options(data->ctx, SSL_OP_NO_TLSv1_1);
   }
 #endif
 #ifdef SSL_OP_NO_TLSv1_2
-  if (!option(OPTTLSV1_2))
+  if (!option(OPT_TLSV1_2))
   {
     SSL_CTX_set_options(data->ctx, SSL_OP_NO_TLSv1_2);
   }
 #endif
-  if (!option(OPTSSLV2))
+  if (!option(OPT_SSLV2))
   {
     SSL_CTX_set_options(data->ctx, SSL_OP_NO_SSLv2);
   }
-  if (!option(OPTSSLV3))
+  if (!option(OPT_SSLV3))
   {
     SSL_CTX_set_options(data->ctx, SSL_OP_NO_SSLv3);
   }
 
-  if (option(OPTSSLSYSTEMCERTS))
+  if (option(OPT_SSL_SYSTEM_CERTS))
   {
     if (!SSL_CTX_set_default_verify_paths(data->ctx))
     {
@@ -1258,15 +1258,15 @@ int mutt_ssl_starttls(struct Connection *conn)
     goto bail_ssldata;
   }
 #ifdef SSL_OP_NO_TLSv1_2
-  if (!option(OPTTLSV1_2))
+  if (!option(OPT_TLSV1_2))
     ssl_options |= SSL_OP_NO_TLSv1_2;
 #endif
 #ifdef SSL_OP_NO_TLSv1_1
-  if (!option(OPTTLSV1_1))
+  if (!option(OPT_TLSV1_1))
     ssl_options |= SSL_OP_NO_TLSv1_1;
 #endif
 #ifdef SSL_OP_NO_TLSv1
-  if (!option(OPTTLSV1))
+  if (!option(OPT_TLSV1))
     ssl_options |= SSL_OP_NO_TLSv1;
 #endif
 /* these are always set */
@@ -1282,7 +1282,7 @@ int mutt_ssl_starttls(struct Connection *conn)
     goto bail_ctx;
   }
 
-  if (option(OPTSSLSYSTEMCERTS))
+  if (option(OPT_SSL_SYSTEM_CERTS))
   {
     if (!SSL_CTX_set_default_verify_paths(ssldata->ctx))
     {
index 09de85569b3bb7753dcb60bbdc50c0d530b8a071..ae719915d3e8f7f8deca9c659d5a3357091e93f3 100644 (file)
@@ -385,7 +385,7 @@ static int tls_check_preauth(const gnutls_datum_t *certdata,
     return -1;
   }
 
-  if (option(OPTSSLVERIFYDATES) != MUTT_NO)
+  if (option(OPT_SSL_VERIFY_DATES) != MUTT_NO)
   {
     if (gnutls_x509_crt_get_expiration_time(cert) < time(NULL))
       *certerr |= CERTERR_EXPIRED;
@@ -393,7 +393,7 @@ static int tls_check_preauth(const gnutls_datum_t *certdata,
       *certerr |= CERTERR_NOTYETVALID;
   }
 
-  if (chainidx == 0 && option(OPTSSLVERIFYHOST) != MUTT_NO &&
+  if (chainidx == 0 && option(OPT_SSL_VERIFY_HOST) != MUTT_NO &&
       !gnutls_x509_crt_check_hostname(cert, hostname) &&
       !tls_check_stored_hostname(certdata, hostname))
     *certerr |= CERTERR_HOSTNAME;
@@ -726,7 +726,7 @@ static int tls_check_one_certificate(const gnutls_datum_t *certdata,
   menu->help = helpstr;
 
   done = 0;
-  set_option(OPTIGNOREMACROEVENTS);
+  set_option(OPT_IGNORE_MACRO_EVENTS);
   while (!done)
   {
     switch (mutt_menu_loop(menu))
@@ -777,7 +777,7 @@ static int tls_check_one_certificate(const gnutls_datum_t *certdata,
         break;
     }
   }
-  unset_option(OPTIGNOREMACROEVENTS);
+  unset_option(OPT_IGNORE_MACRO_EVENTS);
   mutt_pop_current_menu(menu);
   mutt_menu_destroy(&menu);
   gnutls_x509_crt_deinit(cert);
@@ -935,22 +935,22 @@ static int tls_set_priority(struct TlsSockData *data)
   else
     safe_strcat(priority, priority_size, "NORMAL");
 
-  if (!option(OPTTLSV1_2))
+  if (!option(OPT_TLSV1_2))
   {
     nproto--;
     safe_strcat(priority, priority_size, ":-VERS-TLS1.2");
   }
-  if (!option(OPTTLSV1_1))
+  if (!option(OPT_TLSV1_1))
   {
     nproto--;
     safe_strcat(priority, priority_size, ":-VERS-TLS1.1");
   }
-  if (!option(OPTTLSV1))
+  if (!option(OPT_TLSV1))
   {
     nproto--;
     safe_strcat(priority, priority_size, ":-VERS-TLS1.0");
   }
-  if (!option(OPTSSLV3))
+  if (!option(OPT_SSLV3))
   {
     nproto--;
     safe_strcat(priority, priority_size, ":-VERS-SSL3.0");
@@ -986,13 +986,13 @@ static int tls_set_priority(struct TlsSockData *data)
 {
   size_t nproto = 0; /* number of tls/ssl protocols */
 
-  if (option(OPTTLSV1_2))
+  if (option(OPT_TLSV1_2))
     protocol_priority[nproto++] = GNUTLS_TLS1_2;
-  if (option(OPTTLSV1_1))
+  if (option(OPT_TLSV1_1))
     protocol_priority[nproto++] = GNUTLS_TLS1_1;
-  if (option(OPTTLSV1))
+  if (option(OPT_TLSV1))
     protocol_priority[nproto++] = GNUTLS_TLS1;
-  if (option(OPTSSLV3))
+  if (option(OPT_SSLV3))
     protocol_priority[nproto++] = GNUTLS_SSL3;
   protocol_priority[nproto] = 0;
 
@@ -1123,7 +1123,7 @@ static int tls_negotiate(struct Connection *conn)
 
   tls_get_client_cert(conn);
 
-  if (!option(OPTNOCURSES))
+  if (!option(OPT_NO_CURSES))
   {
     mutt_message(_("SSL/TLS connection using %s (%s/%s/%s)"),
                  gnutls_protocol_get_name(gnutls_protocol_get_version(data->state)),
index 0c0bae79235b95a04f327ac80661e498928e8761..72ebadc7d0ead365a31f7cdcb2ef42ff1c8f855b 100644 (file)
--- a/muttlib.c
+++ b/muttlib.c
@@ -1135,7 +1135,7 @@ void mutt_save_path(char *d, size_t dsize, struct Address *a)
   if (a && a->mailbox)
   {
     strfcpy(d, a->mailbox, dsize);
-    if (!option(OPTSAVEADDRESS))
+    if (!option(OPT_SAVE_ADDRESS))
     {
       char *p = NULL;
 
@@ -1284,7 +1284,7 @@ void mutt_expando_format(char *dest, size_t destlen, size_t col, int cols,
 
   prefix[0] = '\0';
   destlen--; /* save room for the terminal \0 */
-  wlen = ((flags & MUTT_FORMAT_ARROWCURSOR) && option(OPTARROWCURSOR)) ? 3 : 0;
+  wlen = ((flags & MUTT_FORMAT_ARROWCURSOR) && option(OPT_ARROW_CURSOR)) ? 3 : 0;
   col += wlen;
 
   if ((flags & MUTT_FORMAT_NOFILTER) == 0)
@@ -1355,7 +1355,7 @@ void mutt_expando_format(char *dest, size_t destlen, size_t col, int cols,
 
       col -= wlen; /* reset to passed in value */
       wptr = dest; /* reset write ptr */
-      wlen = ((flags & MUTT_FORMAT_ARROWCURSOR) && option(OPTARROWCURSOR)) ? 3 : 0;
+      wlen = ((flags & MUTT_FORMAT_ARROWCURSOR) && option(OPT_ARROW_CURSOR)) ? 3 : 0;
       if ((pid = mutt_create_filter(command->data, NULL, &filter, NULL)) != -1)
       {
         int rc;
@@ -1626,7 +1626,7 @@ void mutt_expando_format(char *dest, size_t destlen, size_t col, int cols,
           else if (soft && pad < 0)
           {
             int offset =
-                ((flags & MUTT_FORMAT_ARROWCURSOR) && option(OPTARROWCURSOR)) ? 3 : 0;
+                ((flags & MUTT_FORMAT_ARROWCURSOR) && option(OPT_ARROW_CURSOR)) ? 3 : 0;
             int avail_cols = (cols > offset) ? (cols - offset) : 0;
             /* \0-terminate dest for length computation in mutt_wstr_trunc() */
             *wptr = 0;
@@ -1836,7 +1836,7 @@ int mutt_save_confirm(const char *s, struct stat *st)
 
   if (magic > 0 && !mx_access(s, W_OK))
   {
-    if (option(OPTCONFIRMAPPEND))
+    if (option(OPT_CONFIRM_APPEND))
     {
       snprintf(tmp, sizeof(tmp), _("Append messages to %s?"), s);
       if ((rc = mutt_yesorno(tmp, MUTT_YES)) == MUTT_NO)
@@ -1870,7 +1870,7 @@ int mutt_save_confirm(const char *s, struct stat *st)
     /* pathname does not exist */
     if (errno == ENOENT)
     {
-      if (option(OPTCONFIRMCREATE))
+      if (option(OPT_CONFIRM_CREATE))
       {
         snprintf(tmp, sizeof(tmp), _("Create %s?"), s);
         if ((rc = mutt_yesorno(tmp, MUTT_YES)) == MUTT_NO)
@@ -1879,7 +1879,7 @@ int mutt_save_confirm(const char *s, struct stat *st)
           ret = -1;
       }
 
-      /* user confirmed with MUTT_YES or set OPTCONFIRMCREATE */
+      /* user confirmed with MUTT_YES or set OPT_CONFIRM_CREATE */
       if (ret == 0)
       {
         strncpy(tmp, s, sizeof(tmp) - 1);
diff --git a/mx.c b/mx.c
index b0417f4050e7db4703040de2ed4e3b5cd37f8d31..29bc0f9a26766ed29804eed0974343cd2e9a3dc3 100644 (file)
--- a/mx.c
+++ b/mx.c
@@ -432,7 +432,7 @@ int mx_get_magic(const char *path)
     }
     safe_fclose(&f);
 
-    if (!option(OPTCHECKMBOXSIZE))
+    if (!option(OPT_CHECK_MBOX_SIZE))
     {
       /* need to restore the times here, the file was not really accessed,
        * only the type was accessed.  This is important, because detection
@@ -619,7 +619,7 @@ struct Context *mx_open_mailbox(const char *path, int flags, struct Context *pct
    * mutt_refresh() will think we are in the middle of a macro.  so set a
    * flag to indicate that we should really refresh the screen.
    */
-  set_option(OPTFORCEREFRESH);
+  set_option(OPT_FORCE_REFRESH);
 
   if (!ctx->quiet)
     mutt_message(_("Reading %s..."), ctx->path);
@@ -632,8 +632,8 @@ struct Context *mx_open_mailbox(const char *path, int flags, struct Context *pct
     {
       /* avoid unnecessary work since the mailbox is completely unthreaded
          to begin with */
-      unset_option(OPTSORTSUBTHREADS);
-      unset_option(OPTNEEDRESCORE);
+      unset_option(OPT_SORT_SUBTHREADS);
+      unset_option(OPT_NEED_RESCORE);
       mutt_sort_headers(ctx, 1);
     }
     if (!ctx->quiet)
@@ -648,7 +648,7 @@ struct Context *mx_open_mailbox(const char *path, int flags, struct Context *pct
       FREE(&ctx);
   }
 
-  unset_option(OPTFORCEREFRESH);
+  unset_option(OPT_FORCE_REFRESH);
   return ctx;
 }
 
@@ -721,7 +721,7 @@ static int trash_append(struct Context *ctx)
   struct stat st, stc;
   int opt_confappend, rc;
 
-  if (!TrashPath || !ctx->deleted || (ctx->magic == MUTT_MAILDIR && option(OPTMAILDIRTRASH)))
+  if (!TrashPath || !ctx->deleted || (ctx->magic == MUTT_MAILDIR && option(OPT_MAILDIR_TRASH)))
     return 0;
 
   for (i = 0; i < ctx->msgcount; i++)
@@ -731,12 +731,12 @@ static int trash_append(struct Context *ctx)
     return 0; /* nothing to be done */
 
   /* avoid the "append messages" prompt */
-  opt_confappend = option(OPTCONFIRMAPPEND);
+  opt_confappend = option(OPT_CONFIRM_APPEND);
   if (opt_confappend)
-    unset_option(OPTCONFIRMAPPEND);
+    unset_option(OPT_CONFIRM_APPEND);
   rc = mutt_save_confirm(TrashPath, &st);
   if (opt_confappend)
-    set_option(OPTCONFIRMAPPEND);
+    set_option(OPT_CONFIRM_APPEND);
   if (rc != 0)
   {
     mutt_error(_("message(s) not deleted"));
@@ -824,7 +824,7 @@ int mx_close_mailbox(struct Context *ctx, int *index_hint)
   for (i = 0; i < ctx->msgcount; i++)
   {
     if (!ctx->hdrs[i]->deleted && ctx->hdrs[i]->read &&
-        !(ctx->hdrs[i]->flagged && option(OPTKEEPFLAGGED)))
+        !(ctx->hdrs[i]->flagged && option(OPT_KEEP_FLAGGED)))
       read_msgs++;
   }
 
@@ -865,7 +865,7 @@ int mx_close_mailbox(struct Context *ctx, int *index_hint)
    * There is no point in asking whether or not to purge if we are
    * just marking messages as "trash".
    */
-  if (ctx->deleted && !(ctx->magic == MUTT_MAILDIR && option(OPTMAILDIRTRASH)))
+  if (ctx->deleted && !(ctx->magic == MUTT_MAILDIR && option(OPT_MAILDIR_TRASH)))
   {
     snprintf(buf, sizeof(buf),
              ctx->deleted == 1 ? _("Purge %d deleted message?") :
@@ -878,7 +878,7 @@ int mx_close_mailbox(struct Context *ctx, int *index_hint)
     }
   }
 
-  if (option(OPTMARKOLD))
+  if (option(OPT_MARK_OLD))
   {
     for (i = 0; i < ctx->msgcount; i++)
     {
@@ -901,7 +901,7 @@ int mx_close_mailbox(struct Context *ctx, int *index_hint)
       /* tag messages for moving, and clear old tags, if any */
       for (i = 0; i < ctx->msgcount; i++)
         if (ctx->hdrs[i]->read && !ctx->hdrs[i]->deleted &&
-            !(ctx->hdrs[i]->flagged && option(OPTKEEPFLAGGED)))
+            !(ctx->hdrs[i]->flagged && option(OPT_KEEP_FLAGGED)))
           ctx->hdrs[i]->tagged = true;
         else
           ctx->hdrs[i]->tagged = false;
@@ -928,7 +928,7 @@ int mx_close_mailbox(struct Context *ctx, int *index_hint)
       for (i = 0; i < ctx->msgcount; i++)
       {
         if (ctx->hdrs[i]->read && !ctx->hdrs[i]->deleted &&
-            !(ctx->hdrs[i]->flagged && option(OPTKEEPFLAGGED)))
+            !(ctx->hdrs[i]->flagged && option(OPT_KEEP_FLAGGED)))
         {
           if (mutt_append_message(&f, ctx, ctx->hdrs[i], 0, CH_UPDATE_LEN) == 0)
           {
@@ -1010,7 +1010,7 @@ int mx_close_mailbox(struct Context *ctx, int *index_hint)
   }
 
   if (ctx->msgcount == ctx->deleted && (ctx->magic == MUTT_MMDF || ctx->magic == MUTT_MBOX) &&
-      !mutt_is_spool(ctx->path) && !option(OPTSAVEEMPTY))
+      !mutt_is_spool(ctx->path) && !option(OPT_SAVE_EMPTY))
     mx_unlink_empty(ctx->path);
 
 #ifdef USE_SIDEBAR
@@ -1057,7 +1057,7 @@ void mx_update_tables(struct Context *ctx, int committing)
   {
     if (!ctx->hdrs[i]->quasi_deleted &&
         ((committing && (!ctx->hdrs[i]->deleted ||
-                         (ctx->magic == MUTT_MAILDIR && option(OPTMAILDIRTRASH)))) ||
+                         (ctx->magic == MUTT_MAILDIR && option(OPT_MAILDIR_TRASH)))) ||
          (!committing && ctx->hdrs[i]->active)))
     {
       if (i != j)
@@ -1078,7 +1078,7 @@ void mx_update_tables(struct Context *ctx, int committing)
       else if (ctx->hdrs[j]->changed)
         ctx->changed = true;
 
-      if (!committing || (ctx->magic == MUTT_MAILDIR && option(OPTMAILDIRTRASH)))
+      if (!committing || (ctx->magic == MUTT_MAILDIR && option(OPT_MAILDIR_TRASH)))
       {
         if (ctx->hdrs[j]->deleted)
           ctx->deleted++;
@@ -1223,7 +1223,7 @@ int mx_sync_mailbox(struct Context *ctx, int *index_hint)
     mutt_sleep(0);
 
     if (ctx->msgcount == ctx->deleted && (ctx->magic == MUTT_MBOX || ctx->magic == MUTT_MMDF) &&
-        !mutt_is_spool(ctx->path) && !option(OPTSAVEEMPTY))
+        !mutt_is_spool(ctx->path) && !option(OPT_SAVE_EMPTY))
     {
       unlink(ctx->path);
       mx_fastclose_mailbox(ctx);
@@ -1459,7 +1459,7 @@ void mx_update_context(struct Context *ctx, int new_messages)
       if (h2)
       {
         h2->superseded = true;
-        if (option(OPTSCORE))
+        if (option(OPT_SCORE))
           mutt_score_message(ctx, h2, 1);
       }
     }
@@ -1471,7 +1471,7 @@ void mx_update_context(struct Context *ctx, int new_messages)
       hash_insert(ctx->subj_hash, h->env->real_subj, h);
     mutt_label_hash_add(ctx, h);
 
-    if (option(OPTSCORE))
+    if (option(OPT_SCORE))
       mutt_score_message(ctx, h, 0);
 
     if (h->changed)
index b83ac44831a91f6a6f5d6f84690723c06068d10f..ed1b9f4eadf2a699d5a52d03851c696a7058f7ac 100644 (file)
@@ -66,7 +66,7 @@ void crypt_current_time(struct State *s, char *app_name)
   if (!WithCrypto)
     return;
 
-  if (option(OPTCRYPTTIMESTAMP))
+  if (option(OPT_CRYPT_TIMESTAMP))
   {
     t = time(NULL);
     strftime(p, sizeof(p), _(" (current time: %c)"), localtime(&t));
@@ -193,7 +193,7 @@ int mutt_protect(struct Header *msg, char *keylist)
   if ((WithCrypto & APPLICATION_PGP))
     tmp_pgp_pbody = msg->content;
 
-  if (option(OPTCRYPTUSEPKA) && (msg->security & SIGN))
+  if (option(OPT_CRYPT_USE_PKA) && (msg->security & SIGN))
   {
     /* Set sender (necessary for e.g. PKA).  */
     const char *mailbox = NULL;
@@ -225,7 +225,7 @@ int mutt_protect(struct Header *msg, char *keylist)
     }
 
     if ((WithCrypto & APPLICATION_PGP) && (msg->security & APPLICATION_PGP) &&
-        (!(flags & ENCRYPT) || option(OPTPGPRETAINABLESIG)))
+        (!(flags & ENCRYPT) || option(OPT_PGP_RETAINABLE_SIG)))
     {
       if (!(tmp_pbody = crypt_pgp_sign_message(msg->content)))
         return -1;
@@ -650,7 +650,7 @@ void convert_to_7bit(struct Body *a)
         a->encoding = ENC7BIT;
         convert_to_7bit(a->parts);
       }
-      else if ((WithCrypto & APPLICATION_PGP) && option(OPTPGPSTRICTENC))
+      else if ((WithCrypto & APPLICATION_PGP) && option(OPT_PGP_STRICT_ENC))
         convert_to_7bit(a->parts);
     }
     else if (a->type == TYPEMESSAGE &&
@@ -664,7 +664,7 @@ void convert_to_7bit(struct Body *a)
     else if (a->encoding == ENCBINARY)
       a->encoding = ENCBASE64;
     else if (a->content && a->encoding != ENCBASE64 &&
-             (a->content->from || (a->content->space && option(OPTPGPSTRICTENC))))
+             (a->content->from || (a->content->space && option(OPT_PGP_STRICT_ENC))))
       a->encoding = ENCQUOTEDPRINTABLE;
     a = a->next;
   }
@@ -688,7 +688,7 @@ void crypt_extract_keys_from_messages(struct Header *h)
   }
 
   if ((WithCrypto & APPLICATION_PGP))
-    set_option(OPTDONTHANDLEPGPKEYS);
+    set_option(OPT_DONT_HANDLE_PGP_KEYS);
 
   if (!h)
   {
@@ -787,7 +787,7 @@ void crypt_extract_keys_from_messages(struct Header *h)
   mutt_unlink(tempfname);
 
   if ((WithCrypto & APPLICATION_PGP))
-    unset_option(OPTDONTHANDLEPGPKEYS);
+    unset_option(OPT_DONT_HANDLE_PGP_KEYS);
 }
 
 /**
@@ -814,7 +814,7 @@ int crypt_get_keys(struct Header *msg, char **keylist, int oppenc_mode)
     return 0;
 
   if ((WithCrypto & APPLICATION_PGP))
-    set_option(OPTPGPCHECKTRUST);
+    set_option(OPT_PGP_CHECK_TRUST);
 
   last = rfc822_append(&adrlist, msg->env->to, 0);
   last = rfc822_append(last ? &last : &adrlist, msg->env->cc, 0);
@@ -835,8 +835,8 @@ int crypt_get_keys(struct Header *msg, char **keylist, int oppenc_mode)
         rfc822_free_address(&adrlist);
         return -1;
       }
-      unset_option(OPTPGPCHECKTRUST);
-      if (option(OPTPGPSELFENCRYPT) || (quadoption(OPT_PGPENCRYPTSELF) == MUTT_YES))
+      unset_option(OPT_PGP_CHECK_TRUST);
+      if (option(OPT_PGP_SELF_ENCRYPT) || (quadoption(OPT_PGPENCRYPTSELF) == MUTT_YES))
         self_encrypt = PgpSelfEncryptAs;
     }
     if ((WithCrypto & APPLICATION_SMIME) && (msg->security & APPLICATION_SMIME))
@@ -846,7 +846,7 @@ int crypt_get_keys(struct Header *msg, char **keylist, int oppenc_mode)
         rfc822_free_address(&adrlist);
         return -1;
       }
-      if (option(OPTSMIMESELFENCRYPT) || (quadoption(OPT_SMIMEENCRYPTSELF) == MUTT_YES))
+      if (option(OPT_SMIME_SELF_ENCRYPT) || (quadoption(OPT_SMIMEENCRYPTSELF) == MUTT_YES))
         self_encrypt = SmimeSelfEncryptAs;
     }
   }
@@ -876,7 +876,7 @@ void crypt_opportunistic_encrypt(struct Header *msg)
   if (!WithCrypto)
     return;
 
-  if (!(option(OPTCRYPTOPPORTUNISTICENCRYPT) && (msg->security & OPPENCRYPT)))
+  if (!(option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT) && (msg->security & OPPENCRYPT)))
     return;
 
   crypt_get_keys(msg, &pgpkeylist, 1);
@@ -1058,7 +1058,7 @@ const char *crypt_get_fingerprint_or_id(char *p, const char **pphint,
   size_t hexdigits;
 
   /* User input may be partial name, fingerprint or short or long key ID,
-   * independent of OPTPGPLONGIDS.
+   * independent of OPT_PGP_LONG_IDS.
    * Fingerprint without spaces is 40 hex digits (SHA-1) or 32 hex digits (MD5).
    * Strip leading "0x" for key ID detection and prepare pl and ps to indicate
    * if an ID was found and to simplify logic in the key loop's inner
index 9c4f73dbf8fa2765ff02a131621957859b8c243b..8601630cb76ff47ea52bc5e62aa9bb279b33a548 100644 (file)
@@ -199,7 +199,7 @@ static const char *crypt_keyid(struct CryptKeyInfo *k)
   if (k->kobj && k->kobj->subkeys)
   {
     s = k->kobj->subkeys->keyid;
-    if ((!option(OPTPGPLONGIDS)) && (strlen(s) == 16))
+    if ((!option(OPT_PGP_LONG_IDS)) && (strlen(s) == 16))
       /* Return only the short keyID.  */
       s += 8;
   }
@@ -866,7 +866,7 @@ static char *encrypt_gpgme_object(gpgme_data_t plaintext, gpgme_key_t *rset,
       return NULL;
     }
 
-    if (option(OPTCRYPTUSEPKA))
+    if (option(OPT_CRYPT_USE_PKA))
     {
       err = set_pka_sig_notation(ctx);
       if (err)
@@ -987,7 +987,7 @@ static struct Body *sign_message(struct Body *a, int use_smime)
     return NULL;
   }
 
-  if (option(OPTCRYPTUSEPKA))
+  if (option(OPT_CRYPT_USE_PKA))
   {
     err = set_pka_sig_notation(ctx);
     if (err)
@@ -1320,7 +1320,7 @@ static int show_sig_summary(unsigned long sum, gpgme_ctx_t ctx, gpgme_key_t key,
     state_puts("\n", s);
   }
 
-  if (option(OPTCRYPTUSEPKA))
+  if (option(OPT_CRYPT_USE_PKA))
   {
     if (sig->pka_trust == 1 && sig->pka_address)
     {
@@ -4110,7 +4110,7 @@ static struct CryptKeyInfo *crypt_select_key(struct CryptKeyInfo *keys,
   key_table = NULL;
   for (k = keys; k; k = k->next)
   {
-    if (!option(OPTPGPSHOWUNUSABLE) && (k->flags & KEYFLAG_CANTUSE))
+    if (!option(OPT_PGP_SHOW_UNUSABLE) && (k->flags & KEYFLAG_CANTUSE))
     {
       unusable = true;
       continue;
@@ -4216,7 +4216,7 @@ static struct CryptKeyInfo *crypt_select_key(struct CryptKeyInfo *keys,
       case OP_GENERIC_SELECT_ENTRY:
         /* FIXME make error reporting more verbose - this should be
              easy because gpgme provides more information */
-        if (option(OPTPGPCHECKTRUST))
+        if (option(OPT_PGP_CHECK_TRUST))
         {
           if (!crypt_key_is_valid(key_table[menu->current]))
           {
@@ -4226,7 +4226,7 @@ static struct CryptKeyInfo *crypt_select_key(struct CryptKeyInfo *keys,
           }
         }
 
-        if (option(OPTPGPCHECKTRUST) && (!crypt_id_is_valid(key_table[menu->current]) ||
+        if (option(OPT_PGP_CHECK_TRUST) && (!crypt_id_is_valid(key_table[menu->current]) ||
                                          !crypt_id_is_strong(key_table[menu->current])))
         {
           const char *warn_s = NULL;
@@ -4575,7 +4575,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(OPTCRYPTCONFIRMHOOK))
+        if (!oppenc_mode && option(OPT_CRYPT_CONFIRM_HOOK))
         {
           snprintf(buf, sizeof(buf), _("Use keyID = \"%s\" for %s?"),
                    crypt_hook_val, p->mailbox);
@@ -4687,7 +4687,7 @@ struct Body *pgp_gpgme_make_key_attachment(char *tempf)
   char buff[LONG_STRING];
   struct stat sb;
 
-  unset_option(OPTPGPCHECKTRUST);
+  unset_option(OPT_PGP_CHECK_TRUST);
 
   key = crypt_ask_for_key(_("Please enter the key ID: "), NULL, 0, APPLICATION_PGP, NULL);
   if (!key)
@@ -4805,7 +4805,7 @@ static int gpgme_send_menu(struct Header *msg, int is_smime)
    * NOTE: "Signing" and "Clearing" only adjust the sign bit, so we have different
    *       letter choices for those.
    */
-  if (option(OPTCRYPTOPPORTUNISTICENCRYPT) && (msg->security & OPPENCRYPT))
+  if (option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT) && (msg->security & OPPENCRYPT))
   {
     if (is_smime)
     {
@@ -4830,7 +4830,7 @@ static int gpgme_send_menu(struct Header *msg, int is_smime)
    * Opportunistic encryption option is set, but is toggled off
    * for this message.
    */
-  else if (option(OPTCRYPTOPPORTUNISTICENCRYPT))
+  else if (option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT))
   {
     if (is_smime)
     {
index c489ddc02f5f67c2cea83e83ea042cf379f36b52..19bc64deb998105df83470f03f5c9507fe00f78f 100644 (file)
@@ -71,7 +71,7 @@ void crypt_init(void)
 #ifdef CRYPT_BACKEND_CLASSIC_PGP
   if (
 #ifdef CRYPT_BACKEND_GPGME
-      (!option(OPTCRYPTUSEGPGME))
+      (!option(OPT_CRYPT_USE_GPGME))
 #else
       1
 #endif
@@ -82,7 +82,7 @@ void crypt_init(void)
 #ifdef CRYPT_BACKEND_CLASSIC_SMIME
   if (
 #ifdef CRYPT_BACKEND_GPGME
-      (!option(OPTCRYPTUSEGPGME))
+      (!option(OPT_CRYPT_USE_GPGME))
 #else
       1
 #endif
@@ -90,7 +90,7 @@ void crypt_init(void)
     crypto_module_register(&crypt_mod_smime_classic);
 #endif
 
-  if (option(OPTCRYPTUSEGPGME))
+  if (option(OPT_CRYPT_USE_GPGME))
   {
 #ifdef CRYPT_BACKEND_GPGME
     crypto_module_register(&crypt_mod_pgp_gpgme);
index 991e53abf411dfc7e36a43a618c5f8c5e8841daf..8d063c29bdc96aebc7e02a8f0f6260a3e34d18f2 100644 (file)
@@ -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(OPTPGPIGNORESUB))))
+        if (!(is_uid || is_fpr || (*is_subkey && option(OPT_PGP_IGNORE_SUB))))
           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(OPTPGPIGNORESUB)))
+        if (!is_uid && !(*is_subkey && option(OPT_PGP_IGNORE_SUB)))
           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(OPTPGPIGNORESUB)) && mutt_atos(p, &tmp.keylen) < 0)
+        if (!(*is_subkey && option(OPT_PGP_IGNORE_SUB)) && 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(OPTPGPIGNORESUB)))
+        if (!(*is_subkey && option(OPT_PGP_IGNORE_SUB)))
         {
           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(OPTPGPIGNORESUB)))
+        if (!(*is_subkey && option(OPT_PGP_IGNORE_SUB)))
           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(OPTPGPIGNORESUB)))
+        if (!is_uid && (*is_subkey && option(OPT_PGP_IGNORE_SUB)))
           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(OPTPGPIGNORESUB) ||
+        if (!is_uid && (!*is_subkey || !option(OPT_PGP_IGNORE_SUB) ||
                         !((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(OPTPGPIGNORESUB))))
+  if (!(is_uid || is_fpr || (*is_subkey && option(OPT_PGP_IGNORE_SUB))))
     k = safe_malloc(sizeof(*k));
   memcpy(k, &tmp, sizeof(*k));
   /* fixup parentship of uids after merging the temp key into
index 2395c26a7cee0c0872dbc481572e38f50c411e92..28bb2813b0635d40e2aef459c98f0cff1c54ee9a 100644 (file)
@@ -107,7 +107,7 @@ bool pgp_use_gpg_agent(void)
   char *tty = NULL;
 
   /* GnuPG 2.1 no longer exports GPG_AGENT_INFO */
-  if (!option(OPTUSEGPGAGENT))
+  if (!option(OPT_USE_GPG_AGENT))
     return false;
 
   if ((tty = ttyname(0)))
@@ -121,7 +121,7 @@ bool pgp_use_gpg_agent(void)
 
 static struct PgpKeyInfo *_pgp_parent(struct PgpKeyInfo *k)
 {
-  if ((k->flags & KEYFLAG_SUBKEY) && k->parent && option(OPTPGPIGNORESUB))
+  if ((k->flags & KEYFLAG_SUBKEY) && k->parent && option(OPT_PGP_IGNORE_SUB))
     k = k->parent;
 
   return k;
@@ -150,7 +150,7 @@ char *pgp_keyid(struct PgpKeyInfo *k)
 
 char *_pgp_keyid(struct PgpKeyInfo *k)
 {
-  if (option(OPTPGPLONGIDS))
+  if (option(OPT_PGP_LONG_IDS))
     return k->keyid;
   else
     return (k->keyid + 8);
@@ -799,7 +799,7 @@ void pgp_extract_keys_from_attachment_list(FILE *fp, int tag, struct Body *top)
   }
 
   mutt_endwin(NULL);
-  set_option(OPTDONTHANDLEPGPKEYS);
+  set_option(OPT_DONT_HANDLE_PGP_KEYS);
 
   for (; top; top = top->next)
   {
@@ -810,7 +810,7 @@ void pgp_extract_keys_from_attachment_list(FILE *fp, int tag, struct Body *top)
       break;
   }
 
-  unset_option(OPTDONTHANDLEPGPKEYS);
+  unset_option(OPT_DONT_HANDLE_PGP_KEYS);
 }
 
 static struct Body *pgp_decrypt_part(struct Body *a, struct State *s,
@@ -1159,7 +1159,7 @@ struct Body *pgp_sign_message(struct Body *a)
     fputs(buffer, stdout);
   }
 
-  if (mutt_wait_filter(thepid) && option(OPTPGPCHECKEXIT))
+  if (mutt_wait_filter(thepid) && option(OPT_PGP_CHECK_EXIT))
     empty = true;
 
   safe_fclose(&pgperr);
@@ -1245,7 +1245,7 @@ char *pgp_find_keys(struct Address *adrlist, int oppenc_mode)
       {
         keyID = crypt_hook->data;
         r = MUTT_YES;
-        if (!oppenc_mode && option(OPTCRYPTCONFIRMHOOK))
+        if (!oppenc_mode && option(OPT_CRYPT_CONFIRM_HOOK))
         {
           snprintf(buf, sizeof(buf), _("Use keyID = \"%s\" for %s?"), keyID, p->mailbox);
           r = mutt_yesorno(buf, MUTT_YES);
@@ -1400,7 +1400,7 @@ struct Body *pgp_encrypt_message(struct Body *a, char *keylist, int sign)
   }
   safe_fclose(&pgpin);
 
-  if (mutt_wait_filter(thepid) && option(OPTPGPCHECKEXIT))
+  if (mutt_wait_filter(thepid) && option(OPT_PGP_CHECK_EXIT))
     empty = 1;
 
   unlink(pgpinfile);
@@ -1573,7 +1573,7 @@ struct Body *pgp_traditional_encryptsign(struct Body *a, int flags, char *keylis
     fprintf(pgpin, "%s\n", PgpPass);
   safe_fclose(&pgpin);
 
-  if (mutt_wait_filter(thepid) && option(OPTPGPCHECKEXIT))
+  if (mutt_wait_filter(thepid) && option(OPT_PGP_CHECK_EXIT))
     empty = true;
 
   mutt_unlink(pgpinfile);
@@ -1646,7 +1646,7 @@ int pgp_send_menu(struct Header *msg)
     return msg->security;
 
   /* If autoinline and no crypto options set, then set inline. */
-  if (option(OPTPGPAUTOINLINE) &&
+  if (option(OPT_PGP_AUTO_INLINE) &&
       !((msg->security & APPLICATION_PGP) && (msg->security & (SIGN | ENCRYPT))))
     msg->security |= INLINE;
 
@@ -1671,7 +1671,7 @@ int pgp_send_menu(struct Header *msg)
    * NOTE: "Signing" and "Clearing" only adjust the sign bit, so we have different
    *       letter choices for those.
    */
-  if (option(OPTCRYPTOPPORTUNISTICENCRYPT) && (msg->security & OPPENCRYPT))
+  if (option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT) && (msg->security & OPPENCRYPT))
   {
     if (msg->security & (ENCRYPT | SIGN))
     {
@@ -1699,7 +1699,7 @@ int pgp_send_menu(struct Header *msg)
    * Opportunistic encryption option is set, but is toggled off
    * for this message.
    */
-  else if (option(OPTCRYPTOPPORTUNISTICENCRYPT))
+  else if (option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT))
   {
     /* When the message is not selected for signing or encryption, the toggle
     * between PGP/MIME and Traditional doesn't make sense.
@@ -1775,7 +1775,7 @@ int pgp_send_menu(struct Header *msg)
         break;
 
       case 'a': /* sign (a)s */
-        unset_option(OPTPGPCHECKTRUST);
+        unset_option(OPT_PGP_CHECK_TRUST);
 
         if ((p = pgp_ask_for_key(_("Sign as: "), NULL, 0, PGP_SECRING)))
         {
index 0d99fa9f362572b3092bfa9f6043f2882601bab0..c1c1f8b5808450861552a438ec1c9c1b1368e32f 100644 (file)
@@ -473,7 +473,7 @@ static struct PgpKeyInfo *pgp_select_key(struct PgpKeyInfo *keys,
 
   for (i = 0, kp = keys; kp; kp = kp->next)
   {
-    if (!option(OPTPGPSHOWUNUSABLE) && (kp->flags & KEYFLAG_CANTUSE))
+    if (!option(OPT_PGP_SHOW_UNUSABLE) && (kp->flags & KEYFLAG_CANTUSE))
     {
       unusable = true;
       continue;
@@ -481,7 +481,7 @@ static struct PgpKeyInfo *pgp_select_key(struct PgpKeyInfo *keys,
 
     for (a = kp->address; a; a = a->next)
     {
-      if (!option(OPTPGPSHOWUNUSABLE) && (a->flags & KEYFLAG_CANTUSE))
+      if (!option(OPT_PGP_SHOW_UNUSABLE) && (a->flags & KEYFLAG_CANTUSE))
       {
         unusable = true;
         continue;
@@ -603,14 +603,14 @@ static struct PgpKeyInfo *pgp_select_key(struct PgpKeyInfo *keys,
 
         /* XXX make error reporting more verbose */
 
-        if (option(OPTPGPCHECKTRUST))
+        if (option(OPT_PGP_CHECK_TRUST))
           if (!pgp_key_is_valid(KeyTable[menu->current]->parent))
           {
             mutt_error(_("This key can't be used: expired/disabled/revoked."));
             break;
           }
 
-        if (option(OPTPGPCHECKTRUST) && (!pgp_id_is_valid(KeyTable[menu->current]) ||
+        if (option(OPT_PGP_CHECK_TRUST) && (!pgp_id_is_valid(KeyTable[menu->current]) ||
                                          !pgp_id_is_strong(KeyTable[menu->current])))
         {
           char *str = "";
@@ -721,7 +721,7 @@ struct Body *pgp_make_key_attachment(char *tempf)
   struct stat sb;
   pid_t thepid;
   struct PgpKeyInfo *key = NULL;
-  unset_option(OPTPGPCHECKTRUST);
+  unset_option(OPT_PGP_CHECK_TRUST);
 
   key = pgp_ask_for_key(_("Please enter the key ID: "), NULL, 0, PGP_PUBRING);
 
index 534a0beeefec0cc59f2135b77228b07f48b41a4a..bf97dd3b1c1ffc2b27489d1e258188572cd7335d 100644 (file)
@@ -821,7 +821,7 @@ void smime_getkeys(struct Envelope *env)
   struct Address *t = NULL;
   bool found = false;
 
-  if (option(OPTSDEFAULTDECRYPTKEY) && SmimeDefaultKey && *SmimeDefaultKey)
+  if (option(OPT_SDEFAULT_DECRYPT_KEY) && SmimeDefaultKey && *SmimeDefaultKey)
   {
     snprintf(SmimeKeyToUse, sizeof(SmimeKeyToUse), "%s/%s", NONULL(SmimeKeys), SmimeDefaultKey);
 
@@ -1179,7 +1179,7 @@ void smime_invoke_import(char *infile, char *mailbox)
   mutt_unlink(tmpfname);
 
   buf[0] = '\0';
-  if (option(OPTASKCERTLABEL))
+  if (option(OPT_ASK_CERT_LABEL))
   {
     if ((mutt_get_field(_("Label for certificate: "), buf, sizeof(buf), 0) != 0) ||
         (buf[0] == 0))
@@ -2002,7 +2002,7 @@ int smime_send_menu(struct Header *msg)
    * NOTE: "Signing" and "Clearing" only adjust the sign bit, so we have different
    *       letter choices for those.
    */
-  if (option(OPTCRYPTOPPORTUNISTICENCRYPT) && (msg->security & OPPENCRYPT))
+  if (option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT) && (msg->security & OPPENCRYPT))
   {
     /* L10N: S/MIME options (opportunistic encryption is on) */
     prompt = _("S/MIME (s)ign, encrypt (w)ith, sign (a)s, (c)lear, or (o)ppenc "
@@ -2015,7 +2015,7 @@ int smime_send_menu(struct Header *msg)
    * Opportunistic encryption option is set, but is toggled off
    * for this message.
    */
-  else if (option(OPTCRYPTOPPORTUNISTICENCRYPT))
+  else if (option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT))
   {
     /* L10N: S/MIME options (opportunistic encryption is off) */
     prompt = _("S/MIME (e)ncrypt, (s)ign, encrypt (w)ith, sign (a)s, (b)oth, "
index d53b9f789ee575adadd15e0e1b06baa019b9ba08..554f0067c72489279f35cf1814c06f401a042a62 100644 (file)
--- 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(OPTSAVEUNSUB)))
+      !(nntp_data->newsrc_ent || nntp_data->subscribed || option(OPT_SAVE_UNSUB)))
     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(OPTSAVEUNSUB))
+      else if (nntp_data->newsrc_ent || nntp_data->subscribed || option(OPT_SAVE_UNSUB))
         continue;
 
       nntp_delete_group_cache(nntp_data);
@@ -1158,7 +1158,7 @@ void nntp_article_status(struct Context *ctx, struct Header *hdr, char *group, a
     return;
 
   /* article isn't read but cached, it's old */
-  if (option(OPTMARKOLD))
+  if (option(OPT_MARK_OLD))
     hdr->old = true;
 }
 
@@ -1199,7 +1199,7 @@ struct NntpData *mutt_newsgroup_unsubscribe(struct NntpServer *nserv, char *grou
     return NULL;
 
   nntp_data->subscribed = false;
-  if (!option(OPTSAVEUNSUB))
+  if (!option(OPT_SAVE_UNSUB))
   {
     nntp_data->newsrc_len = 0;
     FREE(&nntp_data->newsrc_ent);
diff --git a/nntp.c b/nntp.c
index 7afeb65fbe855d1f8e18b4ea0aa2218b619a0356..4ace600e1630843b7b85342b5a208ce45119b102 100644 (file)
--- a/nntp.c
+++ b/nntp.c
@@ -666,11 +666,11 @@ int nntp_open_connection(struct NntpServer *nserv)
 
 #ifdef USE_SSL
   /* Attempt STARTTLS if available and desired. */
-  if (nserv->use_tls != 1 && (nserv->hasSTARTTLS || option(OPTSSLFORCETLS)))
+  if (nserv->use_tls != 1 && (nserv->hasSTARTTLS || option(OPT_SSL_FORCE_TLS)))
   {
     if (nserv->use_tls == 0)
       nserv->use_tls =
-          option(OPTSSLFORCETLS) ||
+          option(OPT_SSL_FORCE_TLS) ||
                   query_quadoption(OPT_SSLSTARTTLS,
                                    _("Secure connection with TLS?")) == MUTT_YES ?
               2 :
@@ -1236,7 +1236,7 @@ static int nntp_fetch_headers(struct Context *ctx, void *hc, anum_t first,
 #endif
 
   /* fetch list of articles */
-  if (option(OPTLISTGROUP) && nntp_data->nserv->hasLISTGROUP && !nntp_data->deleted)
+  if (option(OPT_LIST_GROUP) && nntp_data->nserv->hasLISTGROUP && !nntp_data->deleted)
   {
     if (!ctx->quiet)
       mutt_message(_("Fetching list of articles..."));
@@ -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(OPTLISTGROUP) && nntp_data->nserv->hasLISTGROUP)
+      if (option(OPT_LIST_GROUP) && 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(OPTLISTGROUP) || !nntp_data->nserv->hasLISTGROUP)
+  if (!option(OPT_LIST_GROUP) || !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(OPTSAVEUNSUB))
+  if (!nntp_data->newsrc_ent && !nntp_data->subscribed && !option(OPT_SAVE_UNSUB))
     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(OPTSAVEUNSUB))
+    if (nntp_data->newsrc_ent && !nntp_data->subscribed && !option(OPT_SAVE_UNSUB))
     {
       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(OPTLOADDESC) && !nntp_data->desc)
+    if (option(OPT_LOAD_DESC) && !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(OPTSAVEUNSUB)))
+      (nntp_data->newsrc_ent || nntp_data->subscribed || option(OPT_SAVE_UNSUB)))
     nntp_data->bcache = mutt_bcache_open(&nserv->conn->account, nntp_data->group);
 
   /* strip off extra articles if adding context is greater than $nntp_context */
@@ -2231,7 +2231,7 @@ int nntp_active_fetch(struct NntpServer *nserv, unsigned int new)
     }
   }
 
-  if (option(OPTLOADDESC))
+  if (option(OPT_LOAD_DESC))
     rc = get_description(&nntp_data, "*", _("Loading descriptions..."));
 
   nntp_active_save_cache(nserv);
@@ -2261,7 +2261,7 @@ int nntp_check_new_groups(struct NntpServer *nserv)
     return -1;
 
   /* check subscribed newsgroups for new articles */
-  if (option(OPTSHOWNEWNEWS))
+  if (option(OPT_SHOW_NEW_NEWS))
   {
     mutt_message(_("Checking for new messages..."));
     for (i = 0; i < nserv->groups_num; i++)
@@ -2327,7 +2327,7 @@ int nntp_check_new_groups(struct NntpServer *nserv)
     }
 
     /* loading descriptions */
-    if (option(OPTLOADDESC))
+    if (option(OPT_LOAD_DESC))
     {
       unsigned int count = 0;
       struct Progress progress;
index b47a48f04ef98f4b8fbaf058f230c3f476820659..8f12ca65cf4f52195447763f302c008778136647 100644 (file)
--- a/options.h
+++ b/options.h
  */
 enum GlobalBool
 {
-  OPTALLOW8BIT,
-  OPTALLOWANSI,
-  OPTARROWCURSOR,
-  OPTASCIICHARS,
-  OPTASKBCC,
-  OPTASKCC,
-  OPTASKFOLLOWUP,
-  OPTASKXCOMMENTTO,
-  OPTATTACHSPLIT,
-  OPTAUTOEDIT,
-  OPTAUTOTAG,
-  OPTBEEP,
-  OPTBEEPNEW,
-  OPTBOUNCEDELIVERED,
-  OPTBRAILLEFRIENDLY,
-  OPTCHECKMBOXSIZE,
-  OPTCHECKNEW,
-  OPTCOLLAPSEALL,
-  OPTCOLLAPSEUNREAD,
-  OPTCOLLAPSEFLAGGED,
-  OPTCONFIRMAPPEND,
-  OPTCONFIRMCREATE,
-  OPTDELETEUNTAG,
-  OPTDIGESTCOLLAPSE,
-  OPTDUPTHREADS,
-  OPTEDITHDRS,
-  OPTENCODEFROM,
-  OPTENVFROM,
-  OPTFASTREPLY,
-  OPTFCCCLEAR,
-  OPTFLAGSAFE,
-  OPTFOLLOWUPTO,
-  OPTFORCENAME,
-  OPTFORWDECODE,
-  OPTFORWQUOTE,
-  OPTFORWREF,
+  OPT_ALLOW_8BIT,
+  OPT_ALLOW_ANSI,
+  OPT_ARROW_CURSOR,
+  OPT_ASCII_CHARS,
+  OPT_ASK_BCC,
+  OPT_ASK_CC,
+  OPT_ASK_FOLLOWUP,
+  OPT_ASK_XCOMMENTTO,
+  OPT_ATTACH_SPLIT,
+  OPT_AUTO_EDIT,
+  OPT_AUTO_TAG,
+  OPT_BEEP,
+  OPT_BEEP_NEW,
+  OPT_BOUNCE_DELIVERED,
+  OPT_BRAILLE_FRIENDLY,
+  OPT_CHECK_MBOX_SIZE,
+  OPT_CHECK_NEW,
+  OPT_COLLAPSE_ALL,
+  OPT_COLLAPSE_UNREAD,
+  OPT_COLLAPSE_FLAGGED,
+  OPT_CONFIRM_APPEND,
+  OPT_CONFIRM_CREATE,
+  OPT_DELETE_UNTAG,
+  OPT_DIGEST_COLLAPSE,
+  OPT_DUP_THREADS,
+  OPT_EDIT_HDRS,
+  OPT_ENCODE_FROM,
+  OPT_ENV_FROM,
+  OPT_FAST_REPLY,
+  OPT_FCC_CLEAR,
+  OPT_FLAG_SAFE,
+  OPT_FOLLOW_UP_TO,
+  OPT_FORCE_NAME,
+  OPT_FORW_DECODE,
+  OPT_FORW_QUOTE,
+  OPT_FORW_REF,
 #ifdef USE_HCACHE
-  OPTHCACHEVERIFY,
+  OPT_HCACHE_VERIFY,
 #if defined(HAVE_QDBM) || defined(HAVE_TC) || defined(HAVE_KC)
-  OPTHCACHECOMPRESS,
+  OPT_HCACHE_COMPRESS,
 #endif /* HAVE_QDBM */
 #endif
-  OPTHDRS,
-  OPTHEADER,
-  OPTHEADERCOLORPARTIAL,
-  OPTHELP,
-  OPTHIDDENHOST,
-  OPTHIDELIMITED,
-  OPTHIDEMISSING,
-  OPTHIDETHREADSUBJECT,
-  OPTHIDETOPLIMITED,
-  OPTHIDETOPMISSING,
-  OPTHISTREMOVEDUPS,
-  OPTHONORDISP,
-  OPTIGNORELWS,
-  OPTIGNORELISTREPLYTO,
+  OPT_HDRS,
+  OPT_HEADER,
+  OPT_HEADER_COLOR_PARTIAL,
+  OPT_HELP,
+  OPT_HIDDEN_HOST,
+  OPT_HIDE_LIMITED,
+  OPT_HIDE_MISSING,
+  OPT_HIDE_THREAD_SUBJECT,
+  OPT_HIDE_TOP_LIMITED,
+  OPT_HIDE_TOP_MISSING,
+  OPT_HIST_REMOVE_DUPS,
+  OPT_HONOR_DISP,
+  OPT_IGNORE_LWS,
+  OPT_IGNORE_LIST_REPLY_TO,
 #ifdef USE_IMAP
-  OPTIMAPCHECKSUBSCRIBED,
-  OPTIMAPIDLE,
-  OPTIMAPLSUB,
-  OPTIMAPPASSIVE,
-  OPTIMAPPEEK,
-  OPTIMAPSERVERNOISE,
+  OPT_IMAP_CHECK_SUBSCRIBED,
+  OPT_IMAP_IDLE,
+  OPT_IMAP_LSUB,
+  OPT_IMAP_PASSIVE,
+  OPT_IMAP_PEEK,
+  OPT_IMAP_SERVER_NOISE,
 #endif
 #ifdef USE_SSL
 #ifndef USE_SSL_GNUTLS
-  OPTSSLSYSTEMCERTS,
-  OPTSSLV2,
+  OPT_SSL_SYSTEM_CERTS,
+  OPT_SSLV2,
 #endif /* USE_SSL_GNUTLS */
-  OPTSSLV3,
-  OPTTLSV1,
-  OPTTLSV1_1,
-  OPTTLSV1_2,
-  OPTSSLFORCETLS,
-  OPTSSLVERIFYDATES,
-  OPTSSLVERIFYHOST,
+  OPT_SSLV3,
+  OPT_TLSV1,
+  OPT_TLSV1_1,
+  OPT_TLSV1_2,
+  OPT_SSL_FORCE_TLS,
+  OPT_SSL_VERIFY_DATES,
+  OPT_SSL_VERIFY_HOST,
 #if defined(USE_SSL_OPENSSL) && defined(HAVE_SSL_PARTIAL_CHAIN)
-  OPTSSLVERIFYPARTIAL,
+  OPT_SSL_VERIFY_PARTIAL,
 #endif /* USE_SSL_OPENSSL */
 #endif /* defined(USE_SSL) */
-  OPTIMPLICITAUTOVIEW,
-  OPTINCLUDEONLYFIRST,
-  OPTKEEPFLAGGED,
-  OPTKEYWORDSLEGACY,
-  OPTKEYWORDSSTANDARD,
-  OPTMAILCAPSANITIZE,
-  OPTMAILCHECKRECENT,
-  OPTMAILCHECKSTATS,
-  OPTMAILDIRTRASH,
-  OPTMAILDIRCHECKCUR,
-  OPTMARKERS,
-  OPTMARKOLD,
-  OPTMENUSCROLL,  /**< scroll menu instead of implicit next-page */
-  OPTMENUMOVEOFF, /**< allow menu to scroll past last entry */
+  OPT_IMPLICIT_AUTOVIEW,
+  OPT_INCLUDE_ONLY_FIRST,
+  OPT_KEEP_FLAGGED,
+  OPT_KEYWORDS_LEGACY,
+  OPT_KEYWORDS_STANDARD,
+  OPT_MAILCAP_SANITIZE,
+  OPT_MAIL_CHECK_RECENT,
+  OPT_MAIL_CHECK_STATS,
+  OPT_MAILDIR_TRASH,
+  OPT_MAILDIR_CHECK_CUR,
+  OPT_MARKERS,
+  OPT_MARK_OLD,
+  OPT_MENU_SCROLL,  /**< scroll menu instead of implicit next-page */
+  OPT_MENU_MOVE_OFF, /**< allow menu to scroll past last entry */
 #if defined(USE_IMAP) || defined(USE_POP)
-  OPTMESSAGECACHECLEAN,
+  OPT_MESSAGE_CACHE_CLEAN,
 #endif
-  OPTMETAKEY, /**< interpret ALT-x as ESC-x */
-  OPTMETOO,
-  OPTMHPURGE,
-  OPTMIMEFORWDECODE,
+  OPT_METAKEY, /**< interpret ALT-x as ESC-x */
+  OPT_ME_TOO,
+  OPT_MH_PURGE,
+  OPT_MIME_FORW_DECODE,
 #ifdef USE_NNTP
-  OPTMIMESUBJECT, /**< encode subject line with RFC2047 */
+  OPT_MIME_SUBJECT, /**< encode subject line with RFC2047 */
 #endif
-  OPTNARROWTREE,
-  OPTPAGERSTOP,
-  OPTPIPEDECODE,
-  OPTPIPESPLIT,
+  OPT_NARROW_TREE,
+  OPT_PAGER_STOP,
+  OPT_PIPE_DECODE,
+  OPT_PIPE_SPLIT,
 #ifdef USE_POP
-  OPTPOPAUTHTRYALL,
-  OPTPOPLAST,
+  OPT_POP_AUTH_TRY_ALL,
+  OPT_POP_LAST,
 #endif
-  OPTPOSTPONEENCRYPT,
-  OPTPRINTDECODE,
-  OPTPRINTSPLIT,
-  OPTPROMPTAFTER,
-  OPTREADONLY,
-  OPTREFLOWSPACEQUOTES,
-  OPTREFLOWTEXT,
-  OPTREPLYSELF,
-  OPTREPLYWITHXORIG,
-  OPTRESOLVE,
-  OPTRESUMEDRAFTFILES,
-  OPTRESUMEEDITEDDRAFTFILES,
-  OPTREVALIAS,
-  OPTREVNAME,
-  OPTREVREAL,
-  OPTRFC2047PARAMS,
-  OPTSAVEADDRESS,
-  OPTSAVEEMPTY,
-  OPTSAVENAME,
-  OPTSCORE,
+  OPT_POSTPONE_ENCRYPT,
+  OPT_PRINT_DECODE,
+  OPT_PRINT_SPLIT,
+  OPT_PROMPT_AFTER,
+  OPT_READONLY,
+  OPT_REFLOW_SPACE_QUOTES,
+  OPT_REFLOW_TEXT,
+  OPT_REPLY_SELF,
+  OPT_REPLY_WITH_XORIG,
+  OPT_RESOLVE,
+  OPT_RESUME_DRAFT_FILES,
+  OPT_RESUME_EDITED_DRAFT_FILES,
+  OPT_REV_ALIAS,
+  OPT_REV_NAME,
+  OPT_REV_REAL,
+  OPT_RFC2047_PARAMS,
+  OPT_SAVE_ADDRESS,
+  OPT_SAVE_EMPTY,
+  OPT_SAVE_NAME,
+  OPT_SCORE,
 #ifdef USE_SIDEBAR
-  OPTSIDEBAR,
-  OPTSIDEBARFOLDERINDENT,
-  OPTSIDEBARNEWMAILONLY,
-  OPTSIDEBARNEXTNEWWRAP,
-  OPTSIDEBARSHORTPATH,
-  OPTSIDEBARONRIGHT,
+  OPT_SIDEBAR,
+  OPT_SIDEBAR_FOLDER_INDENT,
+  OPT_SIDEBAR_NEWMAIL_ONLY,
+  OPT_SIDEBAR_NEXT_NEW_WRAP,
+  OPT_SIDEBAR_SHORT_PATH,
+  OPT_SIDEBAR_ON_RIGHT,
 #endif
-  OPTSIGDASHES,
-  OPTSIGONTOP,
-  OPTSORTRE,
-  OPTSTATUSONTOP,
-  OPTSTRICTTHREADS,
-  OPTSUSPEND,
-  OPTTEXTFLOWED,
-  OPTTHOROUGHSRC,
-  OPTTHREADRECEIVED,
-  OPTTILDE,
-  OPTTSENABLED,
-  OPTUNCOLLAPSEJUMP,
-  OPTUNCOLLAPSENEW,
-  OPTUSE8BITMIME,
-  OPTUSEDOMAIN,
-  OPTUSEFROM,
-  OPTUSEGPGAGENT,
+  OPT_SIG_DASHES,
+  OPT_SIG_ON_TOP,
+  OPT_SORT_RE,
+  OPT_STATUS_ON_TOP,
+  OPT_STRICT_THREADS,
+  OPT_SUSPEND,
+  OPT_TEXT_FLOWED,
+  OPT_THOROUGH_SRC,
+  OPT_THREAD_RECEIVED,
+  OPT_TILDE,
+  OPT_TS_ENABLED,
+  OPT_UNCOLLAPSE_JUMP,
+  OPT_UNCOLLAPSE_NEW,
+  OPT_USE_8BIT_MIME,
+  OPT_USE_DOMAIN,
+  OPT_USE_FROM,
+  OPT_USE_GPG_AGENT,
 #ifdef HAVE_LIBIDN
-  OPTIDNDECODE,
-  OPTIDNENCODE,
+  OPT_IDN_DECODE,
+  OPT_IDN_ENCODE,
 #endif
 #ifdef HAVE_GETADDRINFO
-  OPTUSEIPV6,
+  OPT_USE_IPV6,
 #endif
-  OPTWAITKEY,
-  OPTWEED,
-  OPTWRAP,
-  OPTWRAPSEARCH,
-  OPTWRITEBCC, /**< write out a bcc header? */
-  OPTXMAILER,
+  OPT_WAIT_KEY,
+  OPT_WEED,
+  OPT_WRAP,
+  OPT_WRAP_SEARCH,
+  OPT_WRITE_BCC, /**< write out a bcc header? */
+  OPT_XMAILER,
 
-  OPTCRYPTUSEGPGME,
-  OPTCRYPTUSEPKA,
+  OPT_CRYPT_USE_GPGME,
+  OPT_CRYPT_USE_PKA,
 
   /* PGP options */
 
-  OPTCRYPTAUTOSIGN,
-  OPTCRYPTAUTOENCRYPT,
-  OPTCRYPTAUTOPGP,
-  OPTCRYPTAUTOSMIME,
-  OPTCRYPTCONFIRMHOOK,
-  OPTCRYPTOPPORTUNISTICENCRYPT,
-  OPTCRYPTREPLYENCRYPT,
-  OPTCRYPTREPLYSIGN,
-  OPTCRYPTREPLYSIGNENCRYPTED,
-  OPTCRYPTTIMESTAMP,
-  OPTSMIMEISDEFAULT,
-  OPTSMIMESELFENCRYPT,
-  OPTASKCERTLABEL,
-  OPTSDEFAULTDECRYPTKEY,
-  OPTPGPIGNORESUB,
-  OPTPGPCHECKEXIT,
-  OPTPGPLONGIDS,
-  OPTPGPAUTODEC,
-  OPTPGPRETAINABLESIG,
-  OPTPGPSELFENCRYPT,
-  OPTPGPSTRICTENC,
-  OPTFORWDECRYPT,
-  OPTPGPSHOWUNUSABLE,
-  OPTPGPAUTOINLINE,
-  OPTPGPREPLYINLINE,
+  OPT_CRYPT_AUTO_SIGN,
+  OPT_CRYPT_AUTO_ENCRYPT,
+  OPT_CRYPT_AUTO_PGP,
+  OPT_CRYPT_AUTO_SMIME,
+  OPT_CRYPT_CONFIRM_HOOK,
+  OPT_CRYPT_OPPORTUNISTIC_ENCRYPT,
+  OPT_CRYPT_REPLY_ENCRYPT,
+  OPT_CRYPT_REPLY_SIGN,
+  OPT_CRYPT_REPLY_SIGN_ENCRYPTED,
+  OPT_CRYPT_TIMESTAMP,
+  OPT_SMIME_IS_DEFAULT,
+  OPT_SMIME_SELF_ENCRYPT,
+  OPT_ASK_CERT_LABEL,
+  OPT_SDEFAULT_DECRYPT_KEY,
+  OPT_PGP_IGNORE_SUB,
+  OPT_PGP_CHECK_EXIT,
+  OPT_PGP_LONG_IDS,
+  OPT_PGP_AUTO_DEC,
+  OPT_PGP_RETAINABLE_SIG,
+  OPT_PGP_SELF_ENCRYPT,
+  OPT_PGP_STRICT_ENC,
+  OPT_FORW_DECRYPT,
+  OPT_PGP_SHOW_UNUSABLE,
+  OPT_PGP_AUTO_INLINE,
+  OPT_PGP_REPLY_INLINE,
 
 /* news options */
 
 #ifdef USE_NNTP
-  OPTSHOWNEWNEWS,
-  OPTSHOWONLYUNREAD,
-  OPTSAVEUNSUB,
-  OPTLISTGROUP,
-  OPTLOADDESC,
-  OPTXCOMMENTTO,
+  OPT_SHOW_NEW_NEWS,
+  OPT_SHOW_ONLY_UNREAD,
+  OPT_SAVE_UNSUB,
+  OPT_LIST_GROUP,
+  OPT_LOAD_DESC,
+  OPT_XCOMMENT_TO,
 #endif
 
   /* pseudo options */
 
-  OPTAUXSORT,           /**< (pseudo) using auxiliary sort function */
-  OPTFORCEREFRESH,      /**< (pseudo) refresh even during macros */
-  OPTLOCALES,           /**< (pseudo) set if user has valid locale definition */
-  OPTNOCURSES,          /**< (pseudo) when sending in batch mode */
-  OPTSEARCHREVERSE,     /**< (pseudo) used by ci_search_command */
-  OPTMSGERR,            /**< (pseudo) used by mutt_error/mutt_message */
-  OPTSEARCHINVALID,     /**< (pseudo) used to invalidate the search pat */
-  OPTSIGNALSBLOCKED,    /**< (pseudo) using by mutt_block_signals () */
-  OPTSYSSIGNALSBLOCKED, /**< (pseudo) using by mutt_block_signals_system () */
-  OPTNEEDRESORT,        /**< (pseudo) used to force a re-sort */
-  OPTRESORTINIT,        /**< (pseudo) used to force the next resort to be from scratch */
-  OPTVIEWATTACH,        /**< (pseudo) signals that we are viewing attachments */
-  OPTSORTSUBTHREADS,    /**< (pseudo) used when $sort_aux changes */
-  OPTNEEDRESCORE,       /**< (pseudo) set when the `score' command is used */
-  OPTATTACHMSG,         /**< (pseudo) used by attach-message */
-  OPTHIDEREAD,          /**< (pseudo) whether or not hide read messages */
-  OPTKEEPQUIET,         /**< (pseudo) shut up the message and refresh
+  OPT_AUX_SORT,           /**< (pseudo) using auxiliary sort function */
+  OPT_FORCE_REFRESH,      /**< (pseudo) refresh even during macros */
+  OPT_LOCALES,           /**< (pseudo) set if user has valid locale definition */
+  OPT_NO_CURSES,          /**< (pseudo) when sending in batch mode */
+  OPT_SEARCH_REVERSE,     /**< (pseudo) used by ci_search_command */
+  OPT_MSG_ERR,            /**< (pseudo) used by mutt_error/mutt_message */
+  OPT_SEARCH_INVALID,     /**< (pseudo) used to invalidate the search pat */
+  OPT_SIGNALS_BLOCKED,    /**< (pseudo) using by mutt_block_signals () */
+  OPT_SYS_SIGNALS_BLOCKED, /**< (pseudo) using by mutt_block_signals_system () */
+  OPT_NEED_RESORT,        /**< (pseudo) used to force a re-sort */
+  OPT_RESORT_INIT,        /**< (pseudo) used to force the next resort to be from scratch */
+  OPT_VIEW_ATTACH,        /**< (pseudo) signals that we are viewing attachments */
+  OPT_SORT_SUBTHREADS,    /**< (pseudo) used when $sort_aux changes */
+  OPT_NEED_RESCORE,       /**< (pseudo) set when the `score' command is used */
+  OPT_ATTACH_MSG,         /**< (pseudo) used by attach-message */
+  OPT_HIDE_READ,          /**< (pseudo) whether or not hide read messages */
+  OPT_KEEP_QUIET,         /**< (pseudo) shut up the message and refresh
                          *            functions while we are executing an
                          *            external program.  */
-  OPTMENUCALLER,        /**< (pseudo) tell menu to give caller a take */
-  OPTREDRAWTREE,        /**< (pseudo) redraw the thread tree */
-  OPTPGPCHECKTRUST,     /**< (pseudo) used by pgp_select_key () */
-  OPTDONTHANDLEPGPKEYS, /**< (pseudo) used to extract PGP keys */
-  OPTIGNOREMACROEVENTS, /**< (pseudo) don't process macro/push/exec events while set */
+  OPT_MENU_CALLER,        /**< (pseudo) tell menu to give caller a take */
+  OPT_REDRAW_TREE,        /**< (pseudo) redraw the thread tree */
+  OPT_PGP_CHECK_TRUST,     /**< (pseudo) used by pgp_select_key () */
+  OPT_DONT_HANDLE_PGP_KEYS, /**< (pseudo) used to extract PGP keys */
+  OPT_IGNORE_MACRO_EVENTS, /**< (pseudo) don't process macro/push/exec events while set */
 
 #ifdef USE_NNTP
-  OPTNEWS,              /**< (pseudo) used to change reader mode */
-  OPTNEWSSEND,          /**< (pseudo) used to change behavior when posting */
+  OPT_NEWS,              /**< (pseudo) used to change reader mode */
+  OPT_NEWS_SEND,          /**< (pseudo) used to change behavior when posting */
 #endif
 #ifdef USE_NOTMUCH
-  OPTVIRTSPOOLFILE,
-  OPTNOTMUCHRECORD,
+  OPT_VIRT_SPOOL_FILE,
+  OPT_NOTMUCH_RECORD,
 #endif
 
-  OPTMAX
+  OPT_GLOBAL_MAX
 };
 
 #define mutt_bit_set(v, n)    v[n / 8] |= (1 << (n % 8))
@@ -287,7 +287,7 @@ enum GlobalBool
 
 /* bit vector for boolean variables */
 #ifdef MAIN_C
-unsigned char Options[(OPTMAX + 7) / 8];
+unsigned char Options[(OPT_GLOBAL_MAX + 7) / 8];
 #else
 extern unsigned char Options[];
 #endif
diff --git a/pager.c b/pager.c
index 9730c99d1849508ee3f164a8234048064c6516fa..20ed7adb5a05c08996981eb0de9b5840c6340de3 100644 (file)
--- a/pager.c
+++ b/pager.c
@@ -98,7 +98,7 @@ static struct Header *OldHdr = NULL;
   }
 
 #define CHECK_ATTACH                                                           \
-  if (option(OPTATTACHMSG))                                                    \
+  if (option(OPT_ATTACH_MSG))                                                    \
   {                                                                            \
     mutt_flushinp();                                                           \
     mutt_error(_(Function_not_permitted_in_attach_message_mode));              \
@@ -232,7 +232,7 @@ static void resolve_color(struct Line *line_info, int n, int cnt, int flags,
 
   if (line_info[n].continuation)
   {
-    if (!cnt && option(OPTMARKERS))
+    if (!cnt && option(OPT_MARKERS))
     {
       SETCOLOR(MT_COLOR_MARKERS);
       addch('+');
@@ -776,7 +776,7 @@ static void resolve_types(char *buf, char *raw, struct Line *line_info, int n,
       if (n > 0 && (buf[0] == ' ' || buf[0] == '\t'))
       {
         line_info[n].type = line_info[n - 1].type; /* wrapped line */
-        if (!option(OPTHEADERCOLORPARTIAL))
+        if (!option(OPT_HEADER_COLOR_PARTIAL))
         {
           (line_info[n].syntax)[0].color = (line_info[n - 1].syntax)[0].color;
           line_info[n].is_cont_hdr = 1;
@@ -791,7 +791,7 @@ static void resolve_types(char *buf, char *raw, struct Line *line_info, int n,
        * same color.  Otherwise, we handle the header patterns just
        * like body patterns (further below).
        */
-      if (!option(OPTHEADERCOLORPARTIAL))
+      if (!option(OPT_HEADER_COLOR_PARTIAL))
       {
         for (color_line = ColorHdrList; color_line; color_line = color_line->next)
         {
@@ -888,7 +888,7 @@ static void resolve_types(char *buf, char *raw, struct Line *line_info, int n,
 
   /* body patterns */
   if (line_info[n].type == MT_COLOR_NORMAL || line_info[n].type == MT_COLOR_QUOTED ||
-      (line_info[n].type == MT_COLOR_HDEFAULT && option(OPTHEADERCOLORPARTIAL)))
+      (line_info[n].type == MT_COLOR_HDEFAULT && option(OPT_HEADER_COLOR_PARTIAL)))
   {
     size_t nl;
 
@@ -1035,7 +1035,7 @@ static int grok_ansi(unsigned char *buf, int pos, struct AnsiAttr *a)
     x++;
 
   /* Character Attributes */
-  if (option(OPTALLOWANSI) && a != NULL && buf[x] == 'm')
+  if (option(OPT_ALLOW_ANSI) && a != NULL && buf[x] == 'm')
   {
     if (pos == x)
     {
@@ -1208,7 +1208,7 @@ static int format_line(struct Line **line_info, int n, unsigned char *buf, int f
                        int *pcol, int *pspecial, struct MuttWindow *pager_window)
 {
   int space = -1; /* index of the last space or TAB */
-  int col = option(OPTMARKERS) ? (*line_info)[n].continuation : 0;
+  int col = option(OPT_MARKERS) ? (*line_info)[n].continuation : 0;
   size_t k;
   int ch, vch, last_special = -1, special = 0, t;
   wchar_t wc;
@@ -1554,7 +1554,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(OPTWRAP))
+  if (option(OPT_WRAP))
   {
     if (cnt < b_read)
     {
@@ -1764,7 +1764,7 @@ static void pager_menu_redraw(struct Menu *pager_menu)
       memcpy(rd->index_window, MuttIndexWindow, sizeof(struct MuttWindow));
       rd->index_window->rows = rd->indexlen > 0 ? rd->indexlen - 1 : 0;
 
-      if (option(OPTSTATUSONTOP))
+      if (option(OPT_STATUS_ON_TOP))
       {
         memcpy(rd->index_status_window, MuttStatusWindow, sizeof(struct MuttWindow));
 
@@ -1790,7 +1790,7 @@ static void pager_menu_redraw(struct Menu *pager_menu)
       }
     }
 
-    if (option(OPTHELP))
+    if (option(OPT_HELP))
     {
       SETCOLOR(MT_COLOR_STATUS);
       mutt_window_move(MuttHelpWindow, 0, 0);
@@ -1926,7 +1926,7 @@ static void pager_menu_redraw(struct Menu *pager_menu)
     while (rd->lines < rd->pager_window->rows)
     {
       mutt_window_clrtoeol(rd->pager_window);
-      if (option(OPTTILDE))
+      if (option(OPT_TILDE))
         addch('~');
       rd->lines++;
       mutt_window_move(rd->pager_window, rd->lines, 0);
@@ -1974,7 +1974,7 @@ static void pager_menu_redraw(struct Menu *pager_menu)
       mutt_draw_statusline(rd->pager_status_window->cols, bn, sizeof(bn));
     }
     NORMAL_COLOR;
-    if (option(OPTTSENABLED) && TSSupported && rd->index)
+    if (option(OPT_TS_ENABLED) && TSSupported && rd->index)
     {
       menu_status_line(buffer, sizeof(buffer), rd->index, NONULL(TSStatusFormat));
       mutt_ts_status(buffer);
@@ -2114,7 +2114,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
 
     pager_menu_redraw(pager_menu);
 
-    if (option(OPTBRAILLEFRIENDLY))
+    if (option(OPT_BRAILLE_FRIENDLY))
     {
       if (brailleLine != -1)
       {
@@ -2148,7 +2148,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
 
     bool do_new_mail = false;
 
-    if (Context && !option(OPTATTACHMSG))
+    if (Context && !option(OPT_ATTACH_MSG))
     {
       oldcount = Context ? Context->msgcount : 0;
       /* check for new mail */
@@ -2206,13 +2206,13 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
           }
 
           pager_menu->redraw = REDRAW_FULL;
-          set_option(OPTSEARCHINVALID);
+          set_option(OPT_SEARCH_INVALID);
         }
       }
 
       if (mutt_buffy_notify() || do_new_mail)
       {
-        if (option(OPTBEEPNEW))
+        if (option(OPT_BEEP_NEW))
           beep();
         if (NewMailCmd)
         {
@@ -2286,7 +2286,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
         {
           rd.topline = up_n_lines(PagerContext, rd.line_info, rd.curline, rd.hide_quoted);
         }
-        else if (option(OPTPAGERSTOP))
+        else if (option(OPT_PAGER_STOP))
         {
           /* emulate "less -q" and don't go on to the next message. */
           mutt_error(_("Bottom of message is shown."));
@@ -2351,7 +2351,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
           rd.topline = up_n_lines(rd.pager_window->rows / 2, rd.line_info,
                                   rd.curline, rd.hide_quoted);
         }
-        else if (option(OPTPAGERSTOP))
+        else if (option(OPT_PAGER_STOP))
         {
           /* emulate "less -q" and don't go on to the next message. */
           mutt_error(_("Bottom of message is shown."));
@@ -2389,7 +2389,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
 
             if (i < rd.last_line)
               rd.topline = i;
-            else if (wrapped || !option(OPTWRAPSEARCH))
+            else if (wrapped || !option(OPT_WRAP_SEARCH))
               mutt_error(_("Not found."));
             else
             {
@@ -2410,7 +2410,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
 
             if (i >= 0)
               rd.topline = i;
-            else if (wrapped || !option(OPTWRAPSEARCH))
+            else if (wrapped || !option(OPT_WRAP_SEARCH))
               mutt_error(_("Not found."));
             else
             {
@@ -2564,7 +2564,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
         CHECK_MODE(IsHeader(extra))
         if (mutt_select_sort((ch == OP_SORT_REVERSE)) == 0)
         {
-          set_option(OPTNEEDRESORT);
+          set_option(OPT_NEED_RESORT);
           ch = -1;
           rc = OP_DISPLAY_MESSAGE;
         }
@@ -2735,10 +2735,10 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
 
         mutt_set_flag(Context, extra->hdr, MUTT_DELETE, 1);
         mutt_set_flag(Context, extra->hdr, MUTT_PURGE, (ch == OP_PURGE_MESSAGE));
-        if (option(OPTDELETEUNTAG))
+        if (option(OPT_DELETE_UNTAG))
           mutt_set_flag(Context, extra->hdr, MUTT_TAG, 0);
         pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX;
-        if (option(OPTRESOLVE))
+        if (option(OPT_RESOLVE))
         {
           ch = -1;
           rc = OP_MAIN_NEXT_UNDELETED;
@@ -2752,7 +2752,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
 
         if (mutt_change_flag(extra->hdr, (ch == OP_MAIN_SET_FLAG)) == 0)
           pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX;
-        if (extra->hdr->deleted && option(OPTRESOLVE))
+        if (extra->hdr->deleted && option(OPT_RESOLVE))
         {
           ch = -1;
           rc = OP_MAIN_NEXT_UNDELETED;
@@ -2779,15 +2779,15 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
               break;
           }
 
-          if (option(OPTDELETEUNTAG))
+          if (option(OPT_DELETE_UNTAG))
             mutt_thread_set_flag(extra->hdr, MUTT_TAG, 0, subthread);
-          if (option(OPTRESOLVE))
+          if (option(OPT_RESOLVE))
           {
             rc = OP_MAIN_NEXT_UNDELETED;
             ch = -1;
           }
 
-          if (!option(OPTRESOLVE) && PagerIndexLines)
+          if (!option(OPT_RESOLVE) && PagerIndexLines)
             pager_menu->redraw = REDRAW_FULL;
           else
             pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX;
@@ -2807,11 +2807,11 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
 
         mutt_enter_command();
 
-        if (option(OPTNEEDRESORT))
+        if (option(OPT_NEED_RESORT))
         {
-          unset_option(OPTNEEDRESORT);
+          unset_option(OPT_NEED_RESORT);
           CHECK_MODE(IsHeader(extra));
-          set_option(OPTNEEDRESORT);
+          set_option(OPT_NEED_RESORT);
         }
 
         if (old_PagerIndexLines != PagerIndexLines)
@@ -2839,7 +2839,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
 
         mutt_set_flag(Context, extra->hdr, MUTT_FLAG, !extra->hdr->flagged);
         pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX;
-        if (option(OPTRESOLVE))
+        if (option(OPT_RESOLVE))
         {
           ch = -1;
           rc = OP_MAIN_NEXT_UNDELETED;
@@ -3003,7 +3003,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
                 (ch == OP_DECRYPT_SAVE) || (ch == OP_DECRYPT_COPY) || 0) == 0 &&
             (ch == OP_SAVE || ch == OP_DECODE_SAVE || ch == OP_DECRYPT_SAVE))
         {
-          if (option(OPTRESOLVE))
+          if (option(OPT_RESOLVE))
           {
             ch = -1;
             rc = OP_MAIN_NEXT_UNDELETED;
@@ -3032,7 +3032,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
         }
 
         pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX;
-        if (option(OPTRESOLVE))
+        if (option(OPT_RESOLVE))
         {
           ch = -1;
           rc = OP_NEXT_ENTRY;
@@ -3052,7 +3052,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
         first = 0;
         Context->msgnotreadyet = -1;
         pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX;
-        if (option(OPTRESOLVE))
+        if (option(OPT_RESOLVE))
         {
           ch = -1;
           rc = OP_MAIN_NEXT_UNDELETED;
@@ -3068,7 +3068,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
         mutt_set_flag(Context, extra->hdr, MUTT_DELETE, 0);
         mutt_set_flag(Context, extra->hdr, MUTT_PURGE, 0);
         pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX;
-        if (option(OPTRESOLVE))
+        if (option(OPT_RESOLVE))
         {
           ch = -1;
           rc = OP_NEXT_ENTRY;
@@ -3089,13 +3089,13 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
                                    ch == OP_UNDELETE_THREAD ? 0 : 1);
         if (r != -1)
         {
-          if (option(OPTRESOLVE))
+          if (option(OPT_RESOLVE))
           {
             rc = (ch == OP_DELETE_THREAD) ? OP_MAIN_NEXT_THREAD : OP_MAIN_NEXT_SUBTHREAD;
             ch = -1;
           }
 
-          if (!option(OPTRESOLVE) && PagerIndexLines)
+          if (!option(OPT_RESOLVE) && PagerIndexLines)
             pager_menu->redraw = REDRAW_FULL;
           else
             pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX;
@@ -3181,7 +3181,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
         break;
 
       case OP_SIDEBAR_TOGGLE_VISIBLE:
-        toggle_option(OPTSIDEBAR);
+        toggle_option(OPT_SIDEBAR);
         mutt_reflow_windows();
         break;
 #endif
diff --git a/parse.c b/parse.c
index db7bede53b2f1a660d9b9371e94055c5bda821de..24b9c9b3fd7c06a116da2c0c20d2744f4a9bd5d6 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -1259,7 +1259,7 @@ int mutt_parse_rfc822_line(struct Envelope *e, struct Header *hdr, char *line,
                 hdr->replied = true;
                 break;
               case 'O':
-                hdr->old = option(OPTMARKOLD) ? true : false;
+                hdr->old = option(OPT_MARK_OLD) ? true : false;
                 break;
               case 'R':
                 hdr->read = true;
@@ -1349,7 +1349,7 @@ int mutt_parse_rfc822_line(struct Envelope *e, struct Header *hdr, char *line,
     /* restore the original line */
     line[strlen(line)] = ':';
 
-    if (weed && option(OPTWEED) && mutt_matches_ignore(line))
+    if (weed && option(OPT_WEED) && mutt_matches_ignore(line))
       goto done;
 
     if (last)
index 20a19864c71687890ba9debe34246ca47f17cdb9..890359e23593a9b9d3c98d991a4b7e3bf63bc2ee 100644 (file)
--- a/pattern.c
+++ b/pattern.c
@@ -941,7 +941,7 @@ static int msg_search(struct Context *ctx, struct Pattern *pat, int msgno)
 
   if ((msg = mx_open_message(ctx, msgno)) != NULL)
   {
-    if (option(OPTTHOROUGHSRC))
+    if (option(OPT_THOROUGH_SRC))
     {
       /* decode the header / body */
       memset(&s, 0, sizeof(s));
@@ -1061,7 +1061,7 @@ static int msg_search(struct Context *ctx, struct Pattern *pat, int msgno)
 
     mx_close_message(ctx, &msg);
 
-    if (option(OPTTHOROUGHSRC))
+    if (option(OPT_THOROUGH_SRC))
     {
       safe_fclose(&fp);
 #ifdef USE_FMEMOPEN
@@ -2012,9 +2012,9 @@ int mutt_search_command(int cur, int op)
       return -1;
 
     if (op == OP_SEARCH || op == OP_SEARCH_NEXT)
-      unset_option(OPTSEARCHREVERSE);
+      unset_option(OPT_SEARCH_REVERSE);
     else
-      set_option(OPTSEARCHREVERSE);
+      set_option(OPT_SEARCH_REVERSE);
 
     /* compare the *expanded* version of the search pattern in case
        $simple_search has changed while we were searching */
@@ -2025,7 +2025,7 @@ int mutt_search_command(int cur, int op)
     {
       struct Buffer err;
       mutt_buffer_init(&err);
-      set_option(OPTSEARCHINVALID);
+      set_option(OPT_SEARCH_INVALID);
       strfcpy(LastSearch, buf, sizeof(LastSearch));
       mutt_message(_("Compiling search pattern..."));
       mutt_pattern_free(&SearchPattern);
@@ -2042,7 +2042,7 @@ int mutt_search_command(int cur, int op)
     }
   }
 
-  if (option(OPTSEARCHINVALID))
+  if (option(OPT_SEARCH_INVALID))
   {
     for (i = 0; i < Context->msgcount; i++)
       Context->hdrs[i]->searched = false;
@@ -2050,10 +2050,10 @@ int mutt_search_command(int cur, int op)
     if (Context->magic == MUTT_IMAP && imap_search(Context, SearchPattern) < 0)
       return -1;
 #endif
-    unset_option(OPTSEARCHINVALID);
+    unset_option(OPT_SEARCH_INVALID);
   }
 
-  incr = (option(OPTSEARCHREVERSE)) ? -1 : 1;
+  incr = (option(OPT_SEARCH_REVERSE)) ? -1 : 1;
   if (op == OP_SEARCH_OPPOSITE)
     incr = -incr;
 
@@ -2066,7 +2066,7 @@ int mutt_search_command(int cur, int op)
     if (i > Context->vcount - 1)
     {
       i = 0;
-      if (option(OPTWRAPSEARCH))
+      if (option(OPT_WRAP_SEARCH))
         msg = _("Search wrapped to top.");
       else
       {
@@ -2077,7 +2077,7 @@ int mutt_search_command(int cur, int op)
     else if (i < 0)
     {
       i = Context->vcount - 1;
-      if (option(OPTWRAPSEARCH))
+      if (option(OPT_WRAP_SEARCH))
         msg = _("Search wrapped to bottom.");
       else
       {
diff --git a/pop.c b/pop.c
index 8f4faa82e5114a3026a5499420a90844e7d349c4..f5b023e6bbe6003df690e01a03dd748607b18b0b 100644 (file)
--- a/pop.c
+++ b/pop.c
@@ -376,7 +376,7 @@ static int pop_fetch_headers(struct Context *ctx)
       {
         if (bcached)
           ctx->hdrs[i]->read = true;
-        else if (option(OPTMARKOLD))
+        else if (option(OPT_MARK_OLD))
           ctx->hdrs[i]->old = true;
       }
       else
@@ -407,7 +407,7 @@ static int pop_fetch_headers(struct Context *ctx)
    * clean up cache, i.e. wipe messages deleted outside
    * the availability of our cache
    */
-  if (option(OPTMESSAGECACHECLEAN))
+  if (option(OPT_MESSAGE_CACHE_CLEAN))
     mutt_bcache_list(pop_data->bcache, msg_cache_check, (void *) ctx);
 
   mutt_clear_error();
@@ -873,7 +873,7 @@ void pop_fetch_mail(void)
   sscanf(buffer, "+OK %d %d", &msgs, &bytes);
 
   /* only get unread messages */
-  if (msgs > 0 && option(OPTPOPLAST))
+  if (msgs > 0 && option(OPT_POP_LAST))
   {
     strfcpy(buffer, "LAST\r\n", sizeof(buffer));
     ret = pop_query(pop_data, buffer, sizeof(buffer));
index 5800e08e4d6ce77a96921315e2b7a026fc325282..640a3df224e2bc6113d9b1641398f499a6c4a244 100644 (file)
@@ -381,7 +381,7 @@ int pop_authenticate(struct PopData *pop_data)
           if (ret != POP_A_UNAVAIL)
             attempts++;
           if (ret == POP_A_SUCCESS || ret == POP_A_SOCKET ||
-              (ret == POP_A_FAILURE && !option(OPTPOPAUTHTRYALL)))
+              (ret == POP_A_FAILURE && !option(OPT_POP_AUTH_TRY_ALL)))
           {
             comma = NULL;
             break;
@@ -419,7 +419,7 @@ int pop_authenticate(struct PopData *pop_data)
       if (ret != POP_A_UNAVAIL)
         attempts++;
       if (ret == POP_A_SUCCESS || ret == POP_A_SOCKET ||
-          (ret == POP_A_FAILURE && !option(OPTPOPAUTHTRYALL)))
+          (ret == POP_A_FAILURE && !option(OPT_POP_AUTH_TRY_ALL)))
         break;
 
       authenticator++;
index 7e7247bafa5ebb6ad58cf8a38c4b727388f22fef..28c7dba859537324cd856cd828d4c9dd31ed43c7 100644 (file)
--- a/pop_lib.c
+++ b/pop_lib.c
@@ -320,9 +320,9 @@ int pop_open_connection(struct PopData *pop_data)
 
 #ifdef USE_SSL
   /* Attempt STLS if available and desired. */
-  if (!pop_data->conn->ssf && (pop_data->cmd_stls || option(OPTSSLFORCETLS)))
+  if (!pop_data->conn->ssf && (pop_data->cmd_stls || option(OPT_SSL_FORCE_TLS)))
   {
-    if (option(OPTSSLFORCETLS))
+    if (option(OPT_SSL_FORCE_TLS))
       pop_data->use_stls = 2;
     if (pop_data->use_stls == 0)
     {
@@ -365,7 +365,7 @@ int pop_open_connection(struct PopData *pop_data)
     }
   }
 
-  if (option(OPTSSLFORCETLS) && !pop_data->conn->ssf)
+  if (option(OPT_SSL_FORCE_TLS) && !pop_data->conn->ssf)
   {
     mutt_error(_("Encrypted connection unavailable"));
     mutt_sleep(1);
index 01fb2975cdabd843fe6a9543ea1897391b7b5174..d681c8342317f3224b7522c172249b46da98bfa4 100644 (file)
@@ -145,7 +145,7 @@ int mutt_num_postponed(int force)
   if (LastModify < st.st_mtime)
   {
 #ifdef USE_NNTP
-    int optnews = option(OPTNEWS);
+    int optnews = option(OPT_NEWS);
 #endif
     LastModify = st.st_mtime;
 
@@ -153,7 +153,7 @@ int mutt_num_postponed(int force)
       return (PostCount = 0);
 #ifdef USE_NNTP
     if (optnews)
-      unset_option(OPTNEWS);
+      unset_option(OPT_NEWS);
 #endif
     if (mx_open_mailbox(Postponed, MUTT_NOSORT | MUTT_QUIET, &ctx) == NULL)
       PostCount = 0;
@@ -162,7 +162,7 @@ int mutt_num_postponed(int force)
     mx_fastclose_mailbox(&ctx);
 #ifdef USE_NNTP
     if (optnews)
-      set_option(OPTNEWS);
+      set_option(OPT_NEWS);
 #endif
   }
 
@@ -213,7 +213,7 @@ static struct Header *select_msg(void)
         mutt_set_flag(PostContext, PostContext->hdrs[menu->current],
                       MUTT_DELETE, (i == OP_DELETE) ? 1 : 0);
         PostCount = PostContext->msgcount - PostContext->deleted;
-        if (option(OPTRESOLVE) && menu->current < menu->max - 1)
+        if (option(OPT_RESOLVE) && menu->current < menu->max - 1)
         {
           menu->oldcurrent = menu->current;
           menu->current++;
@@ -437,7 +437,7 @@ int mutt_get_postponed(struct Context *ctx, struct Header *hdr,
     }
   }
 
-  if (option(OPTCRYPTOPPORTUNISTICENCRYPT))
+  if (option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT))
     crypt_opportunistic_encrypt(hdr);
 
   return code;
@@ -756,7 +756,7 @@ err:
   /* Theoretically, both could be set. Take the one the user wants to set by default. */
   if ((newhdr->security & APPLICATION_PGP) && (newhdr->security & APPLICATION_SMIME))
   {
-    if (option(OPTSMIMEISDEFAULT))
+    if (option(OPT_SMIME_IS_DEFAULT))
       newhdr->security &= ~APPLICATION_PGP;
     else
       newhdr->security &= ~APPLICATION_SMIME;
index d5c558eb1ca882e133745e6155bf213f592370bf..514d94db9fa207bb022e09b2a659da096cca94c5 100644 (file)
--- a/protos.h
+++ b/protos.h
@@ -396,8 +396,8 @@ int mutt_wctoutf8(char *s, unsigned int c, size_t buflen);
 #else
 #define IsPrint(c)                                                             \
   (isprint((unsigned char) (c)) ||                                             \
-   (option(OPTLOCALES) ? 0 : ((unsigned char) (c) >= 0xa0)))
-#define IsWPrint(wc) (iswprint(wc) || (option(OPTLOCALES) ? 0 : (wc >= 0xa0)))
+   (option(OPT_LOCALES) ? 0 : ((unsigned char) (c) >= 0xa0)))
+#define IsWPrint(wc) (iswprint(wc) || (option(OPT_LOCALES) ? 0 : (wc >= 0xa0)))
 #endif
 
 int getdnsdomainname(char *d, size_t len);
index 755bacc5c942c9062c94b67045137aeb76ad14f9..82d3c7b9cb02051acb7ef33c8ec7ff1142049e94 100644 (file)
@@ -535,7 +535,7 @@ void mutt_save_attachment_list(FILE *fp, int tag, struct Body *top,
   {
     if (!tag || top->tagged)
     {
-      if (!option(OPTATTACHSPLIT))
+      if (!option(OPT_ATTACH_SPLIT))
       {
         if (!buf[0])
         {
@@ -598,7 +598,7 @@ void mutt_save_attachment_list(FILE *fp, int tag, struct Body *top,
     menu->redraw |= REDRAW_MOTION;
   }
 
-  if (!option(OPTATTACHSPLIT) && (rc == 0))
+  if (!option(OPT_ATTACH_SPLIT) && (rc == 0))
     mutt_message(_("Attachment saved."));
 }
 
@@ -670,7 +670,7 @@ static void pipe_attachment_list(char *command, FILE *fp, int tag,
   {
     if (!tag || top->tagged)
     {
-      if (!filter && !option(OPTATTACHSPLIT))
+      if (!filter && !option(OPT_ATTACH_SPLIT))
         pipe_attachment(fp, top, state);
       else
         query_pipe_attachment(command, fp, top, filter);
@@ -703,13 +703,13 @@ void mutt_pipe_attachment_list(FILE *fp, int tag, struct Body *top, int filter)
 
   mutt_expand_path(buf, sizeof(buf));
 
-  if (!filter && !option(OPTATTACHSPLIT))
+  if (!filter && !option(OPT_ATTACH_SPLIT))
   {
     mutt_endwin(NULL);
     thepid = mutt_create_filter(buf, &state.fpout, NULL, NULL);
     pipe_attachment_list(buf, fp, tag, top, filter, &state);
     safe_fclose(&state.fpout);
-    if (mutt_wait_filter(thepid) != 0 || option(OPTWAITKEY))
+    if (mutt_wait_filter(thepid) != 0 || option(OPT_WAIT_KEY))
       mutt_any_key_to_continue(NULL);
   }
   else
@@ -755,7 +755,7 @@ static void print_attachment_list(FILE *fp, int tag, struct Body *top, struct St
     if (!tag || top->tagged)
     {
       snprintf(type, sizeof(type), "%s/%s", TYPE(top), top->subtype);
-      if (!option(OPTATTACHSPLIT) && !rfc1524_mailcap_lookup(top, type, NULL, MUTT_PRINT))
+      if (!option(OPT_ATTACH_SPLIT) && !rfc1524_mailcap_lookup(top, type, NULL, MUTT_PRINT))
       {
         if ((ascii_strcasecmp("text/plain", top->subtype) == 0) ||
             (ascii_strcasecmp("application/postscript", top->subtype) == 0))
@@ -801,7 +801,7 @@ void mutt_print_attachment_list(FILE *fp, int tag, struct Body *top)
                              _("Print attachment?")) != MUTT_YES)
     return;
 
-  if (!option(OPTATTACHSPLIT))
+  if (!option(OPT_ATTACH_SPLIT))
   {
     if (!can_print(top, tag))
       return;
@@ -810,7 +810,7 @@ void mutt_print_attachment_list(FILE *fp, int tag, struct Body *top)
     thepid = mutt_create_filter(NONULL(PrintCmd), &state.fpout, NULL, NULL);
     print_attachment_list(fp, tag, top, &state);
     safe_fclose(&state.fpout);
-    if (mutt_wait_filter(thepid) != 0 || option(OPTWAITKEY))
+    if (mutt_wait_filter(thepid) != 0 || option(OPT_WAIT_KEY))
       mutt_any_key_to_continue(NULL);
   }
   else
@@ -847,7 +847,7 @@ int mutt_attach_display_loop(struct Menu *menu, int op, FILE *fp, struct Header
     switch (op)
     {
       case OP_DISPLAY_HEADERS:
-        toggle_option(OPTWEED);
+        toggle_option(OPT_WEED);
       /* fall through */
 
       case OP_VIEW_ATTACH:
@@ -912,7 +912,7 @@ static void attach_collapse(struct Body *b, short collapse, short init, short ju
   for (; b; b = b->next)
   {
     i = init || b->collapsed;
-    if (i && option(OPTDIGESTCOLLAPSE) && b->type == TYPEMULTIPART &&
+    if (i && option(OPT_DIGEST_COLLAPSE) && b->type == TYPEMULTIPART &&
         (ascii_strcasecmp(b->subtype, "digest") == 0))
       attach_collapse(b->parts, 1, 1, 0);
     else if (b->type == TYPEMULTIPART || mutt_is_message_type(b->type, b->subtype))
@@ -938,7 +938,7 @@ static const char *Function_not_permitted =
     N_("Function not permitted in attach-message mode.");
 
 #define CHECK_ATTACH                                                           \
-  if (option(OPTATTACHMSG))                                                    \
+  if (option(OPT_ATTACH_MSG))                                                    \
   {                                                                            \
     mutt_flushinp();                                                           \
     mutt_error(_(Function_not_permitted));                                     \
@@ -1114,7 +1114,7 @@ void mutt_view_attachments(struct Header *hdr)
                                   menu->tagprefix ? cur : idx[menu->current]->content,
                                   hdr, menu);
 
-        if (!menu->tagprefix && option(OPTRESOLVE) && menu->current < menu->max - 1)
+        if (!menu->tagprefix && option(OPT_RESOLVE) && menu->current < menu->max - 1)
           menu->current++;
 
         menu->redraw = REDRAW_MOTION_RESYNCH | REDRAW_FULL;
@@ -1157,7 +1157,7 @@ void mutt_view_attachments(struct Header *hdr)
           if (idx[menu->current]->parent_type == TYPEMULTIPART)
           {
             idx[menu->current]->content->deleted = true;
-            if (option(OPTRESOLVE) && menu->current < menu->max - 1)
+            if (option(OPT_RESOLVE) && menu->current < menu->max - 1)
             {
               menu->current++;
               menu->redraw = REDRAW_MOTION_RESYNCH;
@@ -1195,7 +1195,7 @@ void mutt_view_attachments(struct Header *hdr)
         if (!menu->tagprefix)
         {
           idx[menu->current]->content->deleted = false;
-          if (option(OPTRESOLVE) && menu->current < menu->max - 1)
+          if (option(OPT_RESOLVE) && menu->current < menu->max - 1)
           {
             menu->current++;
             menu->redraw = REDRAW_MOTION_RESYNCH;
index 4ed29e244711775c9aa3f51a269fd1da5facb75f..023b0734865cc9279696c081cfb173e4c2e9d897 100644 (file)
--- a/recvcmd.c
+++ b/recvcmd.c
@@ -332,14 +332,14 @@ static void include_header(int quote, FILE *ifp, struct Header *hdr, FILE *ofp,
   int chflags = CH_DECODE;
   char prefix[SHORT_STRING];
 
-  if (option(OPTWEED))
+  if (option(OPT_WEED))
     chflags |= CH_WEED | CH_REORDER;
 
   if (quote)
   {
     if (_prefix)
       strfcpy(prefix, _prefix, sizeof(prefix));
-    else if (!option(OPTTEXTFLOWED))
+    else if (!option(OPT_TEXT_FLOWED))
       _mutt_make_string(prefix, sizeof(prefix), NONULL(Prefix), Context, hdr, 0);
     else
       strfcpy(prefix, ">", sizeof(prefix));
@@ -420,15 +420,15 @@ static void attach_forward_bodies(FILE *fp, struct Header *hdr,
 
   /* prepare the prefix here since we'll need it later. */
 
-  if (option(OPTFORWQUOTE))
+  if (option(OPT_FORW_QUOTE))
   {
-    if (!option(OPTTEXTFLOWED))
+    if (!option(OPT_TEXT_FLOWED))
       _mutt_make_string(prefix, sizeof(prefix), NONULL(Prefix), Context, parent, 0);
     else
       strfcpy(prefix, ">", sizeof(prefix));
   }
 
-  include_header(option(OPTFORWQUOTE), fp, parent, tmpfp, prefix);
+  include_header(option(OPT_FORW_QUOTE), fp, parent, tmpfp, prefix);
 
   /*
    * Now, we have prepared the first part of the message body: The
@@ -463,10 +463,10 @@ static void attach_forward_bodies(FILE *fp, struct Header *hdr,
 
   memset(&st, 0, sizeof(st));
 
-  if (option(OPTFORWQUOTE))
+  if (option(OPT_FORW_QUOTE))
     st.prefix = prefix;
   st.flags = MUTT_CHARCONV;
-  if (option(OPTWEED))
+  if (option(OPT_WEED))
     st.flags |= MUTT_WEED;
   st.fpin = fp;
   st.fpout = tmpfp;
@@ -585,16 +585,16 @@ static void attach_forward_msgs(FILE *fp, struct Header *hdr, struct AttachPtr *
       return;
     }
 
-    if (option(OPTFORWQUOTE))
+    if (option(OPT_FORW_QUOTE))
     {
       chflags |= CH_PREFIX;
       cmflags |= MUTT_CM_PREFIX;
     }
 
-    if (option(OPTFORWDECODE))
+    if (option(OPT_FORW_DECODE))
     {
       cmflags |= MUTT_CM_DECODE | MUTT_CM_CHARCONV;
-      if (option(OPTWEED))
+      if (option(OPT_WEED))
       {
         chflags |= CH_WEED | CH_REORDER;
         cmflags |= MUTT_CM_WEED;
@@ -766,9 +766,9 @@ static void attach_include_reply(FILE *fp, FILE *tmpfp, struct Header *cur, int
 
   mutt_make_attribution(Context, cur, tmpfp);
 
-  if (!option(OPTHEADER))
+  if (!option(OPT_HEADER))
     cmflags |= MUTT_CM_NOHEADER;
-  if (option(OPTWEED))
+  if (option(OPT_WEED))
   {
     chflags |= CH_WEED;
     cmflags |= MUTT_CM_WEED;
@@ -796,9 +796,9 @@ void mutt_attach_reply(FILE *fp, struct Header *hdr, struct AttachPtr **idx,
 
 #ifdef USE_NNTP
   if (flags & SENDNEWS)
-    set_option(OPTNEWSSEND);
+    set_option(OPT_NEWS_SEND);
   else
-    unset_option(OPTNEWSSEND);
+    unset_option(OPT_NEWS_SEND);
 #endif
 
   if (!check_all_msg(idx, idxlen, cur, false))
@@ -859,7 +859,7 @@ void mutt_attach_reply(FILE *fp, struct Header *hdr, struct AttachPtr **idx,
     st.fpin = fp;
     st.fpout = tmpfp;
 
-    if (!option(OPTTEXTFLOWED))
+    if (!option(OPT_TEXT_FLOWED))
       _mutt_make_string(prefix, sizeof(prefix), NONULL(Prefix), Context, parent, 0);
     else
       strfcpy(prefix, ">", sizeof(prefix));
@@ -867,10 +867,10 @@ void mutt_attach_reply(FILE *fp, struct Header *hdr, struct AttachPtr **idx,
     st.prefix = prefix;
     st.flags = MUTT_CHARCONV;
 
-    if (option(OPTWEED))
+    if (option(OPT_WEED))
       st.flags |= MUTT_WEED;
 
-    if (option(OPTHEADER))
+    if (option(OPT_HEADER))
       include_header(1, fp, parent, tmpfp, prefix);
 
     if (cur)
index 20df2ac7f70848a75ab89c2a19916934c799e2f7..0d45214abd13a59402bb50168ee15d716cecb84f 100644 (file)
@@ -724,13 +724,13 @@ int mix_send_message(struct List *chain, const char *tempfile)
     snprintf(cmd, sizeof(cmd), "%s%s%s", tmp, i ? "," : " -l ", cd_quoted);
   }
 
-  if (!option(OPTNOCURSES))
+  if (!option(OPT_NO_CURSES))
     mutt_endwin(NULL);
 
   if ((i = mutt_system(cmd)))
   {
     fprintf(stderr, _("Error sending message, child exited %d.\n"), i);
-    if (!option(OPTNOCURSES))
+    if (!option(OPT_NO_CURSES))
     {
       mutt_any_key_to_continue(NULL);
       mutt_error(_("Error sending message."));
index 3163dd2d60b720ec811bb608af53bf21e9f77979..6a4eb8abf3111fafb1fdf5ac2c6beb5ba6904c76 100644 (file)
--- a/rfc1524.c
+++ b/rfc1524.c
@@ -69,7 +69,7 @@ int rfc1524_expand_command(struct Body *a, char *filename, char *_type, char *co
 
   strfcpy(type, _type, sizeof(type));
 
-  if (option(OPTMAILCAPSANITIZE))
+  if (option(OPT_MAILCAP_SANITIZE))
     mutt_sanitize_filename(type, 0);
 
   while (x < clen - 1 && command[x] && y < sizeof(buf) - 1)
@@ -96,7 +96,7 @@ int rfc1524_expand_command(struct Body *a, char *filename, char *_type, char *co
 
         _pvalue = mutt_get_parameter(param, a->parameter);
         strfcpy(pvalue, NONULL(_pvalue), sizeof(pvalue));
-        if (option(OPTMAILCAPSANITIZE))
+        if (option(OPT_MAILCAP_SANITIZE))
           mutt_sanitize_filename(pvalue, 0);
 
         y += mutt_quote_filename(buf + y, sizeof(buf) - y, pvalue);
index cba42b03e5ae9ec71413b3f07600c5769a0ea3b2..f9944f9fe21aaf29bec7dbdb0338f63da32197b7 100644 (file)
--- a/rfc2047.c
+++ b/rfc2047.c
@@ -849,7 +849,7 @@ void rfc2047_decode(char **pd)
     if (!(p = find_encoded_word(s, &q)))
     {
       /* no encoded words */
-      if (option(OPTIGNORELWS))
+      if (option(OPT_IGNORE_LWS))
       {
         n = mutt_strlen(s);
         if (found_encoded && (m = lwslen(s, n)) != 0)
@@ -888,7 +888,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(OPTIGNORELWS))
+      if (option(OPT_IGNORE_LWS))
       {
         if (found_encoded && (m = lwslen(s, n)) != 0)
         {
index a1ebe9b6c449226d635e137d39da0db9bff0c0a3..346407ce35a970a86d18fa3cab6758d988a8840d 100644 (file)
--- 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(OPTRFC2047PARAMS) && p->value && strstr(p->value, "=?"))
+      if (option(OPT_RFC2047_PARAMS) && p->value && strstr(p->value, "=?"))
         rfc2047_decode(&p->value);
       else if (AssumedCharset && *AssumedCharset)
         convert_nonmime_string(&p->value);
index c0052220de29347c9e196fbd1d2e0aeeed0e2c7d..4504ba3170008a6e4ca2023207143617df2afdc7 100644 (file)
--- a/rfc3676.c
+++ b/rfc3676.c
@@ -78,13 +78,13 @@ static int get_quote_level(const char *line)
  */
 static int space_quotes(struct State *s)
 {
-  /* Allow quote spacing in the pager even for OPTTEXTFLOWED,
+  /* Allow quote spacing in the pager even for OPT_TEXT_FLOWED,
    * but obviously not when replying.
    */
-  if (option(OPTTEXTFLOWED) && (s->flags & MUTT_REPLYING))
+  if (option(OPT_TEXT_FLOWED) && (s->flags & MUTT_REPLYING))
     return 0;
 
-  return option(OPTREFLOWSPACEQUOTES);
+  return option(OPT_REFLOW_SPACE_QUOTES);
 }
 
 /**
@@ -107,7 +107,7 @@ static bool add_quote_suffix(struct State *s, int ql)
     return false;
 
   /* The prefix will add its own space */
-  if (!option(OPTTEXTFLOWED) && !ql && s->prefix)
+  if (!option(OPT_TEXT_FLOWED) && !ql && s->prefix)
     return false;
 
   return true;
@@ -122,7 +122,7 @@ static size_t print_indent(int ql, struct State *s, int add_suffix)
     /* use given prefix only for format=fixed replies to format=flowed,
      * for format=flowed replies to format=flowed, use '>' indentation
      */
-    if (option(OPTTEXTFLOWED))
+    if (option(OPT_TEXT_FLOWED))
       ql++;
     else
     {
@@ -164,7 +164,7 @@ static void flush_par(struct State *s, struct FlowedState *fst)
 static int quote_width(struct State *s, int ql)
 {
   int width = mutt_window_wrap_cols(MuttIndexWindow, ReflowWrap);
-  if (option(OPTTEXTFLOWED) && (s->flags & MUTT_REPLYING))
+  if (option(OPT_TEXT_FLOWED) && (s->flags & MUTT_REPLYING))
   {
     /* When replying, force a wrap at FLOWED_MAX to comply with RFC3676
      * guidelines */
@@ -232,7 +232,7 @@ static void print_flowed_line(char *line, struct State *s, int ql,
     {
       mutt_debug(4, "f=f: break line at %lu, %lu spaces left\n", fst->width, fst->spaces);
       /* only honor trailing spaces for format=flowed replies */
-      if (option(OPTTEXTFLOWED))
+      if (option(OPT_TEXT_FLOWED))
         for (; fst->spaces; fst->spaces--)
           state_putc(' ', s);
       state_putc('\n', s);
diff --git a/score.c b/score.c
index 93b1b0195216dfbeaf88635da137f2315cc439b7..352f4ed54e5002864af94d9755ab00c801c6216d 100644 (file)
--- a/score.c
+++ b/score.c
@@ -53,13 +53,13 @@ void mutt_check_rescore(struct Context *ctx)
 {
   int i;
 
-  if (option(OPTNEEDRESCORE) && option(OPTSCORE))
+  if (option(OPT_NEED_RESCORE) && option(OPT_SCORE))
   {
     if ((Sort & SORT_MASK) == SORT_SCORE || (SortAux & SORT_MASK) == SORT_SCORE)
     {
-      set_option(OPTNEEDRESORT);
+      set_option(OPT_NEED_RESORT);
       if ((Sort & SORT_MASK) == SORT_THREADS)
-        set_option(OPTSORTSUBTHREADS);
+        set_option(OPT_SORT_SUBTHREADS);
     }
 
     /* must redraw the index since the user might have %N in it */
@@ -72,7 +72,7 @@ void mutt_check_rescore(struct Context *ctx)
       ctx->hdrs[i]->pair = 0;
     }
   }
-  unset_option(OPTNEEDRESCORE);
+  unset_option(OPT_NEED_RESCORE);
 }
 
 int mutt_parse_score(struct Buffer *buf, struct Buffer *s, unsigned long data,
@@ -136,7 +136,7 @@ int mutt_parse_score(struct Buffer *buf, struct Buffer *s, unsigned long data,
     strfcpy(err->data, _("Error: score: invalid number"), err->dsize);
     return -1;
   }
-  set_option(OPTNEEDRESCORE);
+  set_option(OPT_NEED_RESCORE);
   return 0;
 }
 
@@ -207,6 +207,6 @@ int mutt_parse_unscore(struct Buffer *buf, struct Buffer *s, unsigned long data,
       }
     }
   }
-  set_option(OPTNEEDRESCORE);
+  set_option(OPT_NEED_RESCORE);
   return 0;
 }
diff --git a/send.c b/send.c
index 597b93db9186d6abf9668ccd5b88b662c0f3b6d2..fc9b61565c5833076785c155169bb1f44d04cdc2 100644 (file)
--- a/send.c
+++ b/send.c
@@ -77,7 +77,7 @@ static void append_signature(FILE *f)
 
   if (Signature && (tmpfp = mutt_open_read(Signature, &thepid)))
   {
-    if (option(OPTSIGDASHES))
+    if (option(OPT_SIG_DASHES))
       fputs("\n-- \n", f);
     mutt_copy_stream(tmpfp, f);
     safe_fclose(&tmpfp);
@@ -253,7 +253,7 @@ static int edit_envelope(struct Envelope *en, int flags)
   struct List *uh = UserHeader;
 
 #ifdef USE_NNTP
-  if (option(OPTNEWSSEND))
+  if (option(OPT_NEWS_SEND))
   {
     if (en->newsgroups)
       strfcpy(buf, en->newsgroups, sizeof(buf));
@@ -268,7 +268,7 @@ static int edit_envelope(struct Envelope *en, int flags)
       strfcpy(buf, en->followup_to, sizeof(buf));
     else
       buf[0] = 0;
-    if (option(OPTASKFOLLOWUP) && mutt_get_field("Followup-To: ", buf, sizeof(buf), 0) != 0)
+    if (option(OPT_ASK_FOLLOWUP) && mutt_get_field("Followup-To: ", buf, sizeof(buf), 0) != 0)
       return -1;
     FREE(&en->followup_to);
     en->followup_to = safe_strdup(buf);
@@ -277,7 +277,7 @@ static int edit_envelope(struct Envelope *en, int flags)
       strfcpy(buf, en->x_comment_to, sizeof(buf));
     else
       buf[0] = 0;
-    if (option(OPTXCOMMENTTO) && option(OPTASKXCOMMENTTO) &&
+    if (option(OPT_XCOMMENT_TO) && option(OPT_ASK_XCOMMENTTO) &&
         mutt_get_field("X-Comment-To: ", buf, sizeof(buf), 0) != 0)
       return -1;
     FREE(&en->x_comment_to);
@@ -288,18 +288,18 @@ static int edit_envelope(struct Envelope *en, int flags)
   {
     if (edit_address(&en->to, _("To: ")) == -1 || en->to == NULL)
       return -1;
-    if (option(OPTASKCC) && edit_address(&en->cc, _("Cc: ")) == -1)
+    if (option(OPT_ASK_CC) && edit_address(&en->cc, _("Cc: ")) == -1)
       return -1;
-    if (option(OPTASKBCC) && edit_address(&en->bcc, _("Bcc: ")) == -1)
+    if (option(OPT_ASK_BCC) && edit_address(&en->bcc, _("Bcc: ")) == -1)
       return -1;
-    if (option(OPTREPLYWITHXORIG) && (flags & (SENDREPLY | SENDLISTREPLY | SENDGROUPREPLY)) &&
+    if (option(OPT_REPLY_WITH_XORIG) && (flags & (SENDREPLY | SENDLISTREPLY | SENDGROUPREPLY)) &&
         (edit_address(&en->from, "From: ") == -1))
       return -1;
   }
 
   if (en->subject)
   {
-    if (option(OPTFASTREPLY))
+    if (option(OPT_FAST_REPLY))
       return 0;
     else
       strfcpy(buf, en->subject, sizeof(buf));
@@ -454,7 +454,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(OPTFORWDECODE))
+  if (WithCrypto && (cur->security & ENCRYPT) && option(OPT_FORW_DECODE))
   {
     /* make sure we have the user's passphrase before proceeding... */
     if (!crypt_valid_passphrase(cur->security))
@@ -463,16 +463,16 @@ static int include_forward(struct Context *ctx, struct Header *cur, FILE *out)
 
   mutt_forward_intro(ctx, cur, out);
 
-  if (option(OPTFORWDECODE))
+  if (option(OPT_FORW_DECODE))
   {
     cmflags |= MUTT_CM_DECODE | MUTT_CM_CHARCONV;
-    if (option(OPTWEED))
+    if (option(OPT_WEED))
     {
       chflags |= CH_WEED | CH_REORDER;
       cmflags |= MUTT_CM_WEED;
     }
   }
-  if (option(OPTFORWQUOTE))
+  if (option(OPT_FORW_QUOTE))
     cmflags |= MUTT_CM_PREFIX;
 
   /* wrapping headers for forwarding is considered a display
@@ -525,9 +525,9 @@ static int include_reply(struct Context *ctx, struct Header *cur, FILE *out)
 
   mutt_make_attribution(ctx, cur, out);
 
-  if (!option(OPTHEADER))
+  if (!option(OPT_HEADER))
     cmflags |= MUTT_CM_NOHEADER;
-  if (option(OPTWEED))
+  if (option(OPT_WEED))
   {
     chflags |= CH_WEED | CH_REORDER;
     cmflags |= MUTT_CM_WEED;
@@ -556,7 +556,7 @@ static int default_to(struct Address **to, struct Envelope *env, int flags, int
   if (flags & SENDLISTREPLY)
     return 0;
 
-  if (!option(OPTREPLYSELF) && mutt_addr_is_user(env->from))
+  if (!option(OPT_REPLY_SELF) && mutt_addr_is_user(env->from))
   {
     /* mail is from the user, assume replying to recipients */
     rfc822_append(to, env->to, 1);
@@ -565,7 +565,7 @@ static int default_to(struct Address **to, struct Envelope *env, int flags, int
   {
     if ((addrcmp(env->from, env->reply_to) && !env->reply_to->next &&
          !env->reply_to->personal) ||
-        (option(OPTIGNORELISTREPLYTO) && mutt_is_mail_list(env->reply_to) &&
+        (option(OPT_IGNORE_LIST_REPLY_TO) && mutt_is_mail_list(env->reply_to) &&
          (addrsrc(env->reply_to, env->to) || addrsrc(env->reply_to, env->cc))))
     {
       /* If the Reply-To: address is a mailing list, assume that it was
@@ -677,7 +677,7 @@ static struct List *make_references(struct Envelope *e)
 
 void mutt_fix_reply_recipients(struct Envelope *env)
 {
-  if (!option(OPTMETOO))
+  if (!option(OPT_ME_TOO))
   {
     /* the order is important here.  do the CC: first so that if the
      * the user is the only recipient, it ends up on the TO: field
@@ -763,7 +763,7 @@ void mutt_add_to_reference_headers(struct Envelope *env, struct Envelope *curenv
     *qq = q;
 
 #ifdef USE_NNTP
-  if (option(OPTNEWSSEND) && option(OPTXCOMMENTTO) && curenv->from)
+  if (option(OPT_NEWS_SEND) && option(OPT_XCOMMENT_TO) && curenv->from)
     env->x_comment_to = safe_strdup(mutt_get_name(curenv->from));
 #endif
 }
@@ -868,7 +868,7 @@ static int envelope_defaults(struct Envelope *env, struct Context *ctx,
   else if (flags & SENDFORWARD)
   {
     mutt_make_forward_subject(env, ctx, cur);
-    if (option(OPTFORWREF))
+    if (option(OPT_FORW_REF))
       make_reference_headers(tag ? NULL : curenv, env, ctx);
   }
 
@@ -996,10 +996,10 @@ void mutt_set_followup_to(struct Envelope *e)
    * it hasn't already been set
    */
 
-  if (!option(OPTFOLLOWUPTO))
+  if (!option(OPT_FOLLOW_UP_TO))
     return;
 #ifdef USE_NNTP
-  if (option(OPTNEWSSEND))
+  if (option(OPT_NEWS_SEND))
   {
     if (!e->followup_to && e->newsgroups && (strrchr(e->newsgroups, ',')))
       e->followup_to = safe_strdup(e->newsgroups);
@@ -1086,7 +1086,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(OPTREVREAL))
+    if (!option(OPT_REV_REAL))
       FREE(&tmp->personal);
   }
   return tmp;
@@ -1104,7 +1104,7 @@ struct Address *mutt_default_from(void)
 
   if (From)
     adr = rfc822_cpy_adr_real(From);
-  else if (option(OPTUSEDOMAIN))
+  else if (option(OPT_USE_DOMAIN))
   {
     adr = rfc822_new_address();
     adr->mailbox = safe_malloc(mutt_strlen(Username) + mutt_strlen(fqdn) + 2);
@@ -1134,9 +1134,9 @@ static int send_message(struct Header *msg)
     return -1;
 
 #ifdef USE_SMTP
-  old_write_bcc = option(OPTWRITEBCC);
+  old_write_bcc = option(OPT_WRITE_BCC);
   if (SmtpUrl)
-    unset_option(OPTWRITEBCC);
+    unset_option(OPT_WRITE_BCC);
 #endif
 #ifdef MIXMASTER
   mutt_write_rfc822_header(tempfp, msg->env, msg->content, 0, msg->chain ? 1 : 0);
@@ -1146,7 +1146,7 @@ static int send_message(struct Header *msg)
 #endif
 #ifdef USE_SMTP
   if (old_write_bcc)
-    set_option(OPTWRITEBCC);
+    set_option(OPT_WRITE_BCC);
 #endif
 
   fputc('\n', tempfp); /* tie off the header. */
@@ -1172,7 +1172,7 @@ static int send_message(struct Header *msg)
 
 #ifdef USE_SMTP
 #ifdef USE_NNTP
-  if (!option(OPTNEWSSEND))
+  if (!option(OPT_NEWS_SEND))
 #endif
     if (SmtpUrl)
       return mutt_smtp_send(msg->env->from, msg->env->to, msg->env->cc, msg->env->bcc,
@@ -1271,7 +1271,7 @@ int mutt_resend_message(FILE *fp, struct Context *ctx, struct Header *cur)
      * so fix that here */
     if (!(msg->security & (APPLICATION_SMIME | APPLICATION_PGP)))
     {
-      if ((WithCrypto & APPLICATION_SMIME) && option(OPTSMIMEISDEFAULT))
+      if ((WithCrypto & APPLICATION_SMIME) && option(OPT_SMIME_IS_DEFAULT))
         msg->security |= APPLICATION_SMIME;
       else if (WithCrypto & APPLICATION_PGP)
         msg->security |= APPLICATION_PGP;
@@ -1279,7 +1279,7 @@ int mutt_resend_message(FILE *fp, struct Context *ctx, struct Header *cur)
         msg->security |= APPLICATION_SMIME;
     }
 
-    if (option(OPTCRYPTOPPORTUNISTICENCRYPT))
+    if (option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT))
     {
       msg->security |= OPPENCRYPT;
       crypt_opportunistic_encrypt(msg);
@@ -1374,9 +1374,9 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile,
 
 #ifdef USE_NNTP
   if (flags & SENDNEWS)
-    set_option(OPTNEWSSEND);
+    set_option(OPT_NEWS_SEND);
   else
-    unset_option(OPTNEWSSEND);
+    unset_option(OPT_NEWS_SEND);
 #endif
 
   if (!flags && !msg && quadoption(OPT_RECALL) != MUTT_NO && mutt_num_postponed(1))
@@ -1420,12 +1420,12 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile,
       if (msg->env->newsgroups)
       {
         flags |= SENDNEWS;
-        set_option(OPTNEWSSEND);
+        set_option(OPT_NEWS_SEND);
       }
       else
       {
         flags &= ~SENDNEWS;
-        unset_option(OPTNEWSSEND);
+        unset_option(OPT_NEWS_SEND);
       }
 #endif
     }
@@ -1496,7 +1496,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(OPTREVNAME) && !(flags & (SENDPOSTPONED | SENDRESEND)))
+  if (cur && option(OPT_REV_NAME) && !(flags & (SENDPOSTPONED | SENDRESEND)))
   {
     /* we shouldn't have to worry about freeing `msg->env->from' before
      * setting it here since this code will only execute when doing some
@@ -1516,7 +1516,7 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile,
           msg->env->from->mailbox);
     msg->env->from = set_reverse_name(cur->env);
   }
-  if (cur && option(OPTREPLYWITHXORIG) && !(flags & (SENDPOSTPONED | SENDRESEND | SENDFORWARD)))
+  if (cur && option(OPT_REPLY_WITH_XORIG) && !(flags & (SENDPOSTPONED | SENDRESEND | SENDFORWARD)))
   {
     /* We shouldn't have to worry about freeing `msg->env->from' before
      * setting it here since this code will only execute when doing some
@@ -1524,7 +1524,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 OPTREVNAME handling, and we don't use
+     * then it theoretically comes from OPT_REV_NAME handling, and we don't use
      * the `X-Orig-To header'.
      */
     if (cur->env->x_original_to && !msg->env->from)
@@ -1539,13 +1539,13 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile,
   }
 
   if (!(flags & (SENDPOSTPONED | SENDRESEND)) &&
-      !((flags & SENDDRAFTFILE) && option(OPTRESUMEDRAFTFILES)))
+      !((flags & SENDDRAFTFILE) && option(OPT_RESUME_DRAFT_FILES)))
   {
     if ((flags & (SENDREPLY | SENDFORWARD)) && ctx &&
         envelope_defaults(msg->env, ctx, cur, flags) == -1)
       goto cleanup;
 
-    if (option(OPTHDRS))
+    if (option(OPT_HDRS))
       process_user_recips(msg->env);
 
     /* Expand aliases and remove duplicates/crossrefs */
@@ -1559,8 +1559,8 @@ 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(OPTAUTOEDIT) && option(OPTEDITHDRS)) &&
-        !((flags & SENDREPLY) && option(OPTFASTREPLY)))
+    if (!(flags & (SENDMAILX | SENDBATCH)) && !(option(OPT_AUTO_EDIT) && option(OPT_EDIT_HDRS)) &&
+        !((flags & SENDREPLY) && option(OPT_FAST_REPLY)))
     {
       if (edit_envelope(msg->env, flags) == -1)
         goto cleanup;
@@ -1604,7 +1604,7 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile,
 
     if (!(flags & SENDKEY))
     {
-      if (option(OPTTEXTFLOWED) && msg->content->type == TYPETEXT &&
+      if (option(OPT_TEXT_FLOWED) && msg->content->type == TYPETEXT &&
           (ascii_strcasecmp(msg->content->subtype, "plain") == 0))
         mutt_set_parameter("format", "flowed", &msg->content->parameter);
     }
@@ -1613,18 +1613,18 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile,
     if (killfrom)
     {
       rfc822_free_address(&msg->env->from);
-      if (option(OPTUSEFROM) && !(flags & (SENDPOSTPONED | SENDRESEND)))
+      if (option(OPT_USE_FROM) && !(flags & (SENDPOSTPONED | SENDRESEND)))
         msg->env->from = mutt_default_from();
       killfrom = false;
     }
 
-    if (option(OPTHDRS))
+    if (option(OPT_HDRS))
       process_user_header(msg->env);
 
     if (flags & SENDBATCH)
       mutt_copy_stream(stdin, tempfp);
 
-    if (option(OPTSIGONTOP) && !(flags & (SENDMAILX | SENDKEY | SENDBATCH)) &&
+    if (option(OPT_SIG_ON_TOP) && !(flags & (SENDMAILX | SENDKEY | SENDBATCH)) &&
         Editor && (mutt_strcmp(Editor, "builtin") != 0))
       append_signature(tempfp);
 
@@ -1633,7 +1633,7 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile,
         generate_body(tempfp, msg, flags, ctx, cur) == -1)
       goto cleanup;
 
-    if (!option(OPTSIGONTOP) && !(flags & (SENDMAILX | SENDKEY | SENDBATCH)) &&
+    if (!option(OPT_SIG_ON_TOP) && !(flags & (SENDMAILX | SENDKEY | SENDBATCH)) &&
         Editor && (mutt_strcmp(Editor, "builtin") != 0))
       append_signature(tempfp);
   }
@@ -1676,7 +1676,7 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile,
      *    recipients.
      */
     if (!(flags & SENDKEY) &&
-        ((flags & SENDFORWARD) == 0 || (option(OPTEDITHDRS) && option(OPTAUTOEDIT)) ||
+        ((flags & SENDFORWARD) == 0 || (option(OPT_EDIT_HDRS) && option(OPT_AUTO_EDIT)) ||
          query_quadoption(OPT_FORWEDIT, _("Edit forwarded message?")) == MUTT_YES))
     {
       /* If the this isn't a text message, look for a mailcap edit command */
@@ -1687,7 +1687,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(OPTEDITHDRS))
+      else if (option(OPT_EDIT_HDRS))
       {
         mutt_env_to_local(msg->env);
         mutt_edit_headers(Editor, msg->content->filename, msg, fcc, sizeof(fcc));
@@ -1710,7 +1710,7 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile,
        * performed.  If it has already been performed, the format=flowed
        * parameter will be present.
        */
-      if (option(OPTTEXTFLOWED) && msg->content->type == TYPETEXT &&
+      if (option(OPT_TEXT_FLOWED) && msg->content->type == TYPETEXT &&
           (ascii_strcasecmp("plain", msg->content->subtype) == 0))
       {
         char *p = mutt_get_parameter("format", msg->content->parameter);
@@ -1753,26 +1753,26 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile,
   if (WithCrypto && (msg->security == 0) &&
       !(flags & (SENDBATCH | SENDMAILX | SENDPOSTPONED | SENDRESEND)))
   {
-    if (option(OPTCRYPTAUTOSIGN))
+    if (option(OPT_CRYPT_AUTO_SIGN))
       msg->security |= SIGN;
-    if (option(OPTCRYPTAUTOENCRYPT))
+    if (option(OPT_CRYPT_AUTO_ENCRYPT))
       msg->security |= ENCRYPT;
-    if (option(OPTCRYPTREPLYENCRYPT) && cur && (cur->security & ENCRYPT))
+    if (option(OPT_CRYPT_REPLY_ENCRYPT) && cur && (cur->security & ENCRYPT))
       msg->security |= ENCRYPT;
-    if (option(OPTCRYPTREPLYSIGN) && cur && (cur->security & SIGN))
+    if (option(OPT_CRYPT_REPLY_SIGN) && cur && (cur->security & SIGN))
       msg->security |= SIGN;
-    if (option(OPTCRYPTREPLYSIGNENCRYPTED) && cur && (cur->security & ENCRYPT))
+    if (option(OPT_CRYPT_REPLY_SIGN_ENCRYPTED) && cur && (cur->security & ENCRYPT))
       msg->security |= SIGN;
     if ((WithCrypto & APPLICATION_PGP) &&
-        ((msg->security & (ENCRYPT | SIGN)) || option(OPTCRYPTOPPORTUNISTICENCRYPT)))
+        ((msg->security & (ENCRYPT | SIGN)) || option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT)))
     {
-      if (option(OPTPGPAUTOINLINE))
+      if (option(OPT_PGP_AUTO_INLINE))
         msg->security |= INLINE;
-      if (option(OPTPGPREPLYINLINE) && cur && (cur->security & INLINE))
+      if (option(OPT_PGP_REPLY_INLINE) && cur && (cur->security & INLINE))
         msg->security |= INLINE;
     }
 
-    if (msg->security || option(OPTCRYPTOPPORTUNISTICENCRYPT))
+    if (msg->security || option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT))
     {
       /*
        * When replying / forwarding, use the original message's
@@ -1785,10 +1785,10 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile,
        */
       if (cur)
       {
-        if ((WithCrypto & APPLICATION_PGP) && option(OPTCRYPTAUTOPGP) &&
+        if ((WithCrypto & APPLICATION_PGP) && option(OPT_CRYPT_AUTO_PGP) &&
             (cur->security & APPLICATION_PGP))
           msg->security |= APPLICATION_PGP;
-        else if ((WithCrypto & APPLICATION_SMIME) && option(OPTCRYPTAUTOSMIME) &&
+        else if ((WithCrypto & APPLICATION_SMIME) && option(OPT_CRYPT_AUTO_SMIME) &&
                  (cur->security & APPLICATION_SMIME))
           msg->security |= APPLICATION_SMIME;
       }
@@ -1799,21 +1799,21 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile,
        */
       if (!(msg->security & (APPLICATION_SMIME | APPLICATION_PGP)))
       {
-        if ((WithCrypto & APPLICATION_SMIME) && option(OPTCRYPTAUTOSMIME) &&
-            option(OPTSMIMEISDEFAULT))
+        if ((WithCrypto & APPLICATION_SMIME) && option(OPT_CRYPT_AUTO_SMIME) &&
+            option(OPT_SMIME_IS_DEFAULT))
           msg->security |= APPLICATION_SMIME;
-        else if ((WithCrypto & APPLICATION_PGP) && option(OPTCRYPTAUTOPGP))
+        else if ((WithCrypto & APPLICATION_PGP) && option(OPT_CRYPT_AUTO_PGP))
           msg->security |= APPLICATION_PGP;
-        else if ((WithCrypto & APPLICATION_SMIME) && option(OPTCRYPTAUTOSMIME))
+        else if ((WithCrypto & APPLICATION_SMIME) && option(OPT_CRYPT_AUTO_SMIME))
           msg->security |= APPLICATION_SMIME;
       }
     }
 
     /* opportunistic encrypt relies on SMIME or PGP already being selected */
-    if (option(OPTCRYPTOPPORTUNISTICENCRYPT))
+    if (option(OPT_CRYPT_OPPORTUNISTIC_ENCRYPT))
     {
-      /* If something has already enabled encryption, e.g. OPTCRYPTAUTOENCRYPT
-       * or OPTCRYPTREPLYENCRYPT, then don't enable opportunistic encrypt for
+      /* If something has already enabled encryption, e.g. OPT_CRYPT_AUTO_ENCRYPT
+       * or OPT_CRYPT_REPLY_ENCRYPT, then don't enable opportunistic encrypt for
        * the message.
        */
       if (!(msg->security & ENCRYPT))
@@ -1876,7 +1876,7 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile,
       if (msg->content->next)
         msg->content = mutt_make_multipart(msg->content);
 
-      if (WithCrypto && option(OPTPOSTPONEENCRYPT) && (msg->security & ENCRYPT))
+      if (WithCrypto && option(OPT_POSTPONE_ENCRYPT) && (msg->security & ENCRYPT))
       {
         char *encrypt_as = NULL;
 
@@ -2055,7 +2055,7 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile,
       free_clear_content = true;
   }
 
-  if (!option(OPTNOCURSES) && !(flags & SENDMAILX))
+  if (!option(OPT_NO_CURSES) && !(flags & SENDMAILX))
     mutt_message(_("Sending message..."));
 
   mutt_prepare_envelope(msg->env, 1);
@@ -2084,7 +2084,7 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile,
     struct Body *save_sig = NULL;
     struct Body *save_parts = NULL;
 
-    if (WithCrypto && (msg->security & (ENCRYPT | SIGN)) && option(OPTFCCCLEAR))
+    if (WithCrypto && (msg->security & (ENCRYPT | SIGN)) && option(OPT_FCC_CLEAR))
       msg->content = clear_content;
 
     /* check to see if the user wants copies of all attachments */
@@ -2199,13 +2199,13 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile,
       goto cleanup;
     }
   }
-  else if (!option(OPTNOCURSES) && !(flags & SENDMAILX))
+  else if (!option(OPT_NO_CURSES) && !(flags & SENDMAILX))
   {
     mutt_message(i != 0 ? _("Sending in background.") :
                           (flags & SENDNEWS) ? _("Article posted.") : /* USE_NNTP */
                               _("Mail sent."));
 #ifdef USE_NOTMUCH
-    if (option(OPTNOTMUCHRECORD))
+    if (option(OPT_NOTMUCH_RECORD))
       nm_record_message(ctx, finalpath, cur);
 #endif
   }
index 49702dc5667381e856dcf906e317527a116cde1a..c50b5a6d9fbbcdd48682b61ce52f79f02d76f66a 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -1235,10 +1235,10 @@ static void set_encoding(struct Body *b, struct Content *info)
   {
     char *chsname = mutt_get_body_charset(send_charset, sizeof(send_charset), b);
     if ((info->lobin && (ascii_strncasecmp(chsname, "iso-2022", 8) != 0)) ||
-        info->linemax > 990 || (info->from && option(OPTENCODEFROM)))
+        info->linemax > 990 || (info->from && option(OPT_ENCODE_FROM)))
       b->encoding = ENCQUOTEDPRINTABLE;
     else if (info->hibin)
-      b->encoding = option(OPTALLOW8BIT) ? ENC8BIT : ENCQUOTEDPRINTABLE;
+      b->encoding = option(OPT_ALLOW_8BIT) ? ENC8BIT : ENCQUOTEDPRINTABLE;
     else
       b->encoding = ENC7BIT;
   }
@@ -1246,7 +1246,7 @@ static void set_encoding(struct Body *b, struct Content *info)
   {
     if (info->lobin || info->hibin)
     {
-      if (option(OPTALLOW8BIT) && !info->lobin)
+      if (option(OPT_ALLOW_8BIT) && !info->lobin)
         b->encoding = ENC8BIT;
       else
         mutt_message_to_7bit(b, NULL);
@@ -1331,7 +1331,7 @@ struct Body *mutt_make_message_attach(struct Context *ctx, struct Header *hdr, i
 
   if (WithCrypto)
   {
-    if ((option(OPTMIMEFORWDECODE) || option(OPTFORWDECRYPT)) && (hdr->security & ENCRYPT))
+    if ((option(OPT_MIME_FORW_DECODE) || option(OPT_FORW_DECRYPT)) && (hdr->security & ENCRYPT))
     {
       if (!crypt_valid_passphrase(hdr->security))
         return NULL;
@@ -1356,8 +1356,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 OPTMIMEFORWDECODE */
-  if (!attach_msg && option(OPTMIMEFORWDECODE))
+  /* If we are attaching a message, ignore OPT_MIME_FORW_DECODE */
+  if (!attach_msg && option(OPT_MIME_FORW_DECODE))
   {
     chflags |= CH_MIME | CH_TXTPLAIN;
     cmflags = MUTT_CM_DECODE | MUTT_CM_CHARCONV;
@@ -1366,7 +1366,7 @@ struct Body *mutt_make_message_attach(struct Context *ctx, struct Header *hdr, i
     if ((WithCrypto & APPLICATION_SMIME))
       pgp &= ~SMIMEENCRYPT;
   }
-  else if (WithCrypto && option(OPTFORWDECRYPT) && (hdr->security & ENCRYPT))
+  else if (WithCrypto && option(OPT_FORW_DECRYPT) && (hdr->security & ENCRYPT))
   {
     if ((WithCrypto & APPLICATION_PGP) && mutt_is_multipart_encrypted(hdr->content))
     {
@@ -1919,7 +1919,7 @@ int mutt_write_one_header(FILE *fp, const char *tag, const char *value,
   int pfxw = mutt_strwidth(pfx);
   char *v = safe_strdup(value);
 
-  if (!(flags & CH_DISPLAY) || option(OPTWEED))
+  if (!(flags & CH_DISPLAY) || option(OPT_WEED))
     v = unfold_header(v);
 
   /* when not displaying, use sane wrap value */
@@ -2014,7 +2014,7 @@ int mutt_write_rfc822_header(FILE *fp, struct Envelope *env,
   if (mode == 0 && !privacy)
     fputs(mutt_make_date(buffer, sizeof(buffer)), fp);
 
-  /* OPTUSEFROM is not consulted here so that we can still write a From:
+  /* OPT_USE_FROM is not consulted here so that we can still write a From:
    * field if the user sets it with the `my_hdr' command
    */
   if (env->from && !privacy)
@@ -2038,7 +2038,7 @@ int mutt_write_rfc822_header(FILE *fp, struct Envelope *env,
   }
   else if (mode > 0)
 #ifdef USE_NNTP
-    if (!option(OPTNEWSSEND))
+    if (!option(OPT_NEWS_SEND))
 #endif
       fputs("To: \n", fp);
 
@@ -2049,13 +2049,13 @@ int mutt_write_rfc822_header(FILE *fp, struct Envelope *env,
   }
   else if (mode > 0)
 #ifdef USE_NNTP
-    if (!option(OPTNEWSSEND))
+    if (!option(OPT_NEWS_SEND))
 #endif
       fputs("Cc: \n", fp);
 
   if (env->bcc)
   {
-    if (mode != 0 || option(OPTWRITEBCC))
+    if (mode != 0 || option(OPT_WRITE_BCC))
     {
       fputs("Bcc: ", fp);
       mutt_write_address_list(env->bcc, fp, 5, 0);
@@ -2063,24 +2063,24 @@ int mutt_write_rfc822_header(FILE *fp, struct Envelope *env,
   }
   else if (mode > 0)
 #ifdef USE_NNTP
-    if (!option(OPTNEWSSEND))
+    if (!option(OPT_NEWS_SEND))
 #endif
       fputs("Bcc: \n", fp);
 
 #ifdef USE_NNTP
   if (env->newsgroups)
     fprintf(fp, "Newsgroups: %s\n", env->newsgroups);
-  else if (mode == 1 && option(OPTNEWSSEND))
+  else if (mode == 1 && option(OPT_NEWS_SEND))
     fputs("Newsgroups: \n", fp);
 
   if (env->followup_to)
     fprintf(fp, "Followup-To: %s\n", env->followup_to);
-  else if (mode == 1 && option(OPTNEWSSEND))
+  else if (mode == 1 && option(OPT_NEWS_SEND))
     fputs("Followup-To: \n", fp);
 
   if (env->x_comment_to)
     fprintf(fp, "X-Comment-To: %s\n", env->x_comment_to);
-  else if (mode == 1 && option(OPTNEWSSEND) && option(OPTXCOMMENTTO))
+  else if (mode == 1 && option(OPT_NEWS_SEND) && option(OPT_XCOMMENT_TO))
     fputs("X-Comment-To: \n", fp);
 #endif
 
@@ -2103,7 +2103,7 @@ int mutt_write_rfc822_header(FILE *fp, struct Envelope *env,
 
   if (env->mail_followup_to)
 #ifdef USE_NNTP
-    if (!option(OPTNEWSSEND))
+    if (!option(OPT_NEWS_SEND))
 #endif
     {
       fputs("Mail-Followup-To: ", fp);
@@ -2163,7 +2163,7 @@ int mutt_write_rfc822_header(FILE *fp, struct Envelope *env,
     }
   }
 
-  if (mode == 0 && !privacy && option(OPTXMAILER) && !has_agent)
+  if (mode == 0 && !privacy && option(OPT_XMAILER) && !has_agent)
   {
     /* Add a vanity header */
     fprintf(fp, "User-Agent: NeoMutt/%s%s (%s)\n", PACKAGE_VERSION, GitVer, MUTT_VERSION);
@@ -2207,7 +2207,7 @@ const char *mutt_fqdn(short may_hide_host)
   {
     p = Fqdn;
 
-    if (may_hide_host && option(OPTHIDDENHOST))
+    if (may_hide_host && option(OPT_HIDDEN_HOST))
     {
       if ((p = strchr(Fqdn, '.')))
         p++;
@@ -2461,7 +2461,7 @@ int mutt_invoke_sendmail(struct Address *from, struct Address *to, struct Addres
   int i;
 
 #ifdef USE_NNTP
-  if (option(OPTNEWSSEND))
+  if (option(OPT_NEWS_SEND))
   {
     char cmd[LONG_STRING];
 
@@ -2515,7 +2515,7 @@ int mutt_invoke_sendmail(struct Address *from, struct Address *to, struct Addres
   }
 
 #ifdef USE_NNTP
-  if (!option(OPTNEWSSEND))
+  if (!option(OPT_NEWS_SEND))
   {
 #endif
     /* If Sendmail contained a "--", we save the recipients to append to
@@ -2533,10 +2533,10 @@ int mutt_invoke_sendmail(struct Address *from, struct Address *to, struct Addres
       }
     }
 
-    if (eightbit && option(OPTUSE8BITMIME))
+    if (eightbit && option(OPT_USE_8BIT_MIME))
       args = add_option(args, &argslen, &argsmax, "-B8BITMIME");
 
-    if (option(OPTENVFROM))
+    if (option(OPT_ENV_FROM))
     {
       if (EnvFrom)
       {
@@ -2579,10 +2579,10 @@ int mutt_invoke_sendmail(struct Address *from, struct Address *to, struct Addres
    * and is set up to prompt using ncurses pinentry.  If we
    * mutt_endwin() it leaves other users staring at a blank screen.
    * So instead, just force a hard redraw on the next refresh. */
-  if (!option(OPTNOCURSES))
+  if (!option(OPT_NO_CURSES))
     mutt_need_hard_redraw();
 
-  if ((i = send_msg(path, args, msg, option(OPTNOCURSES) ? NULL : &childout)) != (EX_OK & 0xff))
+  if ((i = send_msg(path, args, msg, option(OPT_NO_CURSES) ? NULL : &childout)) != (EX_OK & 0xff))
   {
     if (i != S_BKG)
     {
@@ -2660,7 +2660,7 @@ void mutt_prepare_envelope(struct Envelope *env, int final)
 
   if (env->subject)
 #ifdef USE_NNTP
-    if (!option(OPTNEWSSEND) || option(OPTMIMESUBJECT))
+    if (!option(OPT_NEWS_SEND) || option(OPT_MIME_SUBJECT))
 #endif
     {
       rfc2047_encode_string(&env->subject);
@@ -2716,7 +2716,7 @@ static int _mutt_bounce_message(FILE *fp, struct Header *h, struct Address *to,
     int ch_flags = CH_XMIT | CH_NONEWLINE | CH_NOQFROM;
     char *msgid_str = NULL;
 
-    if (!option(OPTBOUNCEDELIVERED))
+    if (!option(OPT_BOUNCE_DELIVERED))
       ch_flags |= CH_WEED_DELIVERED;
 
     fseeko(fp, h->offset, SEEK_SET);
@@ -2785,7 +2785,7 @@ int mutt_bounce_message(FILE *fp, struct Header *h, struct Address *to)
   rfc822_write_address(resent_from, sizeof(resent_from), from, 0);
 
 #ifdef USE_NNTP
-  unset_option(OPTNEWSSEND);
+  unset_option(OPT_NEWS_SEND);
 #endif
 
   /*
index cd4801d297a4ebc2fa39843e5b3ed79f4321f8ea..868c400cbb55061c3f19fc56b4dedf0b2c62c8f4 100644 (file)
--- 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(OPTSIDEBARNEWMAILONLY);
+  short new_only = option(OPT_SIDEBAR_NEWMAIL_ONLY);
   struct SbEntry *sbe = NULL;
   for (int i = 0; i < EntryCount; i++)
   {
@@ -468,7 +468,7 @@ static int select_next_new(void)
     entry++;
     if (entry == EntryCount)
     {
-      if (option(OPTSIDEBARNEXTNEWWRAP))
+      if (option(OPT_SIDEBAR_NEXT_NEW_WRAP))
         entry = 0;
       else
         return false;
@@ -523,7 +523,7 @@ static bool select_prev_new(void)
     entry--;
     if (entry < 0)
     {
-      if (option(OPTSIDEBARNEXTNEWWRAP))
+      if (option(OPT_SIDEBAR_NEXT_NEW_WRAP))
         entry = EntryCount - 1;
       else
         return false;
@@ -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(OPTSIDEBARNEWMAILONLY))
+  if (option(OPT_SIDEBAR_NEWMAIL_ONLY))
   {
     TopIndex = BotIndex = -1;
     while (BotIndex < HilIndex)
@@ -702,7 +702,7 @@ static int draw_divider(int num_rows, int num_cols)
     altchar = SB_DIV_USER; /* User config */
   }
 
-  if (option(OPTASCIICHARS) && (altchar != SB_DIV_ASCII))
+  if (option(OPT_ASCII_CHARS) && (altchar != SB_DIV_ASCII))
   {
     /* $ascii_chars overrides Unicode divider chars */
     if (altchar == SB_DIV_UTF8)
@@ -728,7 +728,7 @@ static int draw_divider(int num_rows, int num_cols)
 
   SETCOLOR(MT_COLOR_DIVIDER);
 
-  int col = option(OPTSIDEBARONRIGHT) ? 0 : (SidebarWidth - delim_len);
+  int col = option(OPT_SIDEBAR_ON_RIGHT) ? 0 : (SidebarWidth - delim_len);
 
   for (i = 0; i < num_rows; i++)
   {
@@ -765,7 +765,7 @@ static void fill_empty_space(int first_row, int num_rows, int div_width, int num
   /* Fill the remaining rows with blank space */
   SETCOLOR(MT_COLOR_NORMAL);
 
-  if (!option(OPTSIDEBARONRIGHT))
+  if (!option(OPT_SIDEBAR_ON_RIGHT))
     div_width = 0;
   for (int r = 0; r < num_rows; r++)
   {
@@ -839,7 +839,7 @@ static void draw_sidebar(int num_rows, int num_cols, int div_width)
     }
 
     int col = 0;
-    if (option(OPTSIDEBARONRIGHT))
+    if (option(OPT_SIDEBAR_ON_RIGHT))
       col = div_width;
 
     mutt_window_move(MuttSidebarWindow, row, col);
@@ -874,7 +874,7 @@ static void draw_sidebar(int num_rows, int num_cols, int div_width)
     int sidebar_folder_depth = 0;
     char *sidebar_folder_name = NULL;
     int i;
-    if (option(OPTSIDEBARSHORTPATH))
+    if (option(OPT_SIDEBAR_SHORT_PATH))
     {
       /* disregard a trailing separator, so strlen() - 2 */
       sidebar_folder_name = b->path;
@@ -894,7 +894,7 @@ static void draw_sidebar(int num_rows, int num_cols, int div_width)
     {
       sidebar_folder_name = b->desc;
     }
-    else if (maildir_is_prefix && option(OPTSIDEBARFOLDERINDENT))
+    else if (maildir_is_prefix && option(OPT_SIDEBAR_FOLDER_INDENT))
     {
       const char *tmp_folder_name = NULL;
       int lastsep = 0;
@@ -910,7 +910,7 @@ static void draw_sidebar(int num_rows, int num_cols, int div_width)
       }
       if (sidebar_folder_depth > 0)
       {
-        if (option(OPTSIDEBARSHORTPATH))
+        if (option(OPT_SIDEBAR_SHORT_PATH))
           tmp_folder_name += lastsep; /* basename */
         int sfn_len = mutt_strlen(tmp_folder_name) +
                       sidebar_folder_depth * mutt_strlen(SidebarIndentString) + 1;
@@ -940,7 +940,7 @@ static void draw_sidebar(int num_rows, int num_cols, int div_width)
  */
 void mutt_sb_draw(void)
 {
-  if (!option(OPTSIDEBAR))
+  if (!option(OPT_SIDEBAR))
     return;
 
 #ifdef USE_SLANG_CURSES
@@ -987,7 +987,7 @@ void mutt_sb_draw(void)
  */
 void mutt_sb_change_mailbox(int op)
 {
-  if (!option(OPTSIDEBAR))
+  if (!option(OPT_SIDEBAR))
     return;
 
   if (HilIndex < 0) /* It'll get reset on the next draw */
@@ -1060,7 +1060,7 @@ void mutt_sb_set_buffystats(const struct Context *ctx)
  */
 const char *mutt_sb_get_highlight(void)
 {
-  if (!option(OPTSIDEBAR))
+  if (!option(OPT_SIDEBAR))
     return NULL;
 
   if (!EntryCount || HilIndex < 0)
index 1586cd310a9e43073dae0ad666d590e532c648fe..0ad1788ace0283d8c13894f8a6c2f934376c9953 100644 (file)
--- a/signal.c
+++ b/signal.c
@@ -73,7 +73,7 @@ static void sighandler(int sig)
   switch (sig)
   {
     case SIGTSTP: /* user requested a suspend */
-      if (!option(OPTSUSPEND))
+      if (!option(OPT_SUSPEND))
         break;
       IsEndwin = isendwin();
       curs_set(1);
@@ -178,7 +178,7 @@ void mutt_signal_init(void)
  */
 void mutt_block_signals(void)
 {
-  if (!option(OPTSIGNALSBLOCKED))
+  if (!option(OPT_SIGNALS_BLOCKED))
   {
     sigemptyset(&Sigset);
     sigaddset(&Sigset, SIGTERM);
@@ -189,7 +189,7 @@ void mutt_block_signals(void)
     sigaddset(&Sigset, SIGWINCH);
 #endif
     sigprocmask(SIG_BLOCK, &Sigset, 0);
-    set_option(OPTSIGNALSBLOCKED);
+    set_option(OPT_SIGNALS_BLOCKED);
   }
 }
 
@@ -198,10 +198,10 @@ void mutt_block_signals(void)
  */
 void mutt_unblock_signals(void)
 {
-  if (option(OPTSIGNALSBLOCKED))
+  if (option(OPT_SIGNALS_BLOCKED))
   {
     sigprocmask(SIG_UNBLOCK, &Sigset, 0);
-    unset_option(OPTSIGNALSBLOCKED);
+    unset_option(OPT_SIGNALS_BLOCKED);
   }
 }
 
@@ -209,7 +209,7 @@ void mutt_block_signals_system(void)
 {
   struct sigaction sa;
 
-  if (!option(OPTSYSSIGNALSBLOCKED))
+  if (!option(OPT_SYS_SIGNALS_BLOCKED))
   {
     /* POSIX: ignore SIGINT and SIGQUIT & block SIGCHLD  before exec */
     sa.sa_handler = SIG_IGN;
@@ -221,13 +221,13 @@ void mutt_block_signals_system(void)
     sigemptyset(&SigsetSys);
     sigaddset(&SigsetSys, SIGCHLD);
     sigprocmask(SIG_BLOCK, &SigsetSys, 0);
-    set_option(OPTSYSSIGNALSBLOCKED);
+    set_option(OPT_SYS_SIGNALS_BLOCKED);
   }
 }
 
 void mutt_unblock_signals_system(int catch)
 {
-  if (option(OPTSYSSIGNALSBLOCKED))
+  if (option(OPT_SYS_SIGNALS_BLOCKED))
   {
     sigprocmask(SIG_UNBLOCK, &SigsetSys, NULL);
     if (catch)
@@ -246,7 +246,7 @@ void mutt_unblock_signals_system(int catch)
       sigaction(SIGINT, &sa, NULL);
     }
 
-    unset_option(OPTSYSSIGNALSBLOCKED);
+    unset_option(OPT_SYS_SIGNALS_BLOCKED);
   }
 }
 
diff --git a/smtp.c b/smtp.c
index 8a65bcbb8aacb67ee3aa2e78607bf8e57256a8fe..0c812b39cf4231d82502b68685e69e004a322f9d 100644 (file)
--- 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(OPTSSLFORCETLS) || quadoption(OPT_SSLSTARTTLS) != MUTT_NO)
+    if (option(OPT_SSL_FORCE_TLS) || quadoption(OPT_SSLSTARTTLS) != MUTT_NO)
       Esmtp = 1;
 #endif
   }
@@ -387,7 +387,7 @@ static int smtp_auth_sasl(struct Connection *conn, const char *mechlist)
     return SMTP_AUTH_UNAVAIL;
   }
 
-  if (!option(OPTNOCURSES))
+  if (!option(OPT_NO_CURSES))
     mutt_message(_("Authenticating (%s)..."), mech);
 
   bufsize = ((len * 2) > LONG_STRING) ? (len * 2) : LONG_STRING;
@@ -588,7 +588,7 @@ static int smtp_open(struct Connection *conn)
 #ifdef USE_SSL
   if (conn->ssf)
     rc = MUTT_NO;
-  else if (option(OPTSSLFORCETLS))
+  else if (option(OPT_SSL_FORCE_TLS))
     rc = MUTT_YES;
   else if (mutt_bit_isset(Capabilities, STARTTLS) &&
            (rc = query_quadoption(OPT_SSLSTARTTLS,
diff --git a/sort.c b/sort.c
index e3d2851727c98a5eabbc4319aeebd31c9f816b98..3f79397fa29f8bdd13d81ab6ec7f10e887f183a4 100644 (file)
--- a/sort.c
+++ b/sort.c
 static sort_t *AuxSort = NULL;
 
 #define AUXSORT(code, a, b)                                                    \
-  if (!code && AuxSort && !option(OPTAUXSORT))                                 \
+  if (!code && AuxSort && !option(OPT_AUX_SORT))                                 \
   {                                                                            \
-    set_option(OPTAUXSORT);                                                    \
+    set_option(OPT_AUX_SORT);                                                    \
     code = AuxSort(a, b);                                                      \
-    unset_option(OPTAUXSORT);                                                  \
+    unset_option(OPT_AUX_SORT);                                                  \
   }                                                                            \
   if (!code)                                                                   \
     code = (*((struct Header **) a))->index - (*((struct Header **) b))->index;
@@ -110,7 +110,7 @@ const char *mutt_get_name(struct Address *a)
 
   if (a)
   {
-    if (option(OPTREVALIAS) && (ali = alias_reverse_lookup(a)) && ali->personal)
+    if (option(OPT_REV_ALIAS) && (ali = alias_reverse_lookup(a)) && ali->personal)
       return ali->personal;
     else if (a->personal)
       return a->personal;
@@ -303,7 +303,7 @@ void mutt_sort_headers(struct Context *ctx, int init)
   struct MuttThread *thread = NULL, *top = NULL;
   sort_t *sortfunc = NULL;
 
-  unset_option(OPTNEEDRESORT);
+  unset_option(OPT_NEED_RESORT);
 
   if (!ctx)
     return;
@@ -322,16 +322,16 @@ void mutt_sort_headers(struct Context *ctx, int init)
   if (!ctx->quiet)
     mutt_message(_("Sorting mailbox..."));
 
-  if (option(OPTNEEDRESCORE) && option(OPTSCORE))
+  if (option(OPT_NEED_RESCORE) && option(OPT_SCORE))
   {
     for (i = 0; i < ctx->msgcount; i++)
       mutt_score_message(ctx, ctx->hdrs[i], 1);
   }
-  unset_option(OPTNEEDRESCORE);
+  unset_option(OPT_NEED_RESCORE);
 
-  if (option(OPTRESORTINIT))
+  if (option(OPT_RESORT_INIT))
   {
-    unset_option(OPTRESORTINIT);
+    unset_option(OPT_RESORT_INIT);
     init = 1;
   }
 
@@ -343,14 +343,14 @@ void mutt_sort_headers(struct Context *ctx, int init)
     AuxSort = NULL;
     /* if $sort_aux changed after the mailbox is sorted, then all the
        subthreads need to be resorted */
-    if (option(OPTSORTSUBTHREADS))
+    if (option(OPT_SORT_SUBTHREADS))
     {
       i = Sort;
       Sort = SortAux;
       if (ctx->tree)
         ctx->tree = mutt_sort_subthreads(ctx->tree, 1);
       Sort = i;
-      unset_option(OPTSORTSUBTHREADS);
+      unset_option(OPT_SORT_SUBTHREADS);
     }
     mutt_sort_threads(ctx, init);
   }
index 4a37aa43852d71d02d8e03c46b6fa666d4d954d3..fdf374abd0aa5a5309284609b0d0d515e50d1389 100644 (file)
--- a/status.c
+++ b/status.c
@@ -243,7 +243,7 @@ static const char *status_format_str(char *buf, size_t buflen, size_t col, int c
 
       if (Context)
       {
-        i = option(OPTATTACHMSG) ?
+        i = option(OPT_ATTACH_MSG) ?
                 3 :
                 ((Context->readonly || Context->dontwrite) ?
                      2 :
index 205f10639513033e3fb611d9656072d6c883fde8..68a14f9fea8ba29b5d90fad141f5697ede0e823a 100644 (file)
--- a/thread.c
+++ b/thread.c
@@ -63,7 +63,7 @@ static int need_display_subject(struct Context *ctx, struct Header *hdr)
   struct MuttThread *tmp = NULL, *tree = hdr->thread;
 
   /* if the user disabled subject hiding, display it */
-  if (!option(OPTHIDETHREADSUBJECT))
+  if (!option(OPT_HIDE_THREAD_SUBJECT))
     return 1;
 
   /* if our subject is different from our parent's, display it */
@@ -146,8 +146,8 @@ static void linearize_tree(struct Context *ctx)
 static void calculate_visibility(struct Context *ctx, int *max_depth)
 {
   struct MuttThread *tmp = NULL, *tree = ctx->tree;
-  int hide_top_missing = option(OPTHIDETOPMISSING) && !option(OPTHIDEMISSING);
-  int hide_top_limited = option(OPTHIDETOPLIMITED) && !option(OPTHIDELIMITED);
+  int hide_top_missing = option(OPT_HIDE_TOP_MISSING) && !option(OPT_HIDE_MISSING);
+  int hide_top_limited = option(OPT_HIDE_TOP_LIMITED) && !option(OPT_HIDE_LIMITED);
   int depth = 0;
 
   /* we walk each level backwards to make it easier to compute next_subtree_visible */
@@ -184,13 +184,13 @@ static void calculate_visibility(struct Context *ctx, int *max_depth)
       else
       {
         tree->visible = false;
-        tree->deep = !option(OPTHIDELIMITED);
+        tree->deep = !option(OPT_HIDE_LIMITED);
       }
     }
     else
     {
       tree->visible = false;
-      tree->deep = !option(OPTHIDEMISSING);
+      tree->deep = !option(OPT_HIDE_MISSING);
     }
     tree->next_subtree_visible =
         tree->next && (tree->next->next_subtree_visible || tree->next->subtree_visible);
@@ -259,7 +259,7 @@ void mutt_draw_tree(struct Context *ctx)
   char *pfx = NULL, *mypfx = NULL, *arrow = NULL, *myarrow = NULL, *new_tree = NULL;
   char corner = (Sort & SORT_REVERSE) ? MUTT_TREE_ULCORNER : MUTT_TREE_LLCORNER;
   char vtee = (Sort & SORT_REVERSE) ? MUTT_TREE_BTEE : MUTT_TREE_TTEE;
-  int depth = 0, start_depth = 0, max_depth = 0, width = option(OPTNARROWTREE) ? 1 : 2;
+  int depth = 0, start_depth = 0, max_depth = 0, width = option(OPT_NARROW_TREE) ? 1 : 2;
   struct MuttThread *nextdisp = NULL, *pseudo = NULL, *parent = NULL, *tree = ctx->tree;
 
   /* Do the visibility calculations and free the old thread chars.
@@ -275,9 +275,9 @@ void mutt_draw_tree(struct Context *ctx)
       myarrow = arrow + (depth - start_depth - (start_depth ? 0 : 1)) * width;
       if (depth && start_depth == depth)
         myarrow[0] = nextdisp ? MUTT_TREE_LTEE : corner;
-      else if (parent->message && !option(OPTHIDELIMITED))
+      else if (parent->message && !option(OPT_HIDE_LIMITED))
         myarrow[0] = MUTT_TREE_HIDDEN;
-      else if (!parent->message && !option(OPTHIDEMISSING))
+      else if (!parent->message && !option(OPT_HIDE_MISSING))
         myarrow[0] = MUTT_TREE_MISSING;
       else
         myarrow[0] = vtee;
@@ -388,14 +388,14 @@ static struct List *make_subject_list(struct MuttThread *cur, time_t *dateptr)
 
     if (dateptr)
     {
-      thisdate = option(OPTTHREADRECEIVED) ? cur->message->received :
+      thisdate = option(OPT_THREAD_RECEIVED) ? cur->message->received :
                                              cur->message->date_sent;
       if (!*dateptr || thisdate < *dateptr)
         *dateptr = thisdate;
     }
 
     env = cur->message->env;
-    if (env->real_subj && ((env->real_subj != env->subject) || (!option(OPTSORTRE))))
+    if (env->real_subj && ((env->real_subj != env->subject) || (!option(OPT_SORT_RE))))
     {
       for (curlist = subjects, oldlist = NULL; curlist;
            oldlist = curlist, curlist = curlist->next)
@@ -457,9 +457,9 @@ static struct MuttThread *find_subject(struct Context *ctx, struct MuttThread *c
           !tmp->fake_thread &&             /* don't match pseudo threads */
           tmp->message->subject_changed && /* only match interesting replies */
           !is_descendant(tmp, cur) &&      /* don't match in the same thread */
-          (date >= (option(OPTTHREADRECEIVED) ? tmp->message->received :
+          (date >= (option(OPT_THREAD_RECEIVED) ? tmp->message->received :
                                                 tmp->message->date_sent)) &&
-          (!last || (option(OPTTHREADRECEIVED) ?
+          (!last || (option(OPT_THREAD_RECEIVED) ?
                          (last->message->received < tmp->message->received) :
                          (last->message->date_sent < tmp->message->date_sent))) &&
           tmp->message->env->real_subj &&
@@ -832,7 +832,7 @@ void mutt_sort_threads(struct Context *ctx, int init)
 
     if (!cur->thread)
     {
-      if ((!init || option(OPTDUPTHREADS)) && cur->env->message_id)
+      if ((!init || option(OPT_DUP_THREADS)) && cur->env->message_id)
         thread = hash_find(ctx->thread_hash, cur->env->message_id);
       else
         thread = NULL;
@@ -876,7 +876,7 @@ void mutt_sort_threads(struct Context *ctx, int init)
       }
       else
       {
-        new = (option(OPTDUPTHREADS) ? thread : NULL);
+        new = (option(OPT_DUP_THREADS) ? thread : NULL);
 
         thread = safe_calloc(1, sizeof(struct MuttThread));
         thread->message = cur;
@@ -1001,7 +1001,7 @@ void mutt_sort_threads(struct Context *ctx, int init)
 
   check_subjects(ctx, init);
 
-  if (!option(OPTSTRICTTHREADS))
+  if (!option(OPT_STRICT_THREADS))
     pseudo_threads(ctx);
 
   if (ctx->tree)