]> granicus.if.org Git - neomutt/commitdiff
drop header-sized ifdefs
authorRichard Russon <rich@flatcap.org>
Sun, 19 Aug 2018 00:17:47 +0000 (01:17 +0100)
committerRichard Russon <rich@flatcap.org>
Sun, 19 Aug 2018 12:44:08 +0000 (13:44 +0100)
15 files changed:
globals.h
init.h
ncrypt/crypt_mod_pgp_classic.c
ncrypt/crypt_mod_smime_classic.c
ncrypt/gnupgparse.c
ncrypt/pgp.c
ncrypt/pgp.h
ncrypt/pgpinvoke.c
ncrypt/pgpkey.c
ncrypt/pgplib.c
ncrypt/pgplib.h
ncrypt/smime.c
ncrypt/smime.h
remailer.c
remailer.h

index 51c9d4c9f5c11631bd3061b28127b0b3a945e7ed..0b9351837a8d396d8a0f4c6a7587237c0f52502c 100644 (file)
--- a/globals.h
+++ b/globals.h
@@ -166,12 +166,10 @@ WHERE short ImapKeepalive;                 ///< Config: (imap) Time to wait befo
 WHERE short ImapPollTimeout;               ///< Config: (imap) Maximum time to wait for a server response
 #endif
 
-/* -- formerly in pgp.h -- */
 WHERE char *PgpDefaultKey;                 ///< Config: Default key to use for PGP operations
 WHERE char *PgpSignAs;                     ///< Config: Use this alternative key for signing messages
 WHERE char *PgpEntryFormat;                ///< Config: printf-like format string for the PGP key selection menu
 
-/* -- formerly in smime.h -- */
 WHERE char *SmimeDefaultKey;               ///< Config: Default key for SMIME operations
 WHERE char *SmimeSignAs;                   ///< Config: Use this alternative key for signing messages
 WHERE char *SmimeEncryptWith;              ///< Config: Algorithm for encryption
diff --git a/init.h b/init.h
index cad6eae19fa2eb369bc6943bbb1dadb5fffac8ac..f1f4b1e9fb5e772171e4940f82ae3858859ac48c 100644 (file)
--- a/init.h
+++ b/init.h
@@ -73,7 +73,6 @@
 #include "query.h"
 #include "recvattach.h"
 #include "recvcmd.h"
-#include "remailer.h"
 #include "rfc1524.h"
 #include "rfc3676.h"
 #include "score.h"
@@ -83,6 +82,9 @@
 #include "smtp.h"
 #include "sort.h"
 #include "status.h"
+#ifdef MIXMASTER
+#include "remailer.h"
+#endif
 #ifdef USE_LUA
 #include "mutt_lua.h"
 #endif
index 63474aa53e8a5ea7d40adee012de970275e5b815..9a965f39f9b4167a9494949eb5baf66ecf806059 100644 (file)
 #include <stdio.h>
 #include "crypt_mod.h"
 #include "ncrypt.h"
-#include "pgp.h"
 #include "pgpinvoke.h"
 #include "pgpkey.h"
