From: Adam Dickmeiss Date: Wed, 26 Feb 2003 21:46:37 +0000 (+0000) Subject: Truncation=104 (CCL) support X-Git-Tag: ZEBRA.1.3.7~2 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=3e06ed92b9b6a1dc1c889e2199030d4e59db0e93;p=idzebra-moved-to-github.git Truncation=104 (CCL) support --- diff --git a/CHANGELOG b/CHANGELOG index 381b5e5..7f1cf51 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ + +Support Truncation 104 (CCL). + --- 1.3.6 2003/02/25 Added missing source files for perl extension. diff --git a/index/zrpn.c b/index/zrpn.c index 2f35cfa..0a9716f 100644 --- a/index/zrpn.c +++ b/index/zrpn.c @@ -1,4 +1,4 @@ -/* $Id: zrpn.c,v 1.127 2003-02-04 12:06:47 pop Exp $ +/* $Id: zrpn.c,v 1.128 2003-02-26 21:46:37 adam Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002 Index Data Aps @@ -447,18 +447,43 @@ static int term_104 (ZebraMaps zebra_maps, int reg_type, int i = 0; int j = 0; - if (!term_pre (zebra_maps, reg_type, src, "#!", "#!")) + if (!term_pre (zebra_maps, reg_type, src, "?*#", "?*#")) return 0; s0 = *src; while (*s0) { - if (*s0 == '#') + if (*s0 == '?') + { + dst_term[j++] = *s0++; + if (*s0 >= '0' && *s0 <= '9') + { + int limit = 0; + while (*s0 >= '0' && *s0 <= '9') + { + limit = limit * 10 + (*s0 - '0'); + dst_term[j++] = *s0++; + } + if (limit > 20) + limit = 20; + while (--limit >= 0) + { + dst[i++] = '.'; + dst[i++] = '?'; + } + } + else + { + dst[i++] = '.'; + dst[i++] = '*'; + } + } + else if (*s0 == '*') { dst[i++] = '.'; dst[i++] = '*'; dst_term[j++] = *s0++; } - else if (*s0 == '!') + else if (*s0 == '#') { dst[i++] = '.'; dst_term[j++] = *s0++;