- introduced SiteInit
- introduced sicsdescriptor
This commit is contained in:
19
ofac.c
19
ofac.c
@ -225,6 +225,7 @@
|
||||
AddCommand(pInter,"SICSBounds",SICSBounds,NULL,NULL);
|
||||
AddCommand(pInter,"SICSStatus",SICSStatus,NULL,NULL);
|
||||
AddCommand(pInter,"sicstime",SICSTime,NULL,NULL);
|
||||
AddCommand(pInter,"sicsdescriptor",SICSDescriptor,NULL,NULL);
|
||||
AddCommand(pInter,"SetStatus",SetSICSStatus,NULL,NULL);
|
||||
AddCommand(pInter,"db",SICSDebug,NULL,NULL);
|
||||
AddCommand(pInter,"EVFactory",EVControlFactory,NULL,NULL);
|
||||
@ -311,7 +312,6 @@
|
||||
AddCommand(pInter,"MakeMcStasController",
|
||||
McStasControllerFactory,NULL,NULL);
|
||||
|
||||
|
||||
/*
|
||||
install site specific commands
|
||||
*/
|
||||
@ -385,6 +385,16 @@
|
||||
site->RemoveSiteCommands(pSics);
|
||||
}
|
||||
}
|
||||
/*--------------------------------------------------------------------------*/
|
||||
void InitGeneral(void)
|
||||
{
|
||||
#define INIT(F) { void F(void); F(); }
|
||||
|
||||
/* insert here initialization routines ... */
|
||||
|
||||
INIT(SiteInit); /* site specific initializations */
|
||||
|
||||
}
|
||||
/*--------------------------------------------------------------------------*/
|
||||
int InitObjectCommands(pServer pServ, char *file)
|
||||
{
|
||||
@ -396,6 +406,8 @@
|
||||
pSics = pServ->pSics;
|
||||
assert(pSics);
|
||||
|
||||
InitGeneral();
|
||||
|
||||
/* general initialization */
|
||||
InitIniCommands(pSics,pServ->pTasker);
|
||||
|
||||
@ -405,8 +417,11 @@
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
/* removed (gives double output to stdout)
|
||||
pCon->iFiles = 1;
|
||||
pCon->pFiles[0] = stdout;
|
||||
*/
|
||||
pCon->iFiles = 0;
|
||||
|
||||
/* evaluate the file */
|
||||
sprintf(pBueffel,"fileeval %s",file);
|
||||
@ -414,6 +429,7 @@
|
||||
if(!iRet)
|
||||
{
|
||||
KillIniCommands(pSics);
|
||||
RemoveStartupCommands();
|
||||
SCDeleteConnection(pCon);
|
||||
return 0;
|
||||
}
|
||||
@ -422,6 +438,7 @@
|
||||
pCon->iFiles = 0;
|
||||
SCDeleteConnection(pCon);
|
||||
KillIniCommands(pSics);
|
||||
RemoveStartupCommands();
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user