]> granicus.if.org Git - neomutt/commitdiff
de-dupe globals
authorRichard Russon <rich@flatcap.org>
Sat, 21 Jul 2018 00:00:21 +0000 (01:00 +0100)
committerRichard Russon <rich@flatcap.org>
Sat, 21 Jul 2018 00:31:48 +0000 (01:31 +0100)
conn/conn_globals.c
conn/conn_globals.h
conn/conn_raw.c
conn/ssl_gnutls.c
globals.h
init.h
main.c

index ecbeda4befe9bbfa2f4a2496de46f78cb78c77c2..712d7cc09474e180e25f604699df9ac28d8c0d8a 100644 (file)
@@ -27,6 +27,7 @@
  */
 
 #include "config.h"
+#include <stdbool.h>
 #include <stdio.h>
 
 short ConnectTimeout = 0; /**< Config: Timeout for a network connection (for IMAP, POP or SMTP) */
@@ -46,3 +47,12 @@ short SslMinDhPrimeBits = 0; /**< Config: Minimum keysize for Diffie-Hellman key
 const char *Preconnect = NULL; /**< Config: Shell command to run before making a connection */
 const char *Tunnel = NULL; /**< Config: Shell command to establish a tunnel */
 #endif
+
+#ifdef USE_SSL
+bool SslUseSslv3;
+bool SslUseTlsv1;
+bool SslUseTlsv11;
+bool SslUseTlsv12;
+bool SslVerifyDates;
+bool SslVerifyHost;
+#endif
index 17688b65f5a5e7c3b23513a91928ac86af42d6c4..4bd9a53a204c189ecdfbb7133bf2770ee971877e 100644 (file)
@@ -45,14 +45,17 @@ extern const char *Tunnel;
 #endif
 
 /* These Config Variables are only used in conn/conn_raw.c */
+#ifdef HAVE_GETADDRINFO
 extern bool UseIpv6;
+#endif
 
-/* These Config Variables are only used in conn/ssl_gnutls.c */
+#ifdef USE_SSL
 extern bool SslUseSslv3;
 extern bool SslUseTlsv1;
 extern bool SslUseTlsv11;
 extern bool SslUseTlsv12;
 extern bool SslVerifyDates;
 extern bool SslVerifyHost;
+#endif
 
 #endif /* _CONN_GLOBALS_H */
index 13d6fe7bb39e9a120492f57799030efd03238998..903d2f76b89c7c833df66dc8ac97d5cee9a47b18 100644 (file)
 #include "globals.h"
 #include "options.h"
 
+/* These Config Variables are only used in conn/conn_raw.c */
+#ifdef HAVE_GETADDRINFO
+bool UseIpv6;
+#endif
+
 /**
  * socket_connect - set up to connect to a socket fd
  * @param fd File descriptor to connect with
index ce0625c32c5d42046ac01b1e01faca4284693ea8..059cdf29a7c2908693c2af693dd1e3804221f023 100644 (file)
 #include "protos.h"
 #include "socket.h"
 
-/* These Config Variables are only used in conn/ssl_gnutls.c */
-bool SslUseSslv3;
-bool SslUseTlsv1;
-bool SslUseTlsv11;
-bool SslUseTlsv12;
-bool SslVerifyDates;
-bool SslVerifyHost;
-
 /* certificate error bitmap values */
 #define CERTERR_VALID 0
 #define CERTERR_EXPIRED 1
index 5fb1c57f524aebf50d6c8daefec194cae85941e2..ca59820cb1704382e6ea1b61d5c7f8192bf7c25b 100644 (file)
--- a/globals.h
+++ b/globals.h
@@ -232,13 +232,7 @@ WHERE bool ImapPeek;
 WHERE bool SslUsesystemcerts;
 WHERE bool SslUseSslv2;
 #endif /* USE_SSL_GNUTLS */
-WHERE bool SslUseSslv3;
-WHERE bool SslUseTlsv1;
-WHERE bool SslUseTlsv11;
-WHERE bool SslUseTlsv12;
 WHERE bool SslForceTls;
-WHERE bool SslVerifyDates;
-WHERE bool SslVerifyHost;
 #if defined(USE_SSL_OPENSSL) && defined(HAVE_SSL_PARTIAL_CHAIN)
 WHERE bool SslVerifyPartialChains;
 #endif /* USE_SSL_OPENSSL */
@@ -252,7 +246,6 @@ WHERE bool MessageCacheClean;
 WHERE bool ReadOnly;
 WHERE bool Resolve;
 WHERE bool ResumeDraftFiles;
-WHERE bool ResumeEditedDraftFiles;
 WHERE bool SaveAddress;
 WHERE bool SaveEmpty;
 WHERE bool Score;
@@ -265,9 +258,6 @@ WHERE bool Suspend;
 WHERE bool TextFlowed;
 WHERE bool TsEnabled;
 WHERE bool UseDomain;
-#ifdef HAVE_GETADDRINFO
-WHERE bool UseIpv6;
-#endif
 WHERE bool WaitKey;
 WHERE bool WrapSearch;
 WHERE bool WriteBcc; /**< write out a bcc header? */
diff --git a/init.h b/init.h
index 65c31687b1f054bffd4d10db3d09aa4f58035e16..baeaebf4d33d44e0e6a1502d1776c453f81dfbe3 100644 (file)
--- a/init.h
+++ b/init.h
@@ -52,6 +52,7 @@
 #include "imap/imap.h"
 #include "keymap.h"
 #include "maildir/maildir.h"
+#include "main.h"
 #include "menu.h"
 #include "mutt_account.h"
 #include "mutt_commands.h"
diff --git a/main.c b/main.c
index 22b45ffa869ee2239fee73e7f0fb78df5b33ec3f..12ed2caf22ded0d28faa8588d973f71b60081712 100644 (file)
--- a/main.c
+++ b/main.c
@@ -80,6 +80,9 @@
 #include "nntp/nntp.h"
 #endif
 
+/* These Config Variables are only used in main.c */
+bool ResumeEditedDraftFiles;
+
 #define MUTT_IGNORE (1 << 0)  /* -z */
 #define MUTT_BUFFY (1 << 1)   /* -Z */
 #define MUTT_NOSYSRC (1 << 2) /* -n */