projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'yaz-770' of ssh://git.indexdata.com/home/git/pub/yaz into yaz-770
[yaz-moved-to-github.git]
/
src
/
ccl_stop_words.c
diff --git
a/src/ccl_stop_words.c
b/src/ccl_stop_words.c
index
fb36c98
..
1c22a2f
100644
(file)
--- a/
src/ccl_stop_words.c
+++ b/
src/ccl_stop_words.c
@@
-1,15
+1,17
@@
/* This file is part of the YAZ toolkit.
/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2009 Index Data
+ * Copyright (C) Index Data
* See the file LICENSE for details.
*/
* See the file LICENSE for details.
*/
-/**
+/**
* \file ccl_stop_words.c
* \brief Removes stop words from terms in RPN tree
*/
* \file ccl_stop_words.c
* \brief Removes stop words from terms in RPN tree
*/
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <stdio.h>
#include <string.h>
#include <stdio.h>
#include <string.h>
-#include <ctype.h>
#include <yaz/ccl.h>
#include <yaz/nmem.h>
#include <yaz/ccl.h>
#include <yaz/nmem.h>
@@
-24,7
+26,7
@@
struct ccl_stop_words {
NMEM nmem; /* memory for removed items */
struct ccl_stop_info *removed_items;
};
NMEM nmem; /* memory for removed items */
struct ccl_stop_info *removed_items;
};
-
+
static void append_removed_item(ccl_stop_words_t csw,
const char *qname,
const char *t, size_t len)
static void append_removed_item(ccl_stop_words_t csw,
const char *qname,
const char *t, size_t len)
@@
-44,7
+46,7
@@
static void append_removed_item(ccl_stop_words_t csw,
while (*csip)
csip = &(*csip)->next;
while (*csip)
csip = &(*csip)->next;
-
+
*csip = csi;
}
*csip = csi;
}
@@
-161,11
+163,11
@@
int ccl_stop_words_tree(ccl_stop_words_t csw,
CCL_bibset bibset, struct ccl_rpn_node **t)
{
struct ccl_rpn_node *r;
CCL_bibset bibset, struct ccl_rpn_node **t)
{
struct ccl_rpn_node *r;
-
+
/* remove list items */
nmem_reset(csw->nmem);
csw->removed_items = 0;
/* remove list items */
nmem_reset(csw->nmem);
csw->removed_items = 0;
-
+
r = ccl_remove_stop_r(csw, bibset, *t);
*t = r;
if (csw->removed_items)
r = ccl_remove_stop_r(csw, bibset, *t);
*t = r;
if (csw->removed_items)