]> granicus.if.org Git - neomutt/commitdiff
de-dupe
authorRichard Russon <rich@flatcap.org>
Wed, 17 Jan 2018 02:04:41 +0000 (02:04 +0000)
committerRichard Russon <rich@flatcap.org>
Mon, 23 Jul 2018 14:44:54 +0000 (15:44 +0100)
48 files changed:
addrbook.c
alias.c
browser.c
buffy.c
commands.c
compose.c
compress.c
config/address.c
conn/ssl.c
conn/ssl_gnutls.c
copy.c
curs_lib.c
curs_main.c
editmsg.c
flags.c
hdrline.c
imap/command.c
imap/message.c
imap/util.c
init.c
init.h
main.c
mbtable.h [deleted file]
mutt.h
mutt_attach.c
mutt_lua.c
mutt_options.h
mutt_thread.c
muttlib.c
mx.h
ncrypt/crypt.c
ncrypt/pgp.c
ncrypt/smime.c
notmuch/mutt_notmuch.c
pager.c
pattern.c
pop/pop.c
pop/pop_lib.c
postpone.c
recvattach.c
recvcmd.c
score.c
send.c
sendlib.c
sidebar.c
smtp.c
sort.h
status.c

index 731b960ca89b9bf7131263a7aa65e77fc2bed8c8..a88771c065e7388695b87f763ed09d4c276272a4 100644 (file)
@@ -31,6 +31,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/email.h"
 #include "mutt.h"
 #include "alias.h"
diff --git a/alias.c b/alias.c
index 0fdb24e8eefe49c6333b626187fb3746ac76da7d..aac05e8ff458044c11cc962f10dac89fb2348f73 100644 (file)
--- a/alias.c
+++ b/alias.c
@@ -31,6 +31,7 @@
 #include <wchar.h>
 #include <wctype.h>
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/email.h"
 #include "mutt.h"
 #include "alias.h"
index a86bc53d545e7d1902e9ec8ad377be7740ccb820..9c8be2c9c92c606cbac0eb85eec3b7bac1251d6b 100644 (file)
--- a/browser.c
+++ b/browser.c
@@ -36,6 +36,7 @@
 #include <time.h>
 #include <unistd.h>
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/email.h"
 #include "conn/conn.h"
 #include "mutt.h"
diff --git a/buffy.c b/buffy.c
index 07e04f432d2962a772946070ceccc5499e2fd8e4..e91d051dddf8520b05fabc016f0898afe8bfa064 100644 (file)
--- a/buffy.c
+++ b/buffy.c
@@ -31,6 +31,7 @@
 #include <sys/stat.h>
 #include <utime.h>
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/email.h"
 #include "mutt.h"
 #include "buffy.h"
index 259e7c8da3e8f4260ca95fea8c49e86b13129a04..22ac254ac56e228878242f5a7a53722477f7674b 100644 (file)
@@ -30,6 +30,7 @@
 #include <sys/stat.h>
 #include <unistd.h>
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/email.h"
 #include "conn/conn.h"
 #include "mutt.h"
index 1e1717928e977a4528149875d59bb20157e040d8..580fab50e94f036b6ec6109382ab9e061076c5ad 100644 (file)
--- a/compose.c
+++ b/compose.c
@@ -30,6 +30,7 @@
 #include <sys/stat.h>
 #include <unistd.h>
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/email.h"
 #include "conn/conn.h"
 #include "mutt.h"
index 0a4fcc58963809a39c948b626bf965d210cbc9df..c9095724260b12495fa6a47d53dffdcb390025a1 100644 (file)
@@ -35,6 +35,7 @@
 #include <sys/stat.h>
 #include <unistd.h>
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "compress.h"
 #include "context.h"
 #include "curs_lib.h"
index 2a39e25df79e8e47f9659d63c41399b70b0da968..2bd203ee4bc0c4dfc7ce9059dd6d600896341262 100644 (file)
@@ -38,8 +38,6 @@
 #include "set.h"
 #include "types.h"
 
-size_t mutt_addr_write(char *buf, size_t buflen, struct Address *addr, bool display);
-
 /**
  * address_destroy - Destroy an Address object
  * @param cs   Config items
@@ -80,7 +78,7 @@ static int address_string_set(const struct ConfigSet *cs, void *var, struct Conf
   /* An empty address "" will be stored as NULL */
   if (var && value && (value[0] != '\0'))
   {
-    // addr = mutt_addr_parse_list(NULL, value);
+    addr = mutt_addr_parse_list(NULL, value);
   }
 
   int rc = CSR_SUCCESS;
index 27f749212a48680eea97e19304789f312a8aa732..7f272efc8257bf631e1a761b1c528ef95319acbc 100644 (file)
@@ -48,6 +48,7 @@
 #include <sys/stat.h>
 #include <unistd.h>
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/email.h"
 #include "mutt.h"
 #include "ssl.h"
