]> granicus.if.org Git - neomutt/commitdiff
move all config variables to the end of the file
authorRichard Russon <rich@flatcap.org>
Tue, 31 Oct 2017 13:41:32 +0000 (13:41 +0000)
committerRichard Russon <rich@flatcap.org>
Thu, 28 Dec 2017 20:16:27 +0000 (20:16 +0000)
buffy.h
conn/conn_globals.h
globals.h
mutt.h
mx.h
options.h
sort.h

diff --git a/buffy.h b/buffy.h
index ae88193a14b1b1a8c3189f339c91fdbe6924ca38..11864471b2b172d0254cde42355fef83231fae1b 100644 (file)
--- a/buffy.h
+++ b/buffy.h
@@ -61,8 +61,6 @@ struct Buffy
 };
 
 WHERE struct Buffy *Incoming;
-WHERE short MailCheck;
-WHERE short MailCheckStatsInterval;
 
 #ifdef USE_NOTMUCH
 void mutt_buffy_vfolder(char *s, size_t slen);
@@ -82,4 +80,8 @@ void mutt_buffy_setnotified(const char *path);
 
 bool mh_buffy(struct Buffy *mailbox, bool check_stats);
 
+/* These variables are backing for config items */
+WHERE short MailCheck;
+WHERE short MailCheckStatsInterval;
+
 #endif /* _MUTT_BUFFY_H */
index 5b8d4e1632219103ea56f88f719ea0139213f80f..23d3d64c83c0e22513f55b1576c5d7c524c39169 100644 (file)
@@ -23,6 +23,7 @@
 #ifndef _CONN_GLOBALS_H
 #define _CONN_GLOBALS_H
 
+/* These variables are backing for config items */
 short ConnectTimeout;
 
 #ifdef USE_SSL
index aef3edcaedc003287cba7d4c17a5e0b81b54d876..9118394ff282f4ff17cbd3e0a9277fc38b4f36b9 100644 (file)
--- a/globals.h
+++ b/globals.h
@@ -40,6 +40,75 @@ WHERE struct Context *Context;
 WHERE char ErrorBuf[STRING];
 WHERE char AttachmentMarker[STRING];
 