+#ifdef CRYPT_BACKEND_CLASSIC_PGP
+#include "pgp.h"
+#endif
 
 // clang-format off
 struct CryptModuleSpecs crypt_mod_pgp_classic = {
index a7a23e15c8a88c4f64ec2a152fda01136a9ebc21..28cae5df3613d62c5fb6d9498fa4b2446995ce83 100644 (file)
@@ -30,7 +30,9 @@
 #include <stdio.h>
 #include "crypt_mod.h"
 #include "ncrypt.h"
+#ifdef CRYPT_BACKEND_CLASSIC_SMIME
 #include "smime.h"
+#endif
 
 // clang-format off
 struct CryptModuleSpecs crypt_mod_smime_classic = {
index 9f632267f18e3758435a421c4ff772168d0622f4..10f0bc152dd6c9a69fc7f84e6f15bd693da6d7c3 100644 (file)
@@ -48,7 +48,9 @@
 #include "ncrypt.h"
 #include "pgpinvoke.h"
 #include "pgpkey.h"
+#ifdef CRYPT_BACKEND_CLASSIC_PGP
 #include "pgplib.h"
+#endif
 
 /****************
  * Read the GNUPG keys.  For now we read the complete keyring by
index 3d06da3d332e3975c812a6d685c5d9ed9a892547..9bf8dc9031a03e577ccd3cfb6965cea3bb71baf2 100644 (file)
@@ -45,7 +45,6 @@
 #include "config/lib.h"
 #include "email/email.h"
 #include "mutt.h"
-#include "pgp.h"
 #include "crypt.h"
 #include "cryptglue.h"
 #include "curs_lib.h"
 #include "options.h"
 #include "pgpinvoke.h"
 #include "pgpkey.h"
-#include "pgplib.h"
 #include "pgpmicalg.h"
 #include "sendlib.h"
 #include "state.h"
+#ifdef CRYPT_BACKEND_CLASSIC_PGP
+#include "pgp.h"
+#include "pgplib.h"
+#endif
 
 /* These Config Variables are only used in ncrypt/pgp.c */
 bool PgpCheckExit; ///< Config: Check the exit code of PGP subprocess
index e141941b87034dee42e93b2b4f1321199aacea54..5c65ad46caa9d4379de2223c125e0febf92d0afa 100644 (file)
@@ -25,8 +25,6 @@
 #ifndef _NCRYPT_PGP_H
 #define _NCRYPT_PGP_H
 
-#ifdef CRYPT_BACKEND_CLASSIC_PGP
-
 #include <stdbool.h>
 #include <stdio.h>
 
@@ -63,6 +61,4 @@ struct Body *pgp_class_sign_message(struct Body *a);
 
 int pgp_class_send_menu(struct Header *msg);
 
-#endif /* CRYPT_BACKEND_CLASSIC_PGP */
-
 #endif /* _NCRYPT_PGP_H */
index d9980eea28fab67e6cffe982d1b62317350a6f48..b195fd0a6f7772ddfb1a42f81c4de95adafef95b 100644 (file)
 #include "mutt_window.h"
 #include "muttlib.h"
 #include "ncrypt.h"
-#include "pgp.h"
 #include "pgpkey.h"
 #include "protos.h"
+#ifdef CRYPT_BACKEND_CLASSIC_PGP
+#include "pgp.h"
+#endif
 
 /* These Config Variables are only used in ncrypt/pgpinvoke.c */
 char *PgpClearsignCommand; ///< Config: (pgp) External command to inline-sign a messsage
index cba0731e97f5ba54c8bd78c5bbb6bf78f3521706..2c9c63c0e7191862bd66f2890eb08080e1b690e2 100644 (file)
 #include "ncrypt.h"
 #include "opcodes.h"
 #include "options.h"
-#include "pgp.h"
 #include "pgpinvoke.h"
-#include "pgplib.h"
 #include "protos.h"
 #include "recvattach.h"
 #include "sendlib.h"
 #include "sort.h"
+#ifdef CRYPT_BACKEND_CLASSIC_PGP
+#include "pgp.h"
+#include "pgplib.h"
+#endif
 
 /**
  * struct PgpCache - List of cached PGP keys
index 9aa68c26d7846641f6af103e227b80230e09c7dc..a1970f5c323c1bf654375ac10b5a5d2deb2f25d4 100644 (file)
@@ -29,7 +29,9 @@
 #include "config.h"
 #include <stdbool.h>
 #include "mutt/mutt.h"
+#ifdef CRYPT_BACKEND_CLASSIC_PGP
 #include "pgplib.h"
+#endif
 
 /**
  * pgp_pkalgbytype - Get the name of the algorithm from its ID
index f3133172191471f1a85f2824042e779bacb5fad6..124b5fc1a7b4e59038a2c582d7861aa6433d9e82 100644 (file)
@@ -24,8 +24,6 @@
 #ifndef _NCRYPT_PGPLIB_H
 #define _NCRYPT_PGPLIB_H
 
-#ifdef CRYPT_BACKEND_CLASSIC_PGP
-
 #include <stdbool.h>
 #include <time.h>
 
@@ -72,6 +70,4 @@ struct PgpKeyInfo *pgp_remove_key(struct PgpKeyInfo **klist, struct PgpKeyInfo *
 
 struct PgpKeyInfo *pgp_new_keyinfo(void);
 
-#endif /* CRYPT_BACKEND_CLASSIC_PGP */
-
 #endif /* _NCRYPT_PGPLIB_H */
index 24c95c3c505b403123ba33a2108709fa3bd9940c..4f74c35b9fe85ac17fb2c43a6d81bc9ca715861e 100644 (file)
@@ -39,7 +39,6 @@
 #include "config/lib.h"
 #include "email/email.h"
 #include "mutt.h"
-#include "smime.h"
 #include "alias.h"
 #include "copy.h"
 #include "crypt.h"
@@ -61,6 +60,9 @@
 #include "send.h"
 #include "sendlib.h"
 #include "state.h"
+#ifdef CRYPT_BACKEND_CLASSIC_SMIME
+#include "smime.h"
+#endif
 
 /* These Config Variables are only used in ncrypt/smime.c */
 bool SmimeAskCertLabel; ///< Config: Prompt the user for a label for SMIME certificates
index e3d53ac299365dcc0bd2c49c8b5abea64ba45af4..536e6643227569f27fa368222eb79155823a54a0 100644 (file)
@@ -24,8 +24,6 @@
 #ifndef _NCRYPT_SMIME_H
 #define _NCRYPT_SMIME_H
 
-#ifdef CRYPT_BACKEND_CLASSIC_SMIME
-
 #include <stdbool.h>
 #include <stdio.h>
 
@@ -62,6 +60,4 @@ int          smime_class_verify_one(struct Body *sigbdy, struct State *s, const
 int          smime_class_verify_sender(struct Header *h);
 void         smime_class_void_passphrase(void);
 
-#endif
-
 #endif /* _NCRYPT_SMIME_H */
index e5cd659ff29c514f9324cdd31edeaaebf8d9fa4c..06e9819580c03d10363befb3f48789fa4de8df54 100644 (file)
@@ -29,7 +29,6 @@
 #include "mutt/mutt.h"
 #include "email/email.h"
 #include "mutt.h"
-#include "remailer.h"
 #include "curs_lib.h"
 #include "filter.h"
 #include "format_flags.h"
@@ -43,6 +42,9 @@
 #include "protos.h"
 #include "recvattach.h"
 #include "sendlib.h"
+#ifdef MIXMASTER
+#include "remailer.h"
+#endif
 
 /* These Config Variables are only used in remailer.c */
 char *MixEntryFormat; ///< Config: (mixmaster) printf-like format string for the mixmaster chain
index 714149bc4b492f25387fc72df26498f1d042c725..a0d39ec3dc3cdde323a05be38eddd0dec9ab5f6e 100644 (file)
@@ -23,8 +23,6 @@
 #ifndef _MUTT_REMAILER_H
 #define _MUTT_REMAILER_H
 
-#ifdef MIXMASTER
-
 #include <stddef.h>
 
 struct ListHead;
@@ -63,6 +61,4 @@ int mix_send_message(struct ListHead *chain, const char *tempfile);
 int mix_check_message(struct Header *msg);
 void mix_make_chain(struct ListHead *chainhead);
 
-#endif /* MIXMASTER */
-
 #endif /* _MUTT_REMAILER_H */