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
CQL: fix extra terms in wrong order
[yaz-moved-to-github.git]
/
src
/
icu_chain.c
diff --git
a/src/icu_chain.c
b/src/icu_chain.c
index
7bf8109
..
bf614d0
100644
(file)
--- a/
src/icu_chain.c
+++ b/
src/icu_chain.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-2012 Index Data
* See the file LICENSE for details.
*/
* See the file LICENSE for details.
*/
@@
-192,21
+192,17
@@
struct icu_chain_step *icu_chain_step_clone(struct icu_chain_step *old)
struct icu_chain *icu_chain_create(const char *locale, int sort,
UErrorCode *status)
{
struct icu_chain *icu_chain_create(const char *locale, int sort,
UErrorCode *status)
{
- struct icu_chain *chain
- = (struct icu_chain *) xmalloc(sizeof(*chain));
+ struct icu_chain *chain;
+ UCollator *coll = ucol_open(locale, status);
- *status = U_ZERO_ERROR;
+ if (U_FAILURE(*status))
+ return 0;
+ chain = (struct icu_chain *) xmalloc(sizeof(*chain));
chain->iter = 0;
chain->locale = xstrdup(locale);
chain->iter = 0;
chain->locale = xstrdup(locale);
-
chain->sort = sort;
chain->sort = sort;
-
- chain->coll = ucol_open(chain->locale, status);
-
- if (U_FAILURE(*status))
- return 0;
-
+ chain->coll = coll;
chain->csteps = 0;
return chain;
chain->csteps = 0;
return chain;