summaryrefslogtreecommitdiff
path: root/src/common/HPM.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2014-05-04 06:13:56 +0200
committerHaru <haru@dotalux.com>2014-05-09 08:29:46 +0200
commitb6b3f58795288701d0e162d43fa6f0a47af913b3 (patch)
treea75f686731786ed1746325589d8acb1569409981 /src/common/HPM.c
parent1c4e3820d5f4ff9870c28104122f6733db4d55a6 (diff)
downloadhercules-b6b3f58795288701d0e162d43fa6f0a47af913b3.tar.gz
hercules-b6b3f58795288701d0e162d43fa6f0a47af913b3.tar.bz2
hercules-b6b3f58795288701d0e162d43fa6f0a47af913b3.tar.xz
hercules-b6b3f58795288701d0e162d43fa6f0a47af913b3.zip
Fixed order of includes in all source files
- Changed order according to the (upcoming) code style guidelines. - Fixes several issues caused by missing headers when their include order is changed or in plugins. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/common/HPM.c')
-rw-r--r--src/common/HPM.c31
1 files changed, 18 insertions, 13 deletions
diff --git a/src/common/HPM.c b/src/common/HPM.c
index 9ffce87de..00b92dc60 100644
--- a/src/common/HPM.c
+++ b/src/common/HPM.c
@@ -1,26 +1,31 @@
// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
+#define HERCULES_CORE
+
+#include "../config/core.h" // CONSOLE_INPUT
+#include "HPM.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
#include "../common/cbasetypes.h"
-#include "../common/mmo.h"
+#include "../common/conf.h"
+#include "../common/console.h"
#include "../common/core.h"
#include "../common/malloc.h"
+#include "../common/mmo.h"
#include "../common/showmsg.h"
#include "../common/socket.h"
-#include "../common/timer.h"
-#include "../common/conf.h"
-#include "../common/utils.h"
-#include "../common/console.h"
-#include "../common/strlib.h"
#include "../common/sql.h"
+#include "../common/strlib.h"
#include "../common/sysinfo.h"
-#include "HPM.h"
+#include "../common/timer.h"
+#include "../common/utils.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
#ifndef WIN32
-#include <unistd.h>
+# include <unistd.h>
#endif
struct malloc_interface iMalloc_HPM;
@@ -686,7 +691,7 @@ bool hplugins_parse_conf(const char *w1, const char *w2, enum HPluginConfType po
void hplugins_share_defaults(void) {
/* console */
#ifdef CONSOLE_INPUT
- HPM->share(console->addCommand,"addCPCommand");
+ HPM->share(console->input->addCommand,"addCPCommand");
#endif
/* our own */
HPM->share(hplugins_addpacket,"addPacket");
@@ -755,7 +760,7 @@ void hpm_init(void) {
HPM->symbol_defaults();
#ifdef CONSOLE_INPUT
- console->addCommand("plugins",CPCMD_A(plugins));
+ console->input->addCommand("plugins",CPCMD_A(plugins));
#endif
return;
}