- Fixes for FOCUS 2D
- Mapped fileeval to exe manager - Updates for TRICS file formats SKIPPED: psi/libpsi.a psi/sinqhmdriv.c psi/sinqhttp.c psi/tabledrive.c psi/tasscan.c psi/hardsup/asynsrv_utility.c psi/hardsup/sinqhm.c
This commit is contained in:
40
macro.c
40
macro.c
@@ -71,6 +71,7 @@
|
||||
#include "Dbg.h"
|
||||
#include "servlog.h"
|
||||
#include "stringdict.h"
|
||||
#include "exeman.h"
|
||||
|
||||
#define SICSERROR "005567SICS"
|
||||
/*----------------------------------------------------------------------------
|
||||
@@ -431,6 +432,21 @@ static int ProtectedExec(ClientData clientData, Tcl_Interp *interp,
|
||||
|
||||
}
|
||||
/*--------------------------------------------------------------------------*/
|
||||
int MacroFileEvalNew(SConnection *pCon, SicsInterp *pInter, void *pData,
|
||||
int argc, char *argv[])
|
||||
{
|
||||
void *pCom = NULL;
|
||||
pCom = FindCommandData(pInter,"exe","ExeManager");
|
||||
assert(pCom != NULL);
|
||||
|
||||
if(argc < 2){
|
||||
SCWrite(pCon,"ERROR: no batch buffer to execute specified",
|
||||
eError);
|
||||
return 0;
|
||||
}
|
||||
return runExeBatchBuffer(pCom,pCon,pInter,argv[1]);
|
||||
}
|
||||
/*----------------------------------------------------------------------*/
|
||||
int MacroFileEval(SConnection *pCon, SicsInterp *pInter, void *pData,
|
||||
int argc, char *argv[])
|
||||
{
|
||||
@@ -459,8 +475,8 @@ static int ProtectedExec(ClientData clientData, Tcl_Interp *interp,
|
||||
/* open filename */
|
||||
if( argc < 2)
|
||||
{
|
||||
SCWrite(pCon,"ERROR: No filename specified ",eError);
|
||||
return 0;
|
||||
SCWrite(pCon,"ERROR: No filename specified ",eError);
|
||||
return 0;
|
||||
}
|
||||
fp = fopen(argv[1],"r");
|
||||
if(!fp)
|
||||
@@ -490,7 +506,7 @@ static int ProtectedExec(ClientData clientData, Tcl_Interp *interp,
|
||||
{
|
||||
iChar = fgetc(fp);
|
||||
if(iChar == EOF)
|
||||
{
|
||||
{
|
||||
iChar = (int)'\n';
|
||||
iRun = 0;
|
||||
}
|
||||
@@ -505,11 +521,11 @@ static int ProtectedExec(ClientData clientData, Tcl_Interp *interp,
|
||||
SetStatus(eEager);
|
||||
FirstWord(pCom,pBueffel);
|
||||
if(FindCommand(pInter,pBueffel) != NULL)
|
||||
{
|
||||
{
|
||||
sprintf(pBueffel,"%s:%d>> %s",pFile,iLine,pCom);
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
if(pWhere != NULL)
|
||||
{
|
||||
{
|
||||
free(pWhere);
|
||||
}
|
||||
pWhere = strdup(pBueffel);
|
||||
@@ -524,16 +540,16 @@ static int ProtectedExec(ClientData clientData, Tcl_Interp *interp,
|
||||
{ /* Tcl error */
|
||||
if(strlen(pTcl->result) > 2)
|
||||
{
|
||||
/*
|
||||
local copy in order to resolve a valgrind error
|
||||
*/
|
||||
strncpy(pBueffel,pTcl->result,511);
|
||||
/*
|
||||
local copy in order to resolve a valgrind error
|
||||
*/
|
||||
strncpy(pBueffel,pTcl->result,511);
|
||||
SCWrite(pCon,pBueffel,eError);
|
||||
}
|
||||
pCom = Tcl_DStringValue(&command);
|
||||
SCWrite(pCon,"ERROR: in Tcl block:",eError);
|
||||
SCWrite(pCon,"ERROR: in Tcl block:",eError);
|
||||
SCWrite(pCon,pCom,eError);
|
||||
SCWrite(pCon,"ERROR: end of Tcl error block",eError);
|
||||
SCWrite(pCon,"ERROR: end of Tcl error block",eError);
|
||||
}
|
||||
else /* SICS error */
|
||||
{
|
||||
@@ -546,7 +562,7 @@ static int ProtectedExec(ClientData clientData, Tcl_Interp *interp,
|
||||
fclose(fp);
|
||||
Tcl_DStringFree(&command);
|
||||
SCWrite(pCon,"ERROR: batch processing interrupted",eError);
|
||||
SetStatus(eEager);
|
||||
SetStatus(eEager);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user