projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cc00f32
)
CQL: Don't treat \^ as anchor
author
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 13 Dec 2012 10:33:51 +0000
(11:33 +0100)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 13 Dec 2012 10:33:51 +0000
(11:33 +0100)
src/cqltransform.c
patch
|
blob
|
history
diff --git
a/src/cqltransform.c
b/src/cqltransform.c
index
ef93ca8
..
2b7c780
100644
(file)
--- a/
src/cqltransform.c
+++ b/
src/cqltransform.c
@@
-629,7
+629,8
@@
static void emit_term(cql_transform_t ct,
if (process_term && length > 0)
{
if (process_term && length > 0)
{
- if (length > 1 && term[0] == '^' && term[length-1] == '^')
+ if (length > 1 && term[0] == '^' && term[length-1] == '^' &&
+ term[length-2] != '\\')
{
cql_pr_attr(ct, "position", "firstAndLast", 0,
pr, client_data, YAZ_SRW_ANCHORING_CHAR_IN_UNSUPP_POSITION);
{
cql_pr_attr(ct, "position", "firstAndLast", 0,
pr, client_data, YAZ_SRW_ANCHORING_CHAR_IN_UNSUPP_POSITION);
@@
-643,7
+644,8
@@
static void emit_term(cql_transform_t ct,
term++;
length--;
}
term++;
length--;
}
- else if (term[length-1] == '^')
+ else if (term[length-1] == '^' &&
+ (length < 2 || term[length-2] != '\\'))
{
cql_pr_attr(ct, "position", "last", 0,
pr, client_data, YAZ_SRW_ANCHORING_CHAR_IN_UNSUPP_POSITION);
{
cql_pr_attr(ct, "position", "last", 0,
pr, client_data, YAZ_SRW_ANCHORING_CHAR_IN_UNSUPP_POSITION);