move sicslist to site_ansto.c and add TCL 8.5 clock

This commit is contained in:
Douglas Clowes
2012-12-10 14:54:44 +11:00
parent 7f42b8c420
commit c2150780fa

View File

@ -23,6 +23,7 @@
#include <SCinter.h>
#include "protocol.h"
#include "sicslist.h"
/* site-specific driver header files */
#include "motor_dmc2280.h"
#include "motor_asim.h"
@ -149,6 +150,28 @@ static void AddCommands(SicsInterp *pInter)
AddCommand(pInter,"SICS_Site",SICS_Site,NULL,NULL);
AddCommand(pInter,"SICS_Version",SICS_Version,NULL,NULL);
AddCommand(pInter,"SICS_Revision",SICS_Revision,NULL,NULL);
AddCommand(pInter, "sicslist", SicsList, NULL, NULL);
/*
* Tcl 8.5 has implemented the clock command in tcl rather then C.
* This includes the same command, backported from Tcl 8.4
*/
#if 0
printf("TCL interpreter %s safe\n", Tcl_IsSafe(InterpGetTcl(pServ->pSics)) ? "is" : "is not");
//TclClockInit(InterpGetTcl(pServ->pSics));
#else
/*
* from tclClock.c
*/
int Tcl_ClockObjCmd (ClientData client, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]);
/*
* Tcl 8.5 has implemented the clock command in tcl rather than C.
* This includes the same command, backported from Tcl 8.4
*/
Tcl_CreateObjCommand(InterpGetTcl(pServ->pSics), "clock", Tcl_ClockObjCmd, NULL, NULL);
#endif
}
/*---------------------------------------------------------------------*/
static void RemoveCommands(SicsInterp *pSics){