summaryrefslogtreecommitdiff
path: root/src/common/core.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2018-11-11 23:26:19 +0100
committerHaru <haru@dotalux.com>2018-11-13 14:42:46 +0100
commitec2f7f8c40bca8ecef4a8269e87b12d0885d10bb (patch)
treebf840ba8ba3343700246e0b8ccce66c1ce3fb18f /src/common/core.c
parentc9894956cbd029b31b3ad833804a4e59018eb015 (diff)
downloadhercules-ec2f7f8c40bca8ecef4a8269e87b12d0885d10bb.tar.gz
hercules-ec2f7f8c40bca8ecef4a8269e87b12d0885d10bb.tar.bz2
hercules-ec2f7f8c40bca8ecef4a8269e87b12d0885d10bb.tar.xz
hercules-ec2f7f8c40bca8ecef4a8269e87b12d0885d10bb.zip
Remove the unused minicore libraries and ifdefs
Minicore was previously used by the tools in the src/tool directory, and is currently unused. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/common/core.c')
-rw-r--r--src/common/core.c42
1 files changed, 9 insertions, 33 deletions
diff --git a/src/common/core.c b/src/common/core.c
index 9fd33c4e0..1ecf1df83 100644
--- a/src/common/core.c
+++ b/src/common/core.c
@@ -23,32 +23,29 @@
#include "config/core.h"
#include "core.h"
+#include "common/HPM.h"
#include "common/cbasetypes.h"
+#include "common/conf.h"
#include "common/console.h"
#include "common/db.h"
#include "common/des.h"
+#include "common/ers.h"
#include "common/grfio.h"
+#include "common/md5calc.h"
#include "common/memmgr.h"
#include "common/mmo.h"
+#include "common/mutex.h"
#include "common/nullpo.h"
+#include "common/random.h"
#include "common/showmsg.h"
+#include "common/socket.h"
+#include "common/sql.h"
#include "common/strlib.h"
#include "common/sysinfo.h"
+#include "common/thread.h"
#include "common/timer.h"
#include "common/utils.h"
-#ifndef MINICORE
-# include "common/HPM.h"
-# include "common/conf.h"
-# include "common/ers.h"
-# include "common/md5calc.h"
-# include "common/mutex.h"
-# include "common/random.h"
-# include "common/socket.h"
-# include "common/sql.h"
-# include "common/thread.h"
-#endif
-
#ifndef _WIN32
# include <unistd.h>
#else
@@ -83,7 +80,6 @@
static struct core_interface core_s;
struct core_interface *core = &core_s;
-#ifndef MINICORE // minimalist Core
// Added by Gabuzomeu
//
// This is an implementation of signal() using sigaction() for portability.
@@ -196,7 +192,6 @@ static void signals_init(void)
compat_signal(SIGTRAP, SIG_DFL);
#endif
}
-#endif
/**
* Warns the user if executed as superuser (root)
@@ -250,10 +245,8 @@ static bool usercheck(void)
static void core_defaults(void)
{
nullpo_defaults();
-#ifndef MINICORE
hpm_defaults();
HCache_defaults();
-#endif
sysinfo_defaults();
console_defaults();
strlib_defaults();
@@ -262,7 +255,6 @@ static void core_defaults(void)
cmdline_defaults();
des_defaults();
grfio_defaults(); // Note: grfio is lazily loaded. grfio->init() and grfio->final() are not automatically called.
-#ifndef MINICORE
mutex_defaults();
libconfig_defaults();
sql_defaults();
@@ -272,7 +264,6 @@ static void core_defaults(void)
rnd_defaults();
md5_defaults();
thread_defaults();
-#endif
}
/**
@@ -280,12 +271,8 @@ static void core_defaults(void)
*/
static const char *cmdline_arg_source(struct CmdlineArgData *arg)
{
-#ifdef MINICORE
- return "core";
-#else // !MINICORE
nullpo_retr(NULL, arg);
return HPM->pid2name(arg->pluginID);
-#endif // MINICORE
}
/**
@@ -446,15 +433,9 @@ static int cmdline_exec(int argc, char **argv, unsigned int options)
*/
static void cmdline_init(void)
{
-#ifdef MINICORE
- // Minicore has no HPM. This value isn't used, but the arg_add function requires it, so we're (re)defining it here
-#define HPM_PID_CORE ((unsigned int)-1)
-#endif
CMDLINEARG_DEF(help, 'h', "Displays this help screen", CMDLINE_OPT_NORMAL);
CMDLINEARG_DEF(version, 'v', "Displays the server's version.", CMDLINE_OPT_NORMAL);
-#ifndef MINICORE
CMDLINEARG_DEF2(load-plugin, loadplugin, "Loads an additional plugin (can be repeated).", CMDLINE_OPT_PARAM|CMDLINE_OPT_PREINIT);
-#endif // !MINICORE
cmdline_args_init_local();
}
@@ -521,10 +502,6 @@ int main(int argc, char **argv)
if (!usercheck())
return EXIT_FAILURE;
-#ifdef MINICORE // minimalist Core
- do_init(argc,argv);
- do_final();
-#else// not MINICORE
set_server_type();
Sql_Init();
@@ -567,7 +544,6 @@ int main(int argc, char **argv)
thread->final();
ers_final();
rnd->final();
-#endif
cmdline->final();
//sysinfo->final(); Called by iMalloc->final()