From: Adam Dickmeiss Date: Thu, 29 May 2014 15:06:37 +0000 (+0200) Subject: Allow r=omiteq to omit 2=3 for generated PQF YAZ-766 X-Git-Tag: v5.1.2~5 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=a8ff4e889fee9510119c0f02f963fd495dd8334b;p=yaz-moved-to-github.git Allow r=omiteq to omit 2=3 for generated PQF YAZ-766 --- 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':