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
New solr sort strategy. Using it
[yaz-moved-to-github.git]
/
src
/
icu_utf16.c
diff --git
a/src/icu_utf16.c
b/src/icu_utf16.c
index
a5bfcb6
..
0b3e3b9
100644
(file)
--- a/
src/icu_utf16.c
+++ b/
src/icu_utf16.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.
*/
@@
-28,7
+28,7
@@
struct icu_buf_utf16 * icu_buf_utf16_create(size_t capacity)
{
struct icu_buf_utf16 * icu_buf_utf16_create(size_t capacity)
{
- struct icu_buf_utf16 * buf16
+ struct icu_buf_utf16 * buf16
= (struct icu_buf_utf16 *) xmalloc(sizeof(struct icu_buf_utf16));
buf16->utf16 = 0;
= (struct icu_buf_utf16 *) xmalloc(sizeof(struct icu_buf_utf16));
buf16->utf16 = 0;
@@
-60,18
+60,18
@@
struct icu_buf_utf16 * icu_buf_utf16_resize(struct icu_buf_utf16 * buf16,
{
if (!buf16)
return 0;
{
if (!buf16)
return 0;
-
+
if (capacity > 0)
{
if (0 == buf16->utf16)
buf16->utf16 = (UChar *) xmalloc(sizeof(UChar) * capacity);
else
if (capacity > 0)
{
if (0 == buf16->utf16)
buf16->utf16 = (UChar *) xmalloc(sizeof(UChar) * capacity);
else
- buf16->utf16
+ buf16->utf16
= (UChar *) xrealloc(buf16->utf16, sizeof(UChar) * capacity);
icu_buf_utf16_clear(buf16);
buf16->utf16_cap = capacity;
= (UChar *) xrealloc(buf16->utf16, sizeof(UChar) * capacity);
icu_buf_utf16_clear(buf16);
buf16->utf16_cap = capacity;
- }
+ }
else
{
xfree(buf16->utf16);
else
{
xfree(buf16->utf16);