- inserted command statistic
- add runscript parameter to environment object - added Arg2Tcl0 function
This commit is contained in:
7
macro.c
7
macro.c
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user