From bc1d286cc71a7ae82d9639f4a832970a287c0d71 Mon Sep 17 00:00:00 2001 From: Haru Date: Fri, 16 May 2014 17:34:16 +0200 Subject: Follow-up to b6b3f58795288701d0e162d43fa6f0a47af913b3 - Includes in some files weren't sorted alphabetically. Special thanks to KeiKun. Signed-off-by: Haru --- src/common/core.c | 9 ++++---- src/common/mutex.c | 3 ++- src/common/random.c | 1 + src/common/thread.c | 8 ++++---- src/map/atcommand.c | 2 +- src/map/battleground.c | 2 +- src/map/map.h | 4 ++-- src/map/script.c | 2 +- src/map/script.h | 2 +- src/plugins/HPMHooking.c | 53 ++++++++++++++++++++++++------------------------ src/plugins/db2sql.c | 20 ++++++++++-------- src/plugins/sample.c | 10 ++++----- 12 files changed, 60 insertions(+), 56 deletions(-) diff --git a/src/common/core.c b/src/common/core.c index 85f824866..d74e5a451 100644 --- a/src/common/core.c +++ b/src/common/core.c @@ -7,6 +7,11 @@ #include "../config/core.h" #include "core.h" +#include +#include +#include +#include + #include "../common/cbasetypes.h" #include "../common/console.h" #include "../common/malloc.h" @@ -28,10 +33,6 @@ # include "../common/utils.h" #endif -#include -#include -#include -#include #ifndef _WIN32 # include #else diff --git a/src/common/mutex.c b/src/common/mutex.c index 1de707e95..626dfa2e1 100644 --- a/src/common/mutex.c +++ b/src/common/mutex.c @@ -5,6 +5,8 @@ #include "mutex.h" +#include "../common/cbasetypes.h" // for WIN32 + #ifdef WIN32 #include "../common/winapi.h" #else @@ -13,7 +15,6 @@ #include #endif -#include "../common/cbasetypes.h" #include "../common/malloc.h" #include "../common/showmsg.h" #include "../common/timer.h" diff --git a/src/common/random.c b/src/common/random.c index 7019a31f3..88d5748cf 100644 --- a/src/common/random.c +++ b/src/common/random.c @@ -9,6 +9,7 @@ #include // init_genrand, genrand_int32, genrand_res53 +#include "../common/cbasetypes.h" // for WIN32 #include "../common/showmsg.h" #include "../common/timer.h" // gettick diff --git a/src/common/thread.c b/src/common/thread.c index bba56e7eb..91360537f 100644 --- a/src/common/thread.c +++ b/src/common/thread.c @@ -19,12 +19,12 @@ # define getpagesize() 4096 // @TODO: implement this properly (GetSystemInfo .. dwPageSize..). (Atm as on all supported win platforms its 4k its static.) # define __thread __declspec( thread ) #else -# include -# include -# include -# include # include # include +# include +# include +# include +# include #endif // When Compiling using MSC (on win32..) we know we have support in any case! diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 96fa9c350..4a183ded4 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -12,6 +12,7 @@ #include #include +#include "HPMmap.h" #include "battle.h" #include "chat.h" #include "chrif.h" @@ -54,7 +55,6 @@ #include "../common/sysinfo.h" #include "../common/timer.h" #include "../common/utils.h" -#include "HPMmap.h" struct atcommand_interface atcommand_s; diff --git a/src/map/battleground.c b/src/map/battleground.c index a7169de0e..4558f32c3 100644 --- a/src/map/battleground.c +++ b/src/map/battleground.c @@ -6,8 +6,8 @@ #include "battleground.h" -#include #include +#include #include "battle.h" #include "clif.h" diff --git a/src/map/map.h b/src/map/map.h index 099370b7a..3ce59a804 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -10,9 +10,9 @@ #include "atcommand.h" #include "../common/cbasetypes.h" #include "../common/core.h" // CORE_ST_LAST -#include "../common/mmo.h" -#include "../common/mapindex.h" #include "../common/db.h" +#include "../common/mapindex.h" +#include "../common/mmo.h" #include "../common/sql.h" struct mob_data; diff --git a/src/map/script.c b/src/map/script.c index b432e6720..404079126 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -11,6 +11,7 @@ #include #include #include +#include #include "atcommand.h" #include "battle.h" @@ -58,7 +59,6 @@ #ifndef WIN32 #include #endif -#include static inline int GETVALUE(const unsigned char* buf, int i) { return (int)MakeDWord(MakeWord(buf[i], buf[i+1]), MakeWord(buf[i+2], 0)); diff --git a/src/map/script.h b/src/map/script.h index 899c745da..bb6cd6e11 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -5,8 +5,8 @@ #ifndef _MAP_SCRIPT_H_ #define _MAP_SCRIPT_H_ -#include #include +#include #include "map.h" //EVENT_NAME_LENGTH #include "../common/cbasetypes.h" diff --git a/src/plugins/HPMHooking.c b/src/plugins/HPMHooking.c index e6e698383..46792b268 100644 --- a/src/plugins/HPMHooking.c +++ b/src/plugins/HPMHooking.c @@ -3,48 +3,47 @@ // Sample Hercules Plugin #include -#include #include +#include #include "../common/HPMi.h" +#include "../common/db.h" +#include "../common/malloc.h" #include "../common/mmo.h" #include "../common/socket.h" -#include "../common/malloc.h" -#include "../common/db.h" - -#include "../map/map.h" -#include "../map/path.h" +#include "../map/atcommand.h" +#include "../map/battle.h" +#include "../map/battleground.h" +#include "../map/chat.h" #include "../map/chrif.h" #include "../map/clif.h" #include "../map/duel.h" +#include "../map/elemental.h" +#include "../map/guild.h" +#include "../map/homunculus.h" +#include "../map/instance.h" #include "../map/intif.h" +#include "../map/irc-bot.h" +#include "../map/itemdb.h" +#include "../map/log.h" +#include "../map/mail.h" +#include "../map/map.h" +#include "../map/mapreg.h" +#include "../map/mercenary.h" +#include "../map/mob.h" +#include "../map/npc.h" #include "../map/npc.h" +#include "../map/party.h" +#include "../map/path.h" #include "../map/pc.h" +#include "../map/pet.h" +#include "../map/quest.h" +#include "../map/script.h" +#include "../map/skill.h" #include "../map/status.h" -#include "../map/mob.h" -#include "../map/npc.h" -#include "../map/chat.h" -#include "../map/itemdb.h" #include "../map/storage.h" -#include "../map/skill.h" #include "../map/trade.h" -#include "../map/party.h" #include "../map/unit.h" -#include "../map/battle.h" -#include "../map/battleground.h" -#include "../map/quest.h" -#include "../map/script.h" -#include "../map/mapreg.h" -#include "../map/guild.h" -#include "../map/pet.h" -#include "../map/homunculus.h" -#include "../map/instance.h" -#include "../map/mercenary.h" -#include "../map/elemental.h" -#include "../map/atcommand.h" -#include "../map/log.h" -#include "../map/mail.h" -#include "../map/irc-bot.h" #include "../common/HPMDataCheck.h" diff --git a/src/plugins/db2sql.c b/src/plugins/db2sql.c index b8f21407e..1e9cb1a5a 100644 --- a/src/plugins/db2sql.c +++ b/src/plugins/db2sql.c @@ -1,20 +1,22 @@ // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file -#include "../common/cbasetypes.h" -#include "../common/strlib.h" -#include "../common/timer.h" +#include "../config/core.h" + +#include +#include + #include "../common/HPMi.h" +#include "../common/cbasetypes.h" +#include "../common/conf.h" #include "../common/malloc.h" #include "../common/mmo.h" -#include "../common/conf.h" -#include "../config/core.h" +#include "../common/strlib.h" +#include "../common/timer.h" #include "../map/clif.h" -#include "../map/pc.h" -#include "../map/map.h" #include "../map/itemdb.h" -#include -#include +#include "../map/map.h" +#include "../map/pc.h" #include "../common/HPMDataCheck.h" diff --git a/src/plugins/sample.c b/src/plugins/sample.c index 819aae08c..84df88e06 100644 --- a/src/plugins/sample.c +++ b/src/plugins/sample.c @@ -3,17 +3,17 @@ // Sample Hercules Plugin #include -#include #include +#include #include "../common/HPMi.h" +#include "../common/malloc.h" #include "../common/mmo.h" #include "../common/socket.h" -#include "../common/malloc.h" -#include "../map/script.h" -#include "../map/pc.h" -#include "../map/clif.h" #include "../common/strlib.h" +#include "../map/clif.h" +#include "../map/pc.h" +#include "../map/script.h" #include "../common/HPMDataCheck.h" /* should always be the last file included! (if you don't make it last, it'll intentionally break compile time) */ -- cgit v1.2.3-60-g2f50