projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add function yaz_iso5426_decode
[yaz-moved-to-github.git]
/
src
/
cclptree.c
diff --git
a/src/cclptree.c
b/src/cclptree.c
index
d53345b
..
7e38624
100644
(file)
--- a/
src/cclptree.c
+++ b/
src/cclptree.c
@@
-1,8
+1,6
@@
-/*
- * Copyright (C) 1995-2008, Index Data ApS
+/* This file is part of the YAZ toolkit.
+ * Copyright (C) 1995-2008 Index Data
* See the file LICENSE for details.
* See the file LICENSE for details.
- *
- * $Id: cclptree.c,v 1.11 2008-01-09 21:32:27 adam Exp $
*/
/**
* \file cclptree.c
*/
/**
* \file cclptree.c
@@
-16,6
+14,7
@@
#include <string.h>
#include <ctype.h>
#include <string.h>
#include <ctype.h>
+#include <yaz/querytowrbuf.h>
#include <yaz/ccl.h>
static void ccl_pquery_indent(WRBUF w, struct ccl_rpn_node *p, int indent);
#include <yaz/ccl.h>
static void ccl_pquery_indent(WRBUF w, struct ccl_rpn_node *p, int indent);
@@
-70,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)
{
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)
}
static void ccl_pquery_indent(WRBUF w, struct ccl_rpn_node *p, int indent)