CCL Truncation character may be defined.
authorAdam Dickmeiss <adam@indexdata.dk>
Tue, 20 Mar 2001 11:22:58 +0000 (11:22 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Tue, 20 Mar 2001 11:22:58 +0000 (11:22 +0000)
CHANGELOG
ccl/bib1
ccl/cclfind.c

index ebe6ec8..a7897d1 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,7 @@
 Possible compatibility problems with earlier versions marked with '*'.
 
+CCL trunction character may be defined (@truncation in file)
+
 * function zget_ExtendedServicesRequest sets waitAction to
   waitIfPossible (was wait).
 
index fea798a..7c101c7 100644 (file)
--- a/ccl/bib1
+++ b/ccl/bib1
@@ -1,4 +1,4 @@
-# $Id: bib1,v 1.6 2001-03-07 13:24:40 adam Exp $
+# $Id: bib1,v 1.7 2001-03-20 11:22:58 adam Exp $
 # CCL qualifiers and their mappings
 #
 # Each line takes the form:
@@ -103,3 +103,4 @@ exp:category exp1,1=1
 @not ikke -           # and so on..
 @set s set
 @case 0                      # case insenstive (1 for case sensitive)
+@truncation * ?
index 3a9fd83..5702322 100644 (file)
  * Europagate, 1995
  *
  * $Log: cclfind.c,v $
- * Revision 1.22  2001-03-07 13:24:40  adam
+ * Revision 1.23  2001-03-20 11:22:58  adam
+ * CCL Truncation character may be defined.
+ *
+ * Revision 1.22  2001/03/07 13:24:40  adam
  * Member and_not in Z_Operator is kept for backwards compatibility.
  * Added support for definition of CCL operators in field spec file.
  *
@@ -334,6 +337,12 @@ static struct ccl_rpn_node *search_term_x (CCL_parser cclp,
     int and_list = 0;
     int or_list = 0;
     char *attset;
+    const char *truncation_aliases;
+
+    truncation_aliases =
+       ccl_qual_search_special(cclp->bibset, "truncation");
+    if (!truncation_aliases)
+       truncation_aliases = "?";
 
     if (!qa)
     {
@@ -371,7 +380,8 @@ static struct ccl_rpn_node *search_term_x (CCL_parser cclp,
         for (no = 0; no < max && is_term_ok(lookahead->kind, term_list); no++)
         {
             for (i = 0; i<lookahead->len; i++)
-                if (truncation_value == -1 && lookahead->name[i] == '?')
+                if (truncation_value == -1 && strchr(truncation_aliases,
+                                                    lookahead->name[i]))
                 {
                     if (no == 0 && i == 0 && lookahead->len >= 1)
                         left_trunc = 1;