Moved ignore files.
[yaz-moved-to-github.git] / include / yaz / ccl.h
index 7772cff..e6c5af2 100644 (file)
@@ -49,7 +49,7 @@
 /*
  * CCL - header file
  *
- * $Id: ccl.h,v 1.26 2007-04-26 21:45:16 adam Exp $
+ * $Id: ccl.h,v 1.29 2007-05-01 12:22:10 adam Exp $
  *
  * Old Europagate Log:
  *
@@ -150,6 +150,7 @@ struct ccl_rpn_node {
         /** \brief Attributes + Term */
         struct {
             char *term;
+            char *qual;
             struct ccl_rpn_attr *attr_list;
         } t;
         /** Result set */
@@ -185,22 +186,6 @@ struct ccl_rpn_node *ccl_find_str(CCL_bibset bibset,
 YAZ_EXPORT
 struct ccl_rpn_node *ccl_parser_find_str(CCL_parser cclp, const char *str);
 
-/** Set names for AND operator in parser */
-YAZ_EXPORT
-void ccl_parser_set_op_and(CCL_parser p, const char *op);
-
-/** Set names for OR operator in parser */
-YAZ_EXPORT
-void ccl_parser_set_op_or(CCL_parser p, const char *op);
-
-/** Set names for ANDNOT operator in parser */
-YAZ_EXPORT
-void ccl_parser_set_op_not(CCL_parser p, const char *op);
-
-/** Set names for ResultSet in parser */
-YAZ_EXPORT
-void ccl_parser_set_op_set(CCL_parser p, const char *op);
-
 /** Set case sensitivity for parser */
 YAZ_EXPORT
 void ccl_parser_set_case(CCL_parser p, int case_sensitivity_flag);
@@ -228,11 +213,11 @@ void ccl_qual_add_set(CCL_bibset b, const char *name, int no,
 
 /** Add special qualifier */
 YAZ_EXPORT
-void ccl_qual_add_special(CCL_bibset bibset, const char *n, const char *v);
+void ccl_qual_add_special(CCL_bibset bibset, const char *n, const char *cp);
 
 /** Add combo qualifier */
 YAZ_EXPORT
-void ccl_qual_add_combi(CCL_bibset b, const char *n, const char *names);
+void ccl_qual_add_combi(CCL_bibset b, const char *n, const char **names);
 
 /** Read CCL qualifier list spec from file inf */
 YAZ_EXPORT
@@ -274,11 +259,6 @@ int ccl_stricmp(const char *s1, const char *s2);
 YAZ_EXPORT
 int ccl_memicmp(const char *s1, const char *s2, size_t n);
 
-/** Search for qualifier 'name' in set 'b'. */
-YAZ_EXPORT
-struct ccl_rpn_attr *ccl_qual_search(CCL_parser cclp, const char *name,
-                                      size_t len, int seq);
-
 /** Create CCL parser */
 YAZ_EXPORT
 CCL_parser ccl_parser_create(CCL_bibset bibset);
@@ -289,7 +269,7 @@ void ccl_parser_destroy(CCL_parser p);
 
 /** Search for special qualifier */
 YAZ_EXPORT
-const char *ccl_qual_search_special(CCL_bibset b, const char *name);
+const char **ccl_qual_search_special(CCL_bibset b, const char *name);
 /** Pretty-print CCL RPN node tree to WRBUF */
 YAZ_EXPORT
 void ccl_pquery(WRBUF w, struct ccl_rpn_node *p);
@@ -308,6 +288,31 @@ YAZ_EXPORT
 void ccl_add_attr_string(struct ccl_rpn_node *p, const char *set,
                          int type, char *value);
 
+YAZ_EXPORT
+int ccl_search_stop(CCL_bibset bibset, const char *qname,
+                    const char *src_str, size_t src_len);
+
+
+/** \brief stop words handle (pimpl) */
+typedef struct ccl_stop_words *ccl_stop_words_t;
+
+/** \brief creates stop words handle */
+YAZ_EXPORT
+ccl_stop_words_t ccl_stop_words_create(void);
+
+/** \brief destroys stop words handle */
+YAZ_EXPORT
+void ccl_stop_words_destroy(ccl_stop_words_t csw);
+
+/** \brief removes stop words from RPN tree */
+YAZ_EXPORT
+int ccl_stop_words_tree(ccl_stop_words_t csw,
+                        CCL_bibset bibset, struct ccl_rpn_node **t);
+
+/** \brief returns information about removed "stop" words */
+YAZ_EXPORT
+int ccl_stop_words_info(ccl_stop_words_t csw, int idx,
+                        const char **qualname, const char **term);
 
 #ifndef ccl_assert
 #define ccl_assert(x) ;