index 059cdf29a7c2908693c2af693dd1e3804221f023..a29aa18027b004148606337b29c5e3266b9865a1 100644 (file)
@@ -37,6 +37,7 @@
 #include <sys/stat.h>
 #include <time.h>
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "mutt.h"
 #include "account.h"
 #include "conn_globals.h"
diff --git a/copy.c b/copy.c
index 060c569d3eeefaee9ececc06282c56c7b0d23492..d967210c3b73d734fa93382e93f6344859f1994a 100644 (file)
--- a/copy.c
+++ b/copy.c
@@ -32,6 +32,7 @@
 #include <stdbool.h>
 #include <string.h>
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/email.h"
 #include "mutt.h"
 #include "copy.h"
index c0f404b92f4961d80298d8de42a867adc5b0f168..635a4c69061bf95e288ef624bbab43eb61917956 100644 (file)
@@ -37,6 +37,7 @@
 #include <unistd.h>
 #include <wchar.h>
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/email.h"
 #include "mutt.h"
 #include "curs_lib.h"
index 13a2f8648f05c2f6914424a15bf74e0f3abc85e6..f2dfe8b3b2d61d72eed3719d4969fe9cc15601aa 100644 (file)
@@ -29,6 +29,7 @@
 #include <stdio.h>
 #include <string.h>
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/email.h"
 #include "conn/conn.h"
 #include "mutt.h"
index a1b21604f4aaa61d7feb99fa7f520cd04ed20b61..f3c852a9e15eec5c75b6106f10c1dde6264165a0 100644 (file)
--- a/editmsg.c
+++ b/editmsg.c
@@ -36,6 +36,7 @@
 #include <time.h>
 #include <unistd.h>
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/email.h"
 #include "mutt.h"
 #include "context.h"
diff --git a/flags.c b/flags.c
index 88ed1301277ac616d66f365dc249e3968cfc4a1d..0313c726276677d80e73063b347e74ce22ae7b9e 100644 (file)
--- a/flags.c
+++ b/flags.c
@@ -30,6 +30,7 @@
 #include <stddef.h>
 #include <stdbool.h>
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/email.h"
 #include "mutt.h"
 #include "context.h"
index 34fc9403524f8e7a4ce2d8e29860821ec7154fbb..f79f64ce2d5243710c0bf243a21d7180f10cca23 100644 (file)
--- a/hdrline.c
+++ b/hdrline.c
@@ -30,6 +30,7 @@
 #include <string.h>
 #include <time.h>
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/email.h"
 #include "mutt.h"
 #include "hdrline.h"
@@ -38,7 +39,6 @@
 #include "curs_lib.h"
 #include "format_flags.h"
 #include "globals.h"
-#include "mbtable.h"
 #include "mutt_curses.h"
 #include "mutt_parse.h"
 #include "mutt_thread.h"
index 32a30c562a7afb63e50aa4e1d71e71ef94e8f626..c20e5b18e075bf7072cdb0fbfc8185f35dd97d83 100644 (file)
@@ -39,6 +39,7 @@
 #include <time.h>
 #include "imap_private.h"
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/email.h"
 #include "conn/conn.h"
 #include "mutt.h"
index 730a275a1948b4c6db36b84f5839ed8f03ad23de..e661d726141008772f44605c6a2e01cb86af6c2f 100644 (file)
@@ -36,6 +36,7 @@
 #include <unistd.h>
 #include "imap_private.h"
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/email.h"
 #include "conn/conn.h"
 #include "mutt.h"
index 3c1482d10fd6f3731764e46f0c30efec5d966fe7..ba56d287f03924b15536a8d00408633a2b910166 100644 (file)
@@ -43,6 +43,7 @@
 #include <unistd.h>
 #include "imap_private.h"
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/email.h"
 #include "conn/conn.h"
 #include "bcache.h"
diff --git a/init.c b/init.c
index 29d8bee8510feaff9cab0cbc4daa0e9c39bd8a76..33989deb72bde05e5e2330857929044d4ca364da 100644 (file)
--- a/init.c
+++ b/init.c
@@ -45,7 +45,6 @@
 #include "hcache/hcache.h"
 #include "keymap.h"
 #include "mailbox.h"
-#include "mbtable.h"
 #include "menu.h"
 #include "mutt_curses.h"
 #include "mutt_history.h"
@@ -224,7 +223,7 @@ static void candidate(char *try, const char *src, char *dest, size_t dlen)
  * @retval  0 Success
  * @retval -1 Error
  */
