summaryrefslogtreecommitdiff
path: root/src/common/core.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-05-15 16:47:08 -0300
committershennetsind <ind@henn.et>2013-05-15 16:47:08 -0300
commit0aee4fd57f2f4135361f4182a08a98cf52ed9d10 (patch)
treed7f43f0a5a63e73e21291f906e33109232ce7830 /src/common/core.c
parent75942979098d34d52adc2537b6f28e02be7d7bae (diff)
downloadhercules-0aee4fd57f2f4135361f4182a08a98cf52ed9d10.tar.gz
hercules-0aee4fd57f2f4135361f4182a08a98cf52ed9d10.tar.bz2
hercules-0aee4fd57f2f4135361f4182a08a98cf52ed9d10.tar.xz
hercules-0aee4fd57f2f4135361f4182a08a98cf52ed9d10.zip
HPM Update
Made SQL and strlib functions HPM-friendly, special thanks to Yommy for bringing the issue up. Added partial map.c support, for the all-handy map[] array, beware that soon the whole map.c renewal design will be commit and when that happens your usage of map.c functions in plugins might require some updates. Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/common/core.c')
-rw-r--r--src/common/core.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/common/core.c b/src/common/core.c
index 9fd9747aa..8ed0b5801 100644
--- a/src/common/core.c
+++ b/src/common/core.c
@@ -278,27 +278,32 @@ void usercheck(void) {
}
#endif
}
-
+void core_defaults(void) {
+#ifndef MINICORE
+ hpm_defaults();
+#endif
+ console_defaults();
+#ifndef MINICORE
+ strlib_defaults();
+ sql_defaults();
+ timer_defaults();
+#endif
+}
/*======================================
* CORE : MAINROUTINE
*--------------------------------------*/
-int main (int argc, char **argv)
-{
+int main (int argc, char **argv) {
{// initialize program arguments
char *p1 = SERVER_NAME = argv[0];
char *p2 = p1;
- while ((p1 = strchr(p2, '/')) != NULL || (p1 = strchr(p2, '\\')) != NULL)
- {
+ while ((p1 = strchr(p2, '/')) != NULL || (p1 = strchr(p2, '\\')) != NULL) {
SERVER_NAME = ++p1;
p2 = p1;
}
arg_c = argc;
arg_v = argv;
}
-#ifndef MINICORE
- hpm_defaults();
-#endif
- console_defaults();
+ core_defaults();
malloc_init();// needed for Show* in display_title() [FlavioJS]