]> granicus.if.org Git - neomutt/commitdiff
rename some structs/enums/unions/constants
authorRichard Russon <rich@flatcap.org>
Wed, 12 Jul 2017 14:40:21 +0000 (15:40 +0100)
committerRichard Russon <rich@flatcap.org>
Thu, 13 Jul 2017 14:14:39 +0000 (15:14 +0100)
struct/enum/union
    Capability_Aliases CapabilityAliases
    Capability_Alias   CapabilityAlias
    CryptKeyinfo       CryptKeyInfo
    div_type           DivType
    DnArrayS           DnArray
    FgetConvS          FgetConv
    format_flag        FormatFlag
    group_state_t      GroupState
    hash_key           HashKey
    hcache_ops_t       HcacheOps
    history_class_t    HistoryClass
    imap_auth_res_t    ImapAuthRes
    IMAP_COMMAND_TYPE  ImapCommandType
    key_cap_t          KeyCap
    mdb_txn_mode       MdbTxnMode
    NmCtxdata          NmCtxData
    NmHdrdata          NmHdrData
    NmHdrtag           NmHdrTag
    packet_tags        PacketTags
    pattern_exec_flag  PatternExecFlag
    pgp_ring_t         PgpRing
    pop_auth_res_t     PopAuthRes
    sb_src             SidebarSrc
    Sysexits           SysExits
    url_scheme         UrlScheme
    url_scheme_t       UrlScheme
    validate           Validate
    XDGType            XdgType

Constants
    kXDGConfigDirs     XDG_CONFIG_DIRS
    kXDGConfigHome     XDG_CONFIG_HOME
    ADDR               GS_ADDR
    NONE               GS_NONE
    RX                 GS_RX
    txn_read           TXN_READ
    txn_uninitialized  TXN_UNINITIALIZED
    txn_write          TXN_WRITE

Variables
    firstMessage       first_message
    hideQuoted         hide_quoted
    lastCached         last_cached
    lastLine           last_line
    lastLoaded         last_loaded
    lastMessage        last_message
    lineInfo           line_info
    maxLine            max_line
    newMailCount       new_mail_count
    QuoteList          quote_list
    SearchBack         search_back
    SearchCompiled     search_compiled
    searchDir          search_dir
    SearchFlag         search_flag
    SearchRE           search_re
    WrapMargin         wrap_margin

62 files changed:
addrbook.c
browser.c
charset.c
compose.c
compress.c
curs_lib.c
curs_main.c
enter.c
format_flags.h
handler.c
hash.c
hash.h
hcache/backend.h
hcache/hcache.c
hcache/lmdb.c
hdrline.c
history.c
history.h
imap/auth.h
imap/auth_anon.c
imap/auth_cram.c
imap/auth_gss.c
imap/auth_login.c
imap/auth_plain.c
imap/auth_sasl.c
imap/command.c
imap/imap.c
imap/imap_private.h
imap/message.c
init.c
init.h
lib.c
menu.c
mutt_menu.h
mutt_notmuch.c
muttlib.c
mx.c
ncrypt/crypt_gpgme.c
ncrypt/gnupgparse.c
ncrypt/gnupgparse.h
ncrypt/pgpinvoke.c
ncrypt/pgpinvoke.h
ncrypt/pgpkey.c
ncrypt/pgpkey.h
ncrypt/pgppacket.h
ncrypt/smime.c
newsrc.c
nntp.c
nntp.h
pager.c
pattern.c
pattern.h
pop.h
pop_auth.c
protos.h
query.c
recvattach.c
remailer.c
sidebar.c
status.c
url.c
url.h

