]> granicus.if.org Git - neomutt/commitdiff
context: tidy for clarity
authorRichard Russon <rich@flatcap.org>
Fri, 19 Jul 2019 11:09:37 +0000 (12:09 +0100)
committerRichard Russon <rich@flatcap.org>
Sat, 20 Jul 2019 22:13:08 +0000 (23:13 +0100)
- rename msgnotreadyet
- insert whitespace into header

context.h
hdrline.c
mx.c
pager.c

index a18b3d52edc44d4e72e8bab4e89b70897feff5fa..0cf36f7e1d2de38e418f817e83f343325dd343e0 100644 (file)
--- a/context.h
+++ b/context.h
@@ -36,30 +36,30 @@ struct NotifyCallback;
 struct Context
 {
   off_t vsize;
-  char *pattern;                 /**< limit pattern string */
-  struct PatternHead *limit_pattern; /**< compiled limit pattern */
-  struct Email *last_tag;  /**< last tagged msg. used to link threads */
-  struct MuttThread *tree;  /**< top of thread tree */
-  struct Hash *thread_hash; /**< hash table for threading */
-  int msgnotreadyet;        /**< which msg "new" in pager, -1 if none */
+  char *pattern;                     ///< Limit pattern string
+  struct PatternHead *limit_pattern; ///< Compiled limit pattern
+  struct Email *last_tag;            ///< Last tagged msg (used to link threads)
+  struct MuttThread *tree;           ///< Top of thread tree
+  struct Hash *thread_hash;          ///< Hash table for threading
+  int msg_not_read_yet;              ///< Which msg "new" in pager, -1 if none
 
-  struct Menu *menu; /**< needed for pattern compilation */
+  struct Menu *menu;                 ///< Needed for pattern compilation
 
-  bool collapsed : 1; /**< are all threads collapsed? */
+  bool collapsed : 1;                ///< Are all threads collapsed?
 
   struct Mailbox *mailbox;
 };
 
-void ctx_free(struct Context **ptr);
-int  ctx_mailbox_observer(struct NotifyCallback *nc);
-void ctx_update(struct Context *ctx);
-void ctx_update_tables(struct Context *ctx, bool committing);
+void            ctx_free            (struct Context **ptr);
+int             ctx_mailbox_observer(struct NotifyCallback *nc);
+void            ctx_update          (struct Context *ctx);
+void            ctx_update_tables   (struct Context *ctx, bool committing);
 
-bool message_is_tagged(struct Context *ctx, int index);
+bool message_is_tagged (struct Context *ctx, int index);
 bool message_is_visible(struct Context *ctx, int index);
 
-int  el_add_email(struct EmailList *el, struct Email *e);
-int  el_add_tagged(struct EmailList *el, struct Context *ctx, struct Email *e, bool use_tagged);
+int  el_add_email   (struct EmailList *el, struct Email *e);
+int  el_add_tagged  (struct EmailList *el, struct Context *ctx, struct Email *e, bool use_tagged);
 void emaillist_clear(struct EmailList *el);
 
 #endif /* MUTT_CONTEXT_H */
index 70990b094bbd3f92ee3b0aa27b540262d74a7f23..c5a61c0ac78c899e0c7cf939fb581fad53873321 100644 (file)
--- a/hdrline.c
+++ b/hdrline.c
@@ -1172,7 +1172,7 @@ static const char *index_format_str(char *buf, size_t buflen, size_t col, int co
         wch = get_nth_wchar(C_FlagChars, FLAG_CHAR_IMPORTANT);
       else if (e->replied)
         wch = get_nth_wchar(C_FlagChars, FLAG_CHAR_REPLIED);
-      else if (e->read && (ctx && (ctx->msgnotreadyet != e->msgno)))
+      else if (e->read && (ctx && (ctx->msg_not_read_yet != e->msgno)))
         wch = get_nth_wchar(C_FlagChars, FLAG_CHAR_SEMPTY);
       else if (e->old)
         wch = get_nth_wchar(C_FlagChars, FLAG_CHAR_OLD);
@@ -1330,7 +1330,7 @@ static const char *index_format_str(char *buf, size_t buflen, size_t col, int co
           ch = get_nth_wchar(C_FlagChars, FLAG_CHAR_NEW_THREAD);
         else if (threads && thread_is_old(ctx, e))
           ch = get_nth_wchar(C_FlagChars, FLAG_CHAR_OLD_THREAD);
-        else if (e->read && (ctx && (ctx->msgnotreadyet != e->msgno)))
+        else if (e->read && (ctx && (ctx->msg_not_read_yet != e->msgno)))
         {
           if (e->replied)
             ch = get_nth_wchar(C_FlagChars, FLAG_CHAR_REPLIED);
@@ -1396,7 +1396,7 @@ static const char *index_format_str(char *buf, size_t buflen, size_t col, int co
         first = get_nth_wchar(C_FlagChars, FLAG_CHAR_NEW_THREAD);
       else if (threads && thread_is_old(ctx, e))
         first = get_nth_wchar(C_FlagChars, FLAG_CHAR_OLD_THREAD);
-      else if (e->read && (ctx && (ctx->msgnotreadyet != e->msgno)))
+      else if (e->read && (ctx && (ctx->msg_not_read_yet != e->msgno)))
       {
         if (e->replied)
           first = get_nth_wchar(C_FlagChars, FLAG_CHAR_REPLIED);
diff --git a/mx.c b/mx.c
index 2ce9d7b8af683f9b832868ab3addfb49661c46dc..fd2828c955e4c49877f3884b2b9b08da1c42ca91 100644 (file)
--- a/mx.c
+++ b/mx.c
@@ -291,7 +291,7 @@ struct Context *mx_mbox_open(struct Mailbox *m, OpenMailboxFlags flags)
     }
   }
 
-  ctx->msgnotreadyet = -1;
+  ctx->msg_not_read_yet = -1;
   ctx->collapsed = false;
 
   m->size = 0;
diff --git a/pager.c b/pager.c
index 6ed6a39944632cbc825b7607bf24b4f00f516aa6..63484a807791388955b643407c311b4aefa16cd3 100644 (file)
--- a/pager.c
+++ b/pager.c
@@ -2287,7 +2287,7 @@ int mutt_pager(const char *banner, const char *fname, PagerFlags flags, struct P
 
   if (Context && IsEmail(extra) && !extra->email->read)
   {
-    Context->msgnotreadyet = extra->email->msgno;
+    Context->msg_not_read_yet = extra->email->msgno;
     mutt_set_flag(Context->mailbox, extra->email, MUTT_READ, true);
   }
 
@@ -3379,7 +3379,7 @@ int mutt_pager(const char *banner, const char *fname, PagerFlags flags, struct P
         else if (!first)
           mutt_set_flag(Context->mailbox, extra->email, MUTT_READ, true);
         first = false;
-        Context->msgnotreadyet = -1;
+        Context->msg_not_read_yet = -1;
         pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX;
         if (C_Resolve)
         {
@@ -3553,7 +3553,7 @@ int mutt_pager(const char *banner, const char *fname, PagerFlags flags, struct P
   if (IsEmail(extra))
   {
     if (Context)
-      Context->msgnotreadyet = -1;
+      Context->msg_not_read_yet = -1;
     switch (rc)
     {
       case -1: