From: Adam Dickmeiss Date: Wed, 5 Jun 1996 09:26:19 +0000 (+0000) Subject: Bug fix: the change above introduced an error. X-Git-Tag: IRTCL.1.4~121 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=ed273813014dcec37eec2eaf4ea84b61d2232d0c;p=ir-tcl-moved-to-github.git Bug fix: the change above introduced an error. --- diff --git a/CHANGELOG b/CHANGELOG index b161206..e71da69 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,4 @@ -$Id: CHANGELOG,v 1.17 1996-06-05 08:59:22 adam Exp $ +$Id: CHANGELOG,v 1.18 1996-06-05 09:26:19 adam Exp $ 06/19/95 Release of ir-tcl-1.0b ------------------------------------------------------ @@ -83,7 +83,7 @@ $Id: CHANGELOG,v 1.17 1996-06-05 08:59:22 adam Exp $ 20/02/96 Identification of record syntaxes, etc. are handled by the YAZ oid utilities. -29/05/96 Set function getGrs enhanced so that specific elements can be +05/06/96 Set function getGrs enhanced so that specific elements can be extracted by (,) - pairs. diff --git a/grs.c b/grs.c index fa8de69..afcaa4b 100644 --- a/grs.c +++ b/grs.c @@ -5,7 +5,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: grs.c,v $ - * Revision 1.6 1996-06-05 08:59:23 adam + * Revision 1.7 1996-06-05 09:26:20 adam + * Bug fix: the change above introduced an error. + * + * Revision 1.6 1996/06/05 08:59:23 adam * Changed syntax of element specs in GRS-1 retrieval. * * Revision 1.5 1996/05/29 20:28:08 adam @@ -184,7 +187,7 @@ static int ir_tcl_get_grs_r (Tcl_Interp *interp, IrTcl_GRS_Record *grs_record, else { if (*cp0 == '(') - cp++; + cp0++; if (atoi(cp0) == e->tagType) { if (e->tagWhich == Z_StringOrNumeric_numeric) @@ -194,7 +197,11 @@ static int ir_tcl_get_grs_r (Tcl_Interp *interp, IrTcl_GRS_Record *grs_record, } else { - if (!strcmp (cp1+1, e->tagVal.str)) + int len = strlen(cp1+1); + if (cp1[len] == ')') + len--; + if (len && strlen(e->tagVal.str) == len && + !memcmp (cp1+1, e->tagVal.str, len)) yes = 1; } }