From 0aee4fd57f2f4135361f4182a08a98cf52ed9d10 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Wed, 15 May 2013 16:47:08 -0300 Subject: 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 --- src/common/core.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'src/common/core.c') 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] -- cgit v1.2.3-60-g2f50