Browse Source

Cleanup

Fixing include paths and include prefixes
master
David Lanzendörfer 12 months ago
parent
commit
5316ea1e16
26 changed files with 171 additions and 182 deletions
  1. +3
    -2
      include/netpgp.h
  2. +2
    -1
      include/netpgp/crypto.h
  3. +0
    -0
      include/netpgp/getopt.h
  4. +0
    -0
      include/netpgp/gettext.h
  5. +2
    -1
      include/netpgp/netpgpdefs.h
  6. +2
    -1
      include/netpgp/packet.h
  7. +3
    -3
      src/Makefile.am
  8. +7
    -9
      src/compress.c
  9. +10
    -10
      src/create.c
  10. +9
    -9
      src/crypto.c
  11. +1
    -3
      src/getopt.c
  12. +1
    -3
      src/getopt1.c
  13. +1
    -1
      src/gskssl_crypto.c
  14. +13
    -15
      src/keyring.c
  15. +7
    -7
      src/main.c
  16. +14
    -14
      src/misc.c
  17. +15
    -16
      src/netpgp.c
  18. +7
    -8
      src/openssl_crypto.c
  19. +11
    -11
      src/packet-parse.c
  20. +4
    -6
      src/packet-show.c
  21. +15
    -15
      src/reader.c
  22. +9
    -10
      src/signature.c
  23. +7
    -7
      src/ssl_crypto.c
  24. +4
    -6
      src/symmetric.c
  25. +12
    -12
      src/validate.c
  26. +12
    -12
      src/writer.c

+ 3
- 2
include/netpgp.h View File

@ -39,8 +39,9 @@
# endif
#endif
#include <config.h>
#include <keyring.h>
#include <netpgp/config.h>
#include <netpgp/keyring.h>
__BEGIN_DECLS


+ 2
- 1
include/netpgp/crypto.h View File

@ -53,7 +53,8 @@
#ifndef CRYPTO_H_
#define CRYPTO_H_
#include "config.h"
#include <netpgp/config.h>
#include "keyring.h"
#include "packet.h"
#include "memory.h"


src/getopt.h → include/netpgp/getopt.h View File


src/gettext.h → include/netpgp/gettext.h View File


+ 2
- 1
include/netpgp/netpgpdefs.h View File

@ -29,9 +29,10 @@
#ifndef NETPGPDEFS_H_
#define NETPGPDEFS_H_ 1
#include <netpgp/config.h>
#include <stdio.h>
#include <limits.h>
#include <config.h>
#define PRItime "ll"


+ 2
- 1
include/netpgp/packet.h View File

@ -54,6 +54,8 @@
#ifndef PACKET_H_
#define PACKET_H_
#include <netpgp/config.h>
#include <time.h>
#ifdef HAVE_OPENSSL_BN_H
@ -66,7 +68,6 @@
#include "types.h"
#include "errors.h"
#include "config.h"
#ifdef HAVE_GSKSSL
#include <gsktypes.h>


+ 3
- 3
src/Makefile.am View File

@ -2,7 +2,7 @@ AM_CFLAGS = $(WARNCFLAGS)
lib_LTLIBRARIES = libnetpgp.la
libnetpgp_la_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/include/netpgp -D_GNU_SOURCE
libnetpgp_la_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -D_GNU_SOURCE
libnetpgp_la_LDFLAGS = $(ZLIB_FLAG)
libnetpgp_la_SOURCES = \
@ -24,8 +24,8 @@ libnetpgp_la_SOURCES = \
writer.c
bin_PROGRAMS = netpgp
netpgp_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include -I$(top_srcdir)/include/netpgp -D_GNU_SOURCE
LDADD = $(PKCS_LIBS) $(GSKSSL_LIBS) $(ZLIB_FLAG)
netpgp_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -D_GNU_SOURCE
LDADD = $(PKCS_LIBS) $(GSKSSL_LIBS) $(ZLIB_FLAG)
netpgp_LDFLAGS =
netpgp_SOURCES = \
main.c \


