Fix file and line number in fileeval messages
This commit is contained in:
4
macro.c
4
macro.c
@@ -512,6 +512,7 @@ int MacroFileEval(SConnection * pCon, SicsInterp * pInter, void *pData,
|
||||
iRun = 0;
|
||||
}
|
||||
if (iChar == (int) '\n') {
|
||||
iLine++;
|
||||
pBueffel[i] = (char) iChar;
|
||||
pBueffel[i + 1] = '\0';
|
||||
Tcl_DStringAppend(&command, pBueffel, -1);
|
||||
@@ -520,13 +521,12 @@ int MacroFileEval(SConnection * pCon, SicsInterp * pInter, void *pData,
|
||||
SetStatus(eEager);
|
||||
FirstWord(pCom, pBueffel);
|
||||
if (FindCommand(pInter, pBueffel) != NULL) {
|
||||
snprintf(pBueffel,sizeof(pBueffel)-1, "%s:%d>> %s", pFile, iLine, pCom);
|
||||
snprintf(pBueffel,sizeof(pBueffel)-1, "%s:%d>> %s", argv[1], iLine, pCom);
|
||||
SCWrite(pCon, pBueffel, eLog);
|
||||
if (pWhere != NULL) {
|
||||
free(pWhere);
|
||||
}
|
||||
pWhere = strdup(pBueffel);
|
||||
iLine++;
|
||||
}
|
||||
iRet = Tcl_Eval(pTcl, pCom);
|
||||
SetStatus(eBatch);
|
||||
|
||||
Reference in New Issue
Block a user