+WHERE char *HomeDir;
+WHERE char *ShortHostname;
+
+WHERE struct ListHead Muttrc INITVAL(STAILQ_HEAD_INITIALIZER(Muttrc));
+
+WHERE short TSSupported;
+WHERE char *Username;
+
+WHERE char *CurrentFolder;
+WHERE char *LastFolder;
+
+WHERE const char *GitVer;
+
+WHERE struct Hash *Groups;
+WHERE struct Hash *ReverseAliases;
+WHERE struct Hash *TagTransforms;
+WHERE struct Hash *TagFormats;
+
+WHERE struct ListHead AutoViewList INITVAL(STAILQ_HEAD_INITIALIZER(AutoViewList));
+WHERE struct ListHead AlternativeOrderList INITVAL(STAILQ_HEAD_INITIALIZER(AlternativeOrderList));
+WHERE struct ListHead AttachAllow INITVAL(STAILQ_HEAD_INITIALIZER(AttachAllow));
+WHERE struct ListHead AttachExclude INITVAL(STAILQ_HEAD_INITIALIZER(AttachExclude));
+WHERE struct ListHead InlineAllow INITVAL(STAILQ_HEAD_INITIALIZER(InlineAllow));
+WHERE struct ListHead InlineExclude INITVAL(STAILQ_HEAD_INITIALIZER(InlineExclude));
+WHERE struct ListHead HeaderOrderList INITVAL(STAILQ_HEAD_INITIALIZER(HeaderOrderList));
+WHERE struct ListHead Ignore INITVAL(STAILQ_HEAD_INITIALIZER(Ignore));
+WHERE struct ListHead MailToAllow INITVAL(STAILQ_HEAD_INITIALIZER(MailToAllow));
+WHERE struct ListHead MimeLookupList INITVAL(STAILQ_HEAD_INITIALIZER(MimeLookupList));
+WHERE struct ListHead UnIgnore INITVAL(STAILQ_HEAD_INITIALIZER(UnIgnore));
+
+WHERE struct RegexList *Alternates;
+WHERE struct RegexList *UnAlternates;
+WHERE struct RegexList *MailLists;
+WHERE struct RegexList *UnMailLists;
+WHERE struct RegexList *SubscribedLists;
+WHERE struct RegexList *UnSubscribedLists;
+WHERE struct ReplaceList *SpamList;
+WHERE struct RegexList *NoSpamList;
+WHERE struct ReplaceList *SubjectRegexList;
+
+WHERE unsigned short Counter;
+
+#ifdef USE_SIDEBAR
+WHERE struct ListHead SidebarWhitelist INITVAL(STAILQ_HEAD_INITIALIZER(SidebarWhitelist));
+#endif
+
+/* flags for received signals */
+WHERE SIG_ATOMIC_VOLATILE_T SigAlrm;
+WHERE SIG_ATOMIC_VOLATILE_T SigInt;
+WHERE SIG_ATOMIC_VOLATILE_T SigWinch;
+
+WHERE int CurrentMenu;
+
+WHERE struct Alias *Aliases;
+WHERE struct ListHead UserHeader INITVAL(STAILQ_HEAD_INITIALIZER(UserHeader));
+
+#ifdef MAIN_C
+const char *const BodyTypes[] = {
+    "x-unknown", "audio",     "application", "image", "message",
+    "model",     "multipart", "text",        "video", "*",
+};
+const char *const BodyEncodings[] = {
+    "x-unknown", "7bit",   "8bit",        "quoted-printable",
+    "base64",    "binary", "x-uuencoded",
+};
+#endif
+
+/* All the variables below are backing for config items */
+
 WHERE struct Address *EnvelopeFromAddress;
 WHERE struct Address *From;
 
@@ -70,8 +139,7 @@ WHERE char *Hostname;
 WHERE struct MbTable *FromChars;
 WHERE char *IndexFormat;
 WHERE char *HistoryFile;
-WHERE char *HomeDir;
-WHERE char *ShortHostname;
+
 #ifdef USE_IMAP
 WHERE char *ImapAuthenticators;
 WHERE char *ImapDelimChars;
@@ -110,7 +178,6 @@ WHERE char *Mixmaster;
 WHERE char *MixEntryFormat;
 #endif
 
-WHERE struct ListHead Muttrc INITVAL(STAILQ_HEAD_INITIALIZER(Muttrc));
 #ifdef USE_NNTP
 WHERE char *GroupIndexFormat;
 WHERE char *Inews;
@@ -170,42 +237,9 @@ WHERE struct MbTable *FlagChars;
 WHERE char *Trash;
 WHERE char *TSStatusFormat;
 WHERE char *TSIconFormat;
-WHERE short TSSupported;
-WHERE char *Username;
 WHERE char *Visual;
 