+ 7
- 9
src/compress.c View File

@ -47,9 +47,7 @@
* limitations under the License.
*/
/** \file
*/
#include "config.h"
#include <netpgp/config.h>
#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
@ -71,12 +69,12 @@ __RCSID("$NetBSD$");
#include <string.h>
#include <stdlib.h>
#include "packet-parse.h"
#include "errors.h"
#include "netpgpdefs.h"
#include "crypto.h"
#include "memory.h"
#include "writer.h"
#include <netpgp/packet-parse.h>
#include <netpgp/errors.h>
#include <netpgp/netpgpdefs.h>
#include <netpgp/crypto.h>
#include <netpgp/memory.h>
#include <netpgp/writer.h>
#define DECOMPRESS_BUFFER 1024


+ 10
- 10
src/create.c View File

@ -49,7 +49,7 @@
/** \file
*/
#include "config.h"
#include <netpgp/config.h>
/*
** Check to see if this machine uses EBCDIC. (Yes, believe it or
@ -91,15 +91,15 @@ __RCSID("$NetBSD$");
#include <openssl/cast.h>
#endif
#include "create.h"
#include "keyring.h"
#include "packet.h"
#include "signature.h"
#include "writer.h"
#include "readerwriter.h"
#include "memory.h"
#include "netpgpdefs.h"
#include "netpgpdigest.h"
#include <netpgp/create.h>
#include <netpgp/keyring.h>
#include <netpgp/packet.h>
#include <netpgp/signature.h>
#include <netpgp/writer.h>
#include <netpgp/readerwriter.h>
#include <netpgp/memory.h>
#include <netpgp/netpgpdefs.h>
#include <netpgp/netpgpdigest.h>
/**
* \ingroup Core_Create


+ 9
- 9
src/crypto.c View File

@ -46,7 +46,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "config.h"
#include <netpgp/config.h>
#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
@ -67,14 +67,14 @@ __RCSID("$NetBSD$");
#include <string.h>
#include <stdlib.h>
#include "types.h"
#include "crypto.h"
#include "readerwriter.h"
#include "memory.h"
#include "netpgpdefs.h"
#include "signature.h"
#include "netpgpsdk.h"
#include "validate.h"
#include <netpgp/types.h>
#include <netpgp/crypto.h>
#include <netpgp/readerwriter.h>
#include <netpgp/memory.h>
#include <netpgp/netpgpdefs.h>
#include <netpgp/signature.h>
#include <netpgp/netpgpsdk.h>
#include <netpgp/validate.h>
/**
\ingroup Core_MPI


+ 1
- 3
src/getopt.c View File

@ -26,9 +26,7 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
# define _NO_PROTO
#endif
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <netpgp/config.h>
#if !defined __STDC__ || !__STDC__
/* This is a separate conditional since some stdc systems


+ 1
- 3
src/getopt1.c View File

@ -16,9 +16,7 @@ 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/>. */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <netpgp/config.h>
#include "getopt.h"


+ 1
- 1
src/gskssl_crypto.c View File

@ -1,4 +1,4 @@
#include "config.h"
#include <netpgp/config.h>
#ifdef HAVE_GSKSSL


+ 13
- 15
src/keyring.c View File

