- Cleaned all old dtatus setting code
This commit is contained in:
6
macro.c
6
macro.c
@@ -474,8 +474,6 @@ int MacroFileEval(SConnection * pCon, SicsInterp * pInter, void *pData,
|
||||
}
|
||||
|
||||
/* handle status first */
|
||||
eOld = GetStatus();
|
||||
SetStatus(eBatch);
|
||||
|
||||
SICSLogWrite("Evaluating in MacroFileEval", eValue);
|
||||
SICSLogWrite(argv[1], eValue);
|
||||
@@ -500,7 +498,6 @@ int MacroFileEval(SConnection * pCon, SicsInterp * pInter, void *pData,
|
||||
Tcl_DStringAppend(&command, pBueffel, -1);
|
||||
pCom = Tcl_DStringValue(&command);
|
||||
if (Tcl_CommandComplete(pCom)) {
|
||||
SetStatus(eEager);
|
||||
FirstWord(pCom, pBueffel);
|
||||
if (FindCommand(pInter, pBueffel) != NULL) {
|
||||
snprintf(pBueffel,sizeof(pBueffel)-1, "%s:%d>> %s", pFile, iLine, pCom);
|
||||
@@ -512,7 +509,6 @@ int MacroFileEval(SConnection * pCon, SicsInterp * pInter, void *pData,
|
||||
iLine++;
|
||||
}
|
||||
iRet = Tcl_Eval(pTcl, pCom);
|
||||
SetStatus(eBatch);
|
||||
if (iRet != TCL_OK) {
|
||||
/* write TCL error and check for total interrupt */
|
||||
if (Tcl_GetVar(pTcl, SICSERROR, TCL_GLOBAL_ONLY) == NULL) { /* Tcl error */
|
||||
@@ -537,7 +533,6 @@ int MacroFileEval(SConnection * pCon, SicsInterp * pInter, void *pData,
|
||||
fclose(fp);
|
||||
Tcl_DStringFree(&command);
|
||||
SCWrite(pCon, "ERROR: batch processing interrupted", eError);
|
||||
SetStatus(eEager);
|
||||
return 0;
|
||||
} else {
|
||||
SCSetInterrupt(pCon, eContinue);
|
||||
@@ -555,7 +550,6 @@ int MacroFileEval(SConnection * pCon, SicsInterp * pInter, void *pData,
|
||||
/* clean up */
|
||||
fclose(fp);
|
||||
Tcl_DStringFree(&command);
|
||||
SetStatus(eOld);
|
||||
SCSendOK(pCon);
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user