From: Adam Dickmeiss Date: Tue, 17 Sep 2013 14:17:32 +0000 (+0200) Subject: Introduce ccl_parser_qual_search X-Git-Tag: v4.2.67~5 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=7fe4b7de2eb91fc87a5c53ff081b15df0c449a0a;p=yaz-moved-to-github.git Introduce ccl_parser_qual_search This function makes old function ccl_qual_search, from YAZ 2, available again. --- 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;