Push the server and option code down to reduce dependency loops
This commit is contained in:
33
SICSmain.c
33
SICSmain.c
@ -24,12 +24,6 @@
|
||||
#include "nserver.h"
|
||||
#include "servlog.h"
|
||||
|
||||
/***************************** Necessary Globals ****************************/
|
||||
|
||||
IPair *pSICSOptions = NULL;
|
||||
pServer pServ = NULL;
|
||||
const char *argv0;
|
||||
|
||||
/* ========================= Less dreadful file statics =================== */
|
||||
|
||||
#define DEFAULTINIFILE "servo.tcl"
|
||||
@ -53,6 +47,8 @@ int main(int argc, char *argv[])
|
||||
int daemonize = 0;
|
||||
char *file = NULL;
|
||||
int i, firstArg = 1;
|
||||
extern const char *argv0;
|
||||
extern pServer pServ;
|
||||
|
||||
argv0 = argv[0];
|
||||
if (argc < 2)
|
||||
@ -101,28 +97,3 @@ int main(int argc, char *argv[])
|
||||
exit(0);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
SicsInterp *GetInterpreter(void)
|
||||
{
|
||||
return pServ->pSics;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
pExeList GetExecutor(void)
|
||||
{
|
||||
return pServ->pExecutor;
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
void StopExit(void)
|
||||
{
|
||||
if (pServ) {
|
||||
StopServer(pServ);
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
pTaskMan GetTasker(void)
|
||||
{
|
||||
return pServ->pTasker;
|
||||
}
|
||||
|
Reference in New Issue
Block a user