From c2150780fa2e9c2ae2faa134e849412b17ea8e85 Mon Sep 17 00:00:00 2001 From: Douglas Clowes Date: Mon, 10 Dec 2012 14:54:44 +1100 Subject: [PATCH] move sicslist to site_ansto.c and add TCL 8.5 clock --- site_ansto/site_ansto.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/site_ansto/site_ansto.c b/site_ansto/site_ansto.c index 6f0a63ca..980ababd 100644 --- a/site_ansto/site_ansto.c +++ b/site_ansto/site_ansto.c @@ -23,6 +23,7 @@ #include #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){