From 5c3254b421ce3cc5f3d8c4f294a48f233a6cf3f7 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 11 Aug 2004 20:13:36 +0000 Subject: [PATCH] Fixed bug in CCL parser where truncation char was not removed when truncation=both was in effect. --- NEWS | 3 +++ src/cclfind.c | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 945c771..eecd347 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,8 @@ Possible compatibility problems with earlier versions marked with '*'. +Fixed bug in CCL parser where truncation char was not removed when +truncation=both was in effect. + Added odr_set_stream which is is a more generic to odr_setprint. odr_set_stream takes a stream handle, pointer to puts function and pointer to close function. The close function - if non-NULL - will be diff --git a/src/cclfind.c b/src/cclfind.c index 08a4f79..82dd726 100644 --- a/src/cclfind.c +++ b/src/cclfind.c @@ -44,7 +44,7 @@ /* CCL find (to rpn conversion) * Europagate, 1995 * - * $Id: cclfind.c,v 1.2 2004-08-11 09:02:48 adam Exp $ + * $Id: cclfind.c,v 1.3 2004-08-11 20:13:36 adam Exp $ * * Old Europagate log: * @@ -451,7 +451,7 @@ static struct ccl_rpn_node *search_term_x (CCL_parser cclp, else add_attr_numeric (p, attset, CCL_BIB1_STR, 1); } - + /* make the RPN token */ p->u.t.term = (char *)xmalloc (len); ccl_assert (p->u.t.term); @@ -466,7 +466,7 @@ static struct ccl_rpn_node *search_term_x (CCL_parser cclp, src_len--; src_str++; } - else if (i == no-1 && right_trunc) + if (i == no-1 && right_trunc) src_len--; if (src_len) { -- 1.7.10.4