From f2faaef81d1222870ccc544d15e4d4f166b83ecc Mon Sep 17 00:00:00 2001 From: stefanjones Date: Wed, 21 Jul 2004 20:25:16 +0000 Subject: [PATCH] 2004-07-21 Stefan Jones * src/tclspice.c: add getplot() command --- ChangeLog | 5 +++++ src/tclspice.c | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index 2b6130332..7141c553b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-07-21 Stefan Jones + + * src/tclspice.c: + add getplot() command + 2004-07-20 Stefan Jones * src/tclspice.c: diff --git a/src/tclspice.c b/src/tclspice.c index 08f13a826..a8991e9f1 100755 --- a/src/tclspice.c +++ b/src/tclspice.c @@ -922,6 +922,12 @@ static int plot_getvector TCL_CMDPROCARGS(clientData,interp,argc,argv) { return TCL_OK; } +static int plot_getplot TCL_CMDPROCARGS(clientData,interp,argc,argv) { + if(plot_cur) { + Tcl_SetObjResult(interp,Tcl_NewStringObj(plot_cur->pl_typename,-1)); + } + return TCL_OK; +} /*******************************************/ /* Misc functions */ @@ -2063,6 +2069,7 @@ bot: Tcl_CreateCommand(interp, TCLSPICE_prefix "plot_nvars", plot_nvars, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "plot_defaultscale", plot_defaultscale, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "plot_getvector", plot_getvector, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); + Tcl_CreateCommand(interp, TCLSPICE_prefix "getplot", plot_getplot, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "registerTrigger", registerTrigger, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "registerTriggerCallback", registerTriggerCallback, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);