X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fsolrtransform.c;h=4ce5a95c6615f1ac9cd11af4e5642c54a9dc28b1;hb=b756b711841bac38e5b69baa51939ca9e1c01adb;hp=b800ca9433efb8a12b136953b48d3932a59b8b6e;hpb=24a717fb09063be70ff56dc82e9f03e7673254e0;p=yaz-moved-to-github.git diff --git a/src/solrtransform.c b/src/solrtransform.c index b800ca9..4ce5a95 100644 --- a/src/solrtransform.c +++ b/src/solrtransform.c @@ -1,27 +1,18 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2010 Index Data + * Copyright (C) 1995-2011 Index Data * See the file LICENSE for details. */ - /** * \file solrtransform.c * \brief Implements SOLR transform (SOLR to RPN conversion). - * - * Evaluation order of rules: - * - * always - * relation - * structure - * position - * truncation - * index - * relationModifier */ +#if HAVE_CONFIG_H +#include +#endif #include #include #include -#include #include #include #include @@ -168,7 +159,7 @@ static int solr_transform_parse_tok_line(solr_transform_t ct, break; } value_str = yaz_tok_parse_string(tp); - if (isdigit(*value_str)) + if (yaz_isdigit(*value_str)) { elem->which = Z_AttributeValue_numeric; elem->value.numeric = @@ -639,11 +630,11 @@ static int has_modifier(struct solr_node *cn, const char *name) { } -void emit_term(solr_transform_t ct, - struct solr_node *cn, - const char *term, int length, - void (*pr)(const char *buf, void *client_data), - void *client_data) +static void emit_term(solr_transform_t ct, + struct solr_node *cn, + const char *term, int length, + void (*pr)(const char *buf, void *client_data), + void *client_data) { int i; const char *ns = cn->u.st.index_uri; @@ -780,11 +771,11 @@ void emit_term(solr_transform_t ct, xfree(z3958_mem); } -void emit_terms(solr_transform_t ct, - struct solr_node *cn, - void (*pr)(const char *buf, void *client_data), - void *client_data, - const char *op) +static void emit_terms(solr_transform_t ct, + struct solr_node *cn, + void (*pr)(const char *buf, void *client_data), + void *client_data, + const char *op) { struct solr_node *ne = cn->u.st.extra_terms; if (ne) @@ -808,11 +799,11 @@ void emit_terms(solr_transform_t ct, } } -void emit_wordlist(solr_transform_t ct, - struct solr_node *cn, - void (*pr)(const char *buf, void *client_data), - void *client_data, - const char *op) +static void emit_wordlist(solr_transform_t ct, + struct solr_node *cn, + void (*pr)(const char *buf, void *client_data), + void *client_data, + const char *op) { const char *cp0 = cn->u.st.term; const char *cp1;