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
MARC: skip non-ASCII characters always for leader
[yaz-moved-to-github.git]
/
src
/
cqltransform.c
diff --git
a/src/cqltransform.c
b/src/cqltransform.c
index
b2422c9
..
aea8bdc
100644
(file)
--- a/
src/cqltransform.c
+++ b/
src/cqltransform.c
@@
-500,8
+500,7
@@
static int cql_pr_prox(cql_transform_t ct, struct cql_node *mods,
void *client_data)
{
int exclusion = 0;
void *client_data)
{
int exclusion = 0;
- int distance; /* to be filled in later depending on unit */
- int distance_defined = 0;
+ int distance = -1;
int ordered = 0;
int proxrel = 2; /* less than or equal */
int unit = 2; /* word */
int ordered = 0;
int proxrel = 2; /* less than or equal */
int unit = 2; /* word */
@@
-514,7
+513,6
@@
static int cql_pr_prox(cql_transform_t ct, struct cql_node *mods,
if (!strcmp(name, "distance")) {
distance = strtol(term, (char**) 0, 0);
if (!strcmp(name, "distance")) {
distance = strtol(term, (char**) 0, 0);
- distance_defined = 1;
if (!strcmp(relation, "="))
proxrel = 3;
else if (!strcmp(relation, ">"))
if (!strcmp(relation, "="))
proxrel = 3;
else if (!strcmp(relation, ">"))
@@
-564,7
+562,7
@@
static int cql_pr_prox(cql_transform_t ct, struct cql_node *mods,
mods = mods->u.st.modifiers;
}
mods = mods->u.st.modifiers;
}
- if (!distance_defined)
+ if (distance == -1)
distance = (unit == 2) ? 1 : 0;
cql_pr_int(exclusion, pr, client_data);
distance = (unit == 2) ? 1 : 0;
cql_pr_int(exclusion, pr, client_data);