-WHERE char *CurrentFolder;
-WHERE char *LastFolder;
-
-WHERE const char *GitVer;
-
-WHERE struct Hash *Groups;
-WHERE struct Hash *ReverseAliases;
-WHERE struct Hash *TagFormats;
-
-WHERE struct ListHead AutoViewList INITVAL(STAILQ_HEAD_INITIALIZER(AutoViewList));
-WHERE struct ListHead AlternativeOrderList INITVAL(STAILQ_HEAD_INITIALIZER(AlternativeOrderList));
-WHERE struct ListHead AttachAllow INITVAL(STAILQ_HEAD_INITIALIZER(AttachAllow));
-WHERE struct ListHead AttachExclude INITVAL(STAILQ_HEAD_INITIALIZER(AttachExclude));
-WHERE struct ListHead InlineAllow INITVAL(STAILQ_HEAD_INITIALIZER(InlineAllow));
-WHERE struct ListHead InlineExclude INITVAL(STAILQ_HEAD_INITIALIZER(InlineExclude));
-WHERE struct ListHead HeaderOrderList INITVAL(STAILQ_HEAD_INITIALIZER(HeaderOrderList));
-WHERE struct ListHead Ignore INITVAL(STAILQ_HEAD_INITIALIZER(Ignore));
-WHERE struct ListHead MailToAllow INITVAL(STAILQ_HEAD_INITIALIZER(MailToAllow));
-WHERE struct ListHead MimeLookupList INITVAL(STAILQ_HEAD_INITIALIZER(MimeLookupList));
-WHERE struct ListHead UnIgnore INITVAL(STAILQ_HEAD_INITIALIZER(UnIgnore));
-
-WHERE struct RegexList *Alternates;
-WHERE struct RegexList *UnAlternates;
-WHERE struct RegexList *MailLists;
-WHERE struct RegexList *UnMailLists;
-WHERE struct RegexList *SubscribedLists;
-WHERE struct RegexList *UnSubscribedLists;
-WHERE struct ReplaceList *SpamList;
-WHERE struct RegexList *NoSpamList;
-WHERE struct ReplaceList *SubjectRegexList;
-
-WHERE unsigned short Counter;
+WHERE char *HiddenTags;
 
 #ifdef USE_NNTP
 WHERE short NntpPoll;
@@ -238,25 +272,13 @@ WHERE short ScoreThresholdFlag;
 #ifdef USE_SIDEBAR
 WHERE short SidebarComponentDepth;
 WHERE short SidebarWidth;
-WHERE struct ListHead SidebarWhitelist INITVAL(STAILQ_HEAD_INITIALIZER(SidebarWhitelist));
 #endif
-
 #ifdef USE_IMAP
 WHERE short ImapKeepalive;
 WHERE short ImapPipelineDepth;
 WHERE short ImapPollTimeout;
 #endif
 
-/* flags for received signals */
-WHERE SIG_ATOMIC_VOLATILE_T SigAlrm;
-WHERE SIG_ATOMIC_VOLATILE_T SigInt;
-WHERE SIG_ATOMIC_VOLATILE_T SigWinch;
-
-WHERE int CurrentMenu;
-
-WHERE struct Alias *Aliases;
-WHERE struct ListHead UserHeader INITVAL(STAILQ_HEAD_INITIALIZER(UserHeader));
-
 /* -- formerly in pgp.h -- */
 WHERE struct Regex *PgpGoodSign;
 WHERE struct Regex *PgpDecryptionOkay;
@@ -320,15 +342,4 @@ WHERE struct Regex *QuoteRegexp;
 WHERE struct Regex *ReplyRegexp;
 WHERE struct Regex *Smileys;
 
-#ifdef MAIN_C
-const char *const BodyTypes[] = {
-    "x-unknown", "audio",     "application", "image", "message",
-    "model",     "multipart", "text",        "video", "*",
-};
-const char *const BodyEncodings[] = {
-    "x-unknown", "7bit",   "8bit",        "quoted-printable",
-    "base64",    "binary", "x-uuencoded",
-};
-#endif
-
 #endif /* _MUTT_GLOBALS_H */
diff --git a/mutt.h b/mutt.h
index 4bcc13220a0c4520bb2c7ce8cab31e846f75dedd..0f6c760d6240b8d5b8928d90616318d98aac5524 100644 (file)
--- a/mutt.h
+++ b/mutt.h
@@ -229,42 +229,6 @@ enum QuadOptionResponse
   MUTT_ASKYES
 };
 
