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
reindent of yaz-client-man.xml
[yaz-moved-to-github.git]
/
src
/
cql_sortkeys.c
diff --git
a/src/cql_sortkeys.c
b/src/cql_sortkeys.c
index
2ef3740
..
3c69fda
100644
(file)
--- a/
src/cql_sortkeys.c
+++ b/
src/cql_sortkeys.c
@@
-1,5
+1,5
@@
/* This file is part of the YAZ toolkit.
/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2011 Index Data
+ * Copyright (C) 1995-2013 Index Data
* See the file LICENSE for details.
*/
/**
* See the file LICENSE for details.
*/
/**
@@
-33,10
+33,11
@@
static void pr_n(void (*pr)(const char *buf, void *client_data),
}
else
{
}
else
{
- strcpy(tmp, buf);
+ memcpy(tmp, buf, left);
+ tmp[left] = '\0';
left = 0;
}
left = 0;
}
- pr(client_data, tmp);
+ pr(tmp, client_data);
}
}
}
}
@@
-50,6
+51,8
@@
static int cql_sort_modifiers(struct cql_node *cn,
for (; cn; cn = cn->u.st.modifiers)
{
const char *indx = cn->u.st.index;
for (; cn; cn = cn->u.st.modifiers)
{
const char *indx = cn->u.st.index;
+ if (!strncmp(indx, "sort.", 5))
+ indx = indx + 5;
if (!strcmp(indx, "ignoreCase"))
caseSensitive = 0;
else if (!strcmp(indx, "respectCase"))
if (!strcmp(indx, "ignoreCase"))
caseSensitive = 0;
else if (!strcmp(indx, "respectCase"))