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
Documentation updates for new names of dll/so files.
[yaz-moved-to-github.git]
/
src
/
cclptree.c
diff --git
a/src/cclptree.c
b/src/cclptree.c
index
8c480db
..
0f3be4d
100644
(file)
--- a/
src/cclptree.c
+++ b/
src/cclptree.c
@@
-53,7
+53,7
@@
/* CCL print rpn tree - infix notation
* Europagate, 1995
*
/* CCL print rpn tree - infix notation
* Europagate, 1995
*
- * $Id: cclptree.c,v 1.9 2007-04-25 20:50:56 adam Exp $
+ * $Id: cclptree.c,v 1.10 2007-05-01 12:12:34 adam Exp $
*
* Old Europagate Log:
*
*
* Old Europagate Log:
*
@@
-135,12
+135,17
@@
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)
{
- const char *cp = term;
- for (; *cp; cp++)
+ if (!*term)
+ wrbuf_puts(w, "\"\"");
+ else
{
{
- if (*cp == ' ' || *cp == '\\')
- wrbuf_putc(w, '\\');
- wrbuf_putc(w, *cp);
+ const char *cp = term;
+ for (; *cp; cp++)
+ {
+ if (*cp == ' ' || *cp == '\\')
+ wrbuf_putc(w, '\\');
+ wrbuf_putc(w, *cp);
+ }
}
wrbuf_puts(w, " ");
}
}
wrbuf_puts(w, " ");
}
@@
-149,6
+154,8
@@
static void ccl_pquery_indent(WRBUF w, struct ccl_rpn_node *p, int indent)
{
struct ccl_rpn_attr *att;
{
struct ccl_rpn_attr *att;
+ if (!p)
+ return;
if (indent != -1)
{
int i;
if (indent != -1)
{
int i;