// $Id: core.c,v 1.1.1.1 2004/09/10 17:44:49 MagicalTux Exp $ // original : core.c 2003/02/26 18:03:12 Rev 1.7 #include #include #ifndef LCCWIN32 #include #endif #include #include "core.h" #include "socket.h" #include "timer.h" #include "version.h" #ifdef MEMWATCH #include "memwatch.h" #endif static void (*term_func)(void)=NULL; /*====================================== * CORE : Set function *-------------------------------------- */ void set_termfunc(void (*termfunc)(void)) { term_func = termfunc; } /*====================================== * CORE : Signal Sub Function *-------------------------------------- */ static void sig_proc(int sn) { int i; switch(sn){ case SIGINT: case SIGTERM: if(term_func) term_func(); for(i=0;i