Merge branch 'master' into sru_2_0
authorAdam Dickmeiss <adam@indexdata.dk>
Wed, 18 Sep 2013 07:56:58 +0000 (09:56 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Wed, 18 Sep 2013 07:56:58 +0000 (09:56 +0200)
include/yaz/ccl.h
src/cclqual.c

index bf1b62d..f8974df 100644 (file)
@@ -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
index f5fcb7c..eca18ee 100644 (file)
@@ -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;