Added "abortbatch" command for use within batch files.
It gives a user the option of aborting a batch file if their code detects an error. r2192 | ffr | 2007-10-23 12:46:16 +1000 (Tue, 23 Oct 2007) | 3 lines
This commit is contained in:
committed by
Douglas Clowes
parent
7b0162177e
commit
3a7e6a9768
@@ -73,3 +73,8 @@ int portNumCmd(SConnection *pCon, SicsInterp *pInter, void *pData, int argc, cha
|
||||
//SCsetMacro(pCon,iMacro);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int AbortBatch(SConnection *pCon, SicsInterp *pInter, void *pData, int argc, char *argv[]) {
|
||||
SCSetInterrupt(pCon,eAbortBatch);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
@@ -8,4 +8,5 @@
|
||||
char *getParam(SConnection *pCon, Tcl_Interp *pTcl, char *params, char *parName, int mustHave );
|
||||
int portNumCmd(SConnection *pCon, SicsInterp *pInter, void *pData, int argc, char *argv[]);
|
||||
int getPortNum(SConnection *pCon, char *portName);
|
||||
int AbortBatch(SConnection *pCon, SicsInterp *pInter, void *pData, int argc, char *argv[]);
|
||||
#endif
|
||||
|
||||
@@ -65,6 +65,7 @@ static void AddCommands(SicsInterp *pInter)
|
||||
NHQ200InitProtocol(pInter);
|
||||
AddCommand(pInter,"MakeTCPSelector",VelSelTcpFactory,NULL,NULL);
|
||||
AddCommand(pInter,"portnum",portNumCmd,NULL,NULL);
|
||||
AddCommand(pInter,"abortbatch",AbortBatch,NULL,NULL);
|
||||
AddCommand(pInter,"MakeHMControl_ANSTO",MakeHMControl_ANSTO,NULL,NULL);
|
||||
AddCommand(pInter,"MakeAsyncProtocol",AsyncProtocolFactory,NULL,NULL);
|
||||
AddCommand(pInter,"MakeAsyncQueue",AsyncQueueFactory,NULL,NULL);
|
||||
|
||||
Reference in New Issue
Block a user