X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fcclptree.c;h=41997c48e4e8352a7f12810b14f2eea9df7c48cf;hp=d4997f89abbcc377dcd72ca34443ca46379b10bd;hb=b0be69c0a676f1702f12b2ea17cd73f9ebb08ea2;hpb=379504a233e3e2cc85bca1e7b6d864f1395aec7c diff --git a/src/cclptree.c b/src/cclptree.c index d4997f8..41997c4 100644 --- a/src/cclptree.c +++ b/src/cclptree.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2009 Index Data + * Copyright (C) 1995-2012 Index Data * See the file LICENSE for details. */ /** @@ -9,12 +9,15 @@ * This source file implements functions to parse and print * a CCL node tree (as a result of parsing). */ +#if HAVE_CONFIG_H +#include +#endif #include #include -#include #include +#include #include static void ccl_pquery_indent(WRBUF w, struct ccl_rpn_node *p, int indent); @@ -42,7 +45,7 @@ static void ccl_pquery_complex(WRBUF w, struct ccl_rpn_node *p, int indent) if (*cp == '!') { /* word order specified */ - if (isdigit(((const unsigned char *) cp)[1])) + if (yaz_isdigit(cp[1])) wrbuf_printf(w, "@prox 0 %s 1 2 k 2", cp+1); else wrbuf_printf(w, "@prox 0 1 1 2 k 2"); @@ -50,7 +53,7 @@ static void ccl_pquery_complex(WRBUF w, struct ccl_rpn_node *p, int indent) else if (*cp == '%') { /* word order not specified */ - if (isdigit(((const unsigned char *) cp)[1])) + if (yaz_isdigit(cp[1])) wrbuf_printf(w, "@prox 0 %s 0 2 k 2", cp+1); else wrbuf_printf(w, "@prox 0 1 0 2 k 2");