X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fcclptree.c;h=3633ad53e1f2b645f618da5159859790dab5d7a2;hb=3a54a02da2f546427c4e5fe57f952c97f54437ea;hp=55d8ef8455adfd4ff025bb2bbc46f4d624827552;hpb=ee6ab2ee3a9ee1a8c65d7272ec7fba1d886f5af0;p=yaz-moved-to-github.git diff --git a/src/cclptree.c b/src/cclptree.c index 55d8ef8..3633ad5 100644 --- a/src/cclptree.c +++ b/src/cclptree.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2008 Index Data + * Copyright (C) 1995-2009 Index Data * See the file LICENSE for details. */ /** @@ -14,6 +14,7 @@ #include #include +#include #include static void ccl_pquery_indent(WRBUF w, struct ccl_rpn_node *p, int indent); @@ -68,19 +69,7 @@ static void ccl_pquery_complex(WRBUF w, struct ccl_rpn_node *p, int indent) static void ccl_prterm(WRBUF w, const char *term) { - if (!*term) - wrbuf_puts(w, "\"\""); - else - { - const char *cp = term; - for (; *cp; cp++) - { - if (*cp == ' ' || *cp == '\\') - wrbuf_putc(w, '\\'); - wrbuf_putc(w, *cp); - } - } - wrbuf_puts(w, " "); + yaz_encode_pqf_term(w, term, strlen(term)); } static void ccl_pquery_indent(WRBUF w, struct ccl_rpn_node *p, int indent)