From e1f778342e0563a5cf8e5ca34d5be264afa1340e Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 25 Aug 2011 14:05:41 +0200 Subject: [PATCH] rpn2cql: deal with truncation=102 (regexp-1) And ensure proper quoting of reserved CQL characters. --- src/rpn2cql.c | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/src/rpn2cql.c b/src/rpn2cql.c index d892986..03963f4 100644 --- a/src/rpn2cql.c +++ b/src/rpn2cql.c @@ -220,20 +220,43 @@ static int rpn2cql_simple(cql_transform_t ct, int must_quote = 0; Odr_int trunc = lookup_truncation(apt->attributes); - if (trunc > 3 && trunc != 100) + if (trunc > 3 && trunc != 100 && trunc != 102) { cql_transform_set_error( ct, YAZ_BIB1_UNSUPP_TRUNCATION_ATTRIBUTE, 0); ret = -1; } for (i = 0 ; i < lterm; i++) - if (sterm[i] == ' ') + if (strchr(" ()=>