@ -49,7 +49,7 @@
/** \file
*/
#include "config.h"
#include <netpgp/config.h>
#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
@ -76,20 +76,18 @@ __RCSID("$NetBSD$");
#include <unistd.h>
#endif
#include "types.h"
#include "keyring.h"
#include "packet-parse.h"
#include "signature.h"
#include "netpgpsdk.h"
#include "readerwriter.h"
#include "netpgpdefs.h"
#include "packet.h"
#include "crypto.h"
#include "validate.h"
#include "netpgpdefs.h"
#include "netpgpdigest.h"
#include <netpgp/types.h>
#include <netpgp/keyring.h>
#include <netpgp/packet-parse.h>
#include <netpgp/signature.h>
#include <netpgp/netpgpsdk.h>
#include <netpgp/readerwriter.h>
#include <netpgp/netpgpdefs.h>
#include <netpgp/packet.h>
#include <netpgp/crypto.h>
#include <netpgp/validate.h>
#include <netpgp/netpgpdefs.h>
#include <netpgp/netpgpdigest.h>
/**
\ingroup HighLevel_Keyring


+ 7
- 7
src/main.c View File

@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#include <netpgp/config.h>
/* Command line program to perform netpgp operations */
#include <sys/types.h>
@ -47,12 +47,12 @@
#include <string.h>
#include <unistd.h>
#include "netpgpsdk.h"
#include "netpgpdefs.h"
#include "crypto.h"
#include "packet.h"
#include "keyring.h"
#include "getopt.h"
#include <netpgp/netpgpsdk.h>
#include <netpgp/netpgpdefs.h>
#include <netpgp/crypto.h>
#include <netpgp/packet.h>
#include <netpgp/keyring.h>
#include <netpgp/getopt.h>
/*
* SHA1 is now looking as though it should not be used. Let's


+ 14
- 14
src/misc.c View File

@ -49,7 +49,7 @@
/** \file
*/
#include "config.h"
#include <netpgp/config.h>
#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
@ -81,19 +81,19 @@ __RCSID("$NetBSD$");
#include <openssl/rand.h>
#endif
#include "errors.h"
#include "packet.h"
#include "crypto.h"
#include "create.h"
#include "packet-parse.h"
#include "packet-show.h"
#include "signature.h"
#include "netpgpsdk.h"
#include "netpgpdefs.h"
#include "memory.h"
#include "readerwriter.h"
#include "version.h"
#include "netpgpdigest.h"
#include <netpgp/errors.h>
#include <netpgp/packet.h>
#include <netpgp/crypto.h>
#include <netpgp/create.h>
#include <netpgp/packet-parse.h>
#include <netpgp/packet-show.h>
#include <netpgp/signature.h>
#include <netpgp/netpgpsdk.h>
#include <netpgp/netpgpdefs.h>
#include <netpgp/memory.h>
#include <netpgp/readerwriter.h>
#include <netpgp/version.h>
#include <netpgp/netpgpdigest.h>
#ifdef WIN32
#define vsnprintf _vsnprintf


+ 15
- 16
src/netpgp.c View File

@ -26,7 +26,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#include <netpgp/config.h>
#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
@ -71,21 +71,20 @@ __RCSID("$NetBSD$");
#include <limits.h>
#endif
#include "netpgp.h"
#include "packet.h"
#include "packet-parse.h"
#include "keyring.h"
#include "errors.h"
#include "packet-show.h"
#include "create.h"
#include "netpgpsdk.h"
#include "memory.h"
#include "validate.h"
#include "readerwriter.h"
#include "netpgpdefs.h"
#include "crypto.h"
#include "defs.h"
#include <netpgp.h>
#include <netpgp/packet.h>
#include <netpgp/packet-parse.h>
#include <netpgp/keyring.h>
#include <netpgp/errors.h>
#include <netpgp/packet-show.h>
#include <netpgp/create.h>
#include <netpgp/netpgpsdk.h>
#include <netpgp/memory.h>
#include <netpgp/validate.h>
#include <netpgp/readerwriter.h>
#include <netpgp/netpgpdefs.h>
#include <netpgp/crypto.h>
#include <netpgp/defs.h>
#ifndef MIN
#define MIN(a,b) (((a)<(b))?(a):(b))


+ 7
- 8
src/openssl_crypto.c View File

@ -49,7 +49,7 @@
/** \file
*/
#include "config.h"
#include <netpgp/config.h>
#ifdef HAVE_OPENSSL
@ -84,13 +84,12 @@ __RCSID("$NetBSD$");
#include <unistd.h>
#endif
#include "crypto.h"
#include "keyring.h"
#include "readerwriter.h"
#include "netpgpdefs.h"
#include "netpgpdigest.h"
#include "packet.h"
#include <netpgp/crypto.h>
#include <netpgp/keyring.h>
#include <netpgp/readerwriter.h>
#include <netpgp/netpgpdefs.h>
#include <netpgp/netpgpdigest.h>
#include <netpgp/packet.h>
static int
md5_init(pgp_hash_t *hash)


