mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-07 06:25:30 +00:00
ICU-7311 apply patch as per ticket - THANKS!
X-SVN-Rev: 27463
This commit is contained in:
parent
8688c228bc
commit
13bbe4f77d
8 changed files with 21 additions and 11 deletions
|
@ -1,6 +1,6 @@
|
|||
/********************************************************************
|
||||
* COPYRIGHT:
|
||||
* Copyright (c) 1999-2002, International Business Machines Corporation and
|
||||
* Copyright (c) 1999-2010, International Business Machines Corporation and
|
||||
* others. All Rights Reserved.
|
||||
********************************************************************/
|
||||
|
||||
|
@ -59,5 +59,5 @@ void uprintf(const UnicodeString &str) {
|
|||
actualLen = str.extract(0, len, buf/*, bufLen*/); // Default codepage conversion
|
||||
buf[actualLen] = 0;
|
||||
printf("%s", buf);
|
||||
delete buf;
|
||||
delete [] buf;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/********************************************************************
|
||||
* COPYRIGHT:
|
||||
* Copyright (c) 1999-2002, International Business Machines Corporation and
|
||||
* Copyright (c) 1999-2010, International Business Machines Corporation and
|
||||
* others. All Rights Reserved.
|
||||
********************************************************************/
|
||||
|
||||
|
@ -59,5 +59,5 @@ void uprintf(const UnicodeString &str) {
|
|||
actualLen = str.extract(0, len, buf/*, bufLen*/); // Default codepage conversion
|
||||
buf[actualLen] = 0;
|
||||
printf("%s", buf);
|
||||
delete buf;
|
||||
delete [] buf;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**************************************************************************
|
||||
*
|
||||
* Copyright (C) 2000-2003, International Business Machines
|
||||
* Copyright (C) 2000-2010, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*
|
||||
***************************************************************************
|
||||
|
@ -374,6 +374,8 @@ UErrorCode convsample_05()
|
|||
|
||||
printf("\n");
|
||||
|
||||
fclose(f);
|
||||
|
||||
return U_ZERO_ERROR;
|
||||
}
|
||||
#undef BUFFERSIZE
|
||||
|
@ -895,6 +897,7 @@ UErrorCode convsample_40()
|
|||
if(!out)
|
||||
{
|
||||
fprintf(stderr, "Couldn't create file 'data40.utf16'.\n");
|
||||
fclose(f);
|
||||
return U_FILE_ACCESS_ERROR;
|
||||
}
|
||||
|
||||
|
@ -1000,6 +1003,7 @@ UErrorCode convsample_46()
|
|||
if(!out)
|
||||
{
|
||||
fprintf(stderr, "Couldn't create file 'data46.out'.\n");
|
||||
fclose(f);
|
||||
return U_FILE_ACCESS_ERROR;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**************************************************************************
|
||||
*
|
||||
* Copyright (C) 2002, International Business Machines
|
||||
* Copyright (C) 2002-2010, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*
|
||||
***************************************************************************
|
||||
|
@ -287,6 +287,7 @@ void readFile(const char *name) {
|
|||
int t = fread(charBuf, 1, rawFileLen, file);
|
||||
if (t != rawFileLen) {
|
||||
fprintf(stderr, "Error reading file \"%s\"\n", fileName);
|
||||
fclose(file);
|
||||
return;
|
||||
}
|
||||
charBuf[rawFileLen]=0;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2002-2007, International Business Machines
|
||||
* Copyright (C) 2002-2010, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*
|
||||
******************************************************************************
|
||||
|
@ -906,6 +906,7 @@ roundtripBOCU1(UConverter *bocu1, int32_t number, const UChar *text, int32_t len
|
|||
/* BOCU-1 -> Unicode */
|
||||
roundtripRefLength=readString((uint8_t *)bocu1Ref, bocu1RefLength, roundtripRef);
|
||||
if(roundtripRefLength<0) {
|
||||
free(roundtripICU);
|
||||
return; /* readString() found an error and reported it */
|
||||
}
|
||||
|
||||
|
|
|
@ -136,6 +136,7 @@ static void TestUDataOpen(){
|
|||
const char* testPath=loadTestData(&status);
|
||||
if(U_FAILURE(status)) {
|
||||
log_data_err("Could not load testdata.dat, status = %s\n", u_errorName(status));
|
||||
free(path);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/********************************************************************
|
||||
* COPYRIGHT:
|
||||
* Copyright (C) 2001-2009 IBM, Inc. All Rights Reserved.
|
||||
* Copyright (C) 2001-2010 IBM, Inc. All Rights Reserved.
|
||||
*
|
||||
********************************************************************/
|
||||
/********************************************************************************
|
||||
|
@ -808,6 +808,8 @@ void doKeyHist() {
|
|||
(float)accumulatedLen[i] / (float)(numKeysOfSize[i] * i));
|
||||
}
|
||||
}
|
||||
delete []accumulatedLen;
|
||||
delete []numKeysOfSize ;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
**********************************************************************
|
||||
* Copyright (C) 2009, International Business Machines
|
||||
* Copyright (C) 2009-2010, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
**********************************************************************
|
||||
*
|
||||
|
@ -286,7 +286,7 @@ int main(int argc, char **argv) {
|
|||
}
|
||||
|
||||
uspoof_close(sc);
|
||||
delete outData;
|
||||
delete [] outData;
|
||||
delete confusables;
|
||||
delete wsConfsables;
|
||||
u_cleanup();
|
||||
|
@ -318,7 +318,8 @@ int main(int argc, char **argv) {
|
|||
|
||||
long t = fread(result, 1, fileSize, file);
|
||||
if (t != fileSize) {
|
||||
delete result;
|
||||
delete [] result;
|
||||
fclose(file);
|
||||
return NULL;
|
||||
}
|
||||
result[fileSize]=0;
|
||||
|
|
Loading…
Add table
Reference in a new issue