-static int check_charset(struct Option *opt, const char *val)
+static int check_charset(struct ConfigDef *opt, const char *val)
 {
   char *q = NULL, *s = mutt_str_strdup(val);
   int rc = 0;
@@ -339,7 +338,7 @@ static void esc_char(char c, char *p, char *buf, size_t buflen)
  * @param src    String to escape
  * @retval num Number of bytes written to the buffer
  */
-static size_t escape_string(char *buf, size_t buflen, const char *src)
+static size_t escape_string2(char *buf, size_t buflen, const char *src)
 {
   char *p = buf;
 
@@ -467,7 +466,7 @@ static void free_mbtable(struct MbTable **t)
  * free_opt - Free an Option
  * @param p Option to free
  */
-static void free_opt(struct Option *p)
+static void free_opt(struct ConfigDef *p)
 {
   switch (DTYPE(p->type))
   {
@@ -992,7 +991,7 @@ static int parse_unreplace_list(struct Buffer *buf, struct Buffer *s,
  *
  * This function escapes and quotes the string value.
  */
-static void pretty_var(char *buf, size_t buflen, const char *option, const char *val)
+static void pretty_var2(char *buf, size_t buflen, const char *option, const char *val)
 {
   char *p = NULL;
 
@@ -1007,7 +1006,7 @@ static void pretty_var(char *buf, size_t buflen, const char *option, const char
     *p++ = '=';
   if (p - buf < buflen)
     *p++ = '"';
-  p += escape_string(p, buflen - (p - buf) + 1, val); /* \0 terminate it */
+  p += escape_string2(p, buflen - (p - buf) + 1, val); /* \0 terminate it */
   if (p - buf < buflen)
     *p++ = '"';
   *p = '\0';
@@ -1064,7 +1063,7 @@ static void remove_from_stailq(struct ListHead *head, const char *str)
  * restore_default - Restore the default of an Option
  * @param p Option to reset
  */
-static void restore_default(struct Option *p)
+static void restore_default(struct ConfigDef *p)
 {
   switch (DTYPE(p->type))
   {
@@ -1164,7 +1163,7 @@ static void restore_default(struct Option *p)
  * set_default - Set the default/initial value of a config item
  * @param p Option to set
  */
-static void set_default(struct Option *p)
+static void set_default(struct ConfigDef *p)
 {
   switch (DTYPE(p->type))
   {
@@ -2129,7 +2128,7 @@ static int parse_set(struct Buffer *buf, struct Buffer *s, unsigned long data,
           val = myvar_get(myvar);
           if (val)
           {
-            pretty_var(err->data, err->dsize, myvar, val);
+            pretty_var2(err->data, err->dsize, myvar, val);
             break;
           }
           else
@@ -2161,7 +2160,7 @@ static int parse_set(struct Buffer *buf, struct Buffer *s, unsigned long data,
           val = *((char **) MuttVars[idx].var);
 
         /* user requested the value of this variable */
-        pretty_var(err->data, err->dsize, MuttVars[idx].name, NONULL(val));
+        pretty_var2(err->data, err->dsize, MuttVars[idx].name, NONULL(val));
         break;
       }
       else
@@ -2260,7 +2259,7 @@ static int parse_set(struct Buffer *buf, struct Buffer *s, unsigned long data,
         /* user requested the value of this variable */
         struct Regex *ptr = *(struct Regex **) MuttVars[idx].var;
         const char *value = ptr ? ptr->pattern : NULL;
-        pretty_var(err->data, err->dsize, MuttVars[idx].name, NONULL(value));
+        pretty_var2(err->data, err->dsize, MuttVars[idx].name, NONULL(value));
         break;
       }
 
@@ -2535,8 +2534,8 @@ static int parse_set(struct Buffer *buf, struct Buffer *s, unsigned long data,
     {
       if (query || (*s->dptr != '='))
       {
-        pretty_var(err->data, err->dsize, MuttVars[idx].name,
-                   NONULL((*(char **) MuttVars[idx].var)));
+        pretty_var2(err->data, err->dsize, MuttVars[idx].name,
+                    NONULL((*(char **) MuttVars[idx].var)));
         break;
       }
 
@@ -4068,7 +4067,7 @@ int mutt_init(bool skip_sys_rc, struct ListHead *commands)
  *
  * @note The caller must not free the Option.
  */
-bool mutt_option_get(const char *s, struct Option *opt)
+bool mutt_option_get(const char *s, struct ConfigDef *opt)
 {
   mutt_debug(2, " * mutt_option_get(%s)\n", s);
   int idx = mutt_option_index(s);
@@ -4126,7 +4125,7 @@ int mutt_option_index(const char *s)
  * @retval  0 Success
  * @retval -1 Error
  */
-int mutt_option_set(const struct Option *val, struct Buffer *err)
+int mutt_option_set(const struct ConfigDef *val, struct Buffer *err)
 {
   mutt_debug(2, " * mutt_option_set()\n");
   int idx = mutt_option_index(val->name);
@@ -4300,7 +4299,7 @@ int mutt_option_set(const struct Option *val, struct Buffer *err)
  * @retval 1 Success
  * @retval 0 Error
  */
-int mutt_option_to_string(const struct Option *opt, char *val, size_t len)
+int mutt_option_to_string(const struct ConfigDef *opt, char *val, size_t len)
 {
   mutt_debug(2, " * mutt_option_to_string(%s)\n", NONULL((char *) opt->var));
   int idx = mutt_option_index((const char *) opt->name);
@@ -4582,7 +4581,7 @@ int var_to_string(int idx, char *val, size_t len)
   else
     return 0;
 
-  escape_string(val, len - 1, tmp);
+  escape_string2(val, len - 1, tmp);
 
   return 1;
 }
@@ -5021,7 +5020,7 @@ int mutt_var_value_complete(char *buf, size_t buflen, int pos)
       myvarval = myvar_get(var);
       if (myvarval)
       {
-        pretty_var(pt, buflen - (pt - buf), var, myvarval);
+        pretty_var2(pt, buflen - (pt - buf), var, myvarval);
         return 1;
       }
       return 0; /* no such variable. */
diff --git a/init.h b/init.h
index baeaebf4d33d44e0e6a1502d1776c453f81dfbe3..718646496afad664b8b75f03f8dc7b92c6f1afda 100644 (file)
--- a/init.h
+++ b/init.h
@@ -31,6 +31,7 @@
 #include <stddef.h>
 #include <stdbool.h>
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "conn/conn.h"
 #include "mutt.h"
 #include "addrbook.h"
@@ -98,26 +99,6 @@ enum MuttSetCommand
   MUTT_SET_RESET, /**< default is to reset all vars to default */
 };
 
-/* forced redraw/resort types + other flags */
-#define R_NONE        0
-#define R_INDEX       (1 << 0) /**< redraw the index menu (MENU_MAIN) */
-#define R_PAGER       (1 << 1) /**< redraw the pager menu */
-#define R_PAGER_FLOW  (1 << 2) /**< reflow line_info and redraw the pager menu */
-#define R_RESORT      (1 << 3) /**< resort the mailbox */
-#define R_RESORT_SUB  (1 << 4) /**< resort subthreads */
-#define R_RESORT_INIT (1 << 5) /**< resort from scratch */
-#define R_TREE        (1 << 6) /**< redraw the thread tree */
-#define R_REFLOW      (1 << 7) /**< reflow window layout and full redraw */
-#define R_SIDEBAR     (1 << 8) /**< redraw the sidebar */
-#define R_MENU        (1 << 9) /**< redraw all menus */
-#define R_BOTH        (R_INDEX | R_PAGER)
-#define R_RESORT_BOTH (R_RESORT | R_RESORT_SUB)
-
-/* general flags, to be OR'd with the R_ flags above (so keep shifting..) */
-#define F_SENSITIVE   (1 << 10)
-
-#define IS_SENSITIVE(x) (((x).flags & F_SENSITIVE) == F_SENSITIVE)
-
 #define UL (unsigned long)
 #define IP (intptr_t)
 #endif /* _MAKEDOC */
@@ -129,7 +110,7 @@ enum MuttSetCommand
 /* This option is deprecated */
 bool IgnoreLinearWhiteSpace = false;
 
-struct Option MuttVars[] = {
+struct ConfigDef MuttVars[] = {
   /*++*/
 
   { "abort_noattach", DT_QUAD, R_NONE, &AbortNoattach, MUTT_NO },
@@ -4545,83 +4526,6 @@ struct Option MuttVars[] = {
   { NULL, 0, 0, 0, 0 },
 };
 
-const struct Mapping SortMethods[] = {
-  { "date",             SORT_DATE },
-  { "date-received",    SORT_RECEIVED },
-  { "date-sent",        SORT_DATE },
-  { "from",             SORT_FROM },
-  { "label",            SORT_LABEL },
-  { "mailbox-order",    SORT_ORDER },
-  { "score",            SORT_SCORE },
-  { "size",             SORT_SIZE },
-  { "spam",             SORT_SPAM },
-  { "subject",          SORT_SUBJECT },
-  { "threads",          SORT_THREADS },
-  { "to",               SORT_TO },
-  { NULL,               0 },
-};
-
-/* same as SortMethods, but with "threads" replaced by "date" */
-
-const struct Mapping SortAuxMethods[] = {
-  { "date",             SORT_DATE },
-  { "date-received",    SORT_RECEIVED },
-  { "date-sent",        SORT_DATE },
-  { "from",             SORT_FROM },
-  { "label",            SORT_LABEL },
-  { "mailbox-order",    SORT_ORDER },
-  { "score",            SORT_SCORE },
-  { "size",             SORT_SIZE },
-  { "spam",             SORT_SPAM },
-  { "subject",          SORT_SUBJECT },
-  { "threads",          SORT_DATE },    /* note: sort_aux == threads
-                                         * isn't possible.
-                                         */
-  { "to",               SORT_TO },
-  { NULL,               0 },
-};
-
-const struct Mapping SortBrowserMethods[] = {
-  { "alpha",    SORT_SUBJECT },
-  { "count",    SORT_COUNT },
-  { "date",     SORT_DATE },
-  { "desc",     SORT_DESC },
-  { "new",      SORT_UNREAD },
-  { "unread",   SORT_UNREAD },
-  { "size",     SORT_SIZE },
-  { "unsorted", SORT_ORDER },
-  { NULL,       0 },
-};
-
-const struct Mapping SortAliasMethods[] = {
-  { "address",  SORT_ADDRESS },
-  { "alias",    SORT_ALIAS },
-  { "unsorted", SORT_ORDER },
-  { NULL,       0 },
-};
-
-const struct Mapping SortKeyMethods[] = {
-  { "address",  SORT_ADDRESS },
-  { "date",     SORT_DATE },
-  { "keyid",    SORT_KEYID },
-  { "trust",    SORT_TRUST },
-  { NULL,       0 },
-};
-
-const struct Mapping SortSidebarMethods[] = {
-  { "alpha",            SORT_PATH },
-  { "count",            SORT_COUNT },
-  { "desc",             SORT_DESC },
-  { "flagged",          SORT_FLAGGED },
-  { "mailbox-order",    SORT_ORDER },
-  { "name",             SORT_PATH },
-  { "new",              SORT_UNREAD },  /* kept for compatibility */
-  { "path",             SORT_PATH },
-  { "unread",           SORT_UNREAD },
-  { "unsorted",         SORT_ORDER },
-  { NULL,               0 },
-};
-
 /* functions used to parse commands in a rc file */
 static int parse_alias           (struct Buffer *buf, struct Buffer *s, unsigned long data, struct Buffer *err);
 static int parse_alternates      (struct Buffer *buf, struct Buffer *s, unsigned long data, struct Buffer *err);
diff --git a/main.c b/main.c
index 12ed2caf22ded0d28faa8588d973f71b60081712..f6eba298260019311d42cf66308f390b7ad2ae54 100644 (file)
--- a/main.c
+++ b/main.c
@@ -42,6 +42,7 @@
 #include <sys/stat.h>
 #include <unistd.h>
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/email.h"
 #include "conn/conn.h"
 #include "mutt.h"
diff --git a/mbtable.h b/mbtable.h
deleted file mode 100644 (file)
index 7607c77..0000000
--- a/mbtable.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * @file
- * Structure for managing a table of multibyte characters
- *
- * @authors
- * Copyright (C) 2017 Richard Russon <rich@flatcap.org>
- *
- * @copyright
- * This program is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 2 of the License, or (at your option) any later
- * version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef _MUTT_MBTABLE_H
-#define _MUTT_MBTABLE_H
-
-/**
- * struct MbTable - multibyte character table
- *
- * Allows for direct access to the individual multibyte characters in a
- * string.  This is used for the FlagChars, FromChars, StatusChars and ToChars
- * option types.
- */
-struct MbTable
-{
-  int len;             /**< number of characters */
-  char **chars;        /**< the array of multibyte character strings */
-  char *segmented_str; /**< each chars entry points inside this string */
-  char *orig_str;
-};
-
-#endif /* _MUTT_MBTABLE_H */
diff --git a/mutt.h b/mutt.h
index 70e7d48550b9797a1b2c74413221f420bbfa98cf..7539a6ef40d9181d72a6d4fff3041e9bb31ad4bc 100644 (file)
--- a/mutt.h
+++ b/mutt.h
@@ -190,18 +190,6 @@ enum MuttMisc
   MUTT_SAVE_OVERWRITE
 };
 
-/**
- * enum QuadOptionResponse - Possible values of a QuadOption
- */
-enum QuadOptionResponse
-{
-  MUTT_ABORT = -1,
-  MUTT_NO,
-  MUTT_YES,
-  MUTT_ASKNO,
-  MUTT_ASKYES
-};
-
 /* flags for parse_spam_list */
 #define MUTT_SPAM   1
 #define MUTT_NOSPAM 2
index 4f976b8a05442bf78014ffd515b4e115b6cc4878..64c0cd36f12d484ca57ab049ea09688566b6e64d 100644 (file)
@@ -31,6 +31,7 @@
 #include <sys/stat.h>
 #include <unistd.h>
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/email.h"
 #include "mutt.h"
 #include "mutt_attach.h"
index a4fcac386ba206e10730e507091a892651b8b18a..04851e6b63fa0b80beef532b13a5f7b538e69bfe 100644 (file)
 #include <stdbool.h>
 #include <stdio.h>
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/email.h"
 #include "mutt.h"
 #include "mutt_lua.h"
 #include "mailbox.h"
-#include "mbtable.h"
 #include "mutt_commands.h"
 #include "mutt_options.h"
 #include "muttlib.h"
@@ -115,7 +115,7 @@ static int lua_mutt_set(lua_State *l)
   int rc = -1;
   const char *param = lua_tostring(l, -2);
   mutt_debug(2, " * lua_mutt_set(%s)\n", param);
-  struct Option opt;
+  struct ConfigDef opt;
   char err_str[LONG_STRING];
   struct Buffer err = { 0 };
   err.data = err_str;
@@ -204,7 +204,7 @@ static int lua_mutt_get(lua_State *l)
 {
   const char *param = lua_tostring(l, -1);
   mutt_debug(2, " * lua_mutt_get(%s)\n", param);
-  struct Option opt;
+  struct ConfigDef opt;
 
   if (mutt_option_get(param, &opt))
   {
index 8268650ed8fd19ce6d4ca4c01e09ff5a5343dc75..2b4f0558e6cea08e545ee50e73c17f8b520402a5 100644 (file)
 #include <stdint.h>
 
 struct Buffer;
+struct ConfigDef;
 
-#define DT_MASK      0x0f
-#define DT_BOOL      1   /**< boolean option */
-#define DT_NUMBER    2   /**< a number (short) */
-#define DT_STRING    3   /**< a string */
-#define DT_PATH      4   /**< a pathname */
-#define DT_QUAD      5   /**< quad-option (yes/no/ask-yes/ask-no) */
-#define DT_SORT      6   /**< sorting methods */
-#define DT_REGEX     7   /**< regular expressions */
-#define DT_MAGIC     8   /**< mailbox type */
-#define DT_SYNONYM   9   /**< synonym for another variable */
-#define DT_ADDRESS  10   /**< e-mail address */
-#define DT_MBTABLE  11   /**< multibyte char table */
-#define DT_LONG     12   /* a number (long) */
-#define DT_HCACHE   13   /**< header cache backend */
-#define DT_COMMAND  14   /**< A command*/
-
-#define DTYPE(x) ((x) &DT_MASK)
-
-/* subtypes */
-#define DT_SUBTYPE_MASK 0xff0
-#define DT_SORT_ALIAS   0x10
-#define DT_SORT_BROWSER 0x20
-#define DT_SORT_KEYS    0x40
-#define DT_SORT_AUX     0x80
-#define DT_SORT_SIDEBAR 0x100
-
-/* ... DT_REGEX */
-#define DT_REGEX_MATCH_CASE 0x010 /**< Case-sensitive matching */
-#define DT_REGEX_ALLOW_NOT  0x020 /**< Regex can begin with '!' */
-
-/**
- * struct Option - Definition of a user-variable
- */
-struct Option
-{
-  const char   *name;      /**< User-visible name */
-  unsigned int  type;      /**< Variable type, e.g. #DT_STRING */
-  short         flags;     /**< Notification flags, e.g. #R_PAGER */
-  void         *var;       /**< Pointer to the global variable */
-  intptr_t      initial;   /**< Initial value */
-};
-
-int mutt_option_to_string(const struct Option *opt, char *val, size_t len);
-
-bool mutt_option_get(const char *s, struct Option *opt);
-int mutt_option_set(const struct Option *val, struct Buffer *err);
+int  mutt_option_to_string(const struct ConfigDef *opt, char *val, size_t len);
+bool mutt_option_get(const char *s, struct ConfigDef *opt);
+int  mutt_option_set(const struct ConfigDef *val, struct Buffer *err);
 
 #endif /* _MUTT_OPTIONS_H */
index aa40fd4ef71bc1bb4b68688a42618de186d18932..828366d95d424cefc023e4c947b8cd684c237b70 100644 (file)
@@ -27,6 +27,7 @@
 #include <string.h>
 #include <time.h>
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/email.h"
 #include "mutt.h"
 #include "mutt_thread.h"
index 0f2480d0d13fbf543f81757df9e036175fef7eec..8db9e90e9af960b577326b2d454581c8122ff490 100644 (file)
--- a/muttlib.c
+++ b/muttlib.c
@@ -36,6 +36,7 @@
 #include <sys/stat.h>
 #include <unistd.h>
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/email.h"
 #include "conn/conn.h"
 #include "mutt.h"
diff --git a/mx.h b/mx.h
index 7640004634f66440f7d1a1ed16d5ad69bd98a2ba..2d6e869efe34b29b7e22f64769ecf9c91047bc06 100644 (file)
--- a/mx.h
+++ b/mx.h
@@ -144,22 +144,6 @@ struct MxOps
   int (*tags_commit)     (struct Context *ctx, struct Header *hdr, char *buf);
 };
 
-/**
- * enum MailboxFormat - Supported mailbox formats
- */
-enum MailboxFormat
-{
-  MUTT_MBOX = 1,
-  MUTT_MMDF,
-  MUTT_MH,
-  MUTT_MAILDIR,
-  MUTT_NNTP,
-  MUTT_IMAP,
-  MUTT_NOTMUCH,
-  MUTT_POP,
-  MUTT_COMPRESSED,
-};
-
 #define MMDF_SEP "\001\001\001\001\n"
 
 void mbox_reset_atime(struct Context *ctx, struct stat *st);
index 57bdac84882e5dc05c615f09db5fdaa917a7ec25..0f9fedb2a8358ea938937092413d52a1b01524ff 100644 (file)
@@ -39,6 +39,7 @@
 #include <string.h>
 #include <time.h>
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/email.h"
 #include "mutt.h"
 #include "alias.h"
index 22c1519891e31c861131f6c4a217e3487676041a..047b7298f95ef4e44b8e8111ff002c3283c3e529 100644 (file)
@@ -42,6 +42,7 @@
 #include <time.h>
 #include <unistd.h>
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/email.h"
 #include "mutt.h"
 #include "pgp.h"
index d568b15eb96365acde36a787585a8b3c791f0b2d..f394797d9fa462eb1d6222086c6dd819aff08928 100644 (file)
@@ -36,6 +36,7 @@
 #include <sys/stat.h>
 #include <time.h>
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/email.h"
 #include "mutt.h"
 #include "smime.h"
index fbdc86e1f99ec0c212c61e4983534dd5491ea8ea..e5e176f0a4e3df4960c2ddd55172d78ac9003f68 100644 (file)
@@ -54,6 +54,7 @@
 #include <time.h>
 #include <unistd.h>
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/email.h"
 #include "mutt.h"
 #include "mutt_notmuch.h"
diff --git a/pager.c b/pager.c
index 2fc136a831528491a09853bccec41bf34aa04ea5..4fa8abec376a62da83cf59cf9bdda965bfb8a6ad 100644 (file)
--- a/pager.c
+++ b/pager.c
@@ -32,6 +32,7 @@
 #include <unistd.h>
 #include <wchar.h>
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/email.h"
 #include "mutt.h"
 #include "pager.h"
index 966d39478fe5811b46944a712be9c76252e9b3b3..c2e698df4d3e25bd0965cfa5877925c8e4ce08f6 100644 (file)
--- a/pattern.c
+++ b/pattern.c
@@ -32,6 +32,7 @@
 #include <sys/stat.h>
 #include <time.h>
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/email.h"
 #include "conn/conn.h"
 #include "mutt.h"
index d5ed1c674ff05a19ba736c3caacad38d9fa4fb8b..60d7f054c05d9b111a103958edea9d0e31248ac2 100644 (file)
--- a/pop/pop.c
+++ b/pop/pop.c
@@ -38,6 +38,7 @@
 #include <unistd.h>
 #include "pop_private.h"
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/email.h"
 #include "conn/conn.h"
 #include "mutt.h"
index 92c9be808edbe4fdc0f8bfa99fe5d9fd2cc029c0..989b868d176299b2d15ab90151f47d4b1e23f8fc 100644 (file)
@@ -36,6 +36,7 @@
 #include <string.h>
 #include "pop_private.h"
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/email.h"
 #include "conn/conn.h"
 #include "mutt.h"
index 8b87ffc3951c2a5c62f0e71387e183730528d197..b7cb326073b42848e250ca5e858b9794f70e8d2f 100644 (file)
@@ -36,6 +36,7 @@
 #include <time.h>
 #include <unistd.h>
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/email.h"
 #include "conn/conn.h"
 #include "mutt.h"
index 3bbe30eb1a8f15cf39d040ecee05d2cd21150a41..1214b616463a3ddb51466b33c1440256bb00c362 100644 (file)
@@ -29,6 +29,7 @@
 #include <sys/stat.h>
 #include <unistd.h>
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/email.h"
 #include "mutt.h"
 #include "recvattach.h"
index 2f2e4b406d6dfb195c7553993cb39799bfdd8e08..04d2ded3e617be45f6d288ddf589d0b2d7314cb4 100644 (file)
--- a/recvcmd.c
+++ b/recvcmd.c
@@ -26,6 +26,7 @@
 #include <stdio.h>
 #include <string.h>
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/email.h"
 #include "mutt.h"
 #include "alias.h"
diff --git a/score.c b/score.c
index 023641018d91e6758094551964d817f1b026e2ed..c215f9c506a9286b371350adc37ffd5bac0404f3 100644 (file)
--- a/score.c
+++ b/score.c
@@ -24,6 +24,7 @@
 #include <stdbool.h>
 #include <stdlib.h>
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/email.h"
 #include "mutt.h"
 #include "score.h"
diff --git a/send.c b/send.c
index c013e365b77810285c31e08bb095554cd7584151..e291373feaa334b92962395547fb71473b11782f 100644 (file)
--- a/send.c
+++ b/send.c
@@ -32,6 +32,7 @@
 #include <time.h>
 #include <unistd.h>
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/email.h"
 #include "mutt.h"
 #include "send.h"
@@ -718,7 +719,7 @@ static int default_to(struct Address **to, struct Envelope *env, int flags, int
  * mutt_fetch_recips - Generate recpients for a reply email
  * @param out   Envelope to populate
  * @param in    Envelope of source email
- * @param flags Flags, e.g. SENDLISTREPLY
+ * @param flags Flags, e.g. SEND_LIST_REPLY
  * @retval  0 Success
  * @retval -1 Failure
  */
index 4951fd4f6540239fd3d61b740c6828039c32b797..33162acfb8954b06ab2903cf7482cd0166de0664 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -36,6 +36,7 @@
 #include <time.h>
 #include <unistd.h>
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/email.h"
 #include "mutt.h"
 #include "sendlib.h"
index e1cbbe3d40cb5185d22cc365d54f2df74ad79238..3f60207a5eea892d60616bb37299fd6ca700237f 100644 (file)
--- a/sidebar.c
+++ b/sidebar.c
@@ -35,6 +35,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "sidebar.h"
 #include "buffy.h"
 #include "context.h"
diff --git a/smtp.c b/smtp.c
index f1d587b5556117511f553c8b87bc2a508c8741b3..1944525bf255588d10808c582211525db9905cbf 100644 (file)
--- a/smtp.c
+++ b/smtp.c
@@ -32,6 +32,7 @@
 #include <sys/stat.h>
 #include <unistd.h>
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/email.h"
 #include "conn/conn.h"
 #include "mutt.h"
diff --git a/sort.h b/sort.h
index dbb9265497810ad77c3b25a6e777cea74f1e0259..5329fb5fdb247e6eaa442c56837f8fb6a302c26a 100644 (file)
--- a/sort.h
+++ b/sort.h
@@ -25,6 +25,7 @@
 
 #include <stdbool.h>
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "where.h"
 
 struct Address;
@@ -33,44 +34,6 @@ struct Context;
 /* These Config Variables are only used in sort.c */
 extern bool ReverseAlias;
 
-#define SORT_DATE     1 /**< the date the mail was sent. */
-#define SORT_SIZE     2
-#define SORT_SUBJECT  3
-#define SORT_ALPHA    3 /**< makedoc.c requires this */
-#define SORT_FROM     4
-#define SORT_ORDER    5 /**< the order the messages appear in the mailbox. */
-#define SORT_THREADS  6
-#define SORT_RECEIVED 7 /**< when the message were delivered locally */
-#define SORT_TO       8
-#define SORT_SCORE    9
-#define SORT_ALIAS    10
-#define SORT_ADDRESS  11
-#define SORT_KEYID    12
-#define SORT_TRUST    13
-#define SORT_SPAM     14
-#define SORT_COUNT    15
-#define SORT_UNREAD   16
-#define SORT_FLAGGED  17
-#define SORT_PATH     18
-#define SORT_LABEL    19
-#define SORT_DESC     20
-
-/* Sort and sort_aux are shorts, and are a composite of a
- * constant sort operation number and a set of compounded
- * bitflags.
- *
- * Everything below SORT_MASK is a constant. There's room for
- * SORT_MASK constant SORT_ values.
- *
- * Everything above is a bitflag. It's OK to move SORT_MASK
- * down by powers of 2 if we need more, so long as we don't
- * collide with the constants above. (Or we can just expand
- * sort and sort_aux to uint32_t.)
- */
-#define SORT_MASK    ((1 << 8) - 1)
-#define SORT_REVERSE (1 << 8)
-#define SORT_LAST    (1 << 9)
-
 #define SORTCODE(x) (Sort & SORT_REVERSE) ? -(x) : x
 
 typedef int sort_t(const void *a, const void *b);
index 9b877dfe53d887f3623fdf55015cda36481894fc..fab85dd5aca052d8d6a9036ce8089ed9738381bb 100644 (file)
--- a/status.c
+++ b/status.c
@@ -33,7 +33,6 @@
 #include "context.h"
 #include "format_flags.h"
 #include "globals.h"
-#include "mbtable.h"
 #include "menu.h"
 #include "mutt_window.h"
 #include "muttlib.h"