+ 11
- 11
src/packet-parse.c View File

@ -50,7 +50,7 @@
/** \file
* \brief Parser for OpenPGP packets
*/
#include "config.h"
#include <netpgp/config.h>
/*
** Check to see if this machine uses EBCDIC. (Yes, believe it or
@ -96,16 +96,16 @@ __RCSID("$NetBSD$");
#include <limits.h>
#endif
#include "packet.h"
#include "packet-parse.h"
#include "keyring.h"
#include "errors.h"
#include "packet-show.h"
#include "create.h"
#include "readerwriter.h"
#include "netpgpdefs.h"
#include "crypto.h"
#include "netpgpdigest.h"
#include <netpgp/packet.h>
#include <netpgp/packet-parse.h>
#include <netpgp/keyring.h>
#include <netpgp/errors.h>
#include <netpgp/packet-show.h>
#include <netpgp/create.h>
#include <netpgp/readerwriter.h>
#include <netpgp/netpgpdefs.h>
#include <netpgp/crypto.h>
#include <netpgp/netpgpdigest.h>
#define ERRP(cbinfo, cont, err) do { \
cont.u.error = err; \


+ 4
- 6
src/packet-show.c View File

@ -52,7 +52,7 @@
* Creates printable text strings from packet contents
*
*/
#include "config.h"
#include <netpgp/config.h>
#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
@ -66,11 +66,9 @@ __RCSID("$NetBSD$");
#include <stdlib.h>
#include <string.h>
#include "packet-show.h"
#include "netpgpsdk.h"
#include "netpgpdefs.h"
#include <netpgp/packet-show.h>
#include <netpgp/netpgpsdk.h>
#include <netpgp/netpgpdefs.h>
/*
* Arrays of value->text maps


+ 15
- 15
src/reader.c View File

@ -46,7 +46,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "config.h"
#include <netpgp/config.h>
/*
** Check to see if this machine uses EBCDIC. (Yes, believe it or
@ -131,19 +131,19 @@ __RCSID("$NetBSD$");
#include <limits.h>
#endif
#include "errors.h"
#include "crypto.h"
#include "create.h"
#include "signature.h"
#include "packet.h"
#include "packet-parse.h"
#include "packet-show.h"
#include "packet.h"
#include "keyring.h"
#include "readerwriter.h"
#include "netpgpsdk.h"
#include "netpgpdefs.h"
#include "netpgpdigest.h"
#include <netpgp/errors.h>
#include <netpgp/crypto.h>
#include <netpgp/create.h>
#include <netpgp/signature.h>
#include <netpgp/packet.h>
#include <netpgp/packet-parse.h>
#include <netpgp/packet-show.h>
#include <netpgp/packet.h>
#include <netpgp/keyring.h>
#include <netpgp/readerwriter.h>
#include <netpgp/netpgpsdk.h>
#include <netpgp/netpgpdefs.h>
#include <netpgp/netpgpdigest.h>
#ifndef MIN
#define MIN(a,b) (((a)<(b))?(a):(b))
@ -152,7 +152,7 @@ __RCSID("$NetBSD$");
#define MAX(a,b) (((a)>(b))?(a):(b))
#endif
inline char A(char c)
char A(char c)
{
#if defined(NETPGP_EBCDIC)
__e2a_l(&c,1);


+ 9
- 10
src/signature.c View File

@ -49,7 +49,7 @@
/** \file
*/
#include "config.h"
#include <netpgp/config.h>
#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
@ -80,15 +80,14 @@ __RCSID("$NetBSD$");
#include <openssl/dsa.h>
#endif
#include "signature.h"
#include "crypto.h"
#include "create.h"
#include "netpgpsdk.h"
#include "readerwriter.h"
#include "validate.h"
#include "netpgpdefs.h"
#include "netpgpdigest.h"
#include <netpgp/signature.h>
#include <netpgp/crypto.h>
#include <netpgp/create.h>
#include <netpgp/netpgpsdk.h>
#include <netpgp/readerwriter.h>
#include <netpgp/validate.h>
#include <netpgp/netpgpdefs.h>
#include <netpgp/netpgpdigest.h>
/**
\ingroup Core_Signature


+ 7
- 7
src/ssl_crypto.c View File

@ -1,5 +1,5 @@
#include "config.h"
#include <netpgp/config.h>
#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
@ -12,12 +12,12 @@
#include <unistd.h>
#endif
#include "crypto.h"
#include "keyring.h"
#include "readerwriter.h"
#include "netpgpdefs.h"
#include "netpgpdigest.h"
#include "packet.h"
#include <netpgp/crypto.h>
#include <netpgp/keyring.h>
#include <netpgp/readerwriter.h>
#include <netpgp/netpgpdefs.h>
#include <netpgp/netpgpdigest.h>
#include <netpgp/packet.h>
/**
\ingroup HighLevel_KeyGenerate


+ 4
- 6
src/symmetric.c View File

@ -46,7 +46,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "config.h"
#include <netpgp/config.h>
#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
@ -57,9 +57,6 @@ __COPYRIGHT("@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights rese
__RCSID("$NetBSD$");
#endif
#include "crypto.h"
#include "packet-show.h"
#include <string.h>
#include <stdlib.h>
@ -85,8 +82,9 @@ __RCSID("$NetBSD$");
#include <openssl/camellia.h>
#endif
#include "netpgp/crypto.h"
#include "netpgpdefs.h"
#include <netpgp/crypto.h>
#include <netpgp/netpgpdefs.h>
#include <netpgp/packet-show.h>
#define TRAILER "","","","",0,NULL,NULL


+ 12
- 12
src/validate.c View File

@ -46,7 +46,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "config.h"
#include <netpgp/config.h>
#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
@ -75,17 +75,17 @@ __RCSID("$NetBSD$");
#include <fcntl.h>
#endif
#include "packet-parse.h"
#include "packet-show.h"
#include "keyring.h"
#include "signature.h"
#include "netpgpsdk.h"
#include "readerwriter.h"
#include "netpgpdefs.h"
#include "memory.h"
#include "packet.h"
#include "crypto.h"
#include "validate.h"
#include <netpgp/packet-parse.h>
#include <netpgp/packet-show.h>
#include <netpgp/keyring.h>
#include <netpgp/signature.h>
#include <netpgp/netpgpsdk.h>
#include <netpgp/readerwriter.h>
#include <netpgp/netpgpdefs.h>
#include <netpgp/memory.h>
#include <netpgp/packet.h>
#include <netpgp/crypto.h>
#include <netpgp/validate.h>
#ifdef HAVE_FCNTL_H
#include <fcntl.h>


+ 12
- 12
src/writer.c View File

@ -50,7 +50,7 @@
/** \file
* This file contains the base functions used by the writers.
*/
#include "config.h"
#include <netpgp/config.h>
#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
@ -74,17 +74,17 @@ __RCSID("$NetBSD$");
#include <openssl/cast.h>
#endif
#include "create.h"
#include "writer.h"
#include "keyring.h"
#include "signature.h"
#include "packet.h"
#include "packet-parse.h"
#include "readerwriter.h"
#include "memory.h"
#include "netpgpdefs.h"
#include "version.h"
#include "netpgpdigest.h"
#include <netpgp/create.h>
#include <netpgp/writer.h>
#include <netpgp/keyring.h>
#include <netpgp/signature.h>
#include <netpgp/packet.h>
#include <netpgp/packet-parse.h>
#include <netpgp/readerwriter.h>
#include <netpgp/memory.h>
#include <netpgp/netpgpdefs.h>
#include <netpgp/version.h>
#include <netpgp/netpgpdigest.h>
/*
* return 1 if OK, otherwise 0


Loading…
Cancel
Save