- inserted command echo into exe manager
This commit is contained in:
12
exeman.c
12
exeman.c
@ -208,7 +208,7 @@ static int runBatchBuffer(pExeMan self, SConnection *pCon,
|
||||
|
||||
self->exeStackPtr++;
|
||||
DynarPut(self->exeStack,self->exeStackPtr,buffer);
|
||||
status = exeBufProcess(buffer,pSics,pCon,self->pCall);
|
||||
status = exeBufProcess(buffer,pSics,pCon,self->pCall,self->echo);
|
||||
self->exeStackPtr--;
|
||||
return status;
|
||||
}
|
||||
@ -702,7 +702,7 @@ static int execQueue(pExeMan self, SConnection *pCon, SicsInterp *pSics){
|
||||
return 0;
|
||||
}
|
||||
DynarPut(self->exeStack,self->exeStackPtr,buf);
|
||||
status = exeBufProcess(buf,pSics,pCon,self->pCall);
|
||||
status = exeBufProcess(buf,pSics,pCon,self->pCall,self->echo);
|
||||
self->exeStackPtr--;
|
||||
if(SCGetInterrupt(pCon) >= eAbortBatch){
|
||||
SCWrite(pCon,"ERROR: queue processing interrupted",eError);
|
||||
@ -781,6 +781,14 @@ int ExeManagerWrapper(SConnection *pCon, SicsInterp *pSics, void *pData,
|
||||
SCSendOK(pCon);
|
||||
}
|
||||
return status;
|
||||
}else if(strcmp(argv[1],"echo") == 0){
|
||||
if (argc > 2) {
|
||||
self->echo = atoi(argv[2]) != 0;
|
||||
SCSendOK(pCon);
|
||||
} else {
|
||||
SCPrintf(pCon, eValue, "echo = %d", self->echo);
|
||||
}
|
||||
return 1;
|
||||
} else {
|
||||
status = runBatchBuffer(self,pCon,pSics,pBufferName);
|
||||
if(self->exeStackPtr < 0){
|
||||
|
Reference in New Issue
Block a user