From: Adam Dickmeiss Date: Thu, 21 Sep 1995 13:11:49 +0000 (+0000) Subject: Support of dynamic loading. X-Git-Tag: IRTCL.1.4~208 X-Git-Url: http://git.indexdata.com/?p=ir-tcl-moved-to-github.git;a=commitdiff_plain;h=f25d0ab1672bff45ed845baf786f23aac60ca243 Support of dynamic loading. Test script uses load command if necessary. --- diff --git a/client.tcl b/client.tcl index 4a7841c..2ab73be 100644 --- a/client.tcl +++ b/client.tcl @@ -4,7 +4,11 @@ # Sebastian Hammer, Adam Dickmeiss # # $Log: client.tcl,v $ -# Revision 1.67 1995-09-20 14:35:19 adam +# Revision 1.68 1995-09-21 13:11:49 adam +# Support of dynamic loading. +# Test script uses load command if necessary. +# +# Revision 1.67 1995/09/20 14:35:19 adam # Minor changes. # # Revision 1.66 1995/08/29 15:30:13 adam @@ -3113,7 +3117,13 @@ pack .bot.a.target -side top -anchor nw -padx 2 -pady 2 pack .bot.a.status .bot.a.set .bot.a.message \ -side left -padx 2 -pady 2 -ipadx 1 -ipady 1 -catch {ir z39} +if {[catch {ir z39}]} { + set e [info sharedlibextension] + puts -nonewline "Loading irtcl..." + load irtcl$e + ir z39 + puts "ok" +} #z39 logLevel all show-logo 1 diff --git a/ir-tcl.c b/ir-tcl.c index 36d46f4..ab6ef29 100644 --- a/ir-tcl.c +++ b/ir-tcl.c @@ -5,7 +5,11 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: ir-tcl.c,v $ - * Revision 1.56 1995-08-29 15:30:14 adam + * Revision 1.57 1995-09-21 13:11:51 adam + * Support of dynamic loading. + * Test script uses load command if necessary. + * + * Revision 1.56 1995/08/29 15:30:14 adam * Work on GRS records. * * Revision 1.55 1995/08/28 09:43:25 adam @@ -3083,9 +3087,9 @@ void ir_select_write (ClientData clientData) /* ------------------------------------------------------- */ /* - * ir_tcl_init: Registration of TCL commands. + * Irtcl_init: Registration of TCL commands. */ -int ir_tcl_init (Tcl_Interp *interp) +int Irtcl_Init (Tcl_Interp *interp) { Tcl_CreateCommand (interp, "ir", ir_obj_mk, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); @@ -3095,3 +3099,4 @@ int ir_tcl_init (Tcl_Interp *interp) (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); return TCL_OK; } + diff --git a/ir-tcl.h b/ir-tcl.h index bd86627..6dd74ff 100644 --- a/ir-tcl.h +++ b/ir-tcl.h @@ -24,7 +24,11 @@ * OF THIS SOFTWARE. * * $Log: ir-tcl.h,v $ - * Revision 1.10 1995-06-22 07:15:59 adam + * Revision 1.11 1995-09-21 13:11:52 adam + * Support of dynamic loading. + * Test script uses load command if necessary. + * + * Revision 1.10 1995/06/22 07:15:59 adam * Version number moved to Makefile.in * Some work on autoconf. * @@ -56,7 +60,7 @@ #ifndef IR_TCL_H #define IR_TCL_H -int ir_tcl_init (Tcl_Interp *interp); +int Irtcl_Init (Tcl_Interp *interp); void ir_select_add (int fd, void *obj); void ir_select_add_write (int fd, void *obj); diff --git a/tclmain.c b/tclmain.c index 3168bc6..376e56f 100644 --- a/tclmain.c +++ b/tclmain.c @@ -5,7 +5,11 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: tclmain.c,v $ - * Revision 1.13 1995-08-28 12:21:22 adam + * Revision 1.14 1995-09-21 13:11:53 adam + * Support of dynamic loading. + * Test script uses load command if necessary. + * + * Revision 1.13 1995/08/28 12:21:22 adam * Removed lines and list as synonyms of list in MARC extractron. * Configure searches also for tk4.0 / tcl7.4. * @@ -75,7 +79,7 @@ int Tcl_AppInit (Tcl_Interp *interp) { if (Tcl_Init(interp) == TCL_ERROR) return TCL_ERROR; - if (ir_tcl_init(interp) == TCL_ERROR) + if (Irtcl_Init(interp) == TCL_ERROR) return TCL_ERROR; return TCL_OK; }