/*-------------------------------------------------------------------------- THE SICS SERVER This file contains the main entry point into the world of SICS. Mark Koennecke, October 1996 Copyright: see copyright.h Labor fuer Neutronenstreuung Paul Scherrer Institut CH-5423 Villigen-PSI ----------------------------------------------------------------------------*/ #include #include #include #include #include "nserver.h" #include "servlog.h" /***************************** Necessary Globals ****************************/ IPair *pSICSOptions = NULL; pServer pServ = NULL; /* ========================= Less dreadful file statics =================== */ #define DEFAULTINIFILE "servo.tcl" int usage(const char* name) { fprintf(stderr, "usage: %s [-d] [-nolog] \n", name); return 1; } /*--------------------------------------------------------------------------- The Servers Main program. May take one argument: the name of an initialisation file */ int main(int argc, char *argv[]) { int iRet; int debug = 0; char *file=NULL; int i, firstArg=1; if (argc < 2) return usage(argv[0]); /* initialise, will die on you if problems */ if (strcasecmp(argv[1], "-d") == 0) { debug = 1; firstArg=2; } for (i=firstArg; ipSics; } /*--------------------------------------------------------------------------*/ pExeList GetExecutor(void) { return pServ->pExecutor; } /*------------------------------------------------------------------------*/ void StopExit(void) { if(pServ) { StopServer(pServ); } } /*-------------------------------------------------------------------------*/ pTaskMan GetTasker(void) { return pServ->pTasker; }