Push the server and option code down to reduce dependency loops

This commit is contained in:
Douglas Clowes
2014-04-03 16:46:43 +11:00
parent a557cf577a
commit 93276478f5
5 changed files with 36 additions and 34 deletions

View File

@ -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;
}