index a0b40b4f696fc62bf205f2a8514e9d98732e9099..712a1e23d862b70758f6ec6180a33937e80f634b 100644 (file)
@@ -46,7 +46,7 @@ static const struct Mapping AliasHelp[] = {
 static const char *alias_format_str(char *dest, size_t destlen, size_t col, int cols,
                                     char op, const char *src, const char *fmt,
                                     const char *ifstring, const char *elsestring,
-                                    unsigned long data, format_flag flags)
+                                    unsigned long data, enum FormatFlag flags)
 {
   char tmp[SHORT_STRING], adr[SHORT_STRING];
   struct Alias *alias = (struct Alias *) data;
index dfeb117efb1a3648bae10d168742f7c21d33d8cc..47d9038859286b19a8f4e83473653d9adf1f4686 100644 (file)
--- a/browser.c
+++ b/browser.c
@@ -256,7 +256,7 @@ static int link_is_dir(const char *folder, const char *path)
 static const char *folder_format_str(char *dest, size_t destlen, size_t col, int cols,
                                      char op, const char *src, const char *fmt,
                                      const char *ifstring, const char *elsestring,
-                                     unsigned long data, format_flag flags)
+                                     unsigned long data, enum FormatFlag flags)
 {
   char fn[SHORT_STRING], tmp[SHORT_STRING], permission[11];
   char date[SHORT_STRING], *t_fmt = NULL;
@@ -479,7 +479,7 @@ static const char *folder_format_str(char *dest, size_t destlen, size_t col, int
 static const char *newsgroup_format_str(char *dest, size_t destlen, size_t col, int cols,
                                         char op, const char *src, const char *fmt,
                                         const char *ifstring, const char *elsestring,
-                                        unsigned long data, format_flag flags)
+                                        unsigned long data, enum FormatFlag flags)
 {
   char fn[SHORT_STRING], tmp[SHORT_STRING];
   struct Folder *folder = (struct Folder *) data;
@@ -542,12 +542,12 @@ static const char *newsgroup_format_str(char *dest, size_t destlen, size_t col,
         snprintf(dest, destlen, tmp, Context->new);
       }
       else if (option(OPTMARKOLD) &&
-               folder->ff->nd->lastCached >= folder->ff->nd->firstMessage &&
-               folder->ff->nd->lastCached <= folder->ff->nd->lastMessage)
+               folder->ff->nd->last_cached >= folder->ff->nd->first_message &&
+               folder->ff->nd->last_cached <= folder->ff->nd->last_message)
       {
         snprintf(tmp, sizeof(tmp), "%%%sd", fmt);
         snprintf(dest, destlen, tmp,
-                 folder->ff->nd->lastMessage - folder->ff->nd->lastCached);
+                 folder->ff->nd->last_message - folder->ff->nd->last_cached);
       }
       else
       {
index f49075f701b3ae0aa4ef713d2635ff015763aabf..69683bcb6f36f0403e672e4ddf43f8a6b5c50958 100644 (file)
--- a/charset.c
+++ b/charset.c
@@ -473,7 +473,7 @@ int mutt_convert_string(char **ps, const char *from, const char *to, int flags)
  * Used in sendlib.c for converting from mutt's Charset
  */
 
-struct FgetConvS
+struct FgetConv
 {
   FILE *file;
   iconv_t cd;
@@ -498,7 +498,7 @@ struct FgetConvNot
  */
 FGETCONV *fgetconv_open(FILE *file, const char *from, const char *to, int flags)
 {
-  struct FgetConvS *fc = NULL;
+  struct FgetConv *fc = NULL;
   iconv_t cd = (iconv_t) -1;
   static ICONV_CONST char *repls[] = { "\357\277\275", "?", 0 };
 
@@ -507,7 +507,7 @@ FGETCONV *fgetconv_open(FILE *file, const char *from, const char *to, int flags)
 
   if (cd != (iconv_t) -1)
   {
-    fc = safe_malloc(sizeof(struct FgetConvS));
+    fc = safe_malloc(sizeof(struct FgetConv));
     fc->p = fc->ob = fc->bufo;
     fc->ib = fc->bufi;
     fc->ibl = 0;
@@ -543,7 +543,7 @@ char *fgetconvs(char *buf, size_t l, FGETCONV *_fc)
 
 int fgetconv(FGETCONV *_fc)
 {
-  struct FgetConvS *fc = (struct FgetConvS *) _fc;
+  struct FgetConv *fc = (struct FgetConv *) _fc;
 
   if (!fc)
     return EOF;
@@ -596,7 +596,7 @@ int fgetconv(FGETCONV *_fc)
 
 void fgetconv_close(FGETCONV **_fc)
 {
-  struct FgetConvS *fc = (struct FgetConvS *) *_fc;
+  struct FgetConv *fc = (struct FgetConv *) *_fc;
 
   if (fc->cd != (iconv_t) -1)
     iconv_close(fc->cd);
index c4129a9636d1180314b32901e6b6113607698d5c..0ff44521d0d2881738e70c5bfa30ba07e5101cf8 100644 (file)
--- a/compose.c
+++ b/compose.c
@@ -632,7 +632,7 @@ static unsigned long cum_attachs_size(struct Menu *menu)
 static const char *compose_format_str(char *buf, size_t buflen, size_t col, int cols,
                                       char op, const char *src, const char *prefix,
                                       const char *ifstring, const char *elsestring,
-                                      unsigned long data, format_flag flags)
+                                      unsigned long data, enum FormatFlag flags)
 {
   char fmt[SHORT_STRING], tmp[SHORT_STRING];
   int optional = (flags & MUTT_FORMAT_OPTIONAL);
index e444888b450aef23dcfb7f7474d96eab82ffe000..afad6962356a1705f4980db3d91cc5ae816bf93b 100644 (file)
@@ -356,7 +356,7 @@ static char *escape_path(char *src)
 static const char *cb_format_str(char *dest, size_t destlen, size_t col, int cols,
                                  char op, const char *src, const char *fmt,
                                  const char *ifstring, const char *elsestring,
-                                 unsigned long data, format_flag flags)
+                                 unsigned long data, enum FormatFlag flags)
 {
   if (!dest || (data == 0))
     return src;
index 73f443c8cff5784d5ea5dff6fccab1740274cd2e..b39808e8401471c1d7afa81b1b94a7f21997fecf 100644 (file)
@@ -668,7 +668,7 @@ void mutt_reflow_windows(void)
 #endif
 
   mutt_set_current_menu_redraw_full();
-  /* the pager menu needs this flag set to recalc lineInfo */
+  /* the pager menu needs this flag set to recalc line_info */
   mutt_set_current_menu_redraw(REDRAW_FLOW);
 }
 
index e916c03e48b20122d469c24b33b84b5e0687ec0e..b9b6f725c328d19e02020a4a0df485a23ef715a2 100644 (file)
@@ -590,7 +590,7 @@ void index_make_entry(char *s, size_t l, struct Menu *menu, int num)
   if (!h)
     return;
 
-  format_flag flag = MUTT_FORMAT_MAKEPRINT | MUTT_FORMAT_ARROWCURSOR | MUTT_FORMAT_INDEX;
+  enum FormatFlag flag = MUTT_FORMAT_MAKEPRINT | MUTT_FORMAT_ARROWCURSOR | MUTT_FORMAT_INDEX;
   int edgemsgno, reverse = Sort & SORT_REVERSE;
   struct MuttThread *tmp = NULL;
 
diff --git a/enter.c b/enter.c
index ccbd1d23346491ebca3a9029b8af10cd7cd8f5e1..03887686a6a51c4edd41fbda3ff64909c1a97b84 100644 (file)
--- a/enter.c
+++ b/enter.c
@@ -256,7 +256,7 @@ int _mutt_enter_string(char *buf, size_t buflen, int col, int flags, int multipl
   size_t i;
   wchar_t *tempbuf = NULL;
   size_t templen = 0;
-  history_class_t hclass;
+  enum HistoryClass hclass;
   wchar_t wc;
   mbstate_t mbstate;
 
index c7e4bd076f638e23dfb45d081a104cc27dc417b4..74c6d6dcd628adb27218bf176e608c0f7abf5d4d 100644 (file)
@@ -21,7 +21,8 @@
 #include <stddef.h>
 
 /* flags for mutt_FormatString() */
-typedef enum {
+enum FormatFlag
+{
   MUTT_FORMAT_FORCESUBJ   = (1 << 0), /* print the subject even if unchanged */
   MUTT_FORMAT_TREE        = (1 << 1), /* draw the thread tree */
   MUTT_FORMAT_MAKEPRINT   = (1 << 2), /* make sure that all chars are printable */
@@ -30,12 +31,12 @@ typedef enum {
   MUTT_FORMAT_ARROWCURSOR = (1 << 5), /* reserve space for arrow_cursor */
   MUTT_FORMAT_INDEX       = (1 << 6), /* this is a main index entry */
   MUTT_FORMAT_NOFILTER    = (1 << 7)  /* do not allow filtering on this pass */
-} format_flag;
+};
 
 typedef const char *format_t(char *dest, size_t destlen, size_t col, int cols,
                              char op, const char *src, const char *prefix,
                              const char *ifstring, const char *elsestring,
-                             unsigned long data, format_flag flags);
+                             unsigned long data, enum FormatFlag flags);
 
 void mutt_FormatString(char *dest,         /* output buffer */
                        size_t destlen,     /* output buffer len */
@@ -44,6 +45,6 @@ void mutt_FormatString(char *dest,         /* output buffer */
                        const char *src,    /* template string */
                        format_t *callback, /* callback for processing */
                        unsigned long data, /* callback data */
-                       format_flag flags); /* callback flags */
+                       enum FormatFlag flags); /* callback flags */
 
 #endif /* _MUTT_FORMAT_FLAGS_H */
index 90ab82a4d9b02dd1b9c3120fddd6e3ca808ef361..21bbc791c05684ca1285ff35cbbc01da43535df8 100644 (file)
--- a/handler.c
+++ b/handler.c
@@ -524,7 +524,7 @@ struct EnrichedState
   size_t param_used;
   size_t param_len;
   int tag_level[RICH_LAST_TAG];
-  int WrapMargin;
+  int wrap_margin;
   struct State *s;
 };
 
@@ -567,7 +567,7 @@ static void enriched_wrap(struct EnrichedState *stte)
       }
     }
 
-    extra = stte->WrapMargin - stte->line_len - stte->indent_len -
+    extra = stte->wrap_margin - stte->line_len - stte->indent_len -
             (stte->tag_level[RICH_INDENT_RIGHT] * IndentSize);
     if (extra > 0)
     {
@@ -640,7 +640,7 @@ static void enriched_flush(struct EnrichedState *stte, int wrap)
 {
   if (!stte->tag_level[RICH_NOFILL] &&
       (stte->line_len + stte->word_len >
-       (stte->WrapMargin - (stte->tag_level[RICH_INDENT_RIGHT] * IndentSize) - stte->indent_len)))
+       (stte->wrap_margin - (stte->tag_level[RICH_INDENT_RIGHT] * IndentSize) - stte->indent_len)))
     enriched_wrap(stte);
 
   if (stte->buff_used)
@@ -847,11 +847,11 @@ static int text_enriched_handler(struct Body *a, struct State *s)
 
   memset(&stte, 0, sizeof(stte));
   stte.s = s;
-  stte.WrapMargin =
+  stte.wrap_margin =
       ((s->flags & MUTT_DISPLAY) ?
            (MuttIndexWindow->cols - 4) :
            ((MuttIndexWindow->cols - 4) < 72) ? (MuttIndexWindow->cols - 4) : 72);
-  stte.line_max = stte.WrapMargin * 4;
+  stte.line_max = stte.wrap_margin * 4;
   stte.line = safe_calloc(1, (stte.line_max + 1) * sizeof(wchar_t));
   stte.param = safe_calloc(1, (STRING) * sizeof(wchar_t));
 
diff --git a/hash.c b/hash.c
index 3b54e167a2a55e5720bf05c78334a571ca617c87..0b53fbab3af3367968633877174419557b11a7c8 100644 (file)
--- a/hash.c
+++ b/hash.c
@@ -23,7 +23,7 @@
 
 #define SOMEPRIME 149711
 
-static unsigned int gen_string_hash(union hash_key key, unsigned int n)
+static unsigned int gen_string_hash(union HashKey key, unsigned int n)
 {
   unsigned int h = 0;
   unsigned char *s = (unsigned char *) key.strkey;
@@ -35,12 +35,12 @@ static unsigned int gen_string_hash(union hash_key key, unsigned int n)
   return h;
 }
 
-static int cmp_string_key(union hash_key a, union hash_key b)
+static int cmp_string_key(union HashKey a, union HashKey b)
 {
   return mutt_strcmp(a.strkey, b.strkey);
 }
 
-static unsigned int gen_case_string_hash(union hash_key key, unsigned int n)
+static unsigned int gen_case_string_hash(union HashKey key, unsigned int n)
 {
   unsigned int h = 0;
   unsigned char *s = (unsigned char *) key.strkey;
@@ -52,17 +52,17 @@ static unsigned int gen_case_string_hash(union hash_key key, unsigned int n)
   return h;
 }
 
-static int cmp_case_string_key(union hash_key a, union hash_key b)
+static int cmp_case_string_key(union HashKey a, union HashKey b)
 {
   return mutt_strcasecmp(a.strkey, b.strkey);
 }
 
-static unsigned int gen_int_hash(union hash_key key, unsigned int n)
+static unsigned int gen_int_hash(union HashKey key, unsigned int n)
 {
   return key.intkey % n;
 }
 
-static int cmp_int_key(union hash_key a, union hash_key b)
+static int cmp_int_key(union HashKey a, union HashKey b)
 {
   if (a.intkey == b.intkey)
     return 0;
@@ -139,7 +139,7 @@ struct Hash *hash_resize(struct Hash *ptr, int nelem, int lower)
  * data         data to associate with `key'
  * allow_dup    if nonzero, duplicate keys are allowed in the table
  */
-static int union_hash_insert(struct Hash *table, union hash_key key, void *data)
+static int union_hash_insert(struct Hash *table, union HashKey key, void *data)
 {
   struct HashElem *ptr = NULL;
   unsigned int h;
@@ -183,19 +183,19 @@ static int union_hash_insert(struct Hash *table, union hash_key key, void *data)
 
 int hash_insert(struct Hash *table, const char *strkey, void *data)
 {
-  union hash_key key;
+  union HashKey key;
   key.strkey = table->strdup_keys ? safe_strdup(strkey) : strkey;
   return union_hash_insert(table, key, data);
 }
 
 int int_hash_insert(struct Hash *table, unsigned int intkey, void *data)
 {
-  union hash_key key;
+  union HashKey key;
   key.intkey = intkey;
   return union_hash_insert(table, key, data);
 }
 
-static struct HashElem *union_hash_find_elem(const struct Hash *table, union hash_key key)
+static struct HashElem *union_hash_find_elem(const struct Hash *table, union HashKey key)
 {
   int hash;
   struct HashElem *ptr = NULL;
@@ -213,7 +213,7 @@ static struct HashElem *union_hash_find_elem(const struct Hash *table, union has
   return NULL;
 }
 
-static void *union_hash_find(const struct Hash *table, union hash_key key)
+static void *union_hash_find(const struct Hash *table, union HashKey key)
 {
   struct HashElem *ptr = union_hash_find_elem(table, key);
   if (ptr)
@@ -224,28 +224,28 @@ static void *union_hash_find(const struct Hash *table, union hash_key key)
 
 void *hash_find(const struct Hash *table, const char *strkey)
 {
-  union hash_key key;
+  union HashKey key;
   key.strkey = strkey;
   return union_hash_find(table, key);
 }
 
 struct HashElem *hash_find_elem(const struct Hash *table, const char *strkey)
 {
-  union hash_key key;
+  union HashKey key;
   key.strkey = strkey;
   return union_hash_find_elem(table, key);
 }
 
 void *int_hash_find(const struct Hash *table, unsigned int intkey)
 {
-  union hash_key key;
+  union HashKey key;
   key.intkey = intkey;
   return union_hash_find(table, key);
 }
 
 struct HashElem *hash_find_bucket(const struct Hash *table, const char *strkey)
 {
-  union hash_key key;
+  union HashKey key;
   int hash;
 
   if (!table)
@@ -256,7 +256,7 @@ struct HashElem *hash_find_bucket(const struct Hash *table, const char *strkey)
   return table->table[hash];
 }
 
-static void union_hash_delete(struct Hash *table, union hash_key key,
+static void union_hash_delete(struct Hash *table, union HashKey key,
                               const void *data, void (*destroy)(void *))
 {
   int hash;
@@ -294,7 +294,7 @@ static void union_hash_delete(struct Hash *table, union hash_key key,
 void hash_delete(struct Hash *table, const char *strkey, const void *data,
                  void (*destroy)(void *))
 {
-  union hash_key key;
+  union HashKey key;
   key.strkey = strkey;
   union_hash_delete(table, key, data, destroy);
 }
@@ -302,7 +302,7 @@ void hash_delete(struct Hash *table, const char *strkey, const void *data,
 void int_hash_delete(struct Hash *table, unsigned int intkey, const void *data,
                      void (*destroy)(void *))
 {
-  union hash_key key;
+  union HashKey key;
   key.intkey = intkey;
   union_hash_delete(table, key, data, destroy);
 }
diff --git a/hash.h b/hash.h
index 66bb29ce053b3822ac73cb4092192fc6f8833f8c..d72dbb1f0d2fdded887cd305950220c8623aec7f 100644 (file)
--- a/hash.h
+++ b/hash.h
 
 #include <stdbool.h>
 
-union hash_key {
+union HashKey {
   const char *strkey;
   unsigned int intkey;
 };
 
 struct HashElem
 {
-  union hash_key key;
+  union HashKey key;
   void *data;
   struct HashElem *next;
 };
@@ -38,8 +38,8 @@ struct Hash
   bool strdup_keys : 1; /* if set, the key->strkey is strdup'ed */
   bool allow_dups  : 1; /* if set, duplicate keys are allowed */
   struct HashElem **table;
-  unsigned int (*gen_hash)(union hash_key, unsigned int);
-  int (*cmp_key)(union hash_key, union hash_key);
+  unsigned int (*gen_hash)(union HashKey, unsigned int);
+  int (*cmp_key)(union HashKey, union HashKey);
 };
 
 /* flags for hash_create() */
index c8b086a628d909713cb86c6f275a0ff441079ef3..36d0b9a85525c91b2d4484e6ca67ca08fb5b944a 100644 (file)
@@ -96,7 +96,7 @@ typedef void (*hcache_close_t)(void **ctx);
  */
 typedef const char *(*hcache_backend_t)(void);
 
-typedef struct
+struct HcacheOps
 {
   const char       *name;
   hcache_open_t    open;
@@ -106,7 +106,7 @@ typedef struct
   hcache_delete_t  delete;
   hcache_close_t   close;
   hcache_backend_t backend;
-} hcache_ops_t;
+};
 
 #define HCACHE_BACKEND_LIST                                                    \
   HCACHE_BACKEND(bdb)                                                          \
@@ -117,15 +117,15 @@ typedef struct
   HCACHE_BACKEND(tokyocabinet)
 
 #define HCACHE_BACKEND_OPS(_name)                                              \
-  const hcache_ops_t hcache_##_name##_ops = {                                  \
-      .name    = #_name,                                                       \
-      .open    = hcache_##_name##_open,                                        \
-      .fetch   = hcache_##_name##_fetch,                                       \
-      .free    = hcache_##_name##_free,                                        \
-      .store   = hcache_##_name##_store,                                       \
-      .delete  = hcache_##_name##_delete,                                      \
-      .close   = hcache_##_name##_close,                                       \
-      .backend = hcache_##_name##_backend,                                     \
+  const struct HcacheOps hcache_##_name##_ops = {                              \
+    .name = #_name,                                                            \
+    .open = hcache_##_name##_open,                                             \
+    .fetch = hcache_##_name##_fetch,                                           \
+    .free = hcache_##_name##_free,                                             \
+    .store = hcache_##_name##_store,                                           \
+    .delete = hcache_##_name##_delete,                                         \
+    .close = hcache_##_name##_close,                                           \
+    .backend = hcache_##_name##_backend,                                       \
   };
 
 #endif /* _MUTT_HCACHE_BACKEND_H */
index d807b7e3c9f93f048dce3e9d4d3d056d3075b1e1..5443f5a45fc5c998d1f08870454189bde2e38a15 100644 (file)
@@ -56,7 +56,7 @@
 static unsigned int hcachever = 0x0;
 
 /**
- * header_cache_t - header cache structure.
+ * struct HeaderCache - header cache structure
  *
  * This struct holds both the backend-agnostic and the backend-specific parts
  * of the header cache. Backend code MUST initialize the fetch, store,
@@ -70,18 +70,18 @@ struct HeaderCache
   void *ctx;
 };
 
-typedef union {
+union Validate {
   struct timeval timeval;
   unsigned int uidvalidity;
-} validate;
+};
 
-#define HCACHE_BACKEND(name) extern const hcache_ops_t hcache_##name##_ops;
+#define HCACHE_BACKEND(name) extern const struct HcacheOps hcache_##name##_ops;
 HCACHE_BACKEND_LIST
 #undef HCACHE_BACKEND
 
 /* Keep this list sorted as it is in configure.ac to avoid user surprise if no
  * header_cache_backend is specified. */
-const hcache_ops_t *hcache_ops[] = {
+const struct HcacheOps *hcache_ops[] = {
 #ifdef HAVE_TC
   &hcache_tokyocabinet_ops,
 #endif
@@ -103,9 +103,9 @@ const hcache_ops_t *hcache_ops[] = {
   NULL,
 };
 
-static const hcache_ops_t *hcache_get_backend_ops(const char *backend)
+static const struct HcacheOps *hcache_get_backend_ops(const char *backend)
 {
-  const hcache_ops_t **ops = hcache_ops;
+  const struct HcacheOps **ops = hcache_ops;
 
   if (!backend || !*backend)
   {
@@ -513,7 +513,7 @@ static void restore_envelope(struct Envelope *e, const unsigned char *d, int *of
 
 static int crc_matches(const char *d, unsigned int crc)
 {
-  int off = sizeof(validate);
+  int off = sizeof(union Validate);
   unsigned int mycrc = 0;
 
   if (!d)
@@ -636,7 +636,7 @@ static void *hcache_dump(header_cache_t *h, struct Header *header, int *off,
   int convert = !Charset_is_utf8;
 
   *off = 0;
-  d = lazy_malloc(sizeof(validate));
+  d = lazy_malloc(sizeof(union Validate));
 
   if (uidvalidity == 0)
   {
@@ -646,7 +646,7 @@ static void *hcache_dump(header_cache_t *h, struct Header *header, int *off,
   }
   else
     memcpy(d, &uidvalidity, sizeof(uidvalidity));
-  *off += sizeof(validate);
+  *off += sizeof(union Validate);
 
   d = dump_int(h->crc, d, off);
 
@@ -693,7 +693,7 @@ struct Header *mutt_hcache_restore(const unsigned char *d)
   int convert = !Charset_is_utf8;
 
   /* skip validate */
-  off += sizeof(validate);
+  off += sizeof(union Validate);
 
   /* skip crc */
   off += sizeof(unsigned int);
@@ -730,7 +730,7 @@ static char *get_foldername(const char *folder)
 
 header_cache_t *mutt_hcache_open(const char *path, const char *folder, hcache_namer_t namer)
 {
-  const hcache_ops_t *ops = hcache_get_ops();
+  const struct HcacheOps *ops = hcache_get_ops();
   if (!ops)
     return NULL;
 
@@ -805,7 +805,7 @@ header_cache_t *mutt_hcache_open(const char *path, const char *folder, hcache_na
 
 void mutt_hcache_close(header_cache_t *h)
 {
-  const hcache_ops_t *ops = hcache_get_ops();
+  const struct HcacheOps *ops = hcache_get_ops();
   if (!h || !ops)
     return;
 
@@ -836,7 +836,7 @@ void *mutt_hcache_fetch(header_cache_t *h, const char *key, size_t keylen)
 void *mutt_hcache_fetch_raw(header_cache_t *h, const char *key, size_t keylen)
 {
   char path[_POSIX_PATH_MAX];
-  const hcache_ops_t *ops = hcache_get_ops();
+  const struct HcacheOps *ops = hcache_get_ops();
 
   if (!h || !ops)
     return NULL;
@@ -848,7 +848,7 @@ void *mutt_hcache_fetch_raw(header_cache_t *h, const char *key, size_t keylen)
 
 void mutt_hcache_free(header_cache_t *h, void **data)
 {
-  const hcache_ops_t *ops = hcache_get_ops();
+  const struct HcacheOps *ops = hcache_get_ops();
 
   if (!h || !ops)
     return;
@@ -878,7 +878,7 @@ int mutt_hcache_store_raw(header_cache_t *h, const char *key, size_t keylen,
                           void *data, size_t dlen)
 {
   char path[_POSIX_PATH_MAX];
-  const hcache_ops_t *ops = hcache_get_ops();
+  const struct HcacheOps *ops = hcache_get_ops();
 
   if (!h || !ops)
     return -1;
@@ -891,7 +891,7 @@ int mutt_hcache_store_raw(header_cache_t *h, const char *key, size_t keylen,
 int mutt_hcache_delete(header_cache_t *h, const char *key, size_t keylen)
 {
   char path[_POSIX_PATH_MAX];
-  const hcache_ops_t *ops = hcache_get_ops();
+  const struct HcacheOps *ops = hcache_get_ops();
 
   if (!h)
     return -1;
@@ -904,7 +904,7 @@ int mutt_hcache_delete(header_cache_t *h, const char *key, size_t keylen)
 const char *mutt_hcache_backend_list(void)
 {
   char tmp[STRING] = { 0 };
-  const hcache_ops_t **ops = hcache_ops;
+  const struct HcacheOps **ops = hcache_ops;
   size_t len = 0;
 
   for (; *ops; ++ops)
index 29fef9dac730a5cc2d750d1860164f70ca374a62..69e56d92dd95c0b941dcfe983962bd448c011a99 100644 (file)
  * The file is mmap(2)'d into memory. */
 const size_t LMDB_DB_SIZE = 2147483648;
 
-enum mdb_txn_mode
+enum MdbTxnMode
 {
-  txn_uninitialized,
-  txn_read,
-  txn_write
+  TXN_UNINITIALIZED,
+  TXN_READ,
+  TXN_WRITE
 };
 
 struct HcacheLmdbCtx
@@ -40,14 +40,14 @@ struct HcacheLmdbCtx
   MDB_env *env;
   MDB_txn *txn;
   MDB_dbi db;
-  enum mdb_txn_mode txn_mode;
+  enum MdbTxnMode txn_mode;
 };
 
 static int mdb_get_r_txn(struct HcacheLmdbCtx *ctx)
 {
   int rc;
 
-  if (ctx->txn && (ctx->txn_mode == txn_read || ctx->txn_mode == txn_write))
+  if (ctx->txn && (ctx->txn_mode == TXN_READ || ctx->txn_mode == TXN_WRITE))
     return MDB_SUCCESS;
 
   if (ctx->txn)
@@ -56,7 +56,7 @@ static int mdb_get_r_txn(struct HcacheLmdbCtx *ctx)
     rc = mdb_txn_begin(ctx->env, NULL, MDB_RDONLY, &ctx->txn);
 
   if (rc == MDB_SUCCESS)
-    ctx->txn_mode = txn_read;
+    ctx->txn_mode = TXN_READ;
   else
     mutt_debug(2, "mdb_get_r_txn: %s: %s\n",
                ctx->txn ? "mdb_txn_renew" : "mdb_txn_begin", mdb_strerror(rc));
@@ -70,7 +70,7 @@ static int mdb_get_w_txn(struct HcacheLmdbCtx *ctx)
 
   if (ctx->txn)
   {
-    if (ctx->txn_mode == txn_write)
+    if (ctx->txn_mode == TXN_WRITE)
       return MDB_SUCCESS;
 
     /* Free up the memory for readonly or reset transactions */
@@ -79,7 +79,7 @@ static int mdb_get_w_txn(struct HcacheLmdbCtx *ctx)
 
   rc = mdb_txn_begin(ctx->env, NULL, 0, &ctx->txn);
   if (rc == MDB_SUCCESS)
-    ctx->txn_mode = txn_write;
+    ctx->txn_mode = TXN_WRITE;
   else
     mutt_debug(2, "mdb_get_w_txn: mdb_txn_begin: %s\n", mdb_strerror(rc));
 
@@ -126,12 +126,12 @@ static void *hcache_lmdb_open(const char *path)
   }
 
   mdb_txn_reset(ctx->txn);
-  ctx->txn_mode = txn_uninitialized;
+  ctx->txn_mode = TXN_UNINITIALIZED;
   return ctx;
 
 fail_dbi:
   mdb_txn_abort(ctx->txn);
-  ctx->txn_mode = txn_uninitialized;
+  ctx->txn_mode = TXN_UNINITIALIZED;
   ctx->txn = NULL;
 
 fail_env:
@@ -207,7 +207,7 @@ static int hcache_lmdb_store(void *vctx, const char *key, size_t keylen, void *d
   {
     mutt_debug(2, "hcahce_lmdb_store: mdb_put: %s\n", mdb_strerror(rc));
     mdb_txn_abort(ctx->txn);
-    ctx->txn_mode = txn_uninitialized;
+    ctx->txn_mode = TXN_UNINITIALIZED;
     ctx->txn = NULL;
     return rc;
   }
@@ -239,7 +239,7 @@ static int hcache_lmdb_delete(void *vctx, const char *key, size_t keylen)
     {
       mutt_debug(2, "hcache_lmdb_delete: mdb_del: %s\n", mdb_strerror(rc));
       mdb_txn_abort(ctx->txn);
-      ctx->txn_mode = txn_uninitialized;
+      ctx->txn_mode = TXN_UNINITIALIZED;
       ctx->txn = NULL;
     }
     return rc;
@@ -255,10 +255,10 @@ static void hcache_lmdb_close(void **vctx)
 
   struct HcacheLmdbCtx *ctx = *vctx;
 
-  if (ctx->txn && ctx->txn_mode == txn_write)
+  if (ctx->txn && ctx->txn_mode == TXN_WRITE)
   {
     mdb_txn_commit(ctx->txn);
-    ctx->txn_mode = txn_uninitialized;
+    ctx->txn_mode = TXN_UNINITIALIZED;
     ctx->txn = NULL;
   }
 
index d5842588778c79abda26c67a8e2d65adbd49a383..8cf2a4d913234e6c53b04442e8e3de472cac6f45 100644 (file)
--- a/hdrline.c
+++ b/hdrline.c
@@ -135,7 +135,7 @@ static bool first_mailing_list(char *buf, size_t buflen, struct Address *a)
  * arguments.
  * Returns the number of chars written.
  */
-static size_t add_index_color(char *buf, size_t buflen, format_flag flags, char color)
+static size_t add_index_color(char *buf, size_t buflen, enum FormatFlag flags, char color)
 {
   int len;
 
@@ -474,7 +474,7 @@ static char *apply_subject_mods(struct Envelope *env)
 static const char *hdr_format_str(char *dest, size_t destlen, size_t col, int cols,
                                   char op, const char *src, const char *prefix,
                                   const char *ifstring, const char *elsestring,
-                                  unsigned long data, format_flag flags)
+                                  unsigned long data, enum FormatFlag flags)
 {
   struct HdrFormatInfo *hfi = (struct HdrFormatInfo *) data;
   struct Header *hdr = NULL, *htmp = NULL;
@@ -1319,7 +1319,7 @@ static const char *hdr_format_str(char *dest, size_t destlen, size_t col, int co
 }
 
 void _mutt_make_string(char *dest, size_t destlen, const char *s,
-                       struct Context *ctx, struct Header *hdr, format_flag flags)
+                       struct Context *ctx, struct Header *hdr, enum FormatFlag flags)
 {
   struct HdrFormatInfo hfi;
 
@@ -1332,7 +1332,7 @@ void _mutt_make_string(char *dest, size_t destlen, const char *s,
 }
 
 void mutt_make_string_info(char *dst, size_t dstlen, int cols, const char *s,
-                           struct HdrFormatInfo *hfi, format_flag flags)
+                           struct HdrFormatInfo *hfi, enum FormatFlag flags)
 {
   mutt_FormatString(dst, dstlen, 0, cols, s, hdr_format_str, (unsigned long) hfi, flags);
 }
index 76d46ebdd94681161d2a305dfceb5e7c8eabe09c..f4d67530d37e74116fa721ae99af9d0559d2fddb 100644 (file)
--- a/history.c
+++ b/history.c
@@ -273,7 +273,7 @@ cleanup:
       hash_destroy(&dup_hashes[hclass], NULL);
 }
 
-static void save_history(history_class_t hclass, const char *s)
+static void save_history(enum HistoryClass hclass, const char *s)
 {
   static int n = 0;
   FILE *f = NULL;
@@ -317,7 +317,7 @@ static void save_history(history_class_t hclass, const char *s)
 /* When removing dups, we want the created "blanks" to be right below the
  * resulting h->last position.  See the comment section above 'struct History'.
  */
-static void remove_history_dups(history_class_t hclass, const char *s)
+static void remove_history_dups(enum HistoryClass hclass, const char *s)
 {
   int source, dest, old_last;
   struct History *h = GET_HISTORY(hclass);
@@ -364,13 +364,13 @@ void mutt_init_history(void)
   if (HistSize == OldSize)
     return;
 
-  for (history_class_t hclass = HC_FIRST; hclass < HC_LAST; hclass++)
+  for (enum HistoryClass hclass = HC_FIRST; hclass < HC_LAST; hclass++)
     init_history(&History[hclass]);
 
   OldSize = HistSize;
 }
 
-void mutt_history_add(history_class_t hclass, const char *s, int save)
+void mutt_history_add(enum HistoryClass hclass, const char *s, int save)
 {
   int prev;
   struct History *h = GET_HISTORY(hclass);
@@ -402,7 +402,7 @@ void mutt_history_add(history_class_t hclass, const char *s, int save)
   h->cur = h->last; /* reset to the last entry */
 }
 
-char *mutt_history_next(history_class_t hclass)
+char *mutt_history_next(enum HistoryClass hclass)
 {
   int next;
   struct History *h = GET_HISTORY(hclass);
@@ -424,7 +424,7 @@ char *mutt_history_next(history_class_t hclass)
   return (h->hist[h->cur] ? h->hist[h->cur] : "");
 }
 
-char *mutt_history_prev(history_class_t hclass)
+char *mutt_history_prev(enum HistoryClass hclass)
 {
   int prev;
   struct History *h = GET_HISTORY(hclass);
@@ -446,7 +446,7 @@ char *mutt_history_prev(history_class_t hclass)
   return (h->hist[h->cur] ? h->hist[h->cur] : "");
 }
 
-void mutt_reset_history_state(history_class_t hclass)
+void mutt_reset_history_state(enum HistoryClass hclass)
 {
   struct History *h = GET_HISTORY(hclass);
 
@@ -456,7 +456,7 @@ void mutt_reset_history_state(history_class_t hclass)
   h->cur = h->last;
 }
 
-int mutt_history_at_scratch(history_class_t hclass)
+int mutt_history_at_scratch(enum HistoryClass hclass)
 {
   struct History *h = GET_HISTORY(hclass);
 
@@ -466,7 +466,7 @@ int mutt_history_at_scratch(history_class_t hclass)
   return h->cur == h->last;
 }
 
-void mutt_history_save_scratch(history_class_t hclass, const char *s)
+void mutt_history_save_scratch(enum HistoryClass hclass, const char *s)
 {
   struct History *h = GET_HISTORY(hclass);
 
index 0a8c46390da77ad359098c395466df78be6a71dd..e3d5eb0385ae225f463604d1cb0befa9eca4c40e 100644 (file)
--- a/history.h
+++ b/history.h
@@ -18,7 +18,7 @@
 #ifndef _MUTT_HISTORY_H
 #define _MUTT_HISTORY_H 1
 
-typedef enum history_class
+enum HistoryClass
 {
   HC_CMD,
   HC_ALIAS,
@@ -29,17 +29,17 @@ typedef enum history_class
   HC_MBOX,
   /* insert new items here to keep history file working */
   HC_LAST
-} history_class_t;
+};
 
 #define HC_FIRST HC_CMD
 
 void mutt_init_history(void);
 void mutt_read_histfile(void);
-void mutt_history_add(history_class_t hclass, const char *s, int save);
-char *mutt_history_next(history_class_t hclass);
-char *mutt_history_prev(history_class_t hclass);
-void mutt_reset_history_state(history_class_t hclass);
-int mutt_history_at_scratch(history_class_t hclass);
-void mutt_history_save_scratch(history_class_t hclass, const char *s);
+void mutt_history_add(enum HistoryClass hclass, const char *s, int save);
+char *mutt_history_next(enum HistoryClass hclass);
+char *mutt_history_prev(enum HistoryClass hclass);
+void mutt_reset_history_state(enum HistoryClass hclass);
+int mutt_history_at_scratch(enum HistoryClass hclass);
+void mutt_history_save_scratch(enum HistoryClass hclass, const char *s);
 
 #endif /* _MUTT_HISTORY_H */
index bc50e3421e0c96b65ee3e1dd294af819ff377184..baf2d85f5e50399aad361dbe28005b03857d9bc7 100644 (file)
 
 struct ImapData;
 
-typedef enum {
+enum ImapAuthRes
+{
   IMAP_AUTH_SUCCESS = 0,
   IMAP_AUTH_FAILURE,
   IMAP_AUTH_UNAVAIL
-} imap_auth_res_t;
+};
 
 struct ImapAuth
 {
   /* do authentication, using named method or any available if method is NULL */
-  imap_auth_res_t (*authenticate)(struct ImapData *idata, const char *method);
+  enum ImapAuthRes (*authenticate)(struct ImapData *idata, const char *method);
   /* name of authentication method supported, NULL means variable. If this
    * is not null, authenticate may ignore the second parameter. */
   const char *method;
 };
 
 /* external authenticator prototypes */
-imap_auth_res_t imap_auth_plain(struct ImapData *idata, const char *method);
+enum ImapAuthRes imap_auth_plain(struct ImapData *idata, const char *method);
 #ifndef USE_SASL
-imap_auth_res_t imap_auth_anon(struct ImapData *idata, const char *method);
-imap_auth_res_t imap_auth_cram_md5(struct ImapData *idata, const char *method);
+enum ImapAuthRes imap_auth_anon(struct ImapData *idata, const char *method);
+enum ImapAuthRes imap_auth_cram_md5(struct ImapData *idata, const char *method);
 #endif
-imap_auth_res_t imap_auth_login(struct ImapData *idata, const char *method);
+enum ImapAuthRes imap_auth_login(struct ImapData *idata, const char *method);
 #ifdef USE_GSS
-imap_auth_res_t imap_auth_gss(struct ImapData *idata, const char *method);
+enum ImapAuthRes imap_auth_gss(struct ImapData *idata, const char *method);
 #endif
 #ifdef USE_SASL
-imap_auth_res_t imap_auth_sasl(struct ImapData *idata, const char *method);
+enum ImapAuthRes imap_auth_sasl(struct ImapData *idata, const char *method);
 #endif
 
 #endif /* _MUTT_IMAP_AUTH_H */
index d71ce38c1a03b555a7b6d0b19b94c9542c3e8cdb..d7ec0503aae4f2d8410fc94f013db0c05565563a 100644 (file)
@@ -28,7 +28,7 @@
 #include "protos.h"
 
 /* this is basically a stripped-down version of the cram-md5 method. */
-imap_auth_res_t imap_auth_anon(struct ImapData *idata, const char *method)
+enum ImapAuthRes imap_auth_anon(struct ImapData *idata, const char *method)
 {
   int rc;
 
index f9728c401670972ef7b1fdf5d9c820baf5ef4076..f9af0c5fccd549ec8179a1278e8058c7e3da5ee0 100644 (file)
@@ -37,7 +37,7 @@
 static void hmac_md5(const char *password, char *challenge, unsigned char *response);
 
 /* imap_auth_cram_md5: AUTH=CRAM-MD5 support. */
-imap_auth_res_t imap_auth_cram_md5(struct ImapData *idata, const char *method)
+enum ImapAuthRes imap_auth_cram_md5(struct ImapData *idata, const char *method)
 {
   char ibuf[LONG_STRING * 2], obuf[LONG_STRING];
   unsigned char hmac_response[MD5_DIGEST_LEN];
index 0d74790e1cd1bf5f1fe0109d82e824ab861f26ac..c927860be7de5d9d333f302f651ce965793467be 100644 (file)
@@ -72,7 +72,7 @@ static void print_gss_error(OM_uint32 err_maj, OM_uint32 err_min)
 }
 
 /* imap_auth_gss: AUTH=GSSAPI support. */
-imap_auth_res_t imap_auth_gss(struct ImapData *idata, const char *method)
+enum ImapAuthRes imap_auth_gss(struct ImapData *idata, const char *method)
 {
   gss_buffer_desc request_buf, send_token;
   gss_buffer_t sec_token;
index 28f1c5e15de421399e1385f3d9205cafd28cc2b0..e271aa1fdc76a3abfc19035ef6c5fa1938f986ca 100644 (file)
@@ -29,7 +29,7 @@
 #include "protos.h"
 
 /* imap_auth_login: Plain LOGIN support */
-imap_auth_res_t imap_auth_login(struct ImapData *idata, const char *method)
+enum ImapAuthRes imap_auth_login(struct ImapData *idata, const char *method)
 {
   char q_user[SHORT_STRING], q_pass[SHORT_STRING];
   char buf[STRING];
index ccf4994dcdbbb40410cdd8cf0d2cf4ce3f45ca39..43147af1978245a1e9e6de9af06fd4e9da35eba6 100644 (file)
 #include "protos.h"
 
 /* imap_auth_plain: SASL PLAIN support */
-imap_auth_res_t imap_auth_plain(struct ImapData *idata, const char *method)
+enum ImapAuthRes imap_auth_plain(struct ImapData *idata, const char *method)
 {
   int rc;
-  imap_auth_res_t res = IMAP_AUTH_SUCCESS;
+  enum ImapAuthRes res = IMAP_AUTH_SUCCESS;
   char buf[STRING];
 
   if (mutt_account_getuser(&idata->conn->account))
index 99790e332ca0fa09b8494147cab28bf7d4681739..fcfb16499fcf2bd55648e149e6018b323144b3ba 100644 (file)
@@ -35,7 +35,7 @@
 #include "protos.h"
 
 /* imap_auth_sasl: Default authenticator if available. */
-imap_auth_res_t imap_auth_sasl(struct ImapData *idata, const char *method)
+enum ImapAuthRes imap_auth_sasl(struct ImapData *idata, const char *method)
 {
   sasl_conn_t *saslconn = NULL;
   sasl_interact_t *interaction = NULL;
index 06292304fefb969fd550d8a4f2205cc01810f56a..c4c9cc34e3fc9d1cae4598bf684158abd436d77f 100644 (file)
@@ -56,13 +56,13 @@ static const char *const Capabilities[] = {
 };
 
 /* Gmail document one string but use another.  Support both. */
-struct Capability_Alias
+struct CapabilityAlias
 {
   char *name;
   unsigned int value;
 };
 
-static struct Capability_Alias Capability_Aliases[] = {
+static struct CapabilityAlias CapabilityAliases[] = {
   { "X-GM-EXT-1", X_GM_EXT1 }, { NULL, 0 },
 };
 
@@ -311,13 +311,13 @@ static void cmd_parse_capability(struct ImapData *idata, char *s)
       }
     if (!found)
     {
-      for (x = 0; Capability_Aliases[x].name != NULL; x++)
+      for (x = 0; CapabilityAliases[x].name != NULL; x++)
       {
-        if (imap_wordcasecmp(Capability_Aliases[x].name, s) == 0)
+        if (imap_wordcasecmp(CapabilityAliases[x].name, s) == 0)
         {
-          mutt_bit_set(idata->capabilities, Capability_Aliases[x].value);
+          mutt_bit_set(idata->capabilities, CapabilityAliases[x].value);
           mutt_debug(4, " Found capability \"%s\": %d\n",
-                     Capability_Aliases[x].name, Capability_Aliases[x].value);
+                     CapabilityAliases[x].name, CapabilityAliases[x].value);
           found = true;
           break;
         }
@@ -740,7 +740,7 @@ static int cmd_handle_untagged(struct ImapData *idata)
               idata->mailbox, count);
           idata->reopen |= IMAP_NEWMAIL_PENDING;
         }
-        idata->newMailCount = count;
+        idata->new_mail_count = count;
       }
     }
     /* pn vs. s: need initial seqno */
@@ -1003,7 +1003,7 @@ void imap_cmd_finish(struct ImapData *idata)
 
   if (idata->reopen & IMAP_REOPEN_ALLOW)
   {
-    unsigned int count = idata->newMailCount;
+    unsigned int count = idata->new_mail_count;
 
     if (!(idata->reopen & IMAP_EXPUNGE_PENDING) &&
         (idata->reopen & IMAP_NEWMAIL_PENDING) && count > idata->max_msn)
index c487dc42068db6aeb39e899ecdd70857ec322149..746bdc4dfe2fcb0b1bc377b329f515fbed129ec5 100644 (file)
@@ -619,7 +619,7 @@ static int imap_open_mailbox(struct Context *ctx)
   /* clear mailbox status */
   idata->status = false;
   memset(idata->ctx->rights, 0, sizeof(idata->ctx->rights));
-  idata->newMailCount = 0;
+  idata->new_mail_count = 0;
   idata->max_msn = 0;
 
   mutt_message(_("Selecting %s..."), idata->mailbox);
@@ -713,8 +713,8 @@ static int imap_open_mailbox(struct Context *ctx)
       pc = imap_next_word(pc);
       if (ascii_strncasecmp("EXISTS", pc, 6) == 0)
       {
-        count = idata->newMailCount;
-        idata->newMailCount = 0;
+        count = idata->new_mail_count;
+        idata->new_mail_count = 0;
       }
     }
   } while (rc == IMAP_CMD_CONTINUE);
index 40db483c4440c40e0c89f572d707e5cc2ee02f98..4189e01333c3b52dd5ecf3b26ea08a5e486ee614 100644 (file)
@@ -167,11 +167,12 @@ struct ImapCommand
   int state;
 };
 
-typedef enum {
+enum ImapCommandType
+{
   IMAP_CT_NONE = 0,
   IMAP_CT_LIST,
   IMAP_CT_STATUS
-} IMAP_COMMAND_TYPE;
+};
 
 struct ImapData
 {
@@ -201,7 +202,7 @@ struct ImapData
 
   /* if set, the response parser will store results for complicated commands
    * here. */
-  IMAP_COMMAND_TYPE cmdtype;
+  enum ImapCommandType cmdtype;
   void *cmddata;
 
   /* command queue */
@@ -220,7 +221,7 @@ struct ImapData
   char *mailbox;
   unsigned short check_status;
   unsigned char reopen;
-  unsigned int newMailCount; /* Set when EXISTS notifies of new mail */
+  unsigned int new_mail_count; /* Set when EXISTS notifies of new mail */
   struct ImapCache cache[IMAP_CACHE_LEN];
   struct Hash *uid_hash;
   unsigned int uid_validity;
index 367f95936f10d38c2468af64e00437a994006b66..af117c658c9fddab4aecf78b3a7026e4eaebffb9 100644 (file)
@@ -523,7 +523,7 @@ int imap_read_headers(struct ImapData *idata, unsigned int msn_begin, unsigned i
   idx = ctx->msgcount;
   oldmsgcount = ctx->msgcount;
   idata->reopen &= ~(IMAP_REOPEN_ALLOW | IMAP_NEWMAIL_PENDING);
-  idata->newMailCount = 0;
+  idata->new_mail_count = 0;
 
 #ifdef USE_HCACHE
   idata->hcache = imap_hcache_open(idata, NULL);
@@ -772,12 +772,12 @@ int imap_read_headers(struct ImapData *idata, unsigned int msn_begin, unsigned i
       /* update to the last value we actually pulled down */
       fetch_msn_end = idata->max_msn;
       msn_begin = idata->max_msn + 1;
-      msn_end = idata->newMailCount;
+      msn_end = idata->new_mail_count;
       while (msn_end > ctx->hdrmax)
         mx_alloc_memory(ctx);
       imap_alloc_msn_index(idata, msn_end);
       idata->reopen &= ~IMAP_NEWMAIL_PENDING;
-      idata->newMailCount = 0;
+      idata->new_mail_count = 0;
     }
   }
 
diff --git a/init.c b/init.c
index c5fabfda9e5c148f264bf4b4379ee648cd74704b..837623d88511c255ccb2308fec3f94b2e01e13bf 100644 (file)
--- a/init.c
+++ b/init.c
@@ -1268,13 +1268,18 @@ bail:
   return -1;
 }
 
-typedef enum group_state_t { NONE, RX, ADDR } group_state_t;
+enum GroupState
+{
+  GS_NONE,
+  GS_RX,
+  GS_ADDR
+};
 
 static int parse_group(struct Buffer *buf, struct Buffer *s, unsigned long data,
                        struct Buffer *err)
 {
   struct GroupContext *gc = NULL;
-  group_state_t state = NONE;
+  enum GroupState state = GS_NONE;
   struct Address *addr = NULL;
   char *estr = NULL;
 
@@ -1292,19 +1297,19 @@ static int parse_group(struct Buffer *buf, struct Buffer *s, unsigned long data,
     }
 
     if (mutt_strcasecmp(buf->data, "-rx") == 0)
-      state = RX;
+      state = GS_RX;
     else if (mutt_strcasecmp(buf->data, "-addr") == 0)
-      state = ADDR;
+      state = GS_ADDR;
     else
     {
       switch (state)
       {
-        case NONE:
+        case GS_NONE:
           snprintf(err->data, err->dsize, _("%sgroup: missing -rx or -addr."),
                    data == MUTT_UNGROUP ? "un" : "");
           goto bail;
 
-        case RX:
+        case GS_RX:
           if (data == MUTT_GROUP &&
               mutt_group_context_add_rx(gc, buf->data, REG_ICASE, err) != 0)
             goto bail;
@@ -1312,7 +1317,7 @@ static int parse_group(struct Buffer *buf, struct Buffer *s, unsigned long data,
             goto bail;
           break;
 
-        case ADDR:
+        case GS_ADDR:
           if ((addr = mutt_parse_adrlist(NULL, buf->data)) == NULL)
             goto bail;
           if (mutt_addrlist_to_intl(addr, &estr))
@@ -4234,7 +4239,7 @@ void mutt_init(int skip_sys_rc, struct List *commands)
   {
     do
     {
-      if (mutt_set_xdg_path(kXDGConfigDirs, buffer, sizeof(buffer)))
+      if (mutt_set_xdg_path(XDG_CONFIG_DIRS, buffer, sizeof(buffer)))
         break;
 
       snprintf(buffer, sizeof(buffer), "%s/neomuttrc-%s", SYSCONFDIR, PACKAGE_VERSION);
diff --git a/init.h b/init.h
index ed547a6c0197f5df5e3dd10a6cdd9f8bc8a7c87a..b09addc3be4940fa12f1c2f386ed85883780bc52 100644 (file)
--- a/init.h
+++ b/init.h
@@ -53,7 +53,7 @@ struct Buffer;
 #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 lineInfo and 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 */
diff --git a/lib.c b/lib.c
index d2364242f891d6286940a6a3aa45e0687edca5ef..7b85b20541f100dda2c2db5dad164b18be174675 100644 (file)
--- a/lib.c
+++ b/lib.c
@@ -44,7 +44,7 @@
 #define EX_OK 0
 #endif
 
-static const struct Sysexits
+static const struct SysExits
 {
   int v;
   const char *str;
diff --git a/menu.c b/menu.c
index 3f6d6aaed4f668671102c4218c301f4ba00ac1c6..e42ed3c304b909624a5c077dac86307c959300f9 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -914,7 +914,7 @@ void mutt_current_menu_redraw()
 static int menu_search(struct Menu *menu, int op)
 {
   int r = 0, wrap = 0;
-  int searchDir;
+  int search_dir;
   regex_t re;
   char buf[SHORT_STRING];
   char *searchBuf =
@@ -934,12 +934,12 @@ static int menu_search(struct Menu *menu, int op)
       mutt_str_replace(&SearchBuffers[menu->menu], buf);
       searchBuf = SearchBuffers[menu->menu];
     }
-    menu->searchDir = (op == OP_SEARCH || op == OP_SEARCH_NEXT) ? MUTT_SEARCH_DOWN : MUTT_SEARCH_UP;
+    menu->search_dir = (op == OP_SEARCH || op == OP_SEARCH_NEXT) ? MUTT_SEARCH_DOWN : MUTT_SEARCH_UP;
   }
 
-  searchDir = (menu->searchDir == MUTT_SEARCH_UP) ? -1 : 1;
+  search_dir = (menu->search_dir == MUTT_SEARCH_UP) ? -1 : 1;
   if (op == OP_SEARCH_OPPOSITE)
-    searchDir = -searchDir;
+    search_dir = -search_dir;
 
   if (searchBuf)
     r = REGCOMP(&re, searchBuf, REG_NOSUB | mutt_which_case(searchBuf));
@@ -951,7 +951,7 @@ static int menu_search(struct Menu *menu, int op)
     return -1;
   }
 
-  r = menu->current + searchDir;
+  r = menu->current + search_dir;
 search_next:
   if (wrap)
     mutt_message(_("Search wrapped to top."));
@@ -963,12 +963,12 @@ search_next:
       return r;
     }
 
-    r += searchDir;
+    r += search_dir;
   }
 
   if (option(OPTWRAPSEARCH) && wrap++ == 0)
   {
-    r = searchDir == 1 ? 0 : menu->max - 1;
+    r = search_dir == 1 ? 0 : menu->max - 1;
     goto search_next;
   }
   regfree(&re);
index b26b49bae70fe68101ac1ff11738146a22dc259a..263da3d46e91366ac0881b706b18248f15bea85c 100644 (file)
@@ -87,7 +87,7 @@ struct Menu
   /* the following are used only by mutt_menu_loop() */
   int top;        /* entry that is the top of the current page */
   int oldcurrent; /* for driver use only. */
-  int searchDir;  /* direction of search */
+  int search_dir;  /* direction of search */
   int tagged;     /* number of tagged entries */
 };
 
index d8713a2b43a3ecb7dd836298e7f138a6102ee84f..5a0eda1dd973cd65d7667243ddf013ce1ad268a6 100644 (file)
@@ -90,7 +90,7 @@ enum
  *
  * The arguments in a URI are saved in a linked list.
  *
- * @sa nm_ctxdata#query_items
+ * @sa NmCtxData#query_items
  */
 struct UriTag
 {
@@ -100,46 +100,46 @@ struct UriTag
 };
 
 /**
- * nm_hdrtag - NotMuch Mail Header Tags
+ * struct NmHdrTag - NotMuch Mail Header Tags
  *
  * Keep a linked list of header tags and their transformed values.
  * Textual tags can be transformed to symbols to save space.
  *
- * @sa nm_hdrdata#tag_list
+ * @sa NmHdrData#tag_list
  */
-struct NmHdrtag
+struct NmHdrTag
 {
   char *tag;
   char *transformed;
-  struct NmHdrtag *next;
+  struct NmHdrTag *next;
 };
 
 /**
- * struct NmHdrdata - NotMuch data attached to an email
+ * struct NmHdrData - NotMuch data attached to an email
  *
  * This stores all the NotMuch data associated with an email.
  *
  * @sa Header#data, MUTT_MBOX
  */
-struct NmHdrdata
+struct NmHdrData
 {
   char *folder; /**< Location of the email */
   char *tags;
   char *tags_transformed;
-  struct NmHdrtag *tag_list;
+  struct NmHdrTag *tag_list;
   char *oldpath;
   char *virtual_id; /**< Unique NotMuch Id */
   int magic;        /**< Type of mailbox the email is in */
 };
 
 /**
- * struct NmCtxdata - NotMuch data attached to a context
+ * struct NmCtxData - NotMuch data attached to a context
  *
  * This stores the global NotMuch data, such as the database connection.
  *
  * @sa Context#data, NotmuchDBLimit, NM_QUERY_TYPE_MESGS
  */
-struct NmCtxdata
+struct NmCtxData
 {
   notmuch_database_t *db;
 
@@ -302,9 +302,9 @@ err:
   return false;
 }
 
-static void free_tag_list(struct NmHdrtag **tag_list)
+static void free_tag_list(struct NmHdrTag **tag_list)
 {
-  struct NmHdrtag *tmp = NULL;
+  struct NmHdrTag *tmp = NULL;
 
   while ((tmp = *tag_list) != NULL)
   {
@@ -317,7 +317,7 @@ static void free_tag_list(struct NmHdrtag **tag_list)
   *tag_list = 0;
 }
 
-static void free_hdrdata(struct NmHdrdata *data)
+static void free_hdrdata(struct NmHdrData *data)
 {
   if (!data)
     return;
@@ -332,7 +332,7 @@ static void free_hdrdata(struct NmHdrdata *data)
   FREE(&data);
 }
 
-static void free_ctxdata(struct NmCtxdata *data)
+static void free_ctxdata(struct NmCtxData *data)
 {
   if (!data)
     return;
@@ -353,14 +353,14 @@ static void free_ctxdata(struct NmCtxdata *data)
   FREE(&data);
 }
 
-static struct NmCtxdata *new_ctxdata(char *uri)
+static struct NmCtxData *new_ctxdata(char *uri)
 {
-  struct NmCtxdata *data = NULL;
+  struct NmCtxData *data = NULL;
 
   if (!uri)
     return NULL;
 
-  data = safe_calloc(1, sizeof(struct NmCtxdata));
+  data = safe_calloc(1, sizeof(struct NmCtxData));
   mutt_debug(1, "nm: initialize context data %p\n", (void *) data);
 
   data->db_limit = NotmuchDBLimit;
@@ -392,7 +392,7 @@ static int init_context(struct Context *ctx)
 
 static char *header_get_id(struct Header *h)
 {
-  return (h && h->data) ? ((struct NmHdrdata *) h->data)->virtual_id : NULL;
+  return (h && h->data) ? ((struct NmHdrData *) h->data)->virtual_id : NULL;
 }
 
 static char *header_get_fullpath(struct Header *h, char *buf, size_t bufsz)
@@ -401,7 +401,7 @@ static char *header_get_fullpath(struct Header *h, char *buf, size_t bufsz)
   return buf;
 }
 
-static struct NmCtxdata *get_ctxdata(struct Context *ctx)
+static struct NmCtxData *get_ctxdata(struct Context *ctx)
 {
   if (ctx && (ctx->magic == MUTT_NOTMUCH))
     return ctx->data;
@@ -556,7 +556,7 @@ static bool windowed_query_from_query(const char *query, char *buf, size_t bufsz
  * result in buffy) or not (for the count in the sidebar). It is not aimed at
  * enabling/disabling the feature.
  */
-static char *get_query_string(struct NmCtxdata *data, int window)
+static char *get_query_string(struct NmCtxData *data, int window)
 {
   mutt_debug(2, "nm: get_query_string(%d)\n", window);
 
@@ -611,17 +611,17 @@ static char *get_query_string(struct NmCtxdata *data, int window)
   return data->db_query;
 }
 
-static int get_limit(struct NmCtxdata *data)
+static int get_limit(struct NmCtxData *data)
 {
   return data ? data->db_limit : 0;
 }
 
-static int get_query_type(struct NmCtxdata *data)
+static int get_query_type(struct NmCtxData *data)
 {
   return (data && data->query_type) ? data->query_type : string_to_query_type(NULL);
 }
 
-static const char *get_db_filename(struct NmCtxdata *data)
+static const char *get_db_filename(struct NmCtxData *data)
 {
   char *db_filename = NULL;
 
@@ -678,7 +678,7 @@ static notmuch_database_t *do_database_open(const char *filename, int writable,
   return db;
 }
 
-static notmuch_database_t *get_db(struct NmCtxdata *data, int writable)
+static notmuch_database_t *get_db(struct NmCtxData *data, int writable)
 {
   if (!data)
     return NULL;
@@ -692,7 +692,7 @@ static notmuch_database_t *get_db(struct NmCtxdata *data, int writable)
   return data->db;
 }
 
-static int release_db(struct NmCtxdata *data)
+static int release_db(struct NmCtxData *data)
 {
   if (data && data->db)
   {
@@ -710,7 +710,7 @@ static int release_db(struct NmCtxdata *data)
   return -1;
 }
 
-static int db_trans_begin(struct NmCtxdata *data)
+static int db_trans_begin(struct NmCtxData *data)
 {
   if (!data || !data->db)
     return -1;
@@ -727,7 +727,7 @@ static int db_trans_begin(struct NmCtxdata *data)
   return 0;
 }
 
-static int db_trans_end(struct NmCtxdata *data)
+static int db_trans_end(struct NmCtxData *data)
 {
   if (!data || !data->db)
     return -1;
@@ -743,12 +743,12 @@ static int db_trans_end(struct NmCtxdata *data)
   return 0;
 }
 
-static int is_longrun(struct NmCtxdata *data)
+static int is_longrun(struct NmCtxData *data)
 {
   return data && data->longrun;
 }
 
-static int get_database_mtime(struct NmCtxdata *data, time_t *mtime)
+static int get_database_mtime(struct NmCtxData *data, time_t *mtime)
 {
   char path[_POSIX_PATH_MAX];
   struct stat st;
@@ -800,7 +800,7 @@ static void apply_exclude_tags(notmuch_query_t *query)
   FREE(&buf);
 }
 
-static notmuch_query_t *get_query(struct NmCtxdata *data, int writable)
+static notmuch_query_t *get_query(struct NmCtxData *data, int writable)
 {
   notmuch_database_t *db = NULL;
   notmuch_query_t *q = NULL;
@@ -844,10 +844,10 @@ static void append_str_item(char **str, const char *item, int sep)
 
 static int update_header_tags(struct Header *h, notmuch_message_t *msg)
 {
-  struct NmHdrdata *data = h->data;
+  struct NmHdrData *data = h->data;
   notmuch_tags_t *tags = NULL;
   char *tstr = NULL, *ttstr = NULL;
-  struct NmHdrtag *tag_list = NULL, *tmp = NULL;
+  struct NmHdrTag *tag_list = NULL, *tmp = NULL;
 
   mutt_debug(2, "nm: tags update requested (%s)\n", data->virtual_id);
 
@@ -916,7 +916,7 @@ static int update_header_tags(struct Header *h, notmuch_message_t *msg)
 
 static int update_message_path(struct Header *h, const char *path)
 {
-  struct NmHdrdata *data = h->data;
+  struct NmHdrData *data = h->data;
   char *p = NULL;
 
   mutt_debug(2, "nm: path update requested path=%s, (%s)\n", path, data->virtual_id);
@@ -996,14 +996,14 @@ static int init_header(struct Header *h, const char *path, notmuch_message_t *ms
 
   id = notmuch_message_get_message_id(msg);
 
-  h->data = safe_calloc(1, sizeof(struct NmHdrdata));
+  h->data = safe_calloc(1, sizeof(struct NmHdrData));
   h->free_cb = deinit_header;
 
   /*
    * Notmuch ensures that message Id exists (if not notmuch Notmuch will
    * generate an ID), so it's more safe than use mutt Header->env->id
    */
-  ((struct NmHdrdata *) h->data)->virtual_id = safe_strdup(id);
+  ((struct NmHdrData *) h->data)->virtual_id = safe_strdup(id);
 
   mutt_debug(2, "nm: initialize header data: [hdr=%p, data=%p] (%s)\n",
              (void *) h, (void *) h->data, id);
@@ -1035,7 +1035,7 @@ static const char *get_message_last_filename(notmuch_message_t *msg)
 
 static void progress_reset(struct Context *ctx)
 {
-  struct NmCtxdata *data = NULL;
+  struct NmCtxData *data = NULL;
 
   if (ctx->quiet)
     return;
@@ -1053,7 +1053,7 @@ static void progress_reset(struct Context *ctx)
 
 static void progress_update(struct Context *ctx, notmuch_query_t *q)
 {
-  struct NmCtxdata *data = get_ctxdata(ctx);
+  struct NmCtxData *data = get_ctxdata(ctx);
 
   if (ctx->quiet || !data || data->noprogress)
     return;
@@ -1117,7 +1117,7 @@ static void append_message(struct Context *ctx, notmuch_query_t *q,
   const char *path = NULL;
   struct Header *h = NULL;
 
-  struct NmCtxdata *data = get_ctxdata(ctx);
+  struct NmCtxData *data = get_ctxdata(ctx);
   if (!data)
     return;
 
@@ -1185,7 +1185,7 @@ static void append_message(struct Context *ctx, notmuch_query_t *q,
   if (newpath)
   {
     /* remember that file has been moved -- nm_sync_mailbox() will update the DB */
-    struct NmHdrdata *hd = (struct NmHdrdata *) h->data;
+    struct NmHdrData *hd = (struct NmHdrData *) h->data;
 
     if (hd)
     {
@@ -1231,7 +1231,7 @@ static void append_thread(struct Context *ctx, notmuch_query_t *q,
 
 static bool read_mesgs_query(struct Context *ctx, notmuch_query_t *q, int dedup)
 {
-  struct NmCtxdata *data = get_ctxdata(ctx);
+  struct NmCtxData *data = get_ctxdata(ctx);
   int limit;
   notmuch_messages_t *msgs = NULL;
 
@@ -1264,7 +1264,7 @@ static bool read_mesgs_query(struct Context *ctx, notmuch_query_t *q, int dedup)
 
 static bool read_threads_query(struct Context *ctx, notmuch_query_t *q, int dedup, int limit)
 {
-  struct NmCtxdata *data = get_ctxdata(ctx);
+  struct NmCtxData *data = get_ctxdata(ctx);
   notmuch_threads_t *threads = NULL;
 
   if (!data)
@@ -1479,7 +1479,7 @@ static int rename_maildir_filename(const char *old, char *newpath, size_t newsz,
   return 0;
 }
 
-static int remove_filename(struct NmCtxdata *data, const char *path)
+static int remove_filename(struct NmCtxData *data, const char *path)
 {
   notmuch_status_t st;
   notmuch_filenames_t *ls = NULL;
@@ -1533,7 +1533,7 @@ static int remove_filename(struct NmCtxdata *data, const char *path)
   return 0;
 }
 
-static int rename_filename(struct NmCtxdata *data, const char *old,
+static int rename_filename(struct NmCtxData *data, const char *old,
                            const char *new, struct Header *h)
 {
   int rc = -1;
@@ -1639,27 +1639,27 @@ static unsigned count_query(notmuch_database_t *db, const char *qstr)
 
 char *nm_header_get_folder(struct Header *h)
 {
-  return (h && h->data) ? ((struct NmHdrdata *) h->data)->folder : NULL;
+  return (h && h->data) ? ((struct NmHdrData *) h->data)->folder : NULL;
 }
 
 char *nm_header_get_tags(struct Header *h)
 {
-  return (h && h->data) ? ((struct NmHdrdata *) h->data)->tags : NULL;
+  return (h && h->data) ? ((struct NmHdrData *) h->data)->tags : NULL;
 }
 
 char *nm_header_get_tags_transformed(struct Header *h)
 {
-  return (h && h->data) ? ((struct NmHdrdata *) h->data)->tags_transformed : NULL;
+  return (h && h->data) ? ((struct NmHdrData *) h->data)->tags_transformed : NULL;
 }
 
 char *nm_header_get_tag_transformed(char *tag, struct Header *h)
 {
-  struct NmHdrtag *tmp = NULL;
+  struct NmHdrTag *tmp = NULL;
 
   if (!h || !h->data)
     return NULL;
 
-  for (tmp = ((struct NmHdrdata *) h->data)->tag_list; tmp != NULL; tmp = tmp->next)
+  for (tmp = ((struct NmHdrData *) h->data)->tag_list; tmp != NULL; tmp = tmp->next)
   {
     if (strcmp(tag, tmp->tag) == 0)
       return tmp->transformed;
@@ -1670,7 +1670,7 @@ char *nm_header_get_tag_transformed(char *tag, struct Header *h)
 
 void nm_longrun_init(struct Context *ctx, int writable)
 {
-  struct NmCtxdata *data = get_ctxdata(ctx);
+  struct NmCtxData *data = get_ctxdata(ctx);
 
   if (data && get_db(data, writable))
   {
@@ -1681,7 +1681,7 @@ void nm_longrun_init(struct Context *ctx, int writable)
 
 void nm_longrun_done(struct Context *ctx)
 {
-  struct NmCtxdata *data = get_ctxdata(ctx);
+  struct NmCtxData *data = get_ctxdata(ctx);
 
   if (data && (release_db(data) == 0))
     mutt_debug(2, "nm: long run deinitialized\n");
@@ -1689,7 +1689,7 @@ void nm_longrun_done(struct Context *ctx)
 
 void nm_debug_check(struct Context *ctx)
 {
-  struct NmCtxdata *data = get_ctxdata(ctx);
+  struct NmCtxData *data = get_ctxdata(ctx);
   if (!data)
     return;
 
@@ -1702,7 +1702,7 @@ void nm_debug_check(struct Context *ctx)
 
 int nm_read_entire_thread(struct Context *ctx, struct Header *h)
 {
-  struct NmCtxdata *data = get_ctxdata(ctx);
+  struct NmCtxData *data = get_ctxdata(ctx);
   const char *id = NULL;
   char *qstr = NULL;
   notmuch_query_t *q = NULL;
@@ -1756,7 +1756,7 @@ done:
 char *nm_uri_from_query(struct Context *ctx, char *buf, size_t bufsz)
 {
   mutt_debug(2, "nm_uri_from_query (%s)\n", buf);
-  struct NmCtxdata *data = get_ctxdata(ctx);
+  struct NmCtxData *data = get_ctxdata(ctx);
   char uri[_POSIX_PATH_MAX + LONG_STRING + 32]; /* path to DB + query + URI "decoration" */
 
   if (data)
@@ -1798,7 +1798,7 @@ bool nm_normalize_uri(char *new_uri, const char *orig_uri, size_t new_uri_sz)
   char buf[LONG_STRING];
 
   struct Context tmp_ctx;
-  struct NmCtxdata tmp_ctxdata;
+  struct NmCtxData tmp_ctxdata;
 
   tmp_ctx.magic = MUTT_NOTMUCH;
   tmp_ctx.data = &tmp_ctxdata;
@@ -1870,7 +1870,7 @@ void nm_query_window_backward(void)
 
 int nm_modify_message_tags(struct Context *ctx, struct Header *hdr, char *buf)
 {
-  struct NmCtxdata *data = get_ctxdata(ctx);
+  struct NmCtxData *data = get_ctxdata(ctx);
   notmuch_database_t *db = NULL;
   notmuch_message_t *msg = NULL;
   int rc = -1;
@@ -1903,7 +1903,7 @@ bool nm_message_is_still_queried(struct Context *ctx, struct Header *hdr)
 {
   char *orig_str = NULL;
   char *new_str = NULL;
-  struct NmCtxdata *data = get_ctxdata(ctx);
+  struct NmCtxData *data = get_ctxdata(ctx);
   notmuch_database_t *db = NULL;
   notmuch_query_t *q = NULL;
   bool result = false;
@@ -1964,7 +1964,7 @@ int nm_update_filename(struct Context *ctx, const char *old, const char *new,
 {
   char buf[PATH_MAX];
   int rc;
-  struct NmCtxdata *data = get_ctxdata(ctx);
+  struct NmCtxData *data = get_ctxdata(ctx);
 
   if (!data || !new)
     return -1;
@@ -2099,7 +2099,7 @@ int nm_record_message(struct Context *ctx, char *path, struct Header *h)
   notmuch_status_t st;
   notmuch_message_t *msg = NULL;
   int rc = -1, trans;
-  struct NmCtxdata *data = get_ctxdata(ctx);
+  struct NmCtxData *data = get_ctxdata(ctx);
 
   if (!path || !data || (access(path, F_OK) != 0))
     return 0;
@@ -2142,7 +2142,7 @@ done:
 
 int nm_get_all_tags(struct Context *ctx, char **tag_list, int *tag_count)
 {
-  struct NmCtxdata *data = get_ctxdata(ctx);
+  struct NmCtxData *data = get_ctxdata(ctx);
   notmuch_database_t *db = NULL;
   notmuch_tags_t *tags = NULL;
   const char *tag = NULL;
@@ -2186,7 +2186,7 @@ done:
 static int nm_open_mailbox(struct Context *ctx)
 {
   notmuch_query_t *q = NULL;
-  struct NmCtxdata *data = NULL;
+  struct NmCtxData *data = NULL;
   int rc = -1;
 
   if (init_context(ctx) != 0)
@@ -2253,7 +2253,7 @@ static int nm_close_mailbox(struct Context *ctx)
 
 static int nm_check_mailbox(struct Context *ctx, int *index_hint)
 {
-  struct NmCtxdata *data = get_ctxdata(ctx);
+  struct NmCtxData *data = get_ctxdata(ctx);
   time_t mtime = 0;
   notmuch_query_t *q = NULL;
   notmuch_messages_t *msgs = NULL;
@@ -2368,7 +2368,7 @@ done:
 
 static int nm_sync_mailbox(struct Context *ctx, int *index_hint)
 {
-  struct NmCtxdata *data = get_ctxdata(ctx);
+  struct NmCtxData *data = get_ctxdata(ctx);
   int rc = 0;
   char msgbuf[STRING];
   struct Progress progress;
@@ -2391,7 +2391,7 @@ static int nm_sync_mailbox(struct Context *ctx, int *index_hint)
   {
     char old[_POSIX_PATH_MAX], new[_POSIX_PATH_MAX];
     struct Header *h = ctx->hdrs[i];
-    struct NmHdrdata *hd = h->data;
+    struct NmHdrData *hd = h->data;
 
     if (!ctx->quiet)
       mutt_progress_update(&progress, i, -1);
index ff5f9ac4a124b255682326cf5b9fc47240dd5068..8a80faab90010ccfed36e2e3884ba180a2926476 100644 (file)
--- a/muttlib.c
+++ b/muttlib.c
 #endif
 
 static const char *xdg_env_vars[] = {
-      [kXDGConfigHome] = "XDG_CONFIG_HOME",
-      [kXDGConfigDirs] = "XDG_CONFIG_DIRS",
+      [XDG_CONFIG_HOME] = "XDG_CONFIG_HOME",
+      [XDG_CONFIG_DIRS] = "XDG_CONFIG_DIRS",
 };
 
 static const char *xdg_defaults[] = {
-      [kXDGConfigHome] = "~/.config", [kXDGConfigDirs] = "/etc/xdg",
+      [XDG_CONFIG_HOME] = "~/.config", [XDG_CONFIG_DIRS] = "/etc/xdg",
 };
 
 struct Body *mutt_new_body(void)
@@ -953,7 +953,7 @@ void mutt_pretty_mailbox(char *s, size_t buflen)
 {
   char *p = s, *q = s;
   size_t len;
-  url_scheme_t scheme;
+  enum UrlScheme scheme;
   char tmp[PATH_MAX];
 
   scheme = url_check_scheme(s);
@@ -1298,7 +1298,7 @@ void mutt_FormatString(char *dest,     /* output buffer */
                        const char *src,    /* template string */
                        format_t *callback, /* callback for processing */
                        unsigned long data, /* callback data */
-                       format_flag flags)  /* callback flags */
+                       enum FormatFlag flags)  /* callback flags */
 {
   char prefix[SHORT_STRING], buf[LONG_STRING], *cp = NULL, *wptr = dest, ch;
   char ifstring[SHORT_STRING], elsestring[SHORT_STRING];
@@ -2225,7 +2225,7 @@ void mutt_encode_path(char *dest, size_t dlen, const char *src)
  *
  * Return 1 if an entry was found that actually exists on disk and 0 otherwise.
  */
-int mutt_set_xdg_path(const XDGType type, char *buf, size_t bufsize)
+int mutt_set_xdg_path(enum XdgType type, char *buf, size_t bufsize)
 {
   char *xdg_env = getenv(xdg_env_vars[type]);
   char *xdg = (xdg_env && *xdg_env) ? safe_strdup(xdg_env) :
diff --git a/mx.c b/mx.c
index 893da461e090d6de3d6b505050907ddb3872576b..638d67e6285cf53dbda8fdd128a62fcb72f8bb8d 100644 (file)
--- a/mx.c
+++ b/mx.c
@@ -262,7 +262,7 @@ static void mx_unlink_empty(const char *path)
 
 bool mx_is_imap(const char *p)
 {
-  url_scheme_t scheme;
+  enum UrlScheme scheme;
 
   if (!p)
     return false;
@@ -282,7 +282,7 @@ bool mx_is_imap(const char *p)
 #ifdef USE_POP
 bool mx_is_pop(const char *p)
 {
-  url_scheme_t scheme;
+  enum UrlScheme scheme;
 
   if (!p)
     return false;
@@ -298,7 +298,7 @@ bool mx_is_pop(const char *p)
 #ifdef USE_NNTP
 bool mx_is_nntp(const char *p)
 {
-  url_scheme_t scheme;
+  enum UrlScheme scheme;
 
   if (!p)
     return false;
@@ -314,7 +314,7 @@ bool mx_is_nntp(const char *p)
 #ifdef USE_NOTMUCH
 bool mx_is_notmuch(const char *p)
 {
-  url_scheme_t scheme;
+  enum UrlScheme scheme;
 
   if (!p)
     return false;
index 9aede2c36448520078b3a354828e7028b2ce2213..a6a5e8f63ad51d4a6e81cc47069709db640fe9a3 100644 (file)
@@ -86,7 +86,7 @@ struct CryptCache
   struct CryptCache *next;
 };
 
-struct DnArrayS
+struct DnArray
 {
   char *key;
   char *value;
@@ -94,9 +94,9 @@ struct DnArrayS
 
 /* We work based on user IDs, getting from a user ID to the key is
    check and does not need any memory (gpgme uses reference counting). */
-struct CryptKeyinfo
+struct CryptKeyInfo
 {
-  struct CryptKeyinfo *next;
+  struct CryptKeyInfo *next;
   gpgme_key_t kobj;
   int idx;                   /* and the user ID at this index */
   const char *uid;           /* and for convenience point to this user ID */
@@ -107,7 +107,7 @@ struct CryptKeyinfo
 struct CryptEntry
 {
   size_t num;
-  struct CryptKeyinfo *key;
+  struct CryptKeyInfo *key;
 };
 
 static struct CryptCache *id_defaults = NULL;
@@ -165,7 +165,7 @@ static void print_utf8(FILE *fp, const char *buf, size_t len)
 
 /* Return the keyID for the key K.  Note that this string is valid as
    long as K is valid */
-static const char *crypt_keyid(struct CryptKeyinfo *k)
+static const char *crypt_keyid(struct CryptKeyInfo *k)
 {
   const char *s = "????????";
 
@@ -181,7 +181,7 @@ static const char *crypt_keyid(struct CryptKeyinfo *k)
 }
 
 /* Return the long keyID for the key K. */
-static const char *crypt_long_keyid(struct CryptKeyinfo *k)
+static const char *crypt_long_keyid(struct CryptKeyInfo *k)
 {
   const char *s = "????????????????";
 
@@ -194,7 +194,7 @@ static const char *crypt_long_keyid(struct CryptKeyinfo *k)
 }
 
 /* Return the short keyID for the key K. */
-static const char *crypt_short_keyid(struct CryptKeyinfo *k)
+static const char *crypt_short_keyid(struct CryptKeyInfo *k)
 {
   const char *s = "????????";
 
@@ -209,7 +209,7 @@ static const char *crypt_short_keyid(struct CryptKeyinfo *k)
 }
 
 /* Return the hexstring fingerprint from the key K. */
-static const char *crypt_fpr(struct CryptKeyinfo *k)
+static const char *crypt_fpr(struct CryptKeyInfo *k)
 {
   const char *s = "";
 
@@ -222,7 +222,7 @@ static const char *crypt_fpr(struct CryptKeyinfo *k)
 /* Returns the fingerprint if available, otherwise
  * returns the long keyid.
  */
-static const char *crypt_fpr_or_lkeyid(struct CryptKeyinfo *k)
+static const char *crypt_fpr_or_lkeyid(struct CryptKeyInfo *k)
 {
   const char *s = "????????????????";
 
@@ -277,9 +277,9 @@ static char crypt_flags(int flags)
 }
 
 /* Return a copy of KEY. */
-static struct CryptKeyinfo *crypt_copy_key(struct CryptKeyinfo *key)
+static struct CryptKeyInfo *crypt_copy_key(struct CryptKeyInfo *key)
 {
-  struct CryptKeyinfo *k = NULL;
+  struct CryptKeyInfo *k = NULL;
 
   k = safe_calloc(1, sizeof(*k));
   k->kobj = key->kobj;
@@ -294,9 +294,9 @@ static struct CryptKeyinfo *crypt_copy_key(struct CryptKeyinfo *key)
 
 /* Release all the keys at the address of KEYLIST and set the address
    to NULL. */
-static void crypt_free_key(struct CryptKeyinfo **keylist)
+static void crypt_free_key(struct CryptKeyInfo **keylist)
 {
-  struct CryptKeyinfo *k = NULL;
+  struct CryptKeyInfo *k = NULL;
 
   if (!keylist)
     return;
@@ -312,7 +312,7 @@ static void crypt_free_key(struct CryptKeyinfo **keylist)
 }
 
 /* Return true when key K is valid. */
-static bool crypt_key_is_valid(struct CryptKeyinfo *k)
+static bool crypt_key_is_valid(struct CryptKeyInfo *k)
 {
   if (k->flags & KEYFLAG_CANTUSE)
     return false;
@@ -320,7 +320,7 @@ static bool crypt_key_is_valid(struct CryptKeyinfo *k)
 }
 
 /* Return true when validity of KEY is sufficient. */
-static int crypt_id_is_strong(struct CryptKeyinfo *key)
+static int crypt_id_is_strong(struct CryptKeyInfo *key)
 {
   unsigned int is_strong = 0;
 
@@ -346,7 +346,7 @@ static int crypt_id_is_strong(struct CryptKeyinfo *key)
 }
 
 /* Return true when the KEY is valid, i.e. not marked as unusable. */
-static int crypt_id_is_valid(struct CryptKeyinfo *key)
+static int crypt_id_is_valid(struct CryptKeyInfo *key)
 {
   return !(key->flags & KEYFLAG_CANTUSE);
 }
@@ -354,7 +354,7 @@ static int crypt_id_is_valid(struct CryptKeyinfo *key)
 /* Return a bit vector describing how well the addresses ADDR and
    U_ADDR match and whether KEY is valid. */
 static int crypt_id_matches_addr(struct Address *addr, struct Address *u_addr,
-                                 struct CryptKeyinfo *key)
+                                 struct CryptKeyInfo *key)
 {
   int rv = 0;
 
@@ -2729,11 +2729,11 @@ int smime_gpgme_application_handler(struct Body *a, struct State *s)
 static const char *crypt_entry_fmt(char *dest, size_t destlen, size_t col, int cols,
                                    char op, const char *src, const char *prefix,
                                    const char *ifstring, const char *elsestring,
-                                   unsigned long data, format_flag flags)
+                                   unsigned long data, enum FormatFlag flags)
 {
   char fmt[16];
   struct CryptEntry *entry = NULL;
-  struct CryptKeyinfo *key = NULL;
+  struct CryptKeyInfo *key = NULL;
   int kflags = 0;
   int optional = (flags & MUTT_FORMAT_OPTIONAL);
   const char *s = NULL;
@@ -2927,7 +2927,7 @@ static const char *crypt_entry_fmt(char *dest, size_t destlen, size_t col, int c
 /* Used by the display function to format a line. */
 static void crypt_entry(char *s, size_t l, struct Menu *menu, int num)
 {
-  struct CryptKeyinfo **key_table = (struct CryptKeyinfo **) menu->data;
+  struct CryptKeyInfo **key_table = (struct CryptKeyInfo **) menu->data;
   struct CryptEntry entry;
 
   entry.key = key_table[num];
@@ -2940,8 +2940,8 @@ static void crypt_entry(char *s, size_t l, struct Menu *menu, int num)
 /* Compare two addresses and the keyid to be used for sorting. */
 static int _crypt_compare_address(const void *a, const void *b)
 {
-  struct CryptKeyinfo **s = (struct CryptKeyinfo **) a;
-  struct CryptKeyinfo **t = (struct CryptKeyinfo **) b;
+  struct CryptKeyInfo **s = (struct CryptKeyInfo **) a;
+  struct CryptKeyInfo **t = (struct CryptKeyInfo **) b;
   int r;
 
   if ((r = mutt_strcasecmp((*s)->uid, (*t)->uid)))
@@ -2959,8 +2959,8 @@ static int crypt_compare_address(const void *a, const void *b)
 /* Compare two key IDs and the addresses to be used for sorting. */
 static int _crypt_compare_keyid(const void *a, const void *b)
 {
-  struct CryptKeyinfo **s = (struct CryptKeyinfo **) a;
-  struct CryptKeyinfo **t = (struct CryptKeyinfo **) b;
+  struct CryptKeyInfo **s = (struct CryptKeyInfo **) a;
+  struct CryptKeyInfo **t = (struct CryptKeyInfo **) b;
   int r;
 
   if ((r = mutt_strcasecmp(crypt_fpr_or_lkeyid(*s), crypt_fpr_or_lkeyid(*t))))
@@ -2978,8 +2978,8 @@ static int crypt_compare_keyid(const void *a, const void *b)
 /* Compare 2 creation dates and the addresses.  For sorting. */
 static int _crypt_compare_date(const void *a, const void *b)
 {
-  struct CryptKeyinfo **s = (struct CryptKeyinfo **) a;
-  struct CryptKeyinfo **t = (struct CryptKeyinfo **) b;
+  struct CryptKeyInfo **s = (struct CryptKeyInfo **) a;
+  struct CryptKeyInfo **t = (struct CryptKeyInfo **) b;
   unsigned long ts = 0, tt = 0;
 
   if ((*s)->kobj->subkeys && ((*s)->kobj->subkeys->timestamp > 0))
@@ -3005,8 +3005,8 @@ static int crypt_compare_date(const void *a, const void *b)
    addresses and the key IDs.  For sorting. */
 static int _crypt_compare_trust(const void *a, const void *b)
 {
-  struct CryptKeyinfo **s = (struct CryptKeyinfo **) a;
-  struct CryptKeyinfo **t = (struct CryptKeyinfo **) b;
+  struct CryptKeyInfo **s = (struct CryptKeyInfo **) a;
+  struct CryptKeyInfo **t = (struct CryptKeyInfo **) b;
   unsigned long ts = 0, tt = 0;
   int r;
 
@@ -3047,7 +3047,7 @@ static int crypt_compare_trust(const void *a, const void *b)
 
 /* Print the X.500 Distinguished Name part KEY from the array of parts
    DN to FP. */
-static int print_dn_part(FILE *fp, struct DnArrayS *dn, const char *key)
+static int print_dn_part(FILE *fp, struct DnArray *dn, const char *key)
 {
   int any = 0;
 
@@ -3065,7 +3065,7 @@ static int print_dn_part(FILE *fp, struct DnArrayS *dn, const char *key)
 }
 
 /* Print all parts of a DN in a standard sequence. */
-static void print_dn_parts(FILE *fp, struct DnArrayS *dn)
+static void print_dn_parts(FILE *fp, struct DnArray *dn)
 {
   static const char *const stdpart[] = {
     "CN", "OU", "O", "STREET", "L", "ST", "C", NULL,
@@ -3101,7 +3101,7 @@ static void print_dn_parts(FILE *fp, struct DnArrayS *dn)
 }
 
 /* Parse an RDN; this is a helper to parse_dn(). */
-static const char *parse_dn_part(struct DnArrayS *array, const char *string)
+static const char *parse_dn_part(struct DnArray *array, const char *string)
 {
   const char *s = NULL, *s1 = NULL;
   size_t n;
@@ -3189,9 +3189,9 @@ static const char *parse_dn_part(struct DnArrayS *array, const char *string)
 /* Parse a DN and return an array-ized one.  This is not a validating
    parser and it does not support any old-stylish syntax; gpgme is
    expected to return only rfc2253 compatible strings. */
-static struct DnArrayS *parse_dn(const char *string)
+static struct DnArray *parse_dn(const char *string)
 {
-  struct DnArrayS *array = NULL;
+  struct DnArray *array = NULL;
   size_t arrayidx, arraysize;
   int i;
 
@@ -3206,7 +3206,7 @@ static struct DnArrayS *parse_dn(const char *string)
       break; /* ready */
     if (arrayidx >= arraysize)
     { /* mutt lacks a real safe_realoc - so we need to copy */
-      struct DnArrayS *a2 = NULL;
+      struct DnArray *a2 = NULL;
 
       arraysize += 5;
       a2 = safe_malloc((arraysize + 1) * sizeof(*array));
@@ -3266,7 +3266,7 @@ static void parse_and_print_user_id(FILE *fp, const char *userid)
     fputs(_("[Can't display this user ID (invalid encoding)]"), fp);
   else
   {
-    struct DnArrayS *dn = parse_dn(userid);
+    struct DnArray *dn = parse_dn(userid);
     if (!dn)
       fputs(_("[Can't display this user ID (invalid DN)]"), fp);
     else
@@ -3282,13 +3282,14 @@ static void parse_and_print_user_id(FILE *fp, const char *userid)
   }
 }
 
-typedef enum {
+enum KeyCap
+{
   KEY_CAP_CAN_ENCRYPT,
   KEY_CAP_CAN_SIGN,
   KEY_CAP_CAN_CERTIFY
-} key_cap_t;
+};
 
-static unsigned int key_check_cap(gpgme_key_t key, key_cap_t cap)
+static unsigned int key_check_cap(gpgme_key_t key, enum KeyCap cap)
 {
   gpgme_subkey_t subkey = NULL;
   unsigned int ret = 0;
@@ -3600,7 +3601,7 @@ static void print_key_info(gpgme_key_t key, FILE *fp)
 }
 
 /* Show detailed information about the selected key */
-static void verify_key(struct CryptKeyinfo *key)
+static void verify_key(struct CryptKeyInfo *key)
 {
   FILE *fp = NULL;
   char cmd[LONG_STRING], tempfile[_POSIX_PATH_MAX];
@@ -3725,9 +3726,9 @@ static char *list_to_pattern(struct List *list)
 
 /* Return a list of keys which are candidates for the selection.
    Select by looking at the HINTS list. */
-static struct CryptKeyinfo *get_candidates(struct List *hints, unsigned int app, int secret)
+static struct CryptKeyInfo *get_candidates(struct List *hints, unsigned int app, int secret)
 {
-  struct CryptKeyinfo *db = NULL, *k = NULL, **kend = NULL;
+  struct CryptKeyInfo *db = NULL, *k = NULL, **kend = NULL;
   char *pattern = NULL;
   gpgme_error_t err;
   gpgme_ctx_t ctx;
@@ -3894,17 +3895,17 @@ static struct List *crypt_add_string_to_hints(struct List *hints, const char *st
 /* Display a menu to select a key from the array KEYS. FORCED_VALID
    will be set to true on return if the user did override the
    key's validity. */
-static struct CryptKeyinfo *crypt_select_key(struct CryptKeyinfo *keys,
+static struct CryptKeyInfo *crypt_select_key(struct CryptKeyInfo *keys,
                                              struct Address *p, const char *s,
                                              unsigned int app, int *forced_valid)
 {
   int keymax;
-  struct CryptKeyinfo **key_table = NULL;
+  struct CryptKeyInfo **key_table = NULL;
   struct Menu *menu = NULL;
   int i;
   bool done = false;
   char helpstr[LONG_STRING], buf[LONG_STRING];
-  struct CryptKeyinfo *k = NULL;
+  struct CryptKeyInfo *k = NULL;
   int (*f)(const void *, const void *);
   int menu_to_use = 0;
   bool unusable = false;
@@ -3925,7 +3926,7 @@ static struct CryptKeyinfo *crypt_select_key(struct CryptKeyinfo *keys,
     if (i == keymax)
     {
       keymax += 20;
-      safe_realloc(&key_table, sizeof(struct CryptKeyinfo *) * keymax);
+      safe_realloc(&key_table, sizeof(struct CryptKeyInfo *) * keymax);
     }
 
     key_table[i++] = k;
@@ -3954,7 +3955,7 @@ static struct CryptKeyinfo *crypt_select_key(struct CryptKeyinfo *keys,
       f = crypt_compare_trust;
       break;
   }
-  qsort(key_table, i, sizeof(struct CryptKeyinfo *), f);
+  qsort(key_table, i, sizeof(struct CryptKeyInfo *), f);
 
   if (app & APPLICATION_PGP)
     menu_to_use = MENU_KEY_SELECT_PGP;
@@ -4090,7 +4091,7 @@ static struct CryptKeyinfo *crypt_select_key(struct CryptKeyinfo *keys,
   return k;
 }
 
-static struct CryptKeyinfo *crypt_getkeybyaddr(struct Address *a,
+static struct CryptKeyInfo *crypt_getkeybyaddr(struct Address *a,
                                                short abilities, unsigned int app,
                                                int *forced_valid, bool oppenc_mode)
 {
@@ -4102,11 +4103,11 @@ static struct CryptKeyinfo *crypt_getkeybyaddr(struct Address *a,
   int this_key_has_addr_match = false;
   int match = false;
 
-  struct CryptKeyinfo *keys = NULL, *k = NULL;
-  struct CryptKeyinfo *the_strong_valid_key = NULL;
-  struct CryptKeyinfo *a_valid_addrmatch_key = NULL;
-  struct CryptKeyinfo *matches = NULL;
-  struct CryptKeyinfo **matches_endp = &matches;
+  struct CryptKeyInfo *keys = NULL, *k = NULL;
+  struct CryptKeyInfo *the_strong_valid_key = NULL;
+  struct CryptKeyInfo *a_valid_addrmatch_key = NULL;
+  struct CryptKeyInfo *matches = NULL;
+  struct CryptKeyInfo **matches_endp = &matches;
 
   *forced_valid = 0;
 
@@ -4166,7 +4167,7 @@ static struct CryptKeyinfo *crypt_getkeybyaddr(struct Address *a,
 
     if (match)
     {
-      struct CryptKeyinfo *tmp = NULL;
+      struct CryptKeyInfo *tmp = NULL;
 
       *matches_endp = tmp = crypt_copy_key(k);
       matches_endp = &tmp->next;
@@ -4216,14 +4217,14 @@ static struct CryptKeyinfo *crypt_getkeybyaddr(struct Address *a,
   return k;
 }
 
-static struct CryptKeyinfo *crypt_getkeybystr(char *p, short abilities,
+static struct CryptKeyInfo *crypt_getkeybystr(char *p, short abilities,
                                               unsigned int app, int *forced_valid)
 {
   struct List *hints = NULL;
-  struct CryptKeyinfo *keys = NULL;
-  struct CryptKeyinfo *matches = NULL;
-  struct CryptKeyinfo **matches_endp = &matches;
-  struct CryptKeyinfo *k = NULL;
+  struct CryptKeyInfo *keys = NULL;
+  struct CryptKeyInfo *matches = NULL;
+  struct CryptKeyInfo **matches_endp = &matches;
+  struct CryptKeyInfo *k = NULL;
   const char *ps = NULL, *pl = NULL, *pfcopy = NULL, *phint = NULL;
 
   mutt_message(_("Looking for keys matching \"%s\"..."), p);
@@ -4255,7 +4256,7 @@ static struct CryptKeyinfo *crypt_getkeybystr(char *p, short abilities,
         (ps && (mutt_strcasecmp(ps, crypt_short_keyid(k)) == 0)) ||
         mutt_stristr(k->uid, p))
     {
-      struct CryptKeyinfo *tmp = NULL;
+      struct CryptKeyInfo *tmp = NULL;
 
       mutt_debug(5, "match.\n");
 
@@ -4286,10 +4287,10 @@ static struct CryptKeyinfo *crypt_getkeybystr(char *p, short abilities,
    default.  ABILITIES describe the required key abilities (sign,
    encrypt) and APP the type of the requested key; ether S/MIME or
    PGP.  Return a copy of the key or NULL if not found. */
-static struct CryptKeyinfo *crypt_ask_for_key(char *tag, char *whatfor, short abilities,
+static struct CryptKeyInfo *crypt_ask_for_key(char *tag, char *whatfor, short abilities,
                                               unsigned int app, int *forced_valid)
 {
-  struct CryptKeyinfo *key = NULL;
+  struct CryptKeyInfo *key = NULL;
   char resp[SHORT_STRING];
   struct CryptCache *l = NULL;
   int dummy;
@@ -4353,7 +4354,7 @@ static char *find_keys(struct Address *adrlist, unsigned int app, int oppenc_mod
   size_t keylist_used = 0;
   struct Address *addr = NULL;
   struct Address *p = NULL, *q = NULL;
-  struct CryptKeyinfo *k_info = NULL;
+  struct CryptKeyInfo *k_info = NULL;
   const char *fqdn = mutt_fqdn(1);
   char buf[LONG_STRING];
   int forced_valid;
@@ -4477,7 +4478,7 @@ char *smime_gpgme_findkeys(struct Address *adrlist, int oppenc_mode)
 #ifdef HAVE_GPGME_OP_EXPORT_KEYS
 struct Body *pgp_gpgme_make_key_attachment(char *tempf)
 {
-  struct CryptKeyinfo *key = NULL;
+  struct CryptKeyInfo *key = NULL;
   gpgme_ctx_t context = NULL;
   gpgme_key_t export_keys[2];
   gpgme_data_t keydata = NULL;
@@ -4588,7 +4589,7 @@ void smime_gpgme_init(void)
 
 static int gpgme_send_menu(struct Header *msg, int is_smime)
 {
-  struct CryptKeyinfo *p = NULL;
+  struct CryptKeyInfo *p = NULL;
   char input_signas[SHORT_STRING];
   char *prompt = NULL, *letters = NULL, *choices = NULL;
   int choice;
index ee23da58a8f39426b75fd94f7c5e5c3a13a385c1..e9fee7ccb80fd2a9bc32ebf42f262dee404b7bb6 100644 (file)
@@ -374,7 +374,7 @@ bail:
   return NULL;
 }
 
-struct PgpKeyInfo *pgp_get_candidates(pgp_ring_t keyring, struct List *hints)
+struct PgpKeyInfo *pgp_get_candidates(enum PgpRing keyring, struct List *hints)
 {
   FILE *fp = NULL;
   pid_t thepid;
index fbb39b6cabb59324160b3070e78ab39cb3e031b2..044afabcdefa6d51a077726e88eb741aa8a620d7 100644 (file)
@@ -22,6 +22,6 @@
 
 struct List;
 
-struct PgpKeyInfo * pgp_get_candidates(pgp_ring_t keyring, struct List *hints);
+struct PgpKeyInfo * pgp_get_candidates(enum PgpRing keyring, struct List *hints);
 
 #endif /* _NCRYPT_GNUPGPARSE_H */
index 8a9d16a3ba1a4bc7892621390aadba617f181143..34b5af78dcaa5a79bc41bfb3895e722347c9b909 100644 (file)
@@ -56,7 +56,7 @@ static const char *_mutt_fmt_pgp_command(char *dest, size_t destlen, size_t col,
                                          int cols, char op, const char *src,
                                          const char *prefix, const char *ifstring,
                                          const char *elsestring,
-                                         unsigned long data, format_flag flags)
+                                         unsigned long data, enum FormatFlag flags)
 {
   char fmt[16];
   struct PgpCommandContext *cctx = (struct PgpCommandContext *) data;
@@ -310,7 +310,7 @@ pid_t pgp_invoke_verify_key(FILE **pgpin, FILE **pgpout, FILE **pgperr, int pgpi
 
 pid_t pgp_invoke_list_keys(FILE **pgpin, FILE **pgpout, FILE **pgperr,
                            int pgpinfd, int pgpoutfd, int pgperrfd,
-                           pgp_ring_t keyring, struct List *hints)
+                           enum PgpRing keyring, struct List *hints)
 {
   char uids[HUGE_STRING];
   char tmpuids[HUGE_STRING];
index 2103c5e94c84575e9c09e8c2b2d0ba86afb4d191..cc6597e8e0aea60daa5d78ed91a2b19259873c62 100644 (file)
@@ -46,7 +46,7 @@ pid_t pgp_invoke_export(FILE **pgpin, FILE **pgpout, FILE **pgperr, int pgpinfd,
 pid_t pgp_invoke_verify_key(FILE **pgpin, FILE **pgpout, FILE **pgperr, int pgpinfd,
                             int pgpoutfd, int pgperrfd, const char *uids);
 pid_t pgp_invoke_list_keys(FILE **pgpin, FILE **pgpout, FILE **pgperr, int pgpinfd,
-                           int pgpoutfd, int pgperrfd, pgp_ring_t keyring, struct List *hints);
+                           int pgpoutfd, int pgperrfd, enum PgpRing keyring, struct List *hints);
 pid_t pgp_invoke_traditional(FILE **pgpin, FILE **pgpout, FILE **pgperr,
                              int pgpinfd, int pgpoutfd, int pgperrfd,
                              const char *fname, const char *uids, int flags);
index 74f0c3e218ef44f0be7d54d89d51bbf2bb0ec4a1..a44f3c8816724d8f37e8f2a6fcc9bbc2118074fc 100644 (file)
@@ -133,7 +133,7 @@ struct PgpEntry
 static const char *pgp_entry_fmt(char *dest, size_t destlen, size_t col, int cols,
                                  char op, const char *src, const char *prefix,
                                  const char *ifstring, const char *elsestring,
-                                 unsigned long data, format_flag flags)
+                                 unsigned long data, enum FormatFlag flags)
 {
   char fmt[16];
   struct PgpEntry *entry = NULL;
@@ -650,7 +650,7 @@ static struct PgpKeyInfo *pgp_select_key(struct PgpKeyInfo *keys,
   return kp;
 }
 
-struct PgpKeyInfo *pgp_ask_for_key(char *tag, char *whatfor, short abilities, pgp_ring_t keyring)
+struct PgpKeyInfo *pgp_ask_for_key(char *tag, char *whatfor, short abilities, enum PgpRing keyring)
 {
   struct PgpKeyInfo *key = NULL;
   char resp[SHORT_STRING];
@@ -800,7 +800,7 @@ static struct PgpKeyInfo **pgp_get_lastp(struct PgpKeyInfo *p)
 }
 
 struct PgpKeyInfo *pgp_getkeybyaddr(struct Address *a, short abilities,
-                                    pgp_ring_t keyring, int oppenc_mode)
+                                    enum PgpRing keyring, int oppenc_mode)
 {
   struct Address *r = NULL, *p = NULL;
   struct List *hints = NULL;
@@ -927,7 +927,7 @@ struct PgpKeyInfo *pgp_getkeybyaddr(struct Address *a, short abilities,
   return NULL;
 }
 
-struct PgpKeyInfo *pgp_getkeybystr(char *p, short abilities, pgp_ring_t keyring)
+struct PgpKeyInfo *pgp_getkeybystr(char *p, short abilities, enum PgpRing keyring)
 {
   struct List *hints = NULL;
   struct PgpKeyInfo *keys = NULL;
index 8555d86e9aa5e70155dee9a782118d2f5cec7b8f..0ed481388a71a22595185928d38353a30bce0586 100644 (file)
@@ -22,15 +22,15 @@ struct Address;
 struct Body;
 struct PgpKeyInfo;
 
-typedef enum pgp_ring {
+enum PgpRing {
   PGP_PUBRING,
   PGP_SECRING,
-} pgp_ring_t;
+};
 
 struct Body *pgp_make_key_attachment(char *tempf);
 
-struct PgpKeyInfo * pgp_ask_for_key(char *tag, char *whatfor, short abilities, pgp_ring_t keyring);
-struct PgpKeyInfo * pgp_getkeybyaddr(struct Address *a, short abilities, pgp_ring_t keyring, int oppenc_mode);
-struct PgpKeyInfo * pgp_getkeybystr(char *p, short abilities, pgp_ring_t keyring);
+struct PgpKeyInfo * pgp_ask_for_key(char *tag, char *whatfor, short abilities, enum PgpRing keyring);
+struct PgpKeyInfo * pgp_getkeybyaddr(struct Address *a, short abilities, enum PgpRing keyring, int oppenc_mode);
+struct PgpKeyInfo * pgp_getkeybystr(char *p, short abilities, enum PgpRing keyring);
 
 #endif /* _NCRYPT_PGPKEY_H */
index f71d6155ba3c21f66498cec1f03faeacebdf3f68..4faf5c621ad460967eff7dda560c9f5c9c8d0658 100644 (file)
@@ -25,7 +25,7 @@
 
 #include <stdio.h>
 
-enum packet_tags
+enum PacketTags
 {
   PT_RES0 = 0,   /* reserved */
   PT_ESK,        /* Encrypted Session Key */
index a30584dbfa5d50f9220b21cb89ecc773e413c40f..24f7f4ca0d147a5ad681390828c42dea48aff67d 100644 (file)
@@ -149,7 +149,7 @@ static const char *_mutt_fmt_smime_command(char *dest, size_t destlen, size_t co
                                            int cols, char op, const char *src,
                                            const char *prefix, const char *ifstring,
                                            const char *elsestring,
-                                           unsigned long data, format_flag flags)
+                                           unsigned long data, enum FormatFlag flags)
 {
   char fmt[16];
   struct SmimeCommandContext *cctx = (struct SmimeCommandContext *) data;
index b21b52341758a802430b32ee13689b01ee30cdc6..5438ae7b30db0e52ac314e9d5af6b6d25c2fbb78 100644 (file)
--- a/newsrc.c
+++ b/newsrc.c
@@ -124,18 +124,18 @@ void nntp_group_unread_stat(struct NntpData *nntp_data)
   anum_t first, last;
 
   nntp_data->unread = 0;
-  if (nntp_data->lastMessage == 0 || nntp_data->firstMessage > nntp_data->lastMessage)
+  if (nntp_data->last_message == 0 || nntp_data->first_message > nntp_data->last_message)
     return;
 
-  nntp_data->unread = nntp_data->lastMessage - nntp_data->firstMessage + 1;
+  nntp_data->unread = nntp_data->last_message - nntp_data->first_message + 1;
   for (unsigned int i = 0; i < nntp_data->newsrc_len; i++)
   {
     first = nntp_data->newsrc_ent[i].first;
-    if (first < nntp_data->firstMessage)
-      first = nntp_data->firstMessage;
+    if (first < nntp_data->first_message)
+      first = nntp_data->first_message;
     last = nntp_data->newsrc_ent[i].last;
-    if (last > nntp_data->lastMessage)
-      last = nntp_data->lastMessage;
+    if (last > nntp_data->last_message)
+      last = nntp_data->last_message;
     if (first <= last)
       nntp_data->unread -= last - first + 1;
   }
@@ -266,8 +266,8 @@ int nntp_newsrc_parse(struct NntpServer *nserv)
       nntp_data->newsrc_ent[j].last = 0;
       j++;
     }
-    if (nntp_data->lastMessage == 0)
-      nntp_data->lastMessage = nntp_data->newsrc_ent[j - 1].last;
+    if (nntp_data->last_message == 0)
+      nntp_data->last_message = nntp_data->newsrc_ent[j - 1].last;
     nntp_data->newsrc_len = j;
     safe_realloc(&nntp_data->newsrc_ent, j * sizeof(struct NewsrcEntry));
     nntp_group_unread_stat(nntp_data);
@@ -312,7 +312,7 @@ void nntp_newsrc_gen_entries(struct Context *ctx)
       /* We don't actually check sequential order, since we mark
        * "missing" entries as read/deleted */
       last = NHDR(ctx->hdrs[i])->article_num;
-      if (last >= nntp_data->firstMessage && !ctx->hdrs[i]->deleted &&
+      if (last >= nntp_data->first_message && !ctx->hdrs[i]->deleted &&
           !ctx->hdrs[i]->read)
       {
         if (nntp_data->newsrc_len >= entries)
@@ -339,7 +339,7 @@ void nntp_newsrc_gen_entries(struct Context *ctx)
     }
   }
 
-  if (series && first <= nntp_data->lastLoaded)
+  if (series && first <= nntp_data->last_loaded)
   {
     if (nntp_data->newsrc_len >= entries)
     {
@@ -347,7 +347,7 @@ void nntp_newsrc_gen_entries(struct Context *ctx)
       safe_realloc(&nntp_data->newsrc_ent, entries * sizeof(struct NewsrcEntry));
     }
     nntp_data->newsrc_ent[nntp_data->newsrc_len].first = first;
-    nntp_data->newsrc_ent[nntp_data->newsrc_len].last = nntp_data->lastLoaded;
+    nntp_data->newsrc_ent[nntp_data->newsrc_len].last = nntp_data->last_loaded;
     nntp_data->newsrc_len++;
   }
   safe_realloc(&nntp_data->newsrc_ent, nntp_data->newsrc_len * sizeof(struct NewsrcEntry));
@@ -538,14 +538,14 @@ int nntp_add_group(char *line, void *data)
 
   nntp_data = nntp_data_find(nserv, group);
   nntp_data->deleted = false;
-  nntp_data->firstMessage = first;
-  nntp_data->lastMessage = last;
+  nntp_data->first_message = first;
+  nntp_data->last_message = last;
   nntp_data->allowed = (mod == 'y') || (mod == 'm');
   mutt_str_replace(&nntp_data->desc, desc);
-  if (nntp_data->newsrc_ent || nntp_data->lastCached)
+  if (nntp_data->newsrc_ent || nntp_data->last_cached)
     nntp_group_unread_stat(nntp_data);
-  else if (nntp_data->lastMessage && nntp_data->firstMessage <= nntp_data->lastMessage)
-    nntp_data->unread = nntp_data->lastMessage - nntp_data->firstMessage + 1;
+  else if (nntp_data->last_message && nntp_data->first_message <= nntp_data->last_message)
+    nntp_data->unread = nntp_data->last_message - nntp_data->first_message + 1;
   else
     nntp_data->unread = 0;
   return 0;
@@ -610,7 +610,7 @@ int nntp_active_save_cache(struct NntpServer *nserv)
       safe_realloc(&buf, buflen);
     }
     snprintf(buf + off, buflen - off, "%s %d %d %c%s%s\n", nntp_data->group,
-             nntp_data->lastMessage, nntp_data->firstMessage,
+             nntp_data->last_message, nntp_data->first_message,
              nntp_data->allowed ? 'y' : 'n', nntp_data->desc ? " " : "",
              nntp_data->desc ? nntp_data->desc : "");
     off += strlen(buf + off);
@@ -666,12 +666,12 @@ void nntp_hcache_update(struct NntpData *nntp_data, header_cache_t *hc)
     if (sscanf(hdata, ANUM " " ANUM, &first, &last) == 2)
     {
       old = true;
-      nntp_data->lastCached = last;
+      nntp_data->last_cached = last;
 
       /* clean removed headers from cache */
       for (current = first; current <= last; current++)
       {
-        if (current >= nntp_data->firstMessage && current <= nntp_data->lastMessage)
+        if (current >= nntp_data->first_message && current <= nntp_data->last_message)
           continue;
 
         snprintf(buf, sizeof(buf), "%d", current);
@@ -683,9 +683,9 @@ void nntp_hcache_update(struct NntpData *nntp_data, header_cache_t *hc)
   }
 
   /* store current values of first and last */
-  if (!old || nntp_data->firstMessage != first || nntp_data->lastMessage != last)
+  if (!old || nntp_data->first_message != first || nntp_data->last_message != last)
   {
-    snprintf(buf, sizeof(buf), "%u %u", nntp_data->firstMessage, nntp_data->lastMessage);
+    snprintf(buf, sizeof(buf), "%u %u", nntp_data->first_message, nntp_data->last_message);
     mutt_debug(2, "nntp_hcache_update: mutt_hcache_store index: %s\n", buf);
     mutt_hcache_store_raw(hc, "index", 5, buf, strlen(buf));
   }
@@ -700,7 +700,7 @@ static int nntp_bcache_delete(const char *id, struct BodyCache *bcache, void *da
   char c;
 
   if (!nntp_data || sscanf(id, ANUM "%c", &anum, &c) != 1 ||
-      anum < nntp_data->firstMessage || anum > nntp_data->lastMessage)
+      anum < nntp_data->first_message || anum > nntp_data->last_message)
   {
     if (nntp_data)
       mutt_debug(2, "nntp_bcache_delete: mutt_bcache_del %s\n", id);
@@ -726,7 +726,7 @@ void nntp_delete_group_cache(struct NntpData *nntp_data)
   nntp_hcache_namer(nntp_data->group, file, sizeof(file));
   cache_expand(file, sizeof(file), &nntp_data->nserv->conn->account, file);
   unlink(file);
-  nntp_data->lastCached = 0;
+  nntp_data->last_cached = 0;
   mutt_debug(2, "nntp_delete_group_cache: %s\n", file);
 #endif
 
@@ -816,7 +816,7 @@ void nntp_clear_cache(struct NntpServer *nserv)
  * %u = username */
 const char *nntp_format_str(char *dest, size_t destlen, size_t col, int cols, char op,
                             const char *src, const char *fmt, const char *ifstring,
-                            const char *elsestring, unsigned long data, format_flag flags)
+                            const char *elsestring, unsigned long data, enum FormatFlag flags)
 {
   struct NntpServer *nserv = (struct NntpServer *) data;
   struct Account *acct = &nserv->conn->account;
@@ -1029,13 +1029,13 @@ struct NntpServer *nntp_select_server(char *server, int leave_lock)
           {
             if (nntp_data->deleted)
             {
-              nntp_data->firstMessage = first;
-              nntp_data->lastMessage = last;
+              nntp_data->first_message = first;
+              nntp_data->last_message = last;
             }
-            if (last >= nntp_data->firstMessage && last <= nntp_data->lastMessage)
+            if (last >= nntp_data->first_message && last <= nntp_data->last_message)
             {
-              nntp_data->lastCached = last;
-              mutt_debug(2, "nntp_select_server: %s lastCached=%u\n", nntp_data->group, last);
+              nntp_data->last_cached = last;
+              mutt_debug(2, "nntp_select_server: %s last_cached=%u\n", nntp_data->group, last);
             }
           }
           mutt_hcache_free(hc, &hdata);
@@ -1093,7 +1093,7 @@ void nntp_article_status(struct Context *ctx, struct Header *hdr, char *group, a
   }
 
   /* article was not cached yet, it's new */
-  if (anum > nntp_data->lastCached)
+  if (anum > nntp_data->last_cached)
     return;
 
   /* article isn't read but cached, it's old */
@@ -1159,7 +1159,7 @@ struct NntpData *mutt_newsgroup_catchup(struct NntpServer *nserv, char *group)
     safe_realloc(&nntp_data->newsrc_ent, sizeof(struct NewsrcEntry));
     nntp_data->newsrc_len = 1;
     nntp_data->newsrc_ent[0].first = 1;
-    nntp_data->newsrc_ent[0].last = nntp_data->lastMessage;
+    nntp_data->newsrc_ent[0].last = nntp_data->last_message;
   }
   nntp_data->unread = 0;
   if (Context && Context->data == nntp_data)
@@ -1187,7 +1187,7 @@ struct NntpData *mutt_newsgroup_uncatchup(struct NntpServer *nserv, char *group)
     safe_realloc(&nntp_data->newsrc_ent, sizeof(struct NewsrcEntry));
     nntp_data->newsrc_len = 1;
     nntp_data->newsrc_ent[0].first = 1;
-    nntp_data->newsrc_ent[0].last = nntp_data->firstMessage - 1;
+    nntp_data->newsrc_ent[0].last = nntp_data->first_message - 1;
   }
   if (Context && Context->data == nntp_data)
   {
@@ -1197,7 +1197,7 @@ struct NntpData *mutt_newsgroup_uncatchup(struct NntpServer *nserv, char *group)
   }
   else
   {
-    nntp_data->unread = nntp_data->lastMessage;
+    nntp_data->unread = nntp_data->last_message;
     if (nntp_data->newsrc_ent)
       nntp_data->unread -= nntp_data->newsrc_ent[0].last;
   }
diff --git a/nntp.c b/nntp.c
index 028052dd1d3f52a2a5ecaeb9a66a9dc268f6a2ad..4c10ad913f40ab7177c68ea421e5ce3af789fe27 100644 (file)
--- a/nntp.c
+++ b/nntp.c
@@ -1150,8 +1150,8 @@ static int parse_overview_line(char *line, void *data)
       if (!hdr->read)
         nntp_parse_xref(ctx, hdr);
     }
-    if (anum > nntp_data->lastLoaded)
-      nntp_data->lastLoaded = anum;
+    if (anum > nntp_data->last_loaded)
+      nntp_data->last_loaded = anum;
   }
   else
     mutt_free_header(&hdr);
@@ -1363,8 +1363,8 @@ static int nntp_fetch_headers(struct Context *ctx, void *hc, anum_t first,
       if (!hdr->read)
         nntp_parse_xref(ctx, hdr);
     }
-    if (current > nntp_data->lastLoaded)
-      nntp_data->lastLoaded = current;
+    if (current > nntp_data->last_loaded)
+      nntp_data->last_loaded = current;
     first_over = current + 1;
   }
 
@@ -1476,8 +1476,8 @@ static int nntp_open_mailbox(struct Context *ctx)
       mutt_sleep(2);
       return -1;
     }
-    nntp_data->firstMessage = first;
-    nntp_data->lastMessage = last;
+    nntp_data->first_message = first;
+    nntp_data->last_message = last;
     nntp_data->deleted = false;
 
     /* get description if empty */
@@ -1500,14 +1500,14 @@ static int nntp_open_mailbox(struct Context *ctx)
     nntp_data->bcache = mutt_bcache_open(&nserv->conn->account, nntp_data->group);
 
   /* strip off extra articles if adding context is greater than $nntp_context */
-  first = nntp_data->firstMessage;
-  if (NntpContext && nntp_data->lastMessage - first + 1 > NntpContext)
-    first = nntp_data->lastMessage - NntpContext + 1;
-  nntp_data->lastLoaded = first ? first - 1 : 0;
-  count = nntp_data->firstMessage;
-  nntp_data->firstMessage = first;
+  first = nntp_data->first_message;
+  if (NntpContext && nntp_data->last_message - first + 1 > NntpContext)
+    first = nntp_data->last_message - NntpContext + 1;
+  nntp_data->last_loaded = first ? first - 1 : 0;
+  count = nntp_data->first_message;
+  nntp_data->first_message = first;
   nntp_bcache_update(nntp_data);
-  nntp_data->firstMessage = count;
+  nntp_data->first_message = count;
 #ifdef USE_HCACHE
   hc = nntp_hcache_open(nntp_data);
   nntp_hcache_update(nntp_data, hc);
@@ -1518,13 +1518,13 @@ static int nntp_open_mailbox(struct Context *ctx)
     mutt_bit_unset(ctx->rights, MUTT_ACL_DELETE);
   }
   nntp_newsrc_close(nserv);
-  rc = nntp_fetch_headers(ctx, hc, first, nntp_data->lastMessage, 0);
+  rc = nntp_fetch_headers(ctx, hc, first, nntp_data->last_message, 0);
 #ifdef USE_HCACHE
   mutt_hcache_close(hc);
 #endif
   if (rc < 0)
     return -1;
-  nntp_data->lastLoaded = nntp_data->lastMessage;
+  nntp_data->last_loaded = nntp_data->last_message;
   nserv->newsrc_modified = false;
   return 0;
 }
@@ -1743,13 +1743,13 @@ static int nntp_group_poll(struct NntpData *nntp_data, int update_stat)
     return -1;
   if (sscanf(buf, "211 " ANUM " " ANUM " " ANUM, &count, &first, &last) != 3)
     return 0;
-  if (first == nntp_data->firstMessage && last == nntp_data->lastMessage)
+  if (first == nntp_data->first_message && last == nntp_data->last_message)
     return 0;
 
   /* articles have been renumbered */
-  if (last < nntp_data->lastMessage)
+  if (last < nntp_data->last_message)
   {
-    nntp_data->lastCached = 0;
+    nntp_data->last_cached = 0;
     if (nntp_data->newsrc_len)
     {
       safe_realloc(&nntp_data->newsrc_ent, sizeof(struct NewsrcEntry));
@@ -1758,13 +1758,13 @@ static int nntp_group_poll(struct NntpData *nntp_data, int update_stat)
       nntp_data->newsrc_ent[0].last = 0;
     }
   }
-  nntp_data->firstMessage = first;
-  nntp_data->lastMessage = last;
+  nntp_data->first_message = first;
+  nntp_data->last_message = last;
   if (!update_stat)
     return 1;
 
   /* update counters */
-  else if (!last || (!nntp_data->newsrc_ent && !nntp_data->lastCached))
+  else if (!last || (!nntp_data->newsrc_ent && !nntp_data->last_cached))
     nntp_data->unread = count;
   else
     nntp_group_unread_stat(nntp_data);
@@ -1803,18 +1803,18 @@ static int nntp_check_mailbox(struct Context *ctx, int *index_hint)
     nntp_active_save_cache(nserv);
 
   /* articles have been renumbered, remove all headers */
-  if (nntp_data->lastMessage < nntp_data->lastLoaded)
+  if (nntp_data->last_message < nntp_data->last_loaded)
   {
     for (i = 0; i < ctx->msgcount; i++)
       mutt_free_header(&ctx->hdrs[i]);
     ctx->msgcount = 0;
     ctx->tagged = 0;
 
-    if (nntp_data->lastMessage < nntp_data->lastLoaded)
+    if (nntp_data->last_message < nntp_data->last_loaded)
     {
-      nntp_data->lastLoaded = nntp_data->firstMessage - 1;
-      if (NntpContext && nntp_data->lastMessage - nntp_data->lastLoaded > NntpContext)
-        nntp_data->lastLoaded = nntp_data->lastMessage - NntpContext;
+      nntp_data->last_loaded = nntp_data->first_message - 1;
+      if (NntpContext && nntp_data->last_message - nntp_data->last_loaded > NntpContext)
+        nntp_data->last_loaded = nntp_data->last_message - NntpContext;
     }
     ret = MUTT_REOPENED;
   }
@@ -1828,11 +1828,11 @@ static int nntp_check_mailbox(struct Context *ctx, int *index_hint)
     char buf[16];
     void *hdata = NULL;
     struct Header *hdr = NULL;
-    anum_t first = nntp_data->firstMessage;
+    anum_t first = nntp_data->first_message;
 
-    if (NntpContext && nntp_data->lastMessage - first + 1 > NntpContext)
-      first = nntp_data->lastMessage - NntpContext + 1;
-    messages = safe_calloc(nntp_data->lastLoaded - first + 1, sizeof(unsigned char));
+    if (NntpContext && nntp_data->last_message - first + 1 > NntpContext)
+      first = nntp_data->last_message - NntpContext + 1;
+    messages = safe_calloc(nntp_data->last_loaded - first + 1, sizeof(unsigned char));
     hc = nntp_hcache_open(nntp_data);
     nntp_hcache_update(nntp_data, hc);
 #endif
@@ -1847,7 +1847,7 @@ static int nntp_check_mailbox(struct Context *ctx, int *index_hint)
       /* check hcache for flagged and deleted flags */
       if (hc)
       {
-        if (anum >= first && anum <= nntp_data->lastLoaded)
+        if (anum >= first && anum <= nntp_data->last_loaded)
           messages[anum - first] = 1;
 
         snprintf(buf, sizeof(buf), "%d", anum);
@@ -1891,7 +1891,7 @@ static int nntp_check_mailbox(struct Context *ctx, int *index_hint)
     ctx->msgcount = j;
 
     /* restore headers without "deleted" flag */
-    for (anum = first; anum <= nntp_data->lastLoaded; anum++)
+    for (anum = first; anum <= nntp_data->last_loaded; anum++)
     {
       if (messages[anum - first])
         continue;
@@ -1956,7 +1956,7 @@ static int nntp_check_mailbox(struct Context *ctx, int *index_hint)
   }
 
   /* fetch headers of new articles */
-  if (nntp_data->lastMessage > nntp_data->lastLoaded)
+  if (nntp_data->last_message > nntp_data->last_loaded)
   {
     int oldmsgcount = ctx->msgcount;
     bool quiet = ctx->quiet;
@@ -1968,10 +1968,10 @@ static int nntp_check_mailbox(struct Context *ctx, int *index_hint)
       nntp_hcache_update(nntp_data, hc);
     }
 #endif
-    rc = nntp_fetch_headers(ctx, hc, nntp_data->lastLoaded + 1, nntp_data->lastMessage, 0);
+    rc = nntp_fetch_headers(ctx, hc, nntp_data->last_loaded + 1, nntp_data->last_message, 0);
     ctx->quiet = quiet;
     if (rc >= 0)
-      nntp_data->lastLoaded = nntp_data->lastMessage;
+      nntp_data->last_loaded = nntp_data->last_message;
     if (ret == 0 && ctx->msgcount > oldmsgcount)
       ret = MUTT_NEW_MAIL;
   }
@@ -2002,7 +2002,7 @@ static int nntp_sync_mailbox(struct Context *ctx, int *index_hint)
     return rc;
 
 #ifdef USE_HCACHE
-  nntp_data->lastCached = 0;
+  nntp_data->last_cached = 0;
   hc = nntp_hcache_open(nntp_data);
 #endif
 
@@ -2034,7 +2034,7 @@ static int nntp_sync_mailbox(struct Context *ctx, int *index_hint)
   if (hc)
   {
     mutt_hcache_close(hc);
-    nntp_data->lastCached = nntp_data->lastLoaded;
+    nntp_data->last_cached = nntp_data->last_loaded;
   }
 #endif
 
@@ -2356,7 +2356,7 @@ int nntp_check_children(struct Context *ctx, const char *msgid)
 
   if (!nntp_data || !nntp_data->nserv)
     return -1;
-  if (nntp_data->firstMessage > nntp_data->lastLoaded)
+  if (nntp_data->first_message > nntp_data->last_loaded)
     return 0;
 
   /* init context */
@@ -2367,7 +2367,7 @@ int nntp_check_children(struct Context *ctx, const char *msgid)
 
   /* fetch numbers of child messages */
   snprintf(buf, sizeof(buf), "XPAT References %d-%d *%s*\r\n",
-           nntp_data->firstMessage, nntp_data->lastLoaded, msgid);
+           nntp_data->first_message, nntp_data->last_loaded, msgid);
   rc = nntp_fetch_lines(nntp_data, buf, sizeof(buf), NULL, fetch_children, &cc);
   if (rc)
   {
diff --git a/nntp.h b/nntp.h
index b23d28432e95eafb0d7884b249bcd6fa785e19a8..9627ea2cf4ede0c59bf0da7e5294351f54e734f6 100644 (file)
--- a/nntp.h
+++ b/nntp.h
@@ -99,10 +99,10 @@ struct NntpData
 {
   char *group;
   char *desc;
-  anum_t firstMessage;
-  anum_t lastMessage;
-  anum_t lastLoaded;
-  anum_t lastCached;
+  anum_t first_message;
+  anum_t last_message;
+  anum_t last_loaded;
+  anum_t last_cached;
   anum_t unread;
   bool subscribed : 1;
   bool new : 1;
@@ -155,7 +155,7 @@ void nntp_clear_cache(struct NntpServer *nserv);
 const char *nntp_format_str(char *dest, size_t destlen, size_t col, int cols,
                             char op, const char *src, const char *fmt,
                             const char *ifstring, const char *elsestring,
-                            unsigned long data, format_flag flags);
+                            unsigned long data, enum FormatFlag flags);
 
 struct NntpServer *CurrentNewsSrv INITVAL(NULL);
 
diff --git a/pager.c b/pager.c
index 87b60063fb0b39605fac18530f02ffaea65ef973..210ce62d75eb2814d561604c254f3df056f43aa9 100644 (file)
--- a/pager.c
+++ b/pager.c
@@ -160,8 +160,8 @@ static short InHelp = 0;
 static struct Resize
 {
   int line;
-  int SearchCompiled;
-  int SearchBack;
+  int search_compiled;
+  int search_back;
 } *Resize = NULL;
 #endif
 
@@ -198,7 +198,7 @@ static int check_sig(const char *s, struct Line *info, int n)
   return 0;
 }
 
-static void resolve_color(struct Line *lineInfo, int n, int cnt, int flags,
+static void resolve_color(struct Line *line_info, int n, int cnt, int flags,
                           int special, struct AnsiAttr *a)
 {
   int def_color;         /* color without syntax highlight */
@@ -210,7 +210,7 @@ static void resolve_color(struct Line *lineInfo, int n, int cnt, int flags,
   if (!cnt)
     last_color = -1; /* force attrset() */
 
-  if (lineInfo[n].continuation)
+  if (line_info[n].continuation)
   {
     if (!cnt && option(OPTMARKERS))
     {
@@ -218,21 +218,21 @@ static void resolve_color(struct Line *lineInfo, int n, int cnt, int flags,
       addch('+');
       last_color = ColorDefs[MT_COLOR_MARKERS];
     }
-    m = (lineInfo[n].syntax)[0].first;
-    cnt += (lineInfo[n].syntax)[0].last;
+    m = (line_info[n].syntax)[0].first;
+    cnt += (line_info[n].syntax)[0].last;
   }
   else
     m = n;
   if (!(flags & MUTT_SHOWCOLOR))
     def_color = ColorDefs[MT_COLOR_NORMAL];
-  else if (lineInfo[m].type == MT_COLOR_HEADER)
-    def_color = (lineInfo[m].syntax)[0].color;
+  else if (line_info[m].type == MT_COLOR_HEADER)
+    def_color = (line_info[m].syntax)[0].color;
   else
-    def_color = ColorDefs[lineInfo[m].type];
+    def_color = ColorDefs[line_info[m].type];
 
-  if ((flags & MUTT_SHOWCOLOR) && lineInfo[m].type == MT_COLOR_QUOTED)
+  if ((flags & MUTT_SHOWCOLOR) && line_info[m].type == MT_COLOR_QUOTED)
   {
-    struct QClass *class = lineInfo[m].quote;
+    struct QClass *class = line_info[m].quote;
 
     if (class)
     {
@@ -249,16 +249,16 @@ static void resolve_color(struct Line *lineInfo, int n, int cnt, int flags,
   color = def_color;
   if (flags & MUTT_SHOWCOLOR)
   {
-    for (i = 0; i < lineInfo[m].chunks; i++)
+    for (i = 0; i < line_info[m].chunks; i++)
     {
       /* we assume the chunks are sorted */
-      if (cnt > (lineInfo[m].syntax)[i].last)
+      if (cnt > (line_info[m].syntax)[i].last)
         continue;
-      if (cnt < (lineInfo[m].syntax)[i].first)
+      if (cnt < (line_info[m].syntax)[i].first)
         break;
-      if (cnt != (lineInfo[m].syntax)[i].last)
+      if (cnt != (line_info[m].syntax)[i].last)
       {
-        color = (lineInfo[m].syntax)[i].color;
+        color = (line_info[m].syntax)[i].color;
         break;
       }
       /* don't break here, as cnt might be
@@ -268,13 +268,13 @@ static void resolve_color(struct Line *lineInfo, int n, int cnt, int flags,
 
   if (flags & MUTT_SEARCH)
   {
-    for (i = 0; i < lineInfo[m].search_cnt; i++)
+    for (i = 0; i < line_info[m].search_cnt; i++)
     {
-      if (cnt > (lineInfo[m].search)[i].last)
+      if (cnt > (line_info[m].search)[i].last)
         continue;
-      if (cnt < (lineInfo[m].search)[i].first)
+      if (cnt < (line_info[m].search)[i].first)
         break;
-      if (cnt != (lineInfo[m].search)[i].last)
+      if (cnt != (line_info[m].search)[i].last)
       {
         color = ColorDefs[MT_COLOR_SEARCH];
         search = true;
@@ -332,22 +332,22 @@ static void resolve_color(struct Line *lineInfo, int n, int cnt, int flags,
   }
 }
 
-static void append_line(struct Line *lineInfo, int n, int cnt)
+static void append_line(struct Line *line_info, int n, int cnt)
 {
   int m;
 
-  lineInfo[n + 1].type = lineInfo[n].type;
-  (lineInfo[n + 1].syntax)[0].color = (lineInfo[n].syntax)[0].color;
-  lineInfo[n + 1].continuation = 1;
+  line_info[n + 1].type = line_info[n].type;
+  (line_info[n + 1].syntax)[0].color = (line_info[n].syntax)[0].color;
+  line_info[n + 1].continuation = 1;
 
   /* find the real start of the line */
   for (m = n; m >= 0; m--)
-    if (lineInfo[m].continuation == 0)
+    if (line_info[m].continuation == 0)
       break;
 
-  (lineInfo[n + 1].syntax)[0].first = m;
-  (lineInfo[n + 1].syntax)[0].last =
-      (lineInfo[n].continuation) ? cnt + (lineInfo[n].syntax)[0].last : cnt;
+  (line_info[n + 1].syntax)[0].first = m;
+  (line_info[n + 1].syntax)[0].last =
+      (line_info[n].continuation) ? cnt + (line_info[n].syntax)[0].last : cnt;
 }
 
 static void new_class_color(struct QClass *class, int *q_level)
@@ -356,12 +356,12 @@ static void new_class_color(struct QClass *class, int *q_level)
   class->color = ColorQuote[class->index % ColorQuoteUsed];
 }
 
-static void shift_class_colors(struct QClass *QuoteList,
+static void shift_class_colors(struct QClass *quote_list,
                                struct QClass *new_class, int index, int *q_level)
 {
   struct QClass *q_list = NULL;
 
-  q_list = QuoteList;
+  q_list = quote_list;
   new_class->index = -1;
 
   while (q_list)
@@ -393,28 +393,28 @@ static void shift_class_colors(struct QClass *QuoteList,
   (*q_level)++;
 }
 
-static void cleanup_quote(struct QClass **QuoteList)
+static void cleanup_quote(struct QClass **quote_list)
 {
   struct QClass *ptr = NULL;
 
-  while (*QuoteList)
+  while (*quote_list)
   {
-    if ((*QuoteList)->down)
-      cleanup_quote(&((*QuoteList)->down));
-    ptr = (*QuoteList)->next;
-    if ((*QuoteList)->prefix)
-      FREE(&(*QuoteList)->prefix);
-    FREE(QuoteList);
-    *QuoteList = ptr;
+    if ((*quote_list)->down)
+      cleanup_quote(&((*quote_list)->down));
+    ptr = (*quote_list)->next;
+    if ((*quote_list)->prefix)
+      FREE(&(*quote_list)->prefix);
+    FREE(quote_list);
+    *quote_list = ptr;
   }
 
   return;
 }
 
-static struct QClass *classify_quote(struct QClass **QuoteList, const char *qptr,
+static struct QClass *classify_quote(struct QClass **quote_list, const char *qptr,
                                      int length, int *force_redraw, int *q_level)
 {
-  struct QClass *q_list = *QuoteList;
+  struct QClass *q_list = *quote_list;
   struct QClass *class = NULL, *tmp = NULL, *ptr = NULL, *save = NULL;
   char *tail_qptr = NULL;
   int offset, tail_lng;
@@ -424,13 +424,13 @@ static struct QClass *classify_quote(struct QClass **QuoteList, const char *qptr
   {
     /* not much point in classifying quotes... */
 
-    if (*QuoteList == NULL)
+    if (*quote_list == NULL)
     {
       class = safe_calloc(1, sizeof(struct QClass));
       class->color = ColorQuote[0];
-      *QuoteList = class;
+      *quote_list = class;
     }
-    return *QuoteList;
+    return *quote_list;
   }
 
   /* Did I mention how much I like emulating Lisp in C? */
@@ -477,8 +477,8 @@ static struct QClass *classify_quote(struct QClass **QuoteList, const char *qptr
           q_list->prev = NULL;
 
           /* update the root if necessary */
-          if (q_list == *QuoteList)
-            *QuoteList = tmp;
+          if (q_list == *quote_list)
+            *quote_list = tmp;
 
           index = q_list->index;
 
@@ -683,7 +683,7 @@ static struct QClass *classify_quote(struct QClass **QuoteList, const char *qptr
         else
         {
           if (index != -1)
-            shift_class_colors(*QuoteList, tmp, index, q_level);
+            shift_class_colors(*quote_list, tmp, index, q_level);
 
           return class;
         }
@@ -706,16 +706,16 @@ static struct QClass *classify_quote(struct QClass **QuoteList, const char *qptr
     class->length = length;
     new_class_color(class, q_level);
 
-    if (*QuoteList)
+    if (*quote_list)
     {
-      class->next = *QuoteList;
-      (*QuoteList)->prev = class;
+      class->next = *quote_list;
+      (*quote_list)->prev = class;
     }
-    *QuoteList = class;
+    *quote_list = class;
   }
 
   if (index != -1)
-    shift_class_colors(*QuoteList, tmp, index, q_level);
+    shift_class_colors(*quote_list, tmp, index, q_level);
 
   return class;
 }
@@ -732,8 +732,8 @@ static int check_attachment_marker(char *p)
   return (int) (*p - *q);
 }
 
-static void resolve_types(char *buf, char *raw, struct Line *lineInfo, int n,
-                          int last, struct QClass **QuoteList, int *q_level,
+static void resolve_types(char *buf, char *raw, struct Line *line_info, int n,
+                          int last, struct QClass **quote_list, int *q_level,
                           int *force_redraw, int q_classify)
 {
   struct ColorLine *color_line = NULL;
@@ -742,11 +742,11 @@ static void resolve_types(char *buf, char *raw, struct Line *lineInfo, int n,
   bool null_rx;
   int offset, i;
 
-  if (n == 0 || ISHEADER(lineInfo[n - 1].type))
+  if (n == 0 || ISHEADER(line_info[n - 1].type))
   {
     if (buf[0] == '\n') /* end of header */
     {
-      lineInfo[n].type = MT_COLOR_NORMAL;
+      line_info[n].type = MT_COLOR_NORMAL;
       getyx(stdscr, brailleLine, brailleCol);
     }
     else
@@ -755,16 +755,16 @@ static void resolve_types(char *buf, char *raw, struct Line *lineInfo, int n,
        * line's color as default. */
       if (n > 0 && (buf[0] == ' ' || buf[0] == '\t'))
       {
-        lineInfo[n].type = lineInfo[n - 1].type; /* wrapped line */
+        line_info[n].type = line_info[n - 1].type; /* wrapped line */
         if (!option(OPTHEADERCOLORPARTIAL))
         {
-          (lineInfo[n].syntax)[0].color = (lineInfo[n - 1].syntax)[0].color;
-          lineInfo[n].is_cont_hdr = 1;
+          (line_info[n].syntax)[0].color = (line_info[n - 1].syntax)[0].color;
+          line_info[n].is_cont_hdr = 1;
         }
       }
       else
       {
-        lineInfo[n].type = MT_COLOR_HDEFAULT;
+        line_info[n].type = MT_COLOR_HDEFAULT;
       }
 
       /* When this option is unset, we color the entire header the
@@ -777,22 +777,22 @@ static void resolve_types(char *buf, char *raw, struct Line *lineInfo, int n,
         {
           if (REGEXEC(color_line->rx, buf) == 0)
           {
-            lineInfo[n].type = MT_COLOR_HEADER;
-            lineInfo[n].syntax[0].color = color_line->pair;
-            if (lineInfo[n].is_cont_hdr)
+            line_info[n].type = MT_COLOR_HEADER;
+            line_info[n].syntax[0].color = color_line->pair;
+            if (line_info[n].is_cont_hdr)
             {
               /* adjust the previous continuation lines to reflect the color of this continuation line */
               int j;
-              for (j = n - 1; j >= 0 && lineInfo[j].is_cont_hdr; --j)
+              for (j = n - 1; j >= 0 && line_info[j].is_cont_hdr; --j)
               {
-                lineInfo[j].type = lineInfo[n].type;
-                lineInfo[j].syntax[0].color = lineInfo[n].syntax[0].color;
+                line_info[j].type = line_info[n].type;
+                line_info[j].syntax[0].color = line_info[n].syntax[0].color;
               }
               /* now adjust the first line of this header field */
               if (j >= 0)
               {
-                lineInfo[j].type = lineInfo[n].type;
-                lineInfo[j].syntax[0].color = lineInfo[n].syntax[0].color;
+                line_info[j].type = line_info[n].type;
+                line_info[j].syntax[0].color = line_info[n].syntax[0].color;
               }
               *force_redraw = 1; /* the previous lines have already been drawn on the screen */
             }
@@ -803,29 +803,29 @@ static void resolve_types(char *buf, char *raw, struct Line *lineInfo, int n,
     }
   }
   else if (mutt_strncmp("\033[0m", raw, 4) == 0) /* a little hack... */
-    lineInfo[n].type = MT_COLOR_NORMAL;
+    line_info[n].type = MT_COLOR_NORMAL;
   else if (check_attachment_marker((char *) raw) == 0)
-    lineInfo[n].type = MT_COLOR_ATTACHMENT;
+    line_info[n].type = MT_COLOR_ATTACHMENT;
   else if ((mutt_strcmp("-- \n", buf) == 0) || (mutt_strcmp("-- \r\n", buf) == 0))
   {
     i = n + 1;
 
-    lineInfo[n].type = MT_COLOR_SIGNATURE;
-    while (i < last && check_sig(buf, lineInfo, i - 1) == 0 &&
-           (lineInfo[i].type == MT_COLOR_NORMAL || lineInfo[i].type == MT_COLOR_QUOTED ||
-            lineInfo[i].type == MT_COLOR_HEADER))
+    line_info[n].type = MT_COLOR_SIGNATURE;
+    while (i < last && check_sig(buf, line_info, i - 1) == 0 &&
+           (line_info[i].type == MT_COLOR_NORMAL || line_info[i].type == MT_COLOR_QUOTED ||
+            line_info[i].type == MT_COLOR_HEADER))
     {
       /* oops... */
-      if (lineInfo[i].chunks)
+      if (line_info[i].chunks)
       {
-        lineInfo[i].chunks = 0;
-        safe_realloc(&(lineInfo[n].syntax), sizeof(struct Syntax));
+        line_info[i].chunks = 0;
+        safe_realloc(&(line_info[n].syntax), sizeof(struct Syntax));
       }
-      lineInfo[i++].type = MT_COLOR_SIGNATURE;
+      line_info[i++].type = MT_COLOR_SIGNATURE;
     }
   }
-  else if (check_sig(buf, lineInfo, n - 1) == 0)
-    lineInfo[n].type = MT_COLOR_SIGNATURE;
+  else if (check_sig(buf, line_info, n - 1) == 0)
+    line_info[n].type = MT_COLOR_SIGNATURE;
   else if (regexec((regex_t *) QuoteRegexp.rx, buf, 1, pmatch, 0) == 0)
   {
     if (regexec((regex_t *) Smileys.rx, buf, 1, smatch, 0) == 0)
@@ -840,35 +840,35 @@ static void resolve_types(char *buf, char *raw, struct Line *lineInfo, int n,
 
         if (regexec((regex_t *) QuoteRegexp.rx, buf, 1, pmatch, 0) == 0)
         {
-          if (q_classify && lineInfo[n].quote == NULL)
-            lineInfo[n].quote = classify_quote(QuoteList, buf + pmatch[0].rm_so,
+          if (q_classify && line_info[n].quote == NULL)
+            line_info[n].quote = classify_quote(quote_list, buf + pmatch[0].rm_so,
                                                pmatch[0].rm_eo - pmatch[0].rm_so,
                                                force_redraw, q_level);
-          lineInfo[n].type = MT_COLOR_QUOTED;
+          line_info[n].type = MT_COLOR_QUOTED;
         }
         else
-          lineInfo[n].type = MT_COLOR_NORMAL;
+          line_info[n].type = MT_COLOR_NORMAL;
 
         buf[smatch[0].rm_so] = c;
       }
       else
-        lineInfo[n].type = MT_COLOR_NORMAL;
+        line_info[n].type = MT_COLOR_NORMAL;
     }
     else
     {
-      if (q_classify && lineInfo[n].quote == NULL)
-        lineInfo[n].quote = classify_quote(QuoteList, buf + pmatch[0].rm_so,
+      if (q_classify && line_info[n].quote == NULL)
+        line_info[n].quote = classify_quote(quote_list, buf + pmatch[0].rm_so,
                                            pmatch[0].rm_eo - pmatch[0].rm_so,
                                            force_redraw, q_level);
-      lineInfo[n].type = MT_COLOR_QUOTED;
+      line_info[n].type = MT_COLOR_QUOTED;
     }
   }
   else
-    lineInfo[n].type = MT_COLOR_NORMAL;
+    line_info[n].type = MT_COLOR_NORMAL;
 
   /* body patterns */
-  if (lineInfo[n].type == MT_COLOR_NORMAL || lineInfo[n].type == MT_COLOR_QUOTED ||
-      (lineInfo[n].type == MT_COLOR_HDEFAULT && option(OPTHEADERCOLORPARTIAL)))
+  if (line_info[n].type == MT_COLOR_NORMAL || line_info[n].type == MT_COLOR_QUOTED ||
+      (line_info[n].type == MT_COLOR_HDEFAULT && option(OPTHEADERCOLORPARTIAL)))
   {
     size_t nl;
 
@@ -879,7 +879,7 @@ static void resolve_types(char *buf, char *raw, struct Line *lineInfo, int n,
 
     i = 0;
     offset = 0;
-    lineInfo[n].chunks = 0;
+    line_info[n].chunks = 0;
     do
     {
       if (!buf[offset])
@@ -887,7 +887,7 @@ static void resolve_types(char *buf, char *raw, struct Line *lineInfo, int n,
 
       found = false;
       null_rx = false;
-      if (lineInfo[n].type == MT_COLOR_HDEFAULT)
+      if (line_info[n].type == MT_COLOR_HDEFAULT)
         color_line = ColorHdrList;
       else
         color_line = ColorBodyList;
@@ -901,25 +901,25 @@ static void resolve_types(char *buf, char *raw, struct Line *lineInfo, int n,
             {
               /* Abort if we fill up chunks.
                * Yes, this really happened. See #3888 */
-              if (lineInfo[n].chunks == SHRT_MAX)
+              if (line_info[n].chunks == SHRT_MAX)
               {
                 null_rx = false;
                 break;
               }
-              if (++(lineInfo[n].chunks) > 1)
-                safe_realloc(&(lineInfo[n].syntax),
-                             (lineInfo[n].chunks) * sizeof(struct Syntax));
+              if (++(line_info[n].chunks) > 1)
+                safe_realloc(&(line_info[n].syntax),
+                             (line_info[n].chunks) * sizeof(struct Syntax));
             }
-            i = lineInfo[n].chunks - 1;
+            i = line_info[n].chunks - 1;
             pmatch[0].rm_so += offset;
             pmatch[0].rm_eo += offset;
-            if (!found || pmatch[0].rm_so < (lineInfo[n].syntax)[i].first ||
-                (pmatch[0].rm_so == (lineInfo[n].syntax)[i].first &&
-                 pmatch[0].rm_eo > (lineInfo[n].syntax)[i].last))
+            if (!found || pmatch[0].rm_so < (line_info[n].syntax)[i].first ||
+                (pmatch[0].rm_so == (line_info[n].syntax)[i].first &&
+                 pmatch[0].rm_eo > (line_info[n].syntax)[i].last))
             {
-              (lineInfo[n].syntax)[i].color = color_line->pair;
-              (lineInfo[n].syntax)[i].first = pmatch[0].rm_so;
-              (lineInfo[n].syntax)[i].last = pmatch[0].rm_eo;
+              (line_info[n].syntax)[i].color = color_line->pair;
+              (line_info[n].syntax)[i].first = pmatch[0].rm_so;
+              (line_info[n].syntax)[i].last = pmatch[0].rm_eo;
             }
             found = true;
             null_rx = false;
@@ -933,14 +933,14 @@ static void resolve_types(char *buf, char *raw, struct Line *lineInfo, int n,
       if (null_rx)
         offset++; /* avoid degenerate cases */
       else
-        offset = (lineInfo[n].syntax)[i].last;
+        offset = (line_info[n].syntax)[i].last;
     } while (found || null_rx);
     if (nl > 0)
       buf[nl] = '\n';
   }
 
   /* attachment patterns */
-  if (lineInfo[n].type == MT_COLOR_ATTACHMENT)
+  if (line_info[n].type == MT_COLOR_ATTACHMENT)
   {
     size_t nl;
 
@@ -951,7 +951,7 @@ static void resolve_types(char *buf, char *raw, struct Line *lineInfo, int n,
 
     i = 0;
     offset = 0;
-    lineInfo[n].chunks = 0;
+    line_info[n].chunks = 0;
     do
     {
       if (!buf[offset])
@@ -967,20 +967,20 @@ static void resolve_types(char *buf, char *raw, struct Line *lineInfo, int n,
           {
             if (!found)
             {
-              if (++(lineInfo[n].chunks) > 1)
-                safe_realloc(&(lineInfo[n].syntax),
-                             (lineInfo[n].chunks) * sizeof(struct Syntax));
+              if (++(line_info[n].chunks) > 1)
+                safe_realloc(&(line_info[n].syntax),
+                             (line_info[n].chunks) * sizeof(struct Syntax));
             }
-            i = lineInfo[n].chunks - 1;
+            i = line_info[n].chunks - 1;
             pmatch[0].rm_so += offset;
             pmatch[0].rm_eo += offset;
-            if (!found || pmatch[0].rm_so < (lineInfo[n].syntax)[i].first ||
-                (pmatch[0].rm_so == (lineInfo[n].syntax)[i].first &&
-                 pmatch[0].rm_eo > (lineInfo[n].syntax)[i].last))
+            if (!found || pmatch[0].rm_so < (line_info[n].syntax)[i].first ||
+                (pmatch[0].rm_so == (line_info[n].syntax)[i].first &&
+                 pmatch[0].rm_eo > (line_info[n].syntax)[i].last))
             {
-              (lineInfo[n].syntax)[i].color = color_line->pair;
-              (lineInfo[n].syntax)[i].first = pmatch[0].rm_so;
-              (lineInfo[n].syntax)[i].last = pmatch[0].rm_eo;
+              (line_info[n].syntax)[i].color = color_line->pair;
+              (line_info[n].syntax)[i].first = pmatch[0].rm_so;
+              (line_info[n].syntax)[i].last = pmatch[0].rm_eo;
             }
             found = 1;
             null_rx = 0;
@@ -993,7 +993,7 @@ static void resolve_types(char *buf, char *raw, struct Line *lineInfo, int n,
       if (null_rx)
         offset++; /* avoid degenerate cases */
       else
-        offset = (lineInfo[n].syntax)[i].last;
+        offset = (line_info[n].syntax)[i].last;
     } while (found || null_rx);
     if (nl > 0)
       buf[nl] = '\n';
@@ -1179,12 +1179,12 @@ static int fill_buffer(FILE *f, LOFF_T *last_pos, LOFF_T offset, unsigned char *
   return b_read;
 }
 
-static int format_line(struct Line **lineInfo, int n, unsigned char *buf, int flags,
+static int format_line(struct Line **line_info, int n, unsigned char *buf, int flags,
                        struct AnsiAttr *pa, int cnt, int *pspace, int *pvch,
                        int *pcol, int *pspecial, struct MuttWindow *pager_window)
 {
   int space = -1; /* index of the last space or TAB */
-  int col = option(OPTMARKERS) ? (*lineInfo)[n].continuation : 0;
+  int col = option(OPTMARKERS) ? (*line_info)[n].continuation : 0;
   size_t k;
   int ch, vch, last_special = -1, special = 0, t;
   wchar_t wc;
@@ -1195,7 +1195,7 @@ static int format_line(struct Line **lineInfo, int n, unsigned char *buf, int fl
   if (check_attachment_marker((char *) buf) == 0)
     wrap_cols = pager_window->cols;
 
-  /* FIXME: this should come from lineInfo */
+  /* FIXME: this should come from line_info */
   memset(&mbstate, 0, sizeof(mbstate));
 
   for (ch = 0, vch = 0; ch < cnt; ch += k, vch += k)
@@ -1289,7 +1289,7 @@ static int format_line(struct Line **lineInfo, int n, unsigned char *buf, int fl
     if (pa && ((flags & (MUTT_SHOWCOLOR | MUTT_SEARCH | MUTT_PAGER_MARKER)) ||
                special || last_special || pa->attr))
     {
-      resolve_color(*lineInfo, n, vch, flags, special, pa);
+      resolve_color(*line_info, n, vch, flags, special, pa);
       last_special = special;
     }
 
@@ -1373,9 +1373,9 @@ static int format_line(struct Line **lineInfo, int n, unsigned char *buf, int fl
  *      0       normal exit, line was not displayed
  *      >0      normal exit, line was displayed
  */
-static int display_line(FILE *f, LOFF_T *last_pos, struct Line **lineInfo, int n,
-                        int *last, int *max, int flags, struct QClass **QuoteList,
-                        int *q_level, int *force_redraw, regex_t *SearchRE,
+static int display_line(FILE *f, LOFF_T *last_pos, struct Line **line_info, int n,
+                        int *last, int *max, int flags, struct QClass **quote_list,
+                        int *q_level, int *force_redraw, regex_t *search_re,
                         struct MuttWindow *pager_window)
 {
   unsigned char *buf = NULL, *fmt = NULL;
@@ -1400,53 +1400,53 @@ static int display_line(FILE *f, LOFF_T *last_pos, struct Line **lineInfo, int n
 
   if (*last == *max)
   {
-    safe_realloc(lineInfo, sizeof(struct Line) * (*max += LINES));
+    safe_realloc(line_info, sizeof(struct Line) * (*max += LINES));
     for (ch = *last; ch < *max; ch++)
     {
-      memset(&((*lineInfo)[ch]), 0, sizeof(struct Line));
-      (*lineInfo)[ch].type = -1;
-      (*lineInfo)[ch].search_cnt = -1;
-      (*lineInfo)[ch].syntax = safe_malloc(sizeof(struct Syntax));
-      ((*lineInfo)[ch].syntax)[0].first = ((*lineInfo)[ch].syntax)[0].last = -1;
+      memset(&((*line_info)[ch]), 0, sizeof(struct Line));
+      (*line_info)[ch].type = -1;
+      (*line_info)[ch].search_cnt = -1;
+      (*line_info)[ch].syntax = safe_malloc(sizeof(struct Syntax));
+      ((*line_info)[ch].syntax)[0].first = ((*line_info)[ch].syntax)[0].last = -1;
     }
   }
 
   /* only do color highlighting if we are viewing a message */
   if (flags & (MUTT_SHOWCOLOR | MUTT_TYPES))
   {
-    if ((*lineInfo)[n].type == -1)
+    if ((*line_info)[n].type == -1)
     {
       /* determine the line class */
-      if (fill_buffer(f, last_pos, (*lineInfo)[n].offset, &buf, &fmt, &buflen, &buf_ready) < 0)
+      if (fill_buffer(f, last_pos, (*line_info)[n].offset, &buf, &fmt, &buflen, &buf_ready) < 0)
       {
         if (change_last)
           (*last)--;
         goto out;
       }
 
-      resolve_types((char *) fmt, (char *) buf, *lineInfo, n, *last, QuoteList,
+      resolve_types((char *) fmt, (char *) buf, *line_info, n, *last, quote_list,
                     q_level, force_redraw, flags & MUTT_SHOWCOLOR);
 
       /* avoid race condition for continuation lines when scrolling up */
-      for (m = n + 1; m < *last && (*lineInfo)[m].offset && (*lineInfo)[m].continuation; m++)
-        (*lineInfo)[m].type = (*lineInfo)[n].type;
+      for (m = n + 1; m < *last && (*line_info)[m].offset && (*line_info)[m].continuation; m++)
+        (*line_info)[m].type = (*line_info)[n].type;
     }
 
     /* this also prevents searching through the hidden lines */
-    if ((flags & MUTT_HIDE) && (*lineInfo)[n].type == MT_COLOR_QUOTED)
+    if ((flags & MUTT_HIDE) && (*line_info)[n].type == MT_COLOR_QUOTED)
       flags = 0; /* MUTT_NOSHOW */
   }
 
-  /* At this point, (*lineInfo[n]).quote may still be undefined. We
+  /* At this point, (*line_info[n]).quote may still be undefined. We
    * don't want to compute it every time MUTT_TYPES is set, since this
    * would slow down the "bottom" function unacceptably. A compromise
    * solution is hence to call regexec() again, just to find out the
    * length of the quote prefix.
    */
-  if ((flags & MUTT_SHOWCOLOR) && !(*lineInfo)[n].continuation &&
-      (*lineInfo)[n].type == MT_COLOR_QUOTED && (*lineInfo)[n].quote == NULL)
+  if ((flags & MUTT_SHOWCOLOR) && !(*line_info)[n].continuation &&
+      (*line_info)[n].type == MT_COLOR_QUOTED && (*line_info)[n].quote == NULL)
   {
-    if (fill_buffer(f, last_pos, (*lineInfo)[n].offset, &buf, &fmt, &buflen, &buf_ready) < 0)
+    if (fill_buffer(f, last_pos, (*line_info)[n].offset, &buf, &fmt, &buflen, &buf_ready) < 0)
     {
       if (change_last)
         (*last)--;
@@ -1454,15 +1454,15 @@ static int display_line(FILE *f, LOFF_T *last_pos, struct Line **lineInfo, int n
     }
     if (regexec((regex_t *) QuoteRegexp.rx, (char *) fmt, 1, pmatch, 0) != 0)
       goto out;
-    (*lineInfo)[n].quote =
-        classify_quote(QuoteList, (char *) fmt + pmatch[0].rm_so,
+    (*line_info)[n].quote =
+        classify_quote(quote_list, (char *) fmt + pmatch[0].rm_so,
                        pmatch[0].rm_eo - pmatch[0].rm_so, force_redraw, q_level);
   }
 
-  if ((flags & MUTT_SEARCH) && !(*lineInfo)[n].continuation &&
-      (*lineInfo)[n].search_cnt == -1)
+  if ((flags & MUTT_SEARCH) && !(*line_info)[n].continuation &&
+      (*line_info)[n].search_cnt == -1)
   {
-    if (fill_buffer(f, last_pos, (*lineInfo)[n].offset, &buf, &fmt, &buflen, &buf_ready) < 0)
+    if (fill_buffer(f, last_pos, (*line_info)[n].offset, &buf, &fmt, &buflen, &buf_ready) < 0)
     {
       if (change_last)
         (*last)--;
@@ -1470,18 +1470,18 @@ static int display_line(FILE *f, LOFF_T *last_pos, struct Line **lineInfo, int n
     }
 
     offset = 0;
-    (*lineInfo)[n].search_cnt = 0;
-    while (regexec(SearchRE, (char *) fmt + offset, 1, pmatch, (offset ? REG_NOTBOL : 0)) == 0)
+    (*line_info)[n].search_cnt = 0;
+    while (regexec(search_re, (char *) fmt + offset, 1, pmatch, (offset ? REG_NOTBOL : 0)) == 0)
     {
-      if (++((*lineInfo)[n].search_cnt) > 1)
-        safe_realloc(&((*lineInfo)[n].search),
-                     ((*lineInfo)[n].search_cnt) * sizeof(struct Syntax));
+      if (++((*line_info)[n].search_cnt) > 1)
+        safe_realloc(&((*line_info)[n].search),
+                     ((*line_info)[n].search_cnt) * sizeof(struct Syntax));
       else
-        (*lineInfo)[n].search = safe_malloc(sizeof(struct Syntax));
+        (*line_info)[n].search = safe_malloc(sizeof(struct Syntax));
       pmatch[0].rm_so += offset;
       pmatch[0].rm_eo += offset;
-      ((*lineInfo)[n].search)[(*lineInfo)[n].search_cnt - 1].first = pmatch[0].rm_so;
-      ((*lineInfo)[n].search)[(*lineInfo)[n].search_cnt - 1].last = pmatch[0].rm_eo;
+      ((*line_info)[n].search)[(*line_info)[n].search_cnt - 1].first = pmatch[0].rm_so;
+      ((*line_info)[n].search)[(*line_info)[n].search_cnt - 1].last = pmatch[0].rm_eo;
 
       if (pmatch[0].rm_eo == pmatch[0].rm_so)
         offset++; /* avoid degenerate cases */
@@ -1492,20 +1492,20 @@ static int display_line(FILE *f, LOFF_T *last_pos, struct Line **lineInfo, int n
     }
   }
 
-  if (!(flags & MUTT_SHOW) && (*lineInfo)[n + 1].offset > 0)
+  if (!(flags & MUTT_SHOW) && (*line_info)[n + 1].offset > 0)
   {
     /* we've already scanned this line, so just exit */
     rc = 0;
     goto out;
   }
-  if ((flags & MUTT_SHOWCOLOR) && *force_redraw && (*lineInfo)[n + 1].offset > 0)
+  if ((flags & MUTT_SHOWCOLOR) && *force_redraw && (*line_info)[n + 1].offset > 0)
   {
     /* no need to try to display this line... */
     rc = 1;
     goto out; /* fake display */
   }
 
-  if ((b_read = fill_buffer(f, last_pos, (*lineInfo)[n].offset, &buf, &fmt,
+  if ((b_read = fill_buffer(f, last_pos, (*line_info)[n].offset, &buf, &fmt,
                             &buflen, &buf_ready)) < 0)
   {
     if (change_last)
@@ -1514,7 +1514,7 @@ static int display_line(FILE *f, LOFF_T *last_pos, struct Line **lineInfo, int n
   }
 
   /* now chose a good place to break the line */
-  cnt = format_line(lineInfo, n, buf, flags, 0, b_read, &ch, &vch, &col, &special, pager_window);
+  cnt = format_line(line_info, n, buf, flags, 0, b_read, &ch, &vch, &col, &special, pager_window);
   buf_ptr = buf + cnt;
 
   /* move the break point only if smart_wrap is set */
@@ -1549,9 +1549,9 @@ static int display_line(FILE *f, LOFF_T *last_pos, struct Line **lineInfo, int n
   if (*buf_ptr == '\n')
     buf_ptr++;
 
-  if ((int) (buf_ptr - buf) < b_read && !(*lineInfo)[n + 1].continuation)
-    append_line(*lineInfo, n, (int) (buf_ptr - buf));
-  (*lineInfo)[n + 1].offset = (*lineInfo)[n].offset + (long) (buf_ptr - buf);
+  if ((int) (buf_ptr - buf) < b_read && !(*line_info)[n + 1].continuation)
+    append_line(*line_info, n, (int) (buf_ptr - buf));
+  (*line_info)[n + 1].offset = (*line_info)[n].offset + (long) (buf_ptr - buf);
 
   /* if we don't need to display the line we are done */
   if (!(flags & MUTT_SHOW))
@@ -1561,7 +1561,7 @@ static int display_line(FILE *f, LOFF_T *last_pos, struct Line **lineInfo, int n
   }
 
   /* display the line */
-  format_line(lineInfo, n, buf, flags, &a, cnt, &ch, &vch, &col, &special, pager_window);
+  format_line(line_info, n, buf, flags, &a, cnt, &ch, &vch, &col, &special, pager_window);
 
 /* avoid a bug in ncurses... */
 #ifndef USE_SLANG_CURSES
@@ -1574,7 +1574,7 @@ static int display_line(FILE *f, LOFF_T *last_pos, struct Line **lineInfo, int n
 
   /* end the last color pattern (needed by S-Lang) */
   if (special || (col != pager_window->cols && (flags & (MUTT_SHOWCOLOR | MUTT_SEARCH))))
-    resolve_color(*lineInfo, n, vch, flags, 0, &a);
+    resolve_color(*line_info, n, vch, flags, 0, &a);
 
   /*
    * Fill the blank space at the end of the line with the prevailing color.
@@ -1583,11 +1583,11 @@ static int display_line(FILE *f, LOFF_T *last_pos, struct Line **lineInfo, int n
    */
   if (flags & MUTT_SHOWCOLOR)
   {
-    m = ((*lineInfo)[n].continuation) ? ((*lineInfo)[n].syntax)[0].first : n;
-    if ((*lineInfo)[m].type == MT_COLOR_HEADER)
-      def_color = ((*lineInfo)[m].syntax)[0].color;
+    m = ((*line_info)[n].continuation) ? ((*line_info)[n].syntax)[0].first : n;
+    if ((*line_info)[m].type == MT_COLOR_HEADER)
+      def_color = ((*line_info)[m].syntax)[0].color;
     else
-      def_color = ColorDefs[(*lineInfo)[m].type];
+      def_color = ColorDefs[(*line_info)[m].type];
 
     ATTRSET(def_color);
   }
@@ -1662,15 +1662,15 @@ struct PagerRedrawData
   int indicator; /* the indicator line of the PI */
   int oldtopline;
   int lines;
-  int maxLine;
-  int lastLine;
+  int max_line;
+  int last_line;
   int curline;
   int topline;
   int force_redraw;
   int has_types;
-  int hideQuoted;
+  int hide_quoted;
   int q_level;
-  struct QClass *QuoteList;
+  struct QClass *quote_list;
   LOFF_T last_pos;
   LOFF_T last_offset;
   struct MuttWindow *index_status_window;
@@ -1678,14 +1678,14 @@ struct PagerRedrawData
   struct MuttWindow *pager_status_window;
   struct MuttWindow *pager_window;
   struct Menu *index; /* the Pager Index (PI) */
-  regex_t SearchRE;
-  int SearchCompiled;
-  int SearchFlag;
-  int SearchBack;
+  regex_t search_re;
+  int search_compiled;
+  int search_flag;
+  int search_back;
   const char *banner;
   char *helpstr;
   char *searchbuf;
-  struct Line *lineInfo;
+  struct Line *line_info;
   FILE *fp;
   struct stat sb;
 };
@@ -1762,11 +1762,11 @@ static void pager_menu_redraw(struct Menu *pager_menu)
 #if defined(USE_SLANG_CURSES) || defined(HAVE_RESIZETERM)
     if (Resize)
     {
-      if ((rd->SearchCompiled = Resize->SearchCompiled))
+      if ((rd->search_compiled = Resize->search_compiled))
       {
-        REGCOMP(&rd->SearchRE, rd->searchbuf, REG_NEWLINE | mutt_which_case(rd->searchbuf));
-        rd->SearchFlag = MUTT_SEARCH;
-        rd->SearchBack = Resize->SearchBack;
+        REGCOMP(&rd->search_re, rd->searchbuf, REG_NEWLINE | mutt_which_case(rd->searchbuf));
+        rd->search_flag = MUTT_SEARCH;
+        rd->search_back = Resize->search_back;
       }
       rd->lines = Resize->line;
       pager_menu->redraw |= REDRAW_FLOW;
@@ -1818,35 +1818,35 @@ static void pager_menu_redraw(struct Menu *pager_menu)
     {
       rd->lines = -1;
       for (i = 0; i <= rd->topline; i++)
-        if (!rd->lineInfo[i].continuation)
+        if (!rd->line_info[i].continuation)
           rd->lines++;
-      for (i = 0; i < rd->maxLine; i++)
+      for (i = 0; i < rd->max_line; i++)
       {
-        rd->lineInfo[i].offset = 0;
-        rd->lineInfo[i].type = -1;
-        rd->lineInfo[i].continuation = 0;
-        rd->lineInfo[i].chunks = 0;
-        rd->lineInfo[i].search_cnt = -1;
-        rd->lineInfo[i].quote = NULL;
-
-        safe_realloc(&(rd->lineInfo[i].syntax), sizeof(struct Syntax));
-        if (rd->SearchCompiled && rd->lineInfo[i].search)
-          FREE(&(rd->lineInfo[i].search));
+        rd->line_info[i].offset = 0;
+        rd->line_info[i].type = -1;
+        rd->line_info[i].continuation = 0;
+        rd->line_info[i].chunks = 0;
+        rd->line_info[i].search_cnt = -1;
+        rd->line_info[i].quote = NULL;
+
+        safe_realloc(&(rd->line_info[i].syntax), sizeof(struct Syntax));
+        if (rd->search_compiled && rd->line_info[i].search)
+          FREE(&(rd->line_info[i].search));
       }
 
-      rd->lastLine = 0;
+      rd->last_line = 0;
       rd->topline = 0;
     }
     i = -1;
     j = -1;
-    while (display_line(rd->fp, &rd->last_pos, &rd->lineInfo, ++i, &rd->lastLine, &rd->maxLine,
-                        rd->has_types | rd->SearchFlag | (rd->flags & MUTT_PAGER_NOWRAP),
-                        &rd->QuoteList, &rd->q_level, &rd->force_redraw,
-                        &rd->SearchRE, rd->pager_window) == 0)
-      if (!rd->lineInfo[i].continuation && ++j == rd->lines)
+    while (display_line(rd->fp, &rd->last_pos, &rd->line_info, ++i, &rd->last_line, &rd->max_line,
+                        rd->has_types | rd->search_flag | (rd->flags & MUTT_PAGER_NOWRAP),
+                        &rd->quote_list, &rd->q_level, &rd->force_redraw,
+                        &rd->search_re, rd->pager_window) == 0)
+      if (!rd->line_info[i].continuation && ++j == rd->lines)
       {
         rd->topline = i;
-        if (!rd->SearchFlag)
+        if (!rd->search_flag)
           break;
       }
   }
@@ -1868,19 +1868,19 @@ static void pager_menu_redraw(struct Menu *pager_menu)
       rd->force_redraw = 0;
 
       while (rd->lines < rd->pager_window->rows &&
-             rd->lineInfo[rd->curline].offset <= rd->sb.st_size - 1)
+             rd->line_info[rd->curline].offset <= rd->sb.st_size - 1)
       {
-        if (display_line(rd->fp, &rd->last_pos, &rd->lineInfo, rd->curline,
-                         &rd->lastLine, &rd->maxLine,
-                         (rd->flags & MUTT_DISPLAYFLAGS) | rd->hideQuoted |
-                             rd->SearchFlag | (rd->flags & MUTT_PAGER_NOWRAP),
-                         &rd->QuoteList, &rd->q_level, &rd->force_redraw,
-                         &rd->SearchRE, rd->pager_window) > 0)
+        if (display_line(rd->fp, &rd->last_pos, &rd->line_info, rd->curline,
+                         &rd->last_line, &rd->max_line,
+                         (rd->flags & MUTT_DISPLAYFLAGS) | rd->hide_quoted |
+                             rd->search_flag | (rd->flags & MUTT_PAGER_NOWRAP),
+                         &rd->quote_list, &rd->q_level, &rd->force_redraw,
+                         &rd->search_re, rd->pager_window) > 0)
           rd->lines++;
         rd->curline++;
         mutt_window_move(rd->pager_window, rd->lines, 0);
       }
-      rd->last_offset = rd->lineInfo[rd->curline].offset;
+      rd->last_offset = rd->line_info[rd->curline].offset;
     } while (rd->force_redraw);
 
     SETCOLOR(MT_COLOR_TILDE);
@@ -2027,14 +2027,14 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
     mutt_set_flag(Context, extra->hdr, MUTT_READ, 1);
   }
 
-  rd.lineInfo = safe_malloc(sizeof(struct Line) * (rd.maxLine = LINES));
-  for (i = 0; i < rd.maxLine; i++)
+  rd.line_info = safe_malloc(sizeof(struct Line) * (rd.max_line = LINES));
+  for (i = 0; i < rd.max_line; i++)
   {
-    memset(&rd.lineInfo[i], 0, sizeof(struct Line));
-    rd.lineInfo[i].type = -1;
-    rd.lineInfo[i].search_cnt = -1;
-    rd.lineInfo[i].syntax = safe_malloc(sizeof(struct Syntax));
-    (rd.lineInfo[i].syntax)[0].first = (rd.lineInfo[i].syntax)[0].last = -1;
+    memset(&rd.line_info[i], 0, sizeof(struct Line));
+    rd.line_info[i].type = -1;
+    rd.line_info[i].search_cnt = -1;
+    rd.line_info[i].syntax = safe_malloc(sizeof(struct Syntax));
+    (rd.line_info[i].syntax)[0].first = (rd.line_info[i].syntax)[0].last = -1;
   }
 
   mutt_compile_help(helpstr, sizeof(helpstr), MENU_PAGER, PagerHelp);
@@ -2085,7 +2085,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
     mutt_refresh();
 
     if (IsHeader(extra) && OldHdr == extra->hdr && TopLine != rd.topline &&
-        rd.lineInfo[rd.curline].offset < rd.sb.st_size - 1)
+        rd.line_info[rd.curline].offset < rd.sb.st_size - 1)
     {
       if (TopLine - rd.topline > rd.lines)
         rd.topline += rd.lines;
@@ -2192,14 +2192,14 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
         /* Store current position. */
         rd.lines = -1;
         for (i = 0; i <= rd.topline; i++)
-          if (!rd.lineInfo[i].continuation)
+          if (!rd.line_info[i].continuation)
             rd.lines++;
 
         Resize = safe_malloc(sizeof(struct Resize));
 
         Resize->line = rd.lines;
-        Resize->SearchCompiled = rd.SearchCompiled;
-        Resize->SearchBack = rd.SearchBack;
+        Resize->search_compiled = rd.search_compiled;
+        Resize->search_back = rd.search_back;
 
         ch = -1;
         rc = OP_REFORMAT_WINCH;
@@ -2239,9 +2239,9 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
         break;
 
       case OP_NEXT_PAGE:
-        if (rd.lineInfo[rd.curline].offset < rd.sb.st_size - 1)
+        if (rd.line_info[rd.curline].offset < rd.sb.st_size - 1)
         {
-          rd.topline = up_n_lines(PagerContext, rd.lineInfo, rd.curline, rd.hideQuoted);
+          rd.topline = up_n_lines(PagerContext, rd.line_info, rd.curline, rd.hide_quoted);
         }
         else if (option(OPTPAGERSTOP))
         {
@@ -2260,19 +2260,19 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
         if (rd.topline != 0)
         {
           rd.topline = up_n_lines(rd.pager_window->rows - PagerContext,
-                                  rd.lineInfo, rd.topline, rd.hideQuoted);
+                                  rd.line_info, rd.topline, rd.hide_quoted);
         }
         else
           mutt_error(_("Top of message is shown."));
         break;
 
       case OP_NEXT_LINE:
-        if (rd.lineInfo[rd.curline].offset < rd.sb.st_size - 1)
+        if (rd.line_info[rd.curline].offset < rd.sb.st_size - 1)
         {
           rd.topline++;
-          if (rd.hideQuoted)
+          if (rd.hide_quoted)
           {
-            while (rd.lineInfo[rd.topline].type == MT_COLOR_QUOTED && rd.topline < rd.lastLine)
+            while (rd.line_info[rd.topline].type == MT_COLOR_QUOTED && rd.topline < rd.last_line)
               rd.topline++;
           }
         }
@@ -2282,7 +2282,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
 
       case OP_PREV_LINE:
         if (rd.topline)
-          rd.topline = up_n_lines(1, rd.lineInfo, rd.topline, rd.hideQuoted);
+          rd.topline = up_n_lines(1, rd.line_info, rd.topline, rd.hide_quoted);
         else
           mutt_error(_("Top of message is shown."));
         break;
@@ -2296,17 +2296,17 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
 
       case OP_HALF_UP:
         if (rd.topline)
-          rd.topline = up_n_lines(rd.pager_window->rows / 2, rd.lineInfo,
-                                  rd.topline, rd.hideQuoted);
+          rd.topline = up_n_lines(rd.pager_window->rows / 2, rd.line_info,
+                                  rd.topline, rd.hide_quoted);
         else
           mutt_error(_("Top of message is shown."));
         break;
 
       case OP_HALF_DOWN:
-        if (rd.lineInfo[rd.curline].offset < rd.sb.st_size - 1)
+        if (rd.line_info[rd.curline].offset < rd.sb.st_size - 1)
         {
-          rd.topline = up_n_lines(rd.pager_window->rows / 2, rd.lineInfo,
-                                  rd.curline, rd.hideQuoted);
+          rd.topline = up_n_lines(rd.pager_window->rows / 2, rd.line_info,
+                                  rd.curline, rd.hide_quoted);
         }
         else if (option(OPTPAGERSTOP))
         {
@@ -2323,7 +2323,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
 
       case OP_SEARCH_NEXT:
       case OP_SEARCH_OPPOSITE:
-        if (rd.SearchCompiled)
+        if (rd.search_compiled)
         {
           wrapped = false;
 
@@ -2333,18 +2333,18 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
             searchctx = 0;
 
         search_next:
-          if ((!rd.SearchBack && ch == OP_SEARCH_NEXT) ||
-              (rd.SearchBack && ch == OP_SEARCH_OPPOSITE))
+          if ((!rd.search_back && ch == OP_SEARCH_NEXT) ||
+              (rd.search_back && ch == OP_SEARCH_OPPOSITE))
           {
             /* searching forward */
-            for (i = wrapped ? 0 : rd.topline + searchctx + 1; i < rd.lastLine; i++)
+            for (i = wrapped ? 0 : rd.topline + searchctx + 1; i < rd.last_line; i++)
             {
-              if ((!rd.hideQuoted || rd.lineInfo[i].type != MT_COLOR_QUOTED) &&
-                  !rd.lineInfo[i].continuation && rd.lineInfo[i].search_cnt > 0)
+              if ((!rd.hide_quoted || rd.line_info[i].type != MT_COLOR_QUOTED) &&
+                  !rd.line_info[i].continuation && rd.line_info[i].search_cnt > 0)
                 break;
             }
 
-            if (i < rd.lastLine)
+            if (i < rd.last_line)
               rd.topline = i;
             else if (wrapped || !option(OPTWRAPSEARCH))
               mutt_error(_("Not found."));
@@ -2358,10 +2358,10 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
           else
           {
             /* searching backward */
-            for (i = wrapped ? rd.lastLine : rd.topline + searchctx - 1; i >= 0; i--)
+            for (i = wrapped ? rd.last_line : rd.topline + searchctx - 1; i >= 0; i--)
             {
-              if ((!rd.hideQuoted || (rd.has_types && rd.lineInfo[i].type != MT_COLOR_QUOTED)) &&
-                  !rd.lineInfo[i].continuation && rd.lineInfo[i].search_cnt > 0)
+              if ((!rd.hide_quoted || (rd.has_types && rd.line_info[i].type != MT_COLOR_QUOTED)) &&
+                  !rd.line_info[i].continuation && rd.line_info[i].search_cnt > 0)
                 break;
             }
 
@@ -2377,9 +2377,9 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
             }
           }
 
-          if (rd.lineInfo[rd.topline].search_cnt > 0)
+          if (rd.line_info[rd.topline].search_cnt > 0)
           {
-            rd.SearchFlag = MUTT_SEARCH;
+            rd.search_flag = MUTT_SEARCH;
             /* give some context for search results */
             if (rd.topline - searchctx > 0)
               rd.topline -= searchctx;
@@ -2400,7 +2400,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
 
         if (strcmp(buffer, searchbuf) == 0)
         {
-          if (rd.SearchCompiled)
+          if (rd.search_compiled)
           {
             /* do an implicit search-next */
             if (ch == OP_SEARCH)
@@ -2418,60 +2418,60 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
 
         strfcpy(searchbuf, buffer, sizeof(searchbuf));
 
-        /* leave SearchBack alone if ch == OP_SEARCH_NEXT */
+        /* leave search_back alone if ch == OP_SEARCH_NEXT */
         if (ch == OP_SEARCH)
-          rd.SearchBack = 0;
+          rd.search_back = 0;
         else if (ch == OP_SEARCH_REVERSE)
-          rd.SearchBack = 1;
+          rd.search_back = 1;
 
-        if (rd.SearchCompiled)
+        if (rd.search_compiled)
         {
-          regfree(&rd.SearchRE);
-          for (i = 0; i < rd.lastLine; i++)
+          regfree(&rd.search_re);
+          for (i = 0; i < rd.last_line; i++)
           {
-            if (rd.lineInfo[i].search)
-              FREE(&(rd.lineInfo[i].search));
-            rd.lineInfo[i].search_cnt = -1;
+            if (rd.line_info[i].search)
+              FREE(&(rd.line_info[i].search));
+            rd.line_info[i].search_cnt = -1;
           }
         }
 
-        if ((err = REGCOMP(&rd.SearchRE, searchbuf,
+        if ((err = REGCOMP(&rd.search_re, searchbuf,
                            REG_NEWLINE | mutt_which_case(searchbuf))) != 0)
         {
-          regerror(err, &rd.SearchRE, buffer, sizeof(buffer));
+          regerror(err, &rd.search_re, buffer, sizeof(buffer));
           mutt_error("%s", buffer);
-          for (i = 0; i < rd.maxLine; i++)
+          for (i = 0; i < rd.max_line; i++)
           {
             /* cleanup */
-            if (rd.lineInfo[i].search)
-              FREE(&(rd.lineInfo[i].search));
-            rd.lineInfo[i].search_cnt = -1;
+            if (rd.line_info[i].search)
+              FREE(&(rd.line_info[i].search));
+            rd.line_info[i].search_cnt = -1;
           }
-          rd.SearchFlag = 0;
-          rd.SearchCompiled = 0;
+          rd.search_flag = 0;
+          rd.search_compiled = 0;
         }
         else
         {
-          rd.SearchCompiled = 1;
+          rd.search_compiled = 1;
           /* update the search pointers */
           i = 0;
-          while (display_line(rd.fp, &rd.last_pos, &rd.lineInfo, i, &rd.lastLine, &rd.maxLine,
+          while (display_line(rd.fp, &rd.last_pos, &rd.line_info, i, &rd.last_line, &rd.max_line,
                               MUTT_SEARCH | (flags & MUTT_PAGER_NSKIP) | (flags & MUTT_PAGER_NOWRAP),
-                              &rd.QuoteList, &rd.q_level, &rd.force_redraw,
-                              &rd.SearchRE, rd.pager_window) == 0)
+                              &rd.quote_list, &rd.q_level, &rd.force_redraw,
+                              &rd.search_re, rd.pager_window) == 0)
             i++;
 
-          if (!rd.SearchBack)
+          if (!rd.search_back)
           {
             /* searching forward */
-            for (i = rd.topline; i < rd.lastLine; i++)
+            for (i = rd.topline; i < rd.last_line; i++)
             {
-              if ((!rd.hideQuoted || rd.lineInfo[i].type != MT_COLOR_QUOTED) &&
-                  !rd.lineInfo[i].continuation && rd.lineInfo[i].search_cnt > 0)
+              if ((!rd.hide_quoted || rd.line_info[i].type != MT_COLOR_QUOTED) &&
+                  !rd.line_info[i].continuation && rd.line_info[i].search_cnt > 0)
                 break;
             }
 
-            if (i < rd.lastLine)
+            if (i < rd.last_line)
               rd.topline = i;
           }
           else
@@ -2479,8 +2479,8 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
             /* searching backward */
             for (i = rd.topline; i >= 0; i--)
             {
-              if ((!rd.hideQuoted || rd.lineInfo[i].type != MT_COLOR_QUOTED) &&
-                  !rd.lineInfo[i].continuation && rd.lineInfo[i].search_cnt > 0)
+              if ((!rd.hide_quoted || rd.line_info[i].type != MT_COLOR_QUOTED) &&
+                  !rd.line_info[i].continuation && rd.line_info[i].search_cnt > 0)
                 break;
             }
 
@@ -2488,14 +2488,14 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
               rd.topline = i;
           }
 
-          if (rd.lineInfo[rd.topline].search_cnt == 0)
+          if (rd.line_info[rd.topline].search_cnt == 0)
           {
-            rd.SearchFlag = 0;
+            rd.search_flag = 0;
             mutt_error(_("Not found."));
           }
           else
           {
-            rd.SearchFlag = MUTT_SEARCH;
+            rd.search_flag = MUTT_SEARCH;
             /* give some context for search results */
             if (SearchContext > 0 && SearchContext < rd.pager_window->rows)
               searchctx = SearchContext;
@@ -2509,9 +2509,9 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
         break;
 
       case OP_SEARCH_TOGGLE:
-        if (rd.SearchCompiled)
+        if (rd.search_compiled)
         {
-          rd.SearchFlag ^= MUTT_SEARCH;
+          rd.search_flag ^= MUTT_SEARCH;
           pager_menu->redraw = REDRAW_BODY;
         }
         break;
@@ -2543,9 +2543,9 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
       case OP_PAGER_HIDE_QUOTED:
         if (rd.has_types)
         {
-          rd.hideQuoted ^= MUTT_HIDE;
-          if (rd.hideQuoted && rd.lineInfo[rd.topline].type == MT_COLOR_QUOTED)
-            rd.topline = up_n_lines(1, rd.lineInfo, rd.topline, rd.hideQuoted);
+          rd.hide_quoted ^= MUTT_HIDE;
+          if (rd.hide_quoted && rd.line_info[rd.topline].type == MT_COLOR_QUOTED)
+            rd.topline = up_n_lines(1, rd.line_info, rd.topline, rd.hide_quoted);
           else
             pager_menu->redraw = REDRAW_BODY;
         }
@@ -2558,15 +2558,15 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
           int new_topline = rd.topline;
 
           /* Skip all the email headers */
-          if (ISHEADER(rd.lineInfo[new_topline].type))
+          if (ISHEADER(rd.line_info[new_topline].type))
           {
-            while ((new_topline < rd.lastLine ||
+            while ((new_topline < rd.last_line ||
                     (0 == (dretval = display_line(
-                               rd.fp, &rd.last_pos, &rd.lineInfo, new_topline, &rd.lastLine,
-                               &rd.maxLine, MUTT_TYPES | (flags & MUTT_PAGER_NOWRAP),
-                               &rd.QuoteList, &rd.q_level, &rd.force_redraw,
-                               &rd.SearchRE, rd.pager_window)))) &&
-                   ISHEADER(rd.lineInfo[new_topline].type))
+                               rd.fp, &rd.last_pos, &rd.line_info, new_topline, &rd.last_line,
+                               &rd.max_line, MUTT_TYPES | (flags & MUTT_PAGER_NOWRAP),
+                               &rd.quote_list, &rd.q_level, &rd.force_redraw,
+                               &rd.search_re, rd.pager_window)))) &&
+                   ISHEADER(rd.line_info[new_topline].type))
             {
               new_topline++;
             }
@@ -2574,13 +2574,13 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
             break;
           }
 
-          while (((new_topline + SkipQuotedOffset) < rd.lastLine ||
+          while (((new_topline + SkipQuotedOffset) < rd.last_line ||
                   (0 == (dretval = display_line(
-                             rd.fp, &rd.last_pos, &rd.lineInfo, new_topline, &rd.lastLine,
-                             &rd.maxLine, MUTT_TYPES | (flags & MUTT_PAGER_NOWRAP),
-                             &rd.QuoteList, &rd.q_level, &rd.force_redraw,
-                             &rd.SearchRE, rd.pager_window)))) &&
-                 rd.lineInfo[new_topline + SkipQuotedOffset].type != MT_COLOR_QUOTED)
+                             rd.fp, &rd.last_pos, &rd.line_info, new_topline, &rd.last_line,
+                             &rd.max_line, MUTT_TYPES | (flags & MUTT_PAGER_NOWRAP),
+                             &rd.quote_list, &rd.q_level, &rd.force_redraw,
+                             &rd.search_re, rd.pager_window)))) &&
+                 rd.line_info[new_topline + SkipQuotedOffset].type != MT_COLOR_QUOTED)
             new_topline++;
 
           if (dretval < 0)
@@ -2589,13 +2589,13 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
             break;
           }
 
-          while (((new_topline + SkipQuotedOffset) < rd.lastLine ||
+          while (((new_topline + SkipQuotedOffset) < rd.last_line ||
                   (0 == (dretval = display_line(
-                             rd.fp, &rd.last_pos, &rd.lineInfo, new_topline, &rd.lastLine,
-                             &rd.maxLine, MUTT_TYPES | (flags & MUTT_PAGER_NOWRAP),
-                             &rd.QuoteList, &rd.q_level, &rd.force_redraw,
-                             &rd.SearchRE, rd.pager_window)))) &&
-                 rd.lineInfo[new_topline + SkipQuotedOffset].type == MT_COLOR_QUOTED)
+                             rd.fp, &rd.last_pos, &rd.line_info, new_topline, &rd.last_line,
+                             &rd.max_line, MUTT_TYPES | (flags & MUTT_PAGER_NOWRAP),
+                             &rd.quote_list, &rd.q_level, &rd.force_redraw,
+                             &rd.search_re, rd.pager_window)))) &&
+                 rd.line_info[new_topline + SkipQuotedOffset].type == MT_COLOR_QUOTED)
             new_topline++;
 
           if (dretval < 0)
@@ -2608,17 +2608,17 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
         break;
 
       case OP_PAGER_BOTTOM: /* move to the end of the file */
-        if (rd.lineInfo[rd.curline].offset < rd.sb.st_size - 1)
+        if (rd.line_info[rd.curline].offset < rd.sb.st_size - 1)
         {
           i = rd.curline;
           /* make sure the types are defined to the end of file */
-          while (display_line(rd.fp, &rd.last_pos, &rd.lineInfo, i, &rd.lastLine,
-                              &rd.maxLine, rd.has_types | (flags & MUTT_PAGER_NOWRAP),
-                              &rd.QuoteList, &rd.q_level, &rd.force_redraw,
-                              &rd.SearchRE, rd.pager_window) == 0)
+          while (display_line(rd.fp, &rd.last_pos, &rd.line_info, i, &rd.last_line,
+                              &rd.max_line, rd.has_types | (flags & MUTT_PAGER_NOWRAP),
+                              &rd.quote_list, &rd.q_level, &rd.force_redraw,
+                              &rd.search_re, rd.pager_window) == 0)
             i++;
-          rd.topline = up_n_lines(rd.pager_window->rows, rd.lineInfo,
-                                  rd.lastLine, rd.hideQuoted);
+          rd.topline = up_n_lines(rd.pager_window->rows, rd.line_info,
+                                  rd.last_line, rd.hide_quoted);
         }
         else
           mutt_error(_("Bottom of message is shown."));
@@ -3167,20 +3167,20 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
     }
   }
 
-  cleanup_quote(&rd.QuoteList);
+  cleanup_quote(&rd.quote_list);
 
-  for (i = 0; i < rd.maxLine; i++)
+  for (i = 0; i < rd.max_line; i++)
   {
-    FREE(&(rd.lineInfo[i].syntax));
-    if (rd.SearchCompiled && rd.lineInfo[i].search)
-      FREE(&(rd.lineInfo[i].search));
+    FREE(&(rd.line_info[i].syntax));
+    if (rd.search_compiled && rd.line_info[i].search)
+      FREE(&(rd.line_info[i].search));
   }
-  if (rd.SearchCompiled)
+  if (rd.search_compiled)
   {
-    regfree(&rd.SearchRE);
-    rd.SearchCompiled = 0;
+    regfree(&rd.search_re);
+    rd.search_compiled = 0;
   }
-  FREE(&rd.lineInfo);
+  FREE(&rd.line_info);
   mutt_pop_current_menu(pager_menu);
   mutt_menu_destroy(&pager_menu);
   if (rd.index)
index 40dacaab9a3e77e846b7b91fab34dc7bf5f9f055..6fc8a7490088ac015016d5c3466ac04b679f14b3 100644 (file)
--- a/pattern.c
+++ b/pattern.c
@@ -1333,7 +1333,7 @@ struct Pattern *mutt_pattern_comp(/* const */ char *s, int flags, struct Buffer
   return curlist;
 }
 
-static bool perform_and(struct Pattern *pat, pattern_exec_flag flags, struct Context *ctx,
+static bool perform_and(struct Pattern *pat, enum PatternExecFlag flags, struct Context *ctx,
                         struct Header *hdr, struct PatternCache *cache)
 {
   for (; pat; pat = pat->next)
@@ -1342,7 +1342,7 @@ static bool perform_and(struct Pattern *pat, pattern_exec_flag flags, struct Con
   return true;
 }
 
-static int perform_or(struct Pattern *pat, pattern_exec_flag flags, struct Context *ctx,
+static int perform_or(struct Pattern *pat, enum PatternExecFlag flags, struct Context *ctx,
                       struct Header *hdr, struct PatternCache *cache)
 {
   for (; pat; pat = pat->next)
@@ -1423,7 +1423,7 @@ static int match_user(int alladdr, struct Address *a1, struct Address *a2)
   return alladdr;
 }
 
-static int match_threadcomplete(struct Pattern *pat, pattern_exec_flag flags,
+static int match_threadcomplete(struct Pattern *pat, enum PatternExecFlag flags,
                                 struct Context *ctx, struct MuttThread *t,
                                 int left, int up, int right, int down)
 {
@@ -1450,7 +1450,7 @@ static int match_threadcomplete(struct Pattern *pat, pattern_exec_flag flags,
   return 0;
 }
 
-static int match_threadparent(struct Pattern *pat, pattern_exec_flag flags,
+static int match_threadparent(struct Pattern *pat, enum PatternExecFlag flags,
                               struct Context *ctx, struct MuttThread *t)
 {
   if (!t || !t->parent || !t->parent->message)
@@ -1459,7 +1459,7 @@ static int match_threadparent(struct Pattern *pat, pattern_exec_flag flags,
   return mutt_pattern_exec(pat, flags, ctx, t->parent->message, NULL);
 }
 
-static int match_threadchildren(struct Pattern *pat, pattern_exec_flag flags,
+static int match_threadchildren(struct Pattern *pat, enum PatternExecFlag flags,
                                 struct Context *ctx, struct MuttThread *t)
 {
   if (!t || !t->child)
@@ -1497,7 +1497,7 @@ static int is_pattern_cache_set(int cache_entry)
  * flags: MUTT_MATCH_FULL_ADDRESS - match both personal and machine address
  * cache: For repeated matches against the same Header, passing in non-NULL will
  *        store some of the cacheable pattern matches in this structure. */
-int mutt_pattern_exec(struct Pattern *pat, pattern_exec_flag flags,
+int mutt_pattern_exec(struct Pattern *pat, enum PatternExecFlag flags,
                       struct Context *ctx, struct Header *h, struct PatternCache *cache)
 {
   int result;
index aaaa2a2c7ba24223a50eb0df1fb97a66952f8d55..a6213b1b15ec68c2608410f391f193a392d49261 100644 (file)
--- a/pattern.h
+++ b/pattern.h
@@ -48,9 +48,10 @@ struct Pattern
   } p;
 };
 
-typedef enum {
+enum PatternExecFlag
+{
   MUTT_MATCH_FULL_ADDRESS = 1
-} pattern_exec_flag;
+};
 
 /* This is used when a message is repeatedly pattern matched against.
  * e.g. for color, scoring, hooks.  It caches a few of the potentially slow
@@ -74,7 +75,7 @@ static inline struct Pattern *new_pattern(void)
   return safe_calloc(1, sizeof(struct Pattern));
 }
 
-int mutt_pattern_exec(struct Pattern *pat, pattern_exec_flag flags,
+int mutt_pattern_exec(struct Pattern *pat, enum PatternExecFlag flags,
                       struct Context *ctx, struct Header *h, struct PatternCache *cache);
 struct Pattern *mutt_pattern_comp(/* const */ char *s, int flags, struct Buffer *err);
 void mutt_check_simple(char *s, size_t len, const char *simple);
diff --git a/pop.h b/pop.h
index 1faddffad3af802d0a527bab1481f75f7a90232c..5d138406ed15b4501c0764a4265745efcef2201d 100644 (file)
--- a/pop.h
+++ b/pop.h
@@ -44,12 +44,13 @@ enum
   POP_BYE
 };
 
-typedef enum {
+enum PopAuthRes
+{
   POP_A_SUCCESS = 0,
   POP_A_SOCKET,
   POP_A_FAILURE,
   POP_A_UNAVAIL
-} pop_auth_res_t;
+};
 
 struct PopCache
 {
@@ -84,7 +85,7 @@ struct PopData
 struct PopAuth
 {
   /* do authentication, using named method or any available if method is NULL */
-  pop_auth_res_t (*authenticate)(struct PopData *, const char *);
+  enum PopAuthRes (*authenticate)(struct PopData *, const char *);
   /* name of authentication method supported, NULL means variable. If this
    * is not null, authenticate may ignore the second parameter. */
   const char *method;
index 0f9f1d3021561ea43454be44872ccd5b20b46547..68edc5f2b20cb4288d56853320dd50325ff73d34 100644 (file)
@@ -37,7 +37,7 @@
 
 #ifdef USE_SASL
 /* SASL authenticator */
-static pop_auth_res_t pop_auth_sasl(struct PopData *pop_data, const char *method)
+static enum PopAuthRes pop_auth_sasl(struct PopData *pop_data, const char *method)
 {
   sasl_conn_t *saslconn = NULL;
   sasl_interact_t *interaction = NULL;
@@ -201,7 +201,7 @@ void pop_apop_timestamp(struct PopData *pop_data, char *buf)
 }
 
 /* APOP authenticator */
-static pop_auth_res_t pop_auth_apop(struct PopData *pop_data, const char *method)
+static enum PopAuthRes pop_auth_apop(struct PopData *pop_data, const char *method)
 {
   struct Md5Ctx ctx;
   unsigned char digest[16];
@@ -248,7 +248,7 @@ static pop_auth_res_t pop_auth_apop(struct PopData *pop_data, const char *method
 }
 
 /* USER authenticator */
-static pop_auth_res_t pop_auth_user(struct PopData *pop_data, const char *method)
+static enum PopAuthRes pop_auth_user(struct PopData *pop_data, const char *method)
 {
   char buf[LONG_STRING];
   int ret;
index 7ea4fa35f64a5dbdd3ecb4e961f7768f1bef3504..fa12350d88f5b89076ea3b6e1fbc1ffe99350fdc 100644 (file)
--- a/protos.h
+++ b/protos.h
@@ -52,7 +52,7 @@ struct passwd;
 
 #define mutt_make_string(A, B, C, D, E) _mutt_make_string(A, B, C, D, E, 0)
 void _mutt_make_string(char *dest, size_t destlen, const char *s, struct Context *ctx,
-                       struct Header *hdr, format_flag flags);
+                       struct Header *hdr, enum FormatFlag flags);
 
 struct HdrFormatInfo
 {
@@ -61,13 +61,14 @@ struct HdrFormatInfo
   const char *pager_progress;
 };
 
-typedef enum {
-  kXDGConfigHome, /* $XDG_CONFIG_HOME */
-  kXDGConfigDirs, /* $XDG_CONFIG_DIRS */
-} XDGType;
+enum XdgType
+{
+  XDG_CONFIG_HOME,
+  XDG_CONFIG_DIRS,
+};
 
 void mutt_make_string_info(char *dst, size_t dstlen, int cols, const char *s,
-                           struct HdrFormatInfo *hfi, format_flag flags);
+                           struct HdrFormatInfo *hfi, enum FormatFlag flags);
 
 void mutt_free_opts(void);
 
@@ -121,7 +122,7 @@ void mutt_touch_atime(int f);
 const char *mutt_attach_fmt(char *dest, size_t destlen, size_t col, int cols,
                             char op, const char *src, const char *prefix,
                             const char *ifstring, const char *elsestring,
-                            unsigned long data, format_flag flags);
+                            unsigned long data, enum FormatFlag flags);
 
 
 char *mutt_charset_hook(const char *chs);
@@ -136,7 +137,7 @@ struct List *mutt_crypt_hook(struct Address *adr);
 char *mutt_make_date(char *s, size_t len);
 void mutt_timeout_hook(void);
 void mutt_startup_shutdown_hook(int type);
-int mutt_set_xdg_path(const XDGType type, char *buf, size_t bufsize);
+int mutt_set_xdg_path(enum XdgType type, char *buf, size_t bufsize);
 
 const char *mutt_make_version(void);
 
diff --git a/query.c b/query.c
index 74b4beb5e745ff34c29aeffc81562374e7035ea9..f01da3e518e76876d2e70e82e97b275f8682f1fd 100644 (file)
--- a/query.c
+++ b/query.c
@@ -192,7 +192,7 @@ static int query_search(struct Menu *m, regex_t *re, int n)
 static const char *query_format_str(char *dest, size_t destlen, size_t col, int cols,
                                     char op, const char *src, const char *fmt,
                                     const char *ifstring, const char *elsestring,
-                                    unsigned long data, format_flag flags)
+                                    unsigned long data, enum FormatFlag flags)
 {
   struct Entry *entry = (struct Entry *) data;
   struct Query *query = entry->data;
index b6f6e252790f6236846df6722cdf3dab5d9ed39e..66ce2654224ea5c636be2a907f4ff5b8b8bdb13a 100644 (file)
@@ -170,7 +170,7 @@ struct AttachPtr **mutt_gen_attach_list(struct Body *m, int parent_type,
 const char *mutt_attach_fmt(char *dest, size_t destlen, size_t col, int cols,
                             char op, const char *src, const char *prefix,
                             const char *ifstring, const char *elsestring,
-                            unsigned long data, format_flag flags)
+                            unsigned long data, enum FormatFlag flags)
 {
   char fmt[16];
   char tmp[SHORT_STRING];
index 620de2f85c09699d9fd53c9b9854cd332cb1bfbe..6d1c5944cea017df02dbc4b7713d85861e5b7623 100644 (file)
@@ -351,7 +351,7 @@ static const char *mix_format_caps(struct Remailer *r)
 static const char *mix_entry_fmt(char *dest, size_t destlen, size_t col, int cols,
                                  char op, const char *src, const char *prefix,
                                  const char *ifstring, const char *elsestring,
-                                 unsigned long data, format_flag flags)
+                                 unsigned long data, enum FormatFlag flags)
 {
   char fmt[16];
   struct Remailer *remailer = (struct Remailer *) data;
index ffdf7724c808765ae512b5c5cd3f2921a4b5f98a..b7075d947524513c06e6a6232e4b725d7f35c56e 100644 (file)
--- a/sidebar.c
+++ b/sidebar.c
@@ -64,14 +64,14 @@ static int HilIndex = -1; /* Highlighted mailbox */
 static int BotIndex = -1; /* Last mailbox visible in sidebar */
 
 /* The source of the sidebar divider character. */
-enum div_type
+enum DivType
 {
   SB_DIV_USER,
   SB_DIV_ASCII,
   SB_DIV_UTF8
 };
 
-enum sb_src
+enum SidebarSrc
 {
   SB_SRC_INCOMING,
   SB_SRC_VIRT,
@@ -101,7 +101,7 @@ enum sb_src
 static const char *cb_format_str(char *dest, size_t destlen, size_t col, int cols,
                                  char op, const char *src, const char *prefix,
                                  const char *ifstring, const char *elsestring,
-                                 unsigned long data, format_flag flags)
+                                 unsigned long data, enum FormatFlag flags)
 {
   struct SbEntry *sbe = (struct SbEntry *) data;
   unsigned int optional;
@@ -690,7 +690,7 @@ static int draw_divider(int num_rows, int num_cols)
 
   int i;
   int delim_len;
-  enum div_type altchar = SB_DIV_UTF8;
+  enum DivType altchar = SB_DIV_UTF8;
 
   /* Calculate the width of the delimiter in screen cells */
   delim_len = mutt_strwidth(SidebarDividerChar);
index 394e5c874254639cdbe1c44fdb32a8b2805a08e5..d346680ae70401a6b0001874e171bc151a892af2 100644 (file)
--- a/status.c
+++ b/status.c
@@ -66,7 +66,7 @@ static void _menu_status_line(char *buf, size_t buflen, size_t col, int cols,
 static const char *status_format_str(char *buf, size_t buflen, size_t col, int cols,
                                      char op, const char *src, const char *prefix,
                                      const char *ifstring, const char *elsestring,
-                                     unsigned long data, format_flag flags)
+                                     unsigned long data, enum FormatFlag flags)
 {
   char fmt[SHORT_STRING], tmp[SHORT_STRING], *cp = NULL;
   int count, optional = (flags & MUTT_FORMAT_OPTIONAL);
diff --git a/url.c b/url.c
index 7c91c9b12ab14a5dd30fb81263ce6a79b8e853cf..184b177d6a5570edbfa5760d5f09c1d8cf4376f5 100644 (file)
--- a/url.c
+++ b/url.c
@@ -72,7 +72,7 @@ int url_pct_decode(char *s)
   return 0;
 }
 
-url_scheme_t url_check_scheme(const char *s)
+enum UrlScheme url_check_scheme(const char *s)
 {
   char sbuf[STRING];
   char *t = NULL;
@@ -90,7 +90,7 @@ url_scheme_t url_check_scheme(const char *s)
   if ((i = mutt_getvaluebyname(sbuf, UrlMap)) == -1)
     return U_UNKNOWN;
   else
-    return (url_scheme_t) i;
+    return (enum UrlScheme) i;
 }
 
 /* ciss_parse_userhost: fill in components of ciss with info from src. Note
diff --git a/url.h b/url.h
index e76f7272df19447fe73352e6963950cd7c1d01b0..ad4ec142d411668c2938fe3bdab9136243a7a656 100644 (file)
--- a/url.h
+++ b/url.h
@@ -20,7 +20,8 @@
 
 struct Envelope;
 
-typedef enum url_scheme {
+enum UrlScheme
+{
   U_FILE,
   U_POP,
   U_POPS,
@@ -35,14 +36,14 @@ typedef enum url_scheme {
   U_NOTMUCH,
 #endif
   U_UNKNOWN
-} url_scheme_t;
+};
 
 #define U_DECODE_PASSWD (1)
 #define U_PATH (1 << 1)
 
 struct CissUrl
 {
-  url_scheme_t scheme;
+  enum UrlScheme scheme;
   char *user;
   char *pass;
   char *host;
@@ -50,7 +51,7 @@ struct CissUrl
   char *path;
 };
 
-url_scheme_t url_check_scheme(const char *s);
+enum UrlScheme url_check_scheme(const char *s);
 int url_parse_ciss(struct CissUrl *ciss, char *src);
 int url_ciss_tostring(struct CissUrl *ciss, char *dest, size_t len, int flags);
 int url_parse_mailto(struct Envelope *e, char **body, const char *src);