]> granicus.if.org Git - neomutt/commitdiff
Initial autoconf and makefile setup for autocrypt
authorKevin McCarthy <kevin@8t8.us>
Thu, 4 Jul 2019 02:51:09 +0000 (19:51 -0700)
committerRichard Russon <rich@flatcap.org>
Mon, 19 Aug 2019 23:14:27 +0000 (00:14 +0100)
Co-authored-by: Richard Russon <rich@flatcap.org>
autocrypt/autocrypt.c
autocrypt/autocrypt.h [new file with mode: 0644]
main.c

index d5d6fe21b785a44dc9d5a77e8b7552b72a4adb5a..4e859efa876a803aebf64460c4a51b404a0b3fe9 100644 (file)
@@ -1,4 +1,36 @@
+/**
+ * @file
+ * XXX
+ *
+ * @authors
+ * Copyright (C) 2019 Kevin J. McCarthy <kevin@8t8.us>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #include "config.h"
 
-int dummy = 0;
+#include "mutt.h"
+#include "autocrypt.h"
+
+void mutt_autocrypt_init(void)
+{
+  mutt_debug(LL_DEBUG1, "In mutt_autocrypt_init()\n");
+}
+
+void mutt_autocrypt_cleanup(void)
+{
+  mutt_debug(LL_DEBUG1, "In mutt_autocrypt_cleanup()\n");
+}
diff --git a/autocrypt/autocrypt.h b/autocrypt/autocrypt.h
new file mode 100644 (file)
index 0000000..6172203
--- /dev/null
@@ -0,0 +1,29 @@
+/**
+ * @file
+ * XXX
+ *
+ * @authors
+ * Copyright (C) 2019 Kevin J. McCarthy <kevin@8t8.us>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef MUTT_AUTOCRYPT_AUTOCRYPT_H
+#define MUTT_AUTOCRYPT_AUTOCRYPT_H
+
+void mutt_autocrypt_init (void);
+void mutt_autocrypt_cleanup (void);
+
+#endif /* MUTT_AUTOCRYPT_AUTOCRYPT_H */
diff --git a/main.c b/main.c
index 19eb067fa3162833e061d50ff29b21fcabadcf86..37c436ad70f694eea676bd67b732b486826f0040 100644 (file)
--- a/main.c
+++ b/main.c
@@ -90,6 +90,9 @@
 #ifdef USE_NNTP
 #include "nntp/nntp.h"
 #endif
+#ifdef USE_AUTOCRYPT
+#include "autocrypt/autocrypt.h"
+#endif
 
 /* These Config Variables are only used in main.c */
 bool C_ResumeEditedDraftFiles; ///< Config: Resume editing previously saved draft files
@@ -733,6 +736,9 @@ int main(int argc, char *argv[], char *envp[])
 
   /* Initialize crypto backends.  */
   crypt_init();
+#ifdef USE_AUTOCRYPT
+  mutt_autocrypt_init();
+#endif
 
   if (new_magic)
   {
@@ -1238,6 +1244,9 @@ int main(int argc, char *argv[], char *envp[])
 #endif
 #ifdef USE_SASL
     mutt_sasl_done();
+#endif
+#ifdef USE_AUTOCRYPT
+    mutt_autocrypt_cleanup();
 #endif
     log_queue_empty();
     mutt_log_stop();