diff --git a/macro.c b/macro.c index 7924c9bf..0a91a302 100644 --- a/macro.c +++ b/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);