-/* Quad-options */
-WHERE unsigned char AbortUnmodified;
-WHERE unsigned char Bounce;
-WHERE unsigned char Copy;
-WHERE unsigned char Delete;
-WHERE unsigned char ForwardEdit;
-WHERE unsigned char FccAttach;
-WHERE unsigned char Include;
-WHERE unsigned char HonorFollowupTo;
-WHERE unsigned char MimeForward;
-WHERE unsigned char MimeForwardRest;
-WHERE unsigned char Move;
-WHERE unsigned char PgpMimeAuto; /* ask to revert to PGP/MIME when inline fails */
-WHERE unsigned char SmimeEncryptSelf;
-WHERE unsigned char PgpEncryptSelf;
-#ifdef USE_POP
-WHERE unsigned char PopDelete;
-WHERE unsigned char PopReconnect;
-#endif
-WHERE unsigned char Postpone;
-WHERE unsigned char Print;
-WHERE unsigned char Quit;
-WHERE unsigned char ReplyTo;
-WHERE unsigned char Recall;
-#ifdef USE_SSL
-WHERE unsigned char SslStarttls;
-#endif
-WHERE unsigned char AbortNosubject;
-WHERE unsigned char CryptVerifySig; /* verify PGP signatures */
-#ifdef USE_NNTP
-WHERE unsigned char PostModerated;
-WHERE unsigned char CatchupNewsgroup;
-WHERE unsigned char FollowupToPoster;
-#endif
-WHERE unsigned char AbortNoattach; /* forgotten attachment detector */
-
 /* flags to ci_send_message() */
 #define SENDREPLY        (1 << 0)
 #define SENDGROUPREPLY   (1 << 1)
@@ -336,4 +300,42 @@ extern int debuglevel;
 extern char *debugfile_cmdline;
 extern int debuglevel_cmdline;
 
+/* All the variables below are backing for config items */
+
+/* Quad-options */
+WHERE unsigned char AbortUnmodified;
+WHERE unsigned char Bounce;
+WHERE unsigned char Copy;
+WHERE unsigned char Delete;
+WHERE unsigned char ForwardEdit;
+WHERE unsigned char FccAttach;
+WHERE unsigned char Include;
+WHERE unsigned char HonorFollowupTo;
+WHERE unsigned char MimeForward;
+WHERE unsigned char MimeForwardRest;
+WHERE unsigned char Move;
+WHERE unsigned char PgpMimeAuto; /* ask to revert to PGP/MIME when inline fails */
+WHERE unsigned char SmimeEncryptSelf;
+WHERE unsigned char PgpEncryptSelf;
+#ifdef USE_POP
+WHERE unsigned char PopDelete;
+WHERE unsigned char PopReconnect;
+#endif
+WHERE unsigned char Postpone;
+WHERE unsigned char Print;
+WHERE unsigned char Quit;
+WHERE unsigned char ReplyTo;
+WHERE unsigned char Recall;
+#ifdef USE_SSL
+WHERE unsigned char SslStarttls;
+#endif
+WHERE unsigned char AbortNosubject;
+WHERE unsigned char CryptVerifySig; /* verify PGP signatures */
+#ifdef USE_NNTP
+WHERE unsigned char PostModerated;
+WHERE unsigned char CatchupNewsgroup;
+WHERE unsigned char FollowupToPoster;
+#endif
+WHERE unsigned char AbortNoattach; /* forgotten attachment detector */
+
 #endif /* _MUTT_H */
diff --git a/mx.h b/mx.h
index b358e76322949b6bb5f040b614223592518c397c..0a27f41a04194cd2f0a67439c08c90a8dbe0f340 100644 (file)
--- a/mx.h
+++ b/mx.h
@@ -83,8 +83,6 @@ enum MailboxFormat
   MUTT_COMPRESSED,
 };
 
-WHERE short MboxType;
-
 #define MMDF_SEP "\001\001\001\001\n"
 
 void mbox_reset_atime(struct Context *ctx, struct stat *st);
@@ -127,4 +125,7 @@ extern struct MxOps mx_mbox_ops;
 extern struct MxOps mx_mh_ops;
 extern struct MxOps mx_mmdf_ops;
 
