X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=util%2Fxpath.c;h=6751b9bcc5a03cfc70d0a3c5acda5c1c2ecc1109;hb=ce2b82a980c06a45aa2eeeb88c927c90a014da61;hp=a932950b7ea86d51ddf4068dd0526f14900aca10;hpb=22963c0b23a178529bc71e5879c7e4f9c3c9b7f9;p=idzebra-moved-to-github.git diff --git a/util/xpath.c b/util/xpath.c index a932950..6751b9b 100644 --- a/util/xpath.c +++ b/util/xpath.c @@ -1,8 +1,5 @@ -/* $Id: xpath.c,v 1.4 2004-09-28 10:15:03 adam Exp $ - Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004 - Index Data Aps - -This file is part of the Zebra server. +/* This file is part of the Zebra server. + 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 @@ -15,12 +12,15 @@ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Zebra; see the file LICENSE.zebra. If not, write to the -Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +#if HAVE_CONFIG_H +#include +#endif #include #include #include @@ -122,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; @@ -164,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; @@ -218,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); @@ -242,3 +242,12 @@ void dump_xp_steps (struct xpath_location_step *xpath, int no) } } +/* + * Local variables: + * c-basic-offset: 4 + * c-file-style: "Stroustrup" + * indent-tabs-mode: nil + * End: + * vim: shiftwidth=4 tabstop=8 expandtab + */ +