From a8ff4e889fee9510119c0f02f963fd495dd8334b Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 29 May 2014 17:06:37 +0200 Subject: [PATCH] Allow r=omiteq to omit 2=3 for generated PQF YAZ-766 --- include/yaz/ccl.h | 1 + src/cclfind.c | 4 +++- src/cclqfile.c | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/yaz/ccl.h b/include/yaz/ccl.h index 5b9ac5c..d701095 100644 --- a/include/yaz/ccl.h +++ b/include/yaz/ccl.h @@ -358,6 +358,7 @@ struct ccl_rpn_attr *ccl_parser_qual_search(CCL_parser cclp, const char *name, #define CCL_BIB1_STR_AUTO_GROUP (-4) #define CCL_BIB1_REL_ORDER (-1) #define CCL_BIB1_REL_PORDER (-2) +#define CCL_BIB1_REL_OMIT_EQUALS (-3) #define CCL_BIB1_TRU_CAN_LEFT (-1) #define CCL_BIB1_TRU_CAN_RIGHT (-2) diff --git a/src/cclfind.c b/src/cclfind.c index 1d4f6c6..a5bde82 100644 --- a/src/cclfind.c +++ b/src/cclfind.c @@ -799,7 +799,9 @@ struct ccl_rpn_node *qualifiers_order(CCL_parser cclp, { if (!(p = search_terms(cclp, ap))) return NULL; - ccl_add_attr_numeric(p, attset, CCL_BIB1_REL, rel); + if (rel != 3 || + !qual_val_type(ap, CCL_BIB1_REL, CCL_BIB1_REL_OMIT_EQUALS, 0)) + ccl_add_attr_numeric(p, attset, CCL_BIB1_REL, rel); return p; } return NULL; diff --git a/src/cclqfile.c b/src/cclqfile.c index 943f84d..df98f33 100644 --- a/src/cclqfile.c +++ b/src/cclqfile.c @@ -132,6 +132,8 @@ int ccl_qual_field2(CCL_bibset bibset, const char *cp, const char *qual_name, value = CCL_BIB1_REL_ORDER; else if (!ccl_stricmp (value_str, "r")) value = CCL_BIB1_REL_PORDER; + else if (!ccl_stricmp (value_str, "omiteq")) + value = CCL_BIB1_REL_OMIT_EQUALS; break; case 'p': case 'P': -- 1.7.10.4