From 5cb4d4dedf543d0f00f2fe3fe7c65a7c9474ec28 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Mon, 24 Apr 2006 20:35:59 +0000 Subject: [PATCH] * Removed duplicate uint*_t defines from *_internal.h and included common.h in all .c files that needed it. --- caca/caca.c | 1 + caca/caca_internals.h | 7 ------- caca/driver_conio.c | 1 + caca/driver_gl.c | 1 + caca/driver_ncurses.c | 1 + caca/driver_raw.c | 1 + caca/driver_slang.c | 1 + caca/driver_vga.c | 1 + caca/driver_win32.c | 1 + caca/driver_x11.c | 1 + caca/event.c | 1 + caca/graphics.c | 1 + caca/time.c | 1 + common.h | 4 ++++ configure.ac | 4 ++-- cucul/box.c | 1 + cucul/buffer.c | 1 + cucul/canvas.c | 1 + cucul/charset.c | 1 + cucul/colour.c | 1 + cucul/conic.c | 1 + cucul/cucul.c | 1 + cucul/cucul_internals.h | 7 ------- cucul/dither.c | 1 + cucul/export.c | 1 + cucul/font.c | 5 ++++- cucul/import.c | 1 + cucul/line.c | 1 + cucul/sprite.c | 1 + cucul/transform.c | 1 + cucul/triangle.c | 1 + kernel/kernel.c | 1 + src/aafire.c | 1 + src/cacaball.c | 1 + src/cacamoir.c | 1 + src/cacaplas.c | 1 + src/cacaplay.c | 1 + src/cacaserver.c | 1 + src/cacaview.c | 1 + src/common-image.c | 1 + src/img2irc.c | 1 + test/colors.c | 1 + test/demo.c | 1 + test/dithering.c | 1 + test/event.c | 1 + test/spritedit.c | 1 + tools/makefont.c | 7 ++++++- tools/optipal.c | 1 + 48 files changed, 58 insertions(+), 18 deletions(-) diff --git a/caca/caca.c b/caca/caca.c index 3d250da..d0d411b 100644 --- a/caca/caca.c +++ b/caca/caca.c @@ -18,6 +18,7 @@ */ #include "config.h" +#include "common.h" #if !defined(__KERNEL__) # include diff --git a/caca/caca_internals.h b/caca/caca_internals.h index 25437f3..231d9b8 100644 --- a/caca/caca_internals.h +++ b/caca/caca_internals.h @@ -16,13 +16,6 @@ #if defined(HAVE_INTTYPES_H) && !defined(__KERNEL__) # include -#elif !defined(CUSTOM_INTTYPES) && !defined(_DOXYGEN_SKIP_ME) -# define CUSTOM_INTTYPES -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned long int uint32_t; -typedef long int intptr_t; -typedef long unsigned int uintptr_t; #endif typedef struct caca_timer caca_timer_t; diff --git a/caca/driver_conio.c b/caca/driver_conio.c index 5b1a431..159bda3 100644 --- a/caca/driver_conio.c +++ b/caca/driver_conio.c @@ -16,6 +16,7 @@ */ #include "config.h" +#include "common.h" #if defined(USE_CONIO) diff --git a/caca/driver_gl.c b/caca/driver_gl.c index bb2b3fc..52e1822 100644 --- a/caca/driver_gl.c +++ b/caca/driver_gl.c @@ -16,6 +16,7 @@ */ #include "config.h" +#include "common.h" #if defined(USE_GL) diff --git a/caca/driver_ncurses.c b/caca/driver_ncurses.c index 39790d0..e49ba67 100644 --- a/caca/driver_ncurses.c +++ b/caca/driver_ncurses.c @@ -16,6 +16,7 @@ */ #include "config.h" +#include "common.h" #if defined(USE_NCURSES) diff --git a/caca/driver_raw.c b/caca/driver_raw.c index 0ea92a5..ab49266 100644 --- a/caca/driver_raw.c +++ b/caca/driver_raw.c @@ -16,6 +16,7 @@ */ #include "config.h" +#include "common.h" #if !defined(__KERNEL__) # include diff --git a/caca/driver_slang.c b/caca/driver_slang.c index a381458..81bd00e 100644 --- a/caca/driver_slang.c +++ b/caca/driver_slang.c @@ -16,6 +16,7 @@ */ #include "config.h" +#include "common.h" #if defined(USE_SLANG) diff --git a/caca/driver_vga.c b/caca/driver_vga.c index d1d9d96..ed6fb88 100644 --- a/caca/driver_vga.c +++ b/caca/driver_vga.c @@ -16,6 +16,7 @@ */ #include "config.h" +#include "common.h" #if defined(USE_VGA) diff --git a/caca/driver_win32.c b/caca/driver_win32.c index a5b8078..2233a4c 100644 --- a/caca/driver_win32.c +++ b/caca/driver_win32.c @@ -16,6 +16,7 @@ */ #include "config.h" +#include "common.h" #if defined(USE_WIN32) diff --git a/caca/driver_x11.c b/caca/driver_x11.c index 41111b6..2c7d06c 100644 --- a/caca/driver_x11.c +++ b/caca/driver_x11.c @@ -16,6 +16,7 @@ */ #include "config.h" +#include "common.h" #if defined(USE_X11) diff --git a/caca/event.c b/caca/event.c index e7b9d14..c1176f3 100644 --- a/caca/event.c +++ b/caca/event.c @@ -16,6 +16,7 @@ */ #include "config.h" +#include "common.h" #if !defined(__KERNEL__) # include diff --git a/caca/graphics.c b/caca/graphics.c index 0b39ecd..52c1d83 100644 --- a/caca/graphics.c +++ b/caca/graphics.c @@ -16,6 +16,7 @@ */ #include "config.h" +#include "common.h" #include "caca.h" #include "caca_internals.h" diff --git a/caca/time.c b/caca/time.c index 95a316e..041f717 100644 --- a/caca/time.c +++ b/caca/time.c @@ -16,6 +16,7 @@ */ #include "config.h" +#include "common.h" #if !defined(__KERNEL__) # include diff --git a/common.h b/common.h index 04d7fa7..c72431d 100644 --- a/common.h +++ b/common.h @@ -21,8 +21,12 @@ typedef signed char int8_t; typedef signed short int16_t; typedef signed long int int32_t; + typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned long int uint32_t; + +typedef long int intptr_t; +typedef unsigned long int uintptr_t; #endif diff --git a/configure.ac b/configure.ac index 360ce27..1f23d8e 100644 --- a/configure.ac +++ b/configure.ac @@ -61,8 +61,8 @@ dnl conditional builds AC_ARG_ENABLE(doc, [ --enable-doc build documentation (needs doxygen and LaTeX)]) -AC_CHECK_HEADERS(stdio.h stdarg.h signal.h sys/ioctl.h sys/time.h inttypes.h endian.h unistd.h) -AC_CHECK_FUNCS(signal ioctl vsnprintf getenv putenv strcasecmp) +AC_CHECK_HEADERS(stdio.h stdarg.h signal.h sys/ioctl.h sys/time.h inttypes.h endian.h unistd.h arpa/inet.h) +AC_CHECK_FUNCS(signal ioctl vsnprintf getenv putenv strcasecmp htons) AC_CHECK_FUNCS(usleep gettimeofday) AC_MSG_CHECKING(for Sleep) diff --git a/cucul/box.c b/cucul/box.c index 6a52ca8..c512385 100644 --- a/cucul/box.c +++ b/cucul/box.c @@ -16,6 +16,7 @@ */ #include "config.h" +#include "common.h" #if !defined(__KERNEL__) # include diff --git a/cucul/buffer.c b/cucul/buffer.c index 0b62bff..1b47140 100644 --- a/cucul/buffer.c +++ b/cucul/buffer.c @@ -16,6 +16,7 @@ */ #include "config.h" +#include "common.h" #if !defined(__KERNEL__) # include diff --git a/cucul/canvas.c b/cucul/canvas.c index 2b2e4ce..0fb9759 100644 --- a/cucul/canvas.c +++ b/cucul/canvas.c @@ -17,6 +17,7 @@ */ #include "config.h" +#include "common.h" #if !defined(__KERNEL__) # include /* BUFSIZ */ diff --git a/cucul/charset.c b/cucul/charset.c index 8f84160..f223827 100644 --- a/cucul/charset.c +++ b/cucul/charset.c @@ -17,6 +17,7 @@ */ #include "config.h" +#include "common.h" #if !defined(__KERNEL__) # include diff --git a/cucul/colour.c b/cucul/colour.c index c6c7a3d..cbdf3b4 100644 --- a/cucul/colour.c +++ b/cucul/colour.c @@ -17,6 +17,7 @@ */ #include "config.h" +#include "common.h" #include "cucul.h" #include "cucul_internals.h" diff --git a/cucul/conic.c b/cucul/conic.c index 8620c5e..13e39ec 100644 --- a/cucul/conic.c +++ b/cucul/conic.c @@ -17,6 +17,7 @@ */ #include "config.h" +#include "common.h" #if !defined(__KERNEL__) # include diff --git a/cucul/cucul.c b/cucul/cucul.c index 31066d0..9239fb8 100644 --- a/cucul/cucul.c +++ b/cucul/cucul.c @@ -17,6 +17,7 @@ */ #include "config.h" +#include "common.h" #if !defined(__KERNEL__) # include diff --git a/cucul/cucul_internals.h b/cucul/cucul_internals.h index d037177..341c8f6 100644 --- a/cucul/cucul_internals.h +++ b/cucul/cucul_internals.h @@ -16,13 +16,6 @@ #if defined(HAVE_INTTYPES_H) && !defined(__KERNEL__) # include -#elif !defined(CUSTOM_INTTYPES) && !defined(_DOXYGEN_SKIP_ME) -# define CUSTOM_INTTYPES -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned long int uint32_t; -typedef long int intptr_t; -typedef long unsigned int uintptr_t; #endif struct cucul_canvas diff --git a/cucul/dither.c b/cucul/dither.c index c34939e..03a8dd0 100644 --- a/cucul/dither.c +++ b/cucul/dither.c @@ -16,6 +16,7 @@ */ #include "config.h" +#include "common.h" #if !defined(__KERNEL__) # if defined(HAVE_ENDIAN_H) diff --git a/cucul/export.c b/cucul/export.c index f51d75c..0958465 100644 --- a/cucul/export.c +++ b/cucul/export.c @@ -17,6 +17,7 @@ */ #include "config.h" +#include "common.h" #if !defined(__KERNEL__) # include diff --git a/cucul/font.c b/cucul/font.c index 478683d..b9181da 100644 --- a/cucul/font.c +++ b/cucul/font.c @@ -16,16 +16,19 @@ */ #include "config.h" +#include "common.h" #if !defined(USE_WIN32) #if !defined(__KERNEL__) # if defined(HAVE_ENDIAN_H) # include # endif +# if defined(HAVE_ARPA_INET_H) +# include +# endif # include # include # include -# include #endif #include "cucul.h" diff --git a/cucul/import.c b/cucul/import.c index 1639722..25a061b 100644 --- a/cucul/import.c +++ b/cucul/import.c @@ -16,6 +16,7 @@ */ #include "config.h" +#include "common.h" #if !defined(__KERNEL__) # include diff --git a/cucul/line.c b/cucul/line.c index 2b25e23..9d46188 100644 --- a/cucul/line.c +++ b/cucul/line.c @@ -17,6 +17,7 @@ */ #include "config.h" +#include "common.h" #if !defined(__KERNEL__) # include diff --git a/cucul/sprite.c b/cucul/sprite.c index e627166..18031a2 100644 --- a/cucul/sprite.c +++ b/cucul/sprite.c @@ -16,6 +16,7 @@ */ #include "config.h" +#include "common.h" #if !defined(__KERNEL__) # include diff --git a/cucul/transform.c b/cucul/transform.c index 09906bc..d4bc15f 100644 --- a/cucul/transform.c +++ b/cucul/transform.c @@ -16,6 +16,7 @@ */ #include "config.h" +#include "common.h" #if !defined(__KERNEL__) #endif diff --git a/cucul/triangle.c b/cucul/triangle.c index e8ca705..c7d098e 100644 --- a/cucul/triangle.c +++ b/cucul/triangle.c @@ -16,6 +16,7 @@ */ #include "config.h" +#include "common.h" #if !defined(__KERNEL__) # include diff --git a/kernel/kernel.c b/kernel/kernel.c index 2bc3fd3..e291239 100644 --- a/kernel/kernel.c +++ b/kernel/kernel.c @@ -18,6 +18,7 @@ */ #include "config.h" +#include "common.h" #ifdef __KERNEL__ diff --git a/src/aafire.c b/src/aafire.c index 4889267..4223269 100644 --- a/src/aafire.c +++ b/src/aafire.c @@ -24,6 +24,7 @@ #ifdef LIBCACA #include "config.h" +#include "common.h" #if !defined(__KERNEL__) # include # include diff --git a/src/cacaball.c b/src/cacaball.c index 14d1232..49023f3 100644 --- a/src/cacaball.c +++ b/src/cacaball.c @@ -12,6 +12,7 @@ */ #include "config.h" +#include "common.h" #if !defined(__KERNEL__) # include diff --git a/src/cacamoir.c b/src/cacamoir.c index 6ce831d..e344fd1 100644 --- a/src/cacamoir.c +++ b/src/cacamoir.c @@ -12,6 +12,7 @@ */ #include "config.h" +#include "common.h" #if !defined(__KERNEL__) # include diff --git a/src/cacaplas.c b/src/cacaplas.c index 7255746..fc34053 100644 --- a/src/cacaplas.c +++ b/src/cacaplas.c @@ -13,6 +13,7 @@ */ #include "config.h" +#include "common.h" #if !defined(__KERNEL__) # include diff --git a/src/cacaplay.c b/src/cacaplay.c index d86b328..a48864a 100644 --- a/src/cacaplay.c +++ b/src/cacaplay.c @@ -12,6 +12,7 @@ */ #include "config.h" +#include "common.h" #include #include diff --git a/src/cacaserver.c b/src/cacaserver.c index c73452d..b4d0e6d 100644 --- a/src/cacaserver.c +++ b/src/cacaserver.c @@ -13,6 +13,7 @@ */ #include "config.h" +#include "common.h" #include #include diff --git a/src/cacaview.c b/src/cacaview.c index 1243395..7163776 100644 --- a/src/cacaview.c +++ b/src/cacaview.c @@ -12,6 +12,7 @@ */ #include "config.h" +#include "common.h" #include #include diff --git a/src/common-image.c b/src/common-image.c index 913802f..48fab3a 100644 --- a/src/common-image.c +++ b/src/common-image.c @@ -12,6 +12,7 @@ */ #include "config.h" +#include "common.h" #include #include diff --git a/src/img2irc.c b/src/img2irc.c index aadcd3d..a7073c4 100644 --- a/src/img2irc.c +++ b/src/img2irc.c @@ -12,6 +12,7 @@ */ #include "config.h" +#include "common.h" #include #include diff --git a/test/colors.c b/test/colors.c index d3ff813..7bff1f6 100644 --- a/test/colors.c +++ b/test/colors.c @@ -12,6 +12,7 @@ */ #include "config.h" +#include "common.h" #if !defined(__KERNEL__) # include diff --git a/test/demo.c b/test/demo.c index ae16c35..4aa691f 100644 --- a/test/demo.c +++ b/test/demo.c @@ -12,6 +12,7 @@ */ #include "config.h" +#include "common.h" #include #include diff --git a/test/dithering.c b/test/dithering.c index 7515625..4c9474d 100644 --- a/test/dithering.c +++ b/test/dithering.c @@ -12,6 +12,7 @@ */ #include "config.h" +#include "common.h" #include diff --git a/test/event.c b/test/event.c index 7869bc6..7e5defb 100644 --- a/test/event.c +++ b/test/event.c @@ -12,6 +12,7 @@ */ #include "config.h" +#include "common.h" #include #include diff --git a/test/spritedit.c b/test/spritedit.c index 3dad90c..8abe1d2 100644 --- a/test/spritedit.c +++ b/test/spritedit.c @@ -12,6 +12,7 @@ */ #include "config.h" +#include "common.h" #include diff --git a/tools/makefont.c b/tools/makefont.c index b97e726..1c83515 100644 --- a/tools/makefont.c +++ b/tools/makefont.c @@ -14,11 +14,16 @@ * makefont */ +#include "config.h" +#include "common.h" + #include #include #include -#include +#if defined(HAVE_ARPA_INET_H) +# include +#endif #include #include diff --git a/tools/optipal.c b/tools/optipal.c index 047689e..cd33f2d 100644 --- a/tools/optipal.c +++ b/tools/optipal.c @@ -12,6 +12,7 @@ */ #include "config.h" +#include "common.h" #include