+/* This variable is backing for a config item */
+WHERE short MboxType;
+
 #endif /* _MUTT_MX_H */
index 4a3c313fdc2d9e554625c51ea0320d4af6f4f802..2f8116527b0fbeca2b9b06abab35e5d848e33937 100644 (file)
--- a/options.h
+++ b/options.h
 #include <stdbool.h>
 #include "where.h"
 
+/* pseudo options */
+
+WHERE bool OPT_AUX_SORT;           /**< (pseudo) using auxiliary sort function */
+WHERE bool OPT_FORCE_REFRESH;      /**< (pseudo) refresh even during macros */
+WHERE bool OPT_NO_CURSES;          /**< (pseudo) when sending in batch mode */
+WHERE bool OPT_SEARCH_REVERSE;     /**< (pseudo) used by ci_search_command */
+WHERE bool OPT_MSG_ERR;            /**< (pseudo) used by mutt_error/mutt_message */
+WHERE bool OPT_SEARCH_INVALID;     /**< (pseudo) used to invalidate the search pat */
+WHERE bool OPT_SIGNALS_BLOCKED;    /**< (pseudo) using by mutt_block_signals () */
+WHERE bool OPT_SYS_SIGNALS_BLOCKED; /**< (pseudo) using by mutt_block_signals_system () */
+WHERE bool OPT_NEED_RESORT;        /**< (pseudo) used to force a re-sort */
+WHERE bool OPT_RESORT_INIT;        /**< (pseudo) used to force the next resort to be from scratch */
+WHERE bool OPT_VIEW_ATTACH;        /**< (pseudo) signals that we are viewing attachments */
+WHERE bool OPT_SORT_SUBTHREADS;    /**< (pseudo) used when $sort_aux changes */
+WHERE bool OPT_NEED_RESCORE;       /**< (pseudo) set when the `score' command is used */
+WHERE bool OPT_ATTACH_MSG;         /**< (pseudo) used by attach-message */
+WHERE bool OPT_HIDE_READ;          /**< (pseudo) whether or not hide read messages */
+WHERE bool OPT_KEEP_QUIET;         /**< (pseudo) shut up the message and refresh functions while we are executing an external program.  */
+WHERE bool OPT_MENU_CALLER;        /**< (pseudo) tell menu to give caller a take */
+WHERE bool OPT_REDRAW_TREE;        /**< (pseudo) redraw the thread tree */
+WHERE bool OPT_PGP_CHECK_TRUST;     /**< (pseudo) used by pgp_select_key () */
+WHERE bool OPT_DONT_HANDLE_PGP_KEYS; /**< (pseudo) used to extract PGP keys */
+WHERE bool OPT_IGNORE_MACRO_EVENTS; /**< (pseudo) don't process macro/push/exec events while set */
+
+#ifdef USE_NNTP
+WHERE bool OPT_NEWS;              /**< (pseudo) used to change reader mode */
+WHERE bool OPT_NEWS_SEND;          /**< (pseudo) used to change behavior when posting */
+#endif
+
+#define mutt_bit_set(v, n)    v[n / 8] |= (1 << (n % 8))
+#define mutt_bit_unset(v, n)  v[n / 8] &= ~(1 << (n % 8))
+#define mutt_bit_toggle(v, n) v[n / 8] ^= (1 << (n % 8))
+#define mutt_bit_isset(v, n)  (v[n / 8] & (1 << (n % 8)))
+
+/* All the variables below are backing for config items */
+
 WHERE bool Allow8bit;
 WHERE bool AllowAnsi;
 WHERE bool ArrowCursor;
@@ -239,41 +275,9 @@ WHERE bool NntpLoadDescription;
 WHERE bool XCommentTo;
 #endif
 
