X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=ir-tcl.c;h=aa3fcec02bcefdbe9024492e15b1532e822bc6d3;hb=e38936a73431577301570b129ccd1dfca146aa4e;hp=c42a61f4bb4c6b84f554d0fa682526a3d005f587;hpb=f5b793bf279c020b5170a6b4d6201bc47550909b;p=ir-tcl-moved-to-github.git diff --git a/ir-tcl.c b/ir-tcl.c index c42a61f..aa3fcec 100644 --- a/ir-tcl.c +++ b/ir-tcl.c @@ -1,10 +1,19 @@ /* * IR toolkit for tcl/tk - * (c) Index Data 1995-2000 + * (c) Index Data 1995-2001 * See the file LICENSE for details. * * $Log: ir-tcl.c,v $ - * Revision 1.116 2001-02-09 11:58:04 adam + * Revision 1.119 2001-12-03 00:31:06 adam + * Towards 1.4. Configure updates. + * + * Revision 1.118 2001/03/27 16:27:21 adam + * Fixed bug in do_responseStatus. + * + * Revision 1.117 2001/03/26 11:39:34 adam + * Fixed bug in ir_deleteDiags - crash when receiving multiple diags. + * + * Revision 1.116 2001/02/09 11:58:04 adam * Updated for Tcl8.1 and higher where internal encoding is UTF-8. * * Revision 1.115 2000/09/13 12:18:49 adam @@ -1032,7 +1041,7 @@ static int do_implementationName (void *obj, Tcl_Interp *interp, if (argc == 0) return ir_tcl_strdup (interp, &p->implementationName, - "Index Data/IrTcl on YAZ"); + "IrTcl/YAZ"); else if (argc == -1) return ir_tcl_strdel (interp, &p->implementationName); if (argc == 3) @@ -1055,7 +1064,7 @@ static int do_implementationId (void *obj, Tcl_Interp *interp, IrTcl_Obj *p = obj; if (argc == 0) - return ir_tcl_strdup (interp, &p->implementationId, "YAZ (id=81)"); + return ir_tcl_strdup (interp, &p->implementationId, "81"); else if (argc == -1) return ir_tcl_strdel (interp, &p->implementationId); Tcl_AppendResult (interp, p->implementationId, (char*) NULL); @@ -1072,10 +1081,10 @@ static int do_implementationVersion (void *obj, Tcl_Interp *interp, if (argc == 0) return ir_tcl_strdup (interp, &p->implementationVersion, - "YAZ: " YAZ_VERSION #ifdef IR_TCL_VERSION - " / Irtcl: " IR_TCL_VERSION + IR_TCL_VERSION "/" #endif + YAZ_VERSION ); else if (argc == -1) return ir_tcl_strdel (interp, &p->implementationVersion); @@ -2783,6 +2792,10 @@ static int do_responseStatus (void *o, Tcl_Interp *interp, Tcl_AppendElement (interp, "NSD"); return ir_diagResult (interp, obj->nonSurrogateDiagnosticList, obj->nonSurrogateDiagnosticNum); + case Z_Records_multipleNSD: + Tcl_AppendElement (interp, "NSD"); + return ir_diagResult (interp, obj->nonSurrogateDiagnosticList, + obj->nonSurrogateDiagnosticNum); } return TCL_OK; } @@ -3447,7 +3460,8 @@ static int do_scan (void *o, Tcl_Interp *interp, int argc, char **argv) req->num_databaseNames = p->set_inher.num_databaseNames; req->databaseNames = p->set_inher.databaseNames; -#if !CCL2RPN +#if 1 +/* !CCL2RPN */ if (!(req->termListAndStartPoint = p_query_scan (p->odr_out, p->protocol_type, &req->attributeSet, start_term))) @@ -3863,7 +3877,7 @@ static void ir_deleteDiags (IrTcl_Diagnostic **dst_list, int *dst_num) { int i; for (i = 0; i<*dst_num; i++) - xfree (dst_list[i]->addinfo); + xfree ((*dst_list)[i].addinfo); xfree (*dst_list); *dst_list = NULL; *dst_num = 0;