From: Adam Dickmeiss Date: Wed, 18 Sep 2013 07:56:58 +0000 (+0200) Subject: Merge branch 'master' into sru_2_0 X-Git-Tag: v5.0.0~37 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=4f3418e14ebbb9371444f39636baa36d20e802d1;hp=a7585fd1220c684189091e7fba2c5d6cf436031e Merge branch 'master' into sru_2_0 --- diff --git a/include/yaz/ccl.h b/include/yaz/ccl.h index bf1b62d..f8974df 100644 --- a/include/yaz/ccl.h +++ b/include/yaz/ccl.h @@ -305,6 +305,11 @@ YAZ_EXPORT int ccl_stop_words_info(ccl_stop_words_t csw, int idx, const char **qualname, const char **term); +YAZ_EXPORT +struct ccl_rpn_attr *ccl_parser_qual_search(CCL_parser cclp, const char *name, + size_t name_len); + + #ifndef ccl_assert #define ccl_assert(x) ; #endif diff --git a/src/cclqual.c b/src/cclqual.c index f5fcb7c..eca18ee 100644 --- a/src/cclqual.c +++ b/src/cclqual.c @@ -379,6 +379,15 @@ struct ccl_rpn_attr *ccl_qual_get_attr(ccl_qualifier_t q) return q->attr_list; } +struct ccl_rpn_attr *ccl_parser_qual_search(CCL_parser cclp, const char *name, + size_t name_len) +{ + ccl_qualifier_t q = ccl_qual_search(cclp, name, name_len, 0); + if (q) + return q->attr_list; + return 0; +} + const char *ccl_qual_get_name(ccl_qualifier_t q) { return q->name;