From: Kevin McCarthy Date: Thu, 4 Jul 2019 02:51:09 +0000 (-0700) Subject: Initial autoconf and makefile setup for autocrypt X-Git-Tag: 2019-10-25~97^2~52 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=72328efd9514f96eb2f6251f08b004901951faf6;p=neomutt Initial autoconf and makefile setup for autocrypt Co-authored-by: Richard Russon --- diff --git a/autocrypt/autocrypt.c b/autocrypt/autocrypt.c index d5d6fe21b..4e859efa8 100644 --- a/autocrypt/autocrypt.c +++ b/autocrypt/autocrypt.c @@ -1,4 +1,36 @@ +/** + * @file + * XXX + * + * @authors + * Copyright (C) 2019 Kevin J. McCarthy + * + * @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 . + */ #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 index 000000000..6172203e1 --- /dev/null +++ b/autocrypt/autocrypt.h @@ -0,0 +1,29 @@ +/** + * @file + * XXX + * + * @authors + * Copyright (C) 2019 Kevin J. McCarthy + * + * @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 . + */ + +#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 19eb067fa..37c436ad7 100644 --- 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();