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