X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=blobdiff_plain;f=util%2Fxpath.c;h=6751b9bcc5a03cfc70d0a3c5acda5c1c2ecc1109;hp=2a344451d97e5e7dcffc9987bc37f3f0d5239c7c;hb=f3f20a205132c39c9434b10086422c6b49b47faf;hpb=6a0f9234f945bc4956e2bcef75f715661a9eba9a diff --git a/util/xpath.c b/util/xpath.c index 2a34445..6751b9b 100644 --- a/util/xpath.c +++ b/util/xpath.c @@ -1,5 +1,5 @@ /* This file is part of the Zebra server. - Copyright (C) 1994-2009 Index Data + Copyright (C) Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -18,6 +18,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#if HAVE_CONFIG_H +#include +#endif #include #include #include @@ -119,13 +122,13 @@ static struct xpath_predicate *get_xpath_boolean(char **pr, NMEM mem, char **look, int *literal) { struct xpath_predicate *left = 0; - + left = get_xpath_relation(pr, mem, look, literal); if (!left) return 0; - + while (*look && !*literal && - (!strcmp(*look, "and") || !strcmp(*look, "or") || + (!strcmp(*look, "and") || !strcmp(*look, "or") || !strcmp(*look, "not"))) { struct xpath_predicate *res, *right; @@ -161,13 +164,13 @@ int zebra_parse_xpath_str(const char *xpath_string, { const char *cp; char *a; - + int no = 0; - + if (!xpath_string || *xpath_string != '/') return -1; cp = xpath_string; - + while (*cp && no < max) { int i = 0; @@ -215,7 +218,7 @@ void dump_xp_predicate (struct xpath_predicate *p) if (p) { if (p->which == XPATH_PREDICATE_RELATION && p->u.relation.name[0]) { - fprintf (stderr, "%s,%s,%s", + fprintf (stderr, "%s,%s,%s", p->u.relation.name, p->u.relation.op, p->u.relation.value);