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
Fix CQL to CCL conversion for multiple terms
[yaz-moved-to-github.git]
/
src
/
cql2ccl.c
diff --git
a/src/cql2ccl.c
b/src/cql2ccl.c
index
87881e4
..
58b5804
100644
(file)
--- a/
src/cql2ccl.c
+++ b/
src/cql2ccl.c
@@
-62,7
+62,7
@@
static void pr_term(const char **cpp, int stop_at_space,
}
pr("#", client_data);
}
}
pr("#", client_data);
}
- else if (*cp == ' ')
+ else if (*cp == ' ' && stop_at_space)
break;
else
{
break;
else
{
@@
-130,17
+130,20
@@
static int node(struct cql_node *cn,
{
pr(ccl_field, client_data);
pr(ccl_rel, client_data);
{
pr(ccl_field, client_data);
pr(ccl_rel, client_data);
+ if (!split_op)
+ ccl_rel = 0;
}
pr_term(&cp, split_op ? 1 : 0, pr, client_data);
}
pr_term(&cp, split_op ? 1 : 0, pr, client_data);
- if (!split_op)
- break;
while (*cp == ' ')
cp++;
if (*cp == '\0')
break;
pr(" ", client_data);
while (*cp == ' ')
cp++;
if (*cp == '\0')
break;
pr(" ", client_data);
- pr(split_op, client_data);
- pr(" ", client_data);
+ if (split_op)
+ {
+ pr(split_op, client_data);
+ pr(" ", client_data);
+ }
}
if (cn->u.st.extra_terms)
{
}
if (cn->u.st.extra_terms)
{