projects
/
pazpar2-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:
f9ba871
)
unnecessary comments and print statements removed
author
Marc Cromme
<marc@indexdata.dk>
Mon, 7 May 2007 08:02:03 +0000
(08:02 +0000)
committer
Marc Cromme
<marc@indexdata.dk>
Mon, 7 May 2007 08:02:03 +0000
(08:02 +0000)
src/icu_bug_2.c
patch
|
blob
|
history
diff --git
a/src/icu_bug_2.c
b/src/icu_bug_2.c
index
2ceb406
..
d283d9d
100644
(file)
--- a/
src/icu_bug_2.c
+++ b/
src/icu_bug_2.c
@@
-54,7
+54,6
@@
struct icu_buf_utf16 * icu_buf_utf16_create(size_t capacity)
struct icu_buf_utf16 * icu_buf_utf16_resize(struct icu_buf_utf16 * buf16,
size_t capacity)
{
struct icu_buf_utf16 * icu_buf_utf16_resize(struct icu_buf_utf16 * buf16,
size_t capacity)
{
- //printf("buf16 resize: %d\n", (int)capacity);
if (buf16){
if (capacity > 0){
if (0 == buf16->utf16)
if (buf16){
if (capacity > 0){
if (0 == buf16->utf16)
@@
-121,7
+120,6
@@
struct icu_buf_utf8 * icu_buf_utf8_create(size_t capacity)
struct icu_buf_utf8 * icu_buf_utf8_resize(struct icu_buf_utf8 * buf8,
size_t capacity)
{
struct icu_buf_utf8 * icu_buf_utf8_resize(struct icu_buf_utf8 * buf8,
size_t capacity)
{
- //printf("buf8 resize: %d\n", (int)capacity);
if (buf8){
if (capacity > 0){
if (0 == buf8->utf8)
if (buf8){
if (capacity > 0){
if (0 == buf8->utf8)
@@
-162,8
+160,6
@@
UErrorCode icu_utf16_from_utf8(struct icu_buf_utf16 * dest16,
struct icu_buf_utf8 * src8,
UErrorCode * status)
{
struct icu_buf_utf8 * src8,
UErrorCode * status)
{
- //if(!U_SUCCESS(*status))
- // return *status;
printf("icu_utf16_from_utf8 - needs correcting, see icu_utf16_from_utf8_cstr\n");
u_strFromUTF8(dest16->utf16, dest16->utf16_cap, &(dest16->utf16_len),
printf("icu_utf16_from_utf8 - needs correcting, see icu_utf16_from_utf8_cstr\n");
u_strFromUTF8(dest16->utf16, dest16->utf16_cap, &(dest16->utf16_len),
@@
-190,10
+186,6
@@
UErrorCode icu_utf16_from_utf8_cstr(struct icu_buf_utf16 * dest16,
size_t src8cstr_len = 0;
int32_t utf16_len = 0;
size_t src8cstr_len = 0;
int32_t utf16_len = 0;
- //if(!U_SUCCESS(status))
- // return *status;
-
- //printf("icu_utf16_from_utf8_cstr working\n");
src8cstr_len = strlen(src8cstr);
u_strFromUTF8(dest16->utf16, dest16->utf16_cap,
src8cstr_len = strlen(src8cstr);
u_strFromUTF8(dest16->utf16, dest16->utf16_cap,
@@
-205,7
+197,6
@@
UErrorCode icu_utf16_from_utf8_cstr(struct icu_buf_utf16 * dest16,
if (*status == U_BUFFER_OVERFLOW_ERROR
//|| dest16->utf16_len > dest16->utf16_cap
){
if (*status == U_BUFFER_OVERFLOW_ERROR
//|| dest16->utf16_len > dest16->utf16_cap
){
- //printf("icu_utf16_from_utf8_cstr need resize\n");
icu_buf_utf16_resize(dest16, utf16_len * 2);
*status = U_ZERO_ERROR;
u_strFromUTF8(dest16->utf16, dest16->utf16_cap,
icu_buf_utf16_resize(dest16, utf16_len * 2);
*status = U_ZERO_ERROR;
u_strFromUTF8(dest16->utf16, dest16->utf16_cap,
@@
-233,16
+224,12
@@
UErrorCode icu_sortkey8_from_utf16(UCollator *coll,
{
int32_t sortkey_len = 0;
{
int32_t sortkey_len = 0;
- //if(!U_SUCCESS(status))
- // return *status;
- //printf("icu_sortkey8_from_utf16 working\n");
sortkey_len = ucol_getSortKey(coll, src16->utf16, src16->utf16_len,
dest8->utf8, dest8->utf8_cap);
// check for buffer overflow, resize and retry
if (sortkey_len > dest8->utf8_cap) {
sortkey_len = ucol_getSortKey(coll, src16->utf16, src16->utf16_len,
dest8->utf8, dest8->utf8_cap);
// check for buffer overflow, resize and retry
if (sortkey_len > dest8->utf8_cap) {
- //printf("icu_sortkey8_from_utf16 need resize\n");
icu_buf_utf8_resize(dest8, sortkey_len * 2);
sortkey_len = ucol_getSortKey(coll, src16->utf16, src16->utf16_len,
dest8->utf8, dest8->utf8_cap);
icu_buf_utf8_resize(dest8, sortkey_len * 2);
sortkey_len = ucol_getSortKey(coll, src16->utf16, src16->utf16_len,
dest8->utf8, dest8->utf8_cap);
@@
-326,8
+313,6
@@
int icu_coll_sort(const char * locale, int src_list_len,
memcpy(list[i]->sort_key, buf8->utf8, buf8->utf8_len);
//strncpy(list[i]->sort_key, buf8->utf8, buf8->utf8_len);
//strcpy((char *) list[i]->sort_key, (const char *) buf8->utf8);
memcpy(list[i]->sort_key, buf8->utf8, buf8->utf8_len);
//strncpy(list[i]->sort_key, buf8->utf8, buf8->utf8_len);
//strcpy((char *) list[i]->sort_key, (const char *) buf8->utf8);
- //printf("strcp: %s (%d) [%d]\n", list[i]->sort_key,
- // strlen(list[i]->sort_key), buf8->utf8_len);
}
printf("\n");
}
printf("\n");