- inserted command statistic

- add runscript parameter to environment object
- added Arg2Tcl0 function
This commit is contained in:
zolliker
2006-06-20 13:28:17 +00:00
parent bd533e6131
commit f88f48fca9
15 changed files with 334 additions and 32 deletions

View File

@@ -132,7 +132,8 @@
char *lastCommand = NULL, comBuffer[132];
int iRet = 0,i;
int iMacro;
Statistics *old;
/* get the datastructures */
pSics = (struct __SicsUnknown *)pData;
assert(pSics);
@@ -181,7 +182,9 @@
/* invoke */
iMacro = SCinMacro(pCon);
SCsetMacro(pCon,1);
old=StatisticsBegin(pCommand->stat);
iRet = pCommand->OFunc(pCon,pSinter,pCommand->pData,margc, myarg);
StatisticsEnd(old);
SCsetMacro(pCon,iMacro);
/*
lastUnkown gets deeply stacked with each SICS command exec'd.
@@ -881,7 +884,7 @@ static int ProtectedExec(ClientData clientData, Tcl_Interp *interp,
}
/* make a string */
pCommand = Arg2Tcl(argc,argv,pBueffel,sizeof(pBueffel));
pCommand = Arg2Tcl0(argc-1,argv+1,pBueffel,sizeof(pBueffel),self->command);
if (!pCommand) {
SCWrite(pCon, "ERROR: no more memory", eError);
return 0;