ref: 0a3078ab2eb1718856a54d53056da4b68d976932
parent: 7a07db105fb7181327662b01282ccae6b69fa67b
author: giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
date: Sat Jul 20 13:23:15 EDT 2002
move repeated configuration includes to a new os_types.h git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@153 ded80894-8fb9-0310-811b-c03f3676ab4d
--- a/jbig2.c
+++ b/jbig2.c
@@ -8,18 +8,13 @@
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
- $Id: jbig2.c,v 1.15 2002/07/08 19:21:35 giles Exp $
+ $Id: jbig2.c,v 1.16 2002/07/20 17:23:15 giles Exp $
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
-#include "config_types.h"
-#elif _WIN32
-#include "config_win32.h"
-#endif
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
+#endif
+#include "os_types.h"
#include <stdio.h>
#include <stdlib.h>
--- a/jbig2_arith.c
+++ b/jbig2_arith.c
@@ -8,18 +8,13 @@
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
- $Id: jbig2_arith.c,v 1.10 2002/07/08 14:54:01 giles Exp $
+ $Id: jbig2_arith.c,v 1.11 2002/07/20 17:23:15 giles Exp $
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
-#include "config_types.h"
-#elif _WIN32
-#include "config_win32.h"
#endif
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
+#include "os_types.h"
#include <stdio.h>
#include <stdlib.h>
--- a/jbig2_arith_iaid.c
+++ b/jbig2_arith_iaid.c
@@ -2,13 +2,8 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
-#include "config_types.h"
-#elif _WIN32
-#include "config_win32.h"
-#endif
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
+#endif
+#include "os_types.h"
#include <stddef.h>
#include <string.h> /* memset() */
--- a/jbig2_arith_int.c
+++ b/jbig2_arith_int.c
@@ -2,13 +2,8 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
-#include "config_types.h"
-#elif _WIN32
-#include "config_win32.h"
-#endif
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
+#endif
+#include "os_types.h"
#include <stddef.h>
#include <string.h> /* memset() */
--- a/jbig2_generic.c
+++ b/jbig2_generic.c
@@ -8,7 +8,7 @@
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
- $Id: jbig2_generic.c,v 1.12 2002/07/08 14:54:01 giles Exp $
+ $Id: jbig2_generic.c,v 1.13 2002/07/20 17:23:15 giles Exp $
*/
/**
@@ -17,13 +17,8 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
-#include "config_types.h"
-#elif _WIN32
-#include "config_win32.h"
-#endif
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
+#endif
+#include "os_types.h"
#include <stddef.h>
#include <string.h> /* memcpy(), memset() */
--- a/jbig2_huffman.c
+++ b/jbig2_huffman.c
@@ -8,7 +8,7 @@
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
- $Id: jbig2_huffman.c,v 1.10 2002/07/08 14:54:01 giles Exp $
+ $Id: jbig2_huffman.c,v 1.11 2002/07/20 17:23:15 giles Exp $
*/
/* Huffman table decoding procedures
@@ -16,13 +16,8 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
-#include "config_types.h"
-#elif _WIN32
-#include "config_win32.h"
-#endif
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
+#endif
+#include "os_types.h"
#include <stdlib.h>
--- a/jbig2_image.c
+++ b/jbig2_image.c
@@ -8,18 +8,13 @@
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
- $Id: jbig2_image.c,v 1.18 2002/07/08 14:54:01 giles Exp $
+ $Id: jbig2_image.c,v 1.19 2002/07/20 17:23:15 giles Exp $
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
-#include "config_types.h"
-#elif _WIN32
-#include "config_win32.h"
-#endif
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
+#endif
+#include "os_types.h"
#include <stdio.h>
#include <stdlib.h>
--- a/jbig2_image_pbm.c
+++ b/jbig2_image_pbm.c
@@ -8,18 +8,13 @@
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
- $Id: jbig2_image_pbm.c,v 1.9 2002/07/08 14:54:01 giles Exp $
+ $Id: jbig2_image_pbm.c,v 1.10 2002/07/20 17:23:15 giles Exp $
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
-#include "config_types.h"
-#elif _WIN32
-#include "config_win32.h"
-#endif
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
+#endif
+#include "os_types.h"
#include <stdio.h>
#include <ctype.h>
--- a/jbig2_image_png.c
+++ b/jbig2_image_png.c
@@ -8,18 +8,13 @@
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
- $Id: jbig2_image_png.c,v 1.5 2002/07/08 14:54:01 giles Exp $
+ $Id: jbig2_image_png.c,v 1.6 2002/07/20 17:23:15 giles Exp $
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
-#include "config_types.h"
-#elif _WIN32
-#include "config_win32.h"
-#endif
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
+#endif
+#include "os_types.h"
#include <stdio.h>
#include <stdlib.h>
--- a/jbig2_mmr.c
+++ b/jbig2_mmr.c
@@ -4,13 +4,8 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
-#include "config_types.h"
-#elif _WIN32
-#include "config_win32.h"
-#endif
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
+#endif
+#include "os_types.h"
#include <stddef.h>
#include <stdio.h>
--- a/jbig2_page.c
+++ b/jbig2_page.c
@@ -8,18 +8,13 @@
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
- $Id: jbig2_page.c,v 1.12 2002/07/09 09:45:32 giles Exp $
+ $Id: jbig2_page.c,v 1.13 2002/07/20 17:23:15 giles Exp $
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
-#include "config_types.h"
-#elif _WIN32
-#include "config_win32.h"
-#endif
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
+#endif
+#include "os_types.h"
#include <stdlib.h>
--- a/jbig2_segment.c
+++ b/jbig2_segment.c
@@ -8,18 +8,13 @@
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
- $Id: jbig2_segment.c,v 1.17 2002/07/09 09:45:32 giles Exp $
+ $Id: jbig2_segment.c,v 1.18 2002/07/20 17:23:15 giles Exp $
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
-#include "config_types.h"
-#elif _WIN32
-#include "config_win32.h"
-#endif
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
+#endif
+#include "os_types.h"
#include <stddef.h> /* size_t */
--- a/jbig2_symbol_dict.c
+++ b/jbig2_symbol_dict.c
@@ -8,7 +8,7 @@
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
- $Id: jbig2_symbol_dict.c,v 1.17 2002/07/09 10:13:13 giles Exp $
+ $Id: jbig2_symbol_dict.c,v 1.18 2002/07/20 17:23:15 giles Exp $
symbol dictionary segment decode and support
*/
@@ -15,13 +15,8 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
-#include "config_types.h"
-#elif _WIN32
-#include "config_win32.h"
-#endif
-#if HAVE_STDINT_H
-#include <stdint.h>
-#endif
+#endif
+#include "os_types.h"
#include <stddef.h>
#include <string.h> /* memset() */
--- a/jbig2_text.c
+++ b/jbig2_text.c
@@ -8,18 +8,13 @@
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
- $Id: jbig2_text.c,v 1.15 2002/07/13 00:32:43 giles Exp $
+ $Id: jbig2_text.c,v 1.16 2002/07/20 17:23:15 giles Exp $
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
-#include "config_types.h"
-#elif _WIN32
-#include "config_win32.h"
-#endif
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
+#endif
+#include "os_types.h"
#include <stddef.h>
#include <string.h> /* memset() */
--- a/jbig2dec.c
+++ b/jbig2dec.c
@@ -8,18 +8,12 @@
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
- $Id: jbig2dec.c,v 1.36 2002/07/20 16:02:24 giles Exp $
+ $Id: jbig2dec.c,v 1.37 2002/07/20 17:23:15 giles Exp $
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
-#include "config_types.h"
-#elif _WIN32
-#include "config_win32.h"
#endif
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
#include <stdio.h>
#include <stdlib.h>
@@ -26,9 +20,6 @@
#include <stddef.h>
#include <string.h>
-#include "jbig2.h"
-#include "jbig2_image.h"
-
#ifdef HAVE_GETOPT_H
# include <getopt.h>
#else
@@ -35,7 +26,11 @@
# include "getopt.h"
#endif
+#include "os_types.h"
#include "sha1.h"
+
+#include "jbig2.h"
+#include "jbig2_image.h"
typedef enum {
usage,dump,render
--- /dev/null
+++ b/os_types.h
@@ -1,0 +1,30 @@
+/*
+ jbig2dec
+
+ Copyright (c) 2002 artofcode LLC.
+
+ 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.
+
+ $Id: os_types.h,v 1.1 2002/07/20 17:23:15 giles Exp $
+*/
+
+/*
+ indirection layer for build and platform-specific definitions
+
+ in general, this header should insure that the stdint types are
+ available, and that any optional compile flags are defined if
+ the build system doesn't pass them directly.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config_types.h"
+#elif defined(_WIN32)
+#include "config_win32.h"
+#endif
+
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
--- a/sha1.c
+++ b/sha1.c
@@ -80,18 +80,12 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
-#include "config_types.h"
-#elif defined(_WIN32)
-#include "config_win32.h"
#endif
#include <stdio.h>
#include <string.h>
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
-
+#include "os_types.h"
#include "sha1.h"
void SHA1_Transform(uint32_t state[5], const uint8_t buffer[64]);