From f2fbdc16a14d07e0895cc09eeba689bc556481d2 Mon Sep 17 00:00:00 2001 From: Haru Date: Fri, 5 Jun 2015 01:49:44 +0200 Subject: Cleaned up some #includes Signed-off-by: Haru --- src/common/HPM.c | 1 + src/common/cbasetypes.h | 1 + src/common/conf.h | 2 +- src/common/core.c | 3 +-- src/common/core.h | 2 -- src/common/grfio.c | 1 - src/common/malloc.c | 2 +- src/common/mapindex.c | 3 +-- src/common/mapindex.h | 1 + src/common/md5calc.c | 5 +---- src/common/mmo.h | 3 --- src/common/mutex.c | 1 - src/common/random.c | 2 -- src/common/showmsg.c | 2 -- src/common/socket.c | 2 +- src/common/socket.h | 2 -- src/common/sql.c | 1 - src/common/sysinfo.c | 1 - src/common/timer.c | 1 - src/common/utils.c | 4 ---- src/common/utils.h | 1 - 21 files changed, 9 insertions(+), 32 deletions(-) (limited to 'src/common') diff --git a/src/common/HPM.c b/src/common/HPM.c index 2b508e233..5a0fe16dc 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -10,6 +10,7 @@ #include "common/conf.h" #include "common/console.h" #include "common/core.h" +#include "common/db.h" #include "common/malloc.h" #include "common/mmo.h" #include "common/showmsg.h" diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h index a0fa77fb5..ce8fc6bcf 100644 --- a/src/common/cbasetypes.h +++ b/src/common/cbasetypes.h @@ -97,6 +97,7 @@ #include #include #include +#include // temporary fix for bugreport:4961 (unintended conversion from signed to unsigned) // (-20 >= UCHAR_MAX) returns true diff --git a/src/common/conf.h b/src/common/conf.h index 771725cf4..1889aeb3a 100644 --- a/src/common/conf.h +++ b/src/common/conf.h @@ -7,7 +7,7 @@ #include "common/cbasetypes.h" -#include "libconfig/libconfig.h" +#include /** * The libconfig interface -- specially for plugins, but we enforce it throughout the core to be consistent diff --git a/src/common/core.c b/src/common/core.c index 5a410add1..e663c4e4c 100644 --- a/src/common/core.c +++ b/src/common/core.c @@ -9,6 +9,7 @@ #include "common/cbasetypes.h" #include "common/console.h" +#include "common/db.h" #include "common/malloc.h" #include "common/mmo.h" #include "common/random.h" @@ -20,7 +21,6 @@ #ifndef MINICORE # include "common/HPM.h" # include "common/conf.h" -# include "common/db.h" # include "common/ers.h" # include "common/socket.h" # include "common/sql.h" @@ -37,7 +37,6 @@ #include #include #include -#include /// Called when a terminate signal is received. void (*shutdown_callback)(void) = NULL; diff --git a/src/common/core.h b/src/common/core.h index d96e8506a..c2a8d9e58 100644 --- a/src/common/core.h +++ b/src/common/core.h @@ -6,8 +6,6 @@ #define COMMON_CORE_H #include "common/cbasetypes.h" -#include "common/db.h" -#include "common/mmo.h" /* so that developers with --enable-debug can raise signals from any section of the code they'd like */ #ifdef DEBUG diff --git a/src/common/grfio.c b/src/common/grfio.c index 00d6ffc89..614678da8 100644 --- a/src/common/grfio.c +++ b/src/common/grfio.c @@ -16,7 +16,6 @@ #include #include -#include #include #include diff --git a/src/common/malloc.c b/src/common/malloc.c index 008fd0930..ec0467495 100644 --- a/src/common/malloc.c +++ b/src/common/malloc.c @@ -6,6 +6,7 @@ #include "malloc.h" +#include "common/cbasetypes.h" #include "common/core.h" #include "common/showmsg.h" #include "common/sysinfo.h" @@ -13,7 +14,6 @@ #include #include #include -#include struct malloc_interface iMalloc_s; diff --git a/src/common/mapindex.c b/src/common/mapindex.c index 42b46246d..18aa413cc 100644 --- a/src/common/mapindex.c +++ b/src/common/mapindex.c @@ -6,15 +6,14 @@ #include "mapindex.h" +#include "common/cbasetypes.h" #include "common/db.h" -#include "common/malloc.h" #include "common/mmo.h" #include "common/showmsg.h" #include "common/strlib.h" #include #include -#include /* mapindex.c interface source */ struct mapindex_interface mapindex_s; diff --git a/src/common/mapindex.h b/src/common/mapindex.h index 408078ceb..c334e7cca 100644 --- a/src/common/mapindex.h +++ b/src/common/mapindex.h @@ -5,6 +5,7 @@ #ifndef COMMON_MAPINDEX_H #define COMMON_MAPINDEX_H +#include "common/cbasetypes.h" #include "common/db.h" #include "common/mmo.h" diff --git a/src/common/md5calc.c b/src/common/md5calc.c index e27b64504..e594c364f 100644 --- a/src/common/md5calc.c +++ b/src/common/md5calc.c @@ -10,16 +10,13 @@ #include "md5calc.h" +#include "common/cbasetypes.h" #include "common/random.h" #include #include #include -#ifndef UINT_MAX -#define UINT_MAX 4294967295U -#endif - // Global variable static unsigned int *pX; diff --git a/src/common/mmo.h b/src/common/mmo.h index 94a4b06da..3e497c667 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -7,9 +7,6 @@ #include "config/core.h" #include "common/cbasetypes.h" -#include "common/db.h" - -#include // server->client protocol version // 0 - pre-? diff --git a/src/common/mutex.c b/src/common/mutex.c index 59c04d4f0..5dfb3d01c 100644 --- a/src/common/mutex.c +++ b/src/common/mutex.c @@ -14,7 +14,6 @@ #include "common/winapi.h" #else #include -#include #include #endif diff --git a/src/common/random.c b/src/common/random.c index 70257fcb6..a4d7c5d34 100644 --- a/src/common/random.c +++ b/src/common/random.c @@ -5,8 +5,6 @@ #include "random.h" -#include // time - #include "common/cbasetypes.h" // for WIN32 #include "common/showmsg.h" #include "common/timer.h" // gettick diff --git a/src/common/showmsg.c b/src/common/showmsg.c index 3eb7ba0af..01dc0b01a 100644 --- a/src/common/showmsg.c +++ b/src/common/showmsg.c @@ -15,8 +15,6 @@ #include #include #include // atexit -#include -#include #ifdef WIN32 # include "common/winapi.h" diff --git a/src/common/socket.c b/src/common/socket.c index aa575f1a6..17c31db50 100644 --- a/src/common/socket.c +++ b/src/common/socket.c @@ -11,6 +11,7 @@ #include "common/HPM.h" #include "common/cbasetypes.h" +#include "common/db.h" #include "common/malloc.h" #include "common/mmo.h" #include "common/showmsg.h" @@ -19,7 +20,6 @@ #include #include -#include #include #ifdef WIN32 diff --git a/src/common/socket.h b/src/common/socket.h index 94f86759b..bd5d9baa2 100644 --- a/src/common/socket.h +++ b/src/common/socket.h @@ -7,8 +7,6 @@ #include "common/cbasetypes.h" -#include - #ifdef WIN32 # include "common/winapi.h" typedef long in_addr_t; diff --git a/src/common/sql.c b/src/common/sql.c index 9dc8144bf..a93092533 100644 --- a/src/common/sql.c +++ b/src/common/sql.c @@ -17,7 +17,6 @@ #endif #include #include // strtoul -#include // strlen/strnlen/memcpy/memset void hercules_mysql_error_handler(unsigned int ecode); diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c index 33ffc43f3..a27357e7e 100644 --- a/src/common/sysinfo.c +++ b/src/common/sysinfo.c @@ -16,7 +16,6 @@ #include // fopen #include // atoi #ifdef WIN32 -# include // strlen # include #else # include diff --git a/src/common/timer.c b/src/common/timer.c index 42eb892ad..06309642e 100644 --- a/src/common/timer.c +++ b/src/common/timer.c @@ -22,7 +22,6 @@ #include #include #include -#include struct timer_interface timer_s; diff --git a/src/common/utils.c b/src/common/utils.c index 865b3575b..07e2e9fdf 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -8,7 +8,6 @@ #include "common/cbasetypes.h" #include "common/core.h" -#include "common/malloc.h" #include "common/mmo.h" #include "common/showmsg.h" #include "common/socket.h" @@ -21,15 +20,12 @@ # endif /* F_OK */ #else # include -# include # include #endif #include // floor() -#include #include #include -#include #include // cache purposes [Ind/Hercules] struct HCache_interface HCache_s; diff --git a/src/common/utils.h b/src/common/utils.h index 57113aea0..0ac818468 100644 --- a/src/common/utils.h +++ b/src/common/utils.h @@ -8,7 +8,6 @@ #include "common/cbasetypes.h" #include // FILE* -#include /* [HCache] 1-byte key to ensure our method is the latest, we can modify to ensure the method matches */ #define HCACHE_KEY 'k' -- cgit v1.2.3-60-g2f50