-/* pseudo options */
-
-WHERE bool OPT_AUX_SORT;           /**< (pseudo) using auxiliary sort function */
-WHERE bool OPT_FORCE_REFRESH;      /**< (pseudo) refresh even during macros */
-WHERE bool OPT_NO_CURSES;          /**< (pseudo) when sending in batch mode */
-WHERE bool OPT_SEARCH_REVERSE;     /**< (pseudo) used by ci_search_command */
-WHERE bool OPT_MSG_ERR;            /**< (pseudo) used by mutt_error/mutt_message */
-WHERE bool OPT_SEARCH_INVALID;     /**< (pseudo) used to invalidate the search pat */
-WHERE bool OPT_NEED_RESORT;        /**< (pseudo) used to force a re-sort */
-WHERE bool OPT_RESORT_INIT;        /**< (pseudo) used to force the next resort to be from scratch */
-WHERE bool OPT_VIEW_ATTACH;        /**< (pseudo) signals that we are viewing attachments */
-WHERE bool OPT_SORT_SUBTHREADS;    /**< (pseudo) used when $sort_aux changes */
-WHERE bool OPT_NEED_RESCORE;       /**< (pseudo) set when the `score' command is used */
-WHERE bool OPT_ATTACH_MSG;         /**< (pseudo) used by attach-message */
-WHERE bool OPT_HIDE_READ;          /**< (pseudo) whether or not hide read messages */
-WHERE bool OPT_KEEP_QUIET;         /**< (pseudo) shut up the message and refresh functions while we are executing an external program.  */
-WHERE bool OPT_MENU_CALLER;        /**< (pseudo) tell menu to give caller a take */
-WHERE bool OPT_REDRAW_TREE;        /**< (pseudo) redraw the thread tree */
-WHERE bool OPT_PGP_CHECK_TRUST;     /**< (pseudo) used by pgp_select_key () */
-WHERE bool OPT_DONT_HANDLE_PGP_KEYS; /**< (pseudo) used to extract PGP keys */
-WHERE bool OPT_IGNORE_MACRO_EVENTS; /**< (pseudo) don't process macro/push/exec events while set */
-
-#ifdef USE_NNTP
-WHERE bool OPT_NEWS;              /**< (pseudo) used to change reader mode */
-WHERE bool OPT_NEWS_SEND;          /**< (pseudo) used to change behavior when posting */
-#endif
 #ifdef USE_NOTMUCH
 WHERE bool VirtualSpoolfile;
 WHERE bool NmRecord;
 #endif
 
-
-#define mutt_bit_set(v, n)    v[n / 8] |= (1 << (n % 8))
-#define mutt_bit_unset(v, n)  v[n / 8] &= ~(1 << (n % 8))
-#define mutt_bit_toggle(v, n) v[n / 8] ^= (1 << (n % 8))
-#define mutt_bit_isset(v, n)  (v[n / 8] & (1 << (n % 8)))
-
 #endif /* _MUTT_OPTIONS_H_ */
diff --git a/sort.h b/sort.h
index 18c66a7210e60fb9ffe13f70db16ed9c55537d78..5da3fab271e3a52b0518d352f6674e82d2748e44 100644 (file)
--- a/sort.h
+++ b/sort.h
@@ -73,6 +73,11 @@ sort_t *mutt_get_sort_func(int method);
 void mutt_sort_headers(struct Context *ctx, int init);
 int mutt_select_sort(int reverse);
 
+extern const struct Mapping SortMethods[];
+
+const char *mutt_get_name(struct Address *a);
+
+/* These variables are backing for config items */
 WHERE short SortBrowser;
 WHERE short Sort;
 WHERE short SortAux; /* auxiliary sorting method */
@@ -82,8 +87,4 @@ WHERE short SidebarSortMethod;
 /* FIXME: This one does not belong to here */
 WHERE short PgpSortKeys;
 
-extern const struct Mapping SortMethods[];
-
-const char *mutt_get_name(struct Address *a);
-
 #endif /* _MUTT_SORT_H */