From d8b28e86c30111f9697ad6d2fa279764be99221d Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 28 Aug 1995 09:43:24 +0000 Subject: [PATCH] Minor changes. configure only searches for yaz beta 3 and versions after that. --- configure.in | 4 ++-- ir-tcl.c | 27 +++++++++++++-------------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/configure.in b/configure.in index c05ad73..c43e153 100644 --- a/configure.in +++ b/configure.in @@ -1,7 +1,7 @@ dnl IR toolkit for tcl/tk dnl (c) Index Data 1995 dnl See the file LICENSE for details. -dnl $Id: configure.in,v 1.7 1995-07-28 10:28:37 adam Exp $ +dnl $Id: configure.in,v 1.8 1995-08-28 09:43:24 adam Exp $ AC_INIT(ir-tcl.h) CC=${CC-cc} AC_SUBST(CC) @@ -36,7 +36,7 @@ if test "$YAZDIR" = "yes"; then YAZDIR="../yaz-1.0b" elif test "$YAZDIR" = ""; then YAZDIR="../yaz" - for i in ../yaz-1.0b ../yaz-1.0b2 ../yaz-1.0b3 ../yaz-1.0b4 ../yaz-1.0 ../yaz; do + for i in ../yaz-1.0b3 ../yaz-1.0b4 ../yaz-1.0 ../yaz; do if test -d $i; then YAZDIR=$i fi diff --git a/ir-tcl.c b/ir-tcl.c index 43f9963..86da3b3 100644 --- a/ir-tcl.c +++ b/ir-tcl.c @@ -5,7 +5,11 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: ir-tcl.c,v $ - * Revision 1.54 1995-08-24 12:25:16 adam + * Revision 1.55 1995-08-28 09:43:25 adam + * Minor changes. configure only searches for yaz beta 3 and versions after + * that. + * + * Revision 1.54 1995/08/24 12:25:16 adam * Modified to work with yaz 1.0b3. * * Revision 1.53 1995/08/04 12:49:26 adam @@ -210,8 +214,6 @@ typedef struct { IrTcl_Method *tab; } IrTcl_Methods; -static Tcl_Interp *irTcl_interp; - static void ir_deleteDiags (IrTcl_Diagnostic **dst_list, int *dst_num); static int do_disconnect (void *obj, Tcl_Interp *interp, int argc, char **argv); @@ -1053,7 +1055,6 @@ static int do_callback (void *obj, Tcl_Interp *interp, } else p->callback = NULL; - p->interp = interp; } return TCL_OK; } @@ -1083,7 +1084,6 @@ static int do_failback (void *obj, Tcl_Interp *interp, } else p->failback = NULL; - p->interp = interp; } return TCL_OK; } @@ -1481,6 +1481,7 @@ static int ir_obj_mk (ClientData clientData, Tcl_Interp *interp, obj->odr_out = odr_createmem (ODR_ENCODE); obj->odr_pr = odr_createmem (ODR_PRINT); obj->state = IR_TCL_R_Idle; + obj->interp = interp; obj->len_in = 0; obj->buf_in = NULL; @@ -2169,16 +2170,16 @@ static int ir_set_obj_mk (ClientData clientData, Tcl_Interp *interp, dst = &obj->set_inher; src = &obj->parent->set_inher; - dst->num_databaseNames = src->num_databaseNames; - dst->databaseNames = - ir_tcl_malloc (sizeof (*dst->databaseNames) - * dst->num_databaseNames); + if ((dst->num_databaseNames = src->num_databaseNames)) + dst->databaseNames = + ir_tcl_malloc (sizeof (*dst->databaseNames) + * dst->num_databaseNames); + else + dst->databaseNames = NULL; for (i = 0; i < dst->num_databaseNames; i++) - { if (ir_tcl_strdup (interp, &dst->databaseNames[i], src->databaseNames[i]) == TCL_ERROR) return TCL_ERROR; - } if (ir_tcl_strdup (interp, &dst->queryType, src->queryType) == TCL_ERROR) return TCL_ERROR; @@ -2922,6 +2923,7 @@ void ir_select_read (ClientData clientData) exit (1); } object_name = rq->object_name; + logf (LOG_DEBUG, "getCommandInfo (%s)", object_name); if (Tcl_GetCommandInfo (p->interp, object_name, &cmd_info)) { switch(apdu->which) @@ -3043,8 +3045,5 @@ int ir_tcl_init (Tcl_Interp *interp) (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); Tcl_CreateCommand (interp, "ir-scan", ir_scan_obj_mk, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); - irTcl_interp = interp; return TCL_OK; } - - -- 1.7.10.4