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:
00537b4
)
Avoid strcasecmp which does not exist on Windows
author
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 18 Oct 2012 11:45:32 +0000
(13:45 +0200)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 18 Oct 2012 11:45:32 +0000
(13:45 +0200)
And also fix condition that would never be true.
src/sortspec.c
patch
|
blob
|
history
diff --git
a/src/sortspec.c
b/src/sortspec.c
index
e09895b
..
7f272f5
100644
(file)
--- a/
src/sortspec.c
+++ b/
src/sortspec.c
@@
-13,6
+13,7
@@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+#include <yaz/matchstr.h>
#include <yaz/z-core.h>
#include <yaz/sortspec.h>
@@
-417,8
+418,8
@@
int yaz_solr_sortkeys_to_sort_spec(const char *solr_sortkeys, WRBUF w)
if (num_arg != 2)
return -1;
- if (!strcasecmp(arg[1],"asc") &&
- !strcasecmp(arg[1],"desc"))
+ if (yaz_matchstr(arg[1], "asc") &&
+ yaz_matchstr(arg[1], "desc"))
return -1;
if (arg[1][0]) {