Merge commit 'refs/merge-requests/1' of ssh://gitorious.psi.ch/sinqdev/sics into merge-requests/1

First merge with ANSTO which compiles

Conflicts:
	SICSmain.c
	asynnet.c
	confvirtualmot.c
	counter.c
	devexec.c
	drive.c
	exebuf.c
	hipadaba.c
	interface.h
	make_gen
	motor.c
	nserver.c
	nwatch.c
	ofac.c
	protocol.c
	sicshipadaba.c
This commit is contained in:
2015-04-23 17:00:33 +02:00
93 changed files with 3977 additions and 1572 deletions

View File

@@ -40,12 +40,16 @@
#include "commandlog.h"
extern void StopExit(void); /* in SICSmain.c */
extern int openDevexecLog(); /* in devexec.c */
extern void NetWatchInit(void); /* in nwatch.c */
/* ========================= Less dreadful file statics =================== */
extern int NetWatchTask(void *pData); /* in nwatch.c */
/*------------------------------------------------------------------------*/
static void StopExit(void)
{
if (pServ) {
StopServer(pServ);
}
}
#define DEFAULTINIFILE "servo.tcl"
#define DEFAULTSTATUSFILE "sicsstat.tcl"
@@ -116,7 +120,7 @@ int InitServer(char *file, pServer * pServ)
pSICSOptions = IFAddOption(pSICSOptions, "ConMask", "0");
/* initialize the network watcher */
NetWatchInit();
TaskRegister(self->pTasker, NetWatchTask, NULL, NULL, NULL, 1);
/* initialise the server from script */
SetWriteHistory(0);
@@ -507,3 +511,23 @@ int ServerIsStarting(pServer self)
{
return self->pReader == NULL;
}
pServer pServ = NULL;
/*--------------------------------------------------------------------------*/
SicsInterp *GetInterpreter(void)
{
return pServ->pSics;
}
/*--------------------------------------------------------------------------*/
pExeList GetExecutor(void)
{
return pServ->pExecutor;
}
/*-------------------------------------------------------------------------*/
pTaskMan GetTasker(void)
{
return pServ->pTasker;
}