ICU-1953 remove Tabs
X-SVN-Rev: 9023
This commit is contained in:
parent
0ae0c40901
commit
80dfca0dc5
@ -62,18 +62,18 @@ BreakIterator::createWordInstance(const Locale& key, UErrorCode& status)
|
||||
filename = "thaidict.brk";
|
||||
result = new DictionaryBasedBreakIterator(file, filename, status);
|
||||
/* test for NULL */
|
||||
if(result == 0) {
|
||||
status = U_MEMORY_ALLOCATION_ERROR;
|
||||
return 0;
|
||||
}
|
||||
if(result == 0) {
|
||||
status = U_MEMORY_ALLOCATION_ERROR;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
result = new RuleBasedBreakIterator(file, status);
|
||||
/* test for NULL */
|
||||
if(result == 0) {
|
||||
status = U_MEMORY_ALLOCATION_ERROR;
|
||||
return 0;
|
||||
}
|
||||
if(result == 0) {
|
||||
status = U_MEMORY_ALLOCATION_ERROR;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -106,18 +106,18 @@ BreakIterator::createLineInstance(const Locale& key, UErrorCode& status)
|
||||
filename = "thaidict.brk";
|
||||
result = new DictionaryBasedBreakIterator(file, filename, status);
|
||||
/* test for NULL */
|
||||
if(result == 0) {
|
||||
status = U_MEMORY_ALLOCATION_ERROR;
|
||||
return 0;
|
||||
}
|
||||
if(result == 0) {
|
||||
status = U_MEMORY_ALLOCATION_ERROR;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
result = new RuleBasedBreakIterator(file, status);
|
||||
/* test for NULL */
|
||||
if(result == 0) {
|
||||
status = U_MEMORY_ALLOCATION_ERROR;
|
||||
return 0;
|
||||
}
|
||||
if(result == 0) {
|
||||
status = U_MEMORY_ALLOCATION_ERROR;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -143,10 +143,10 @@ BreakIterator::createCharacterInstance(const Locale& key, UErrorCode& status)
|
||||
if (!U_FAILURE(status)) {
|
||||
result = new RuleBasedBreakIterator(file, status);
|
||||
/* test for NULL */
|
||||
if(result == 0) {
|
||||
status = U_MEMORY_ALLOCATION_ERROR;
|
||||
return 0;
|
||||
}
|
||||
if(result == 0) {
|
||||
status = U_MEMORY_ALLOCATION_ERROR;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
@ -171,10 +171,10 @@ BreakIterator::createSentenceInstance(const Locale& key, UErrorCode& status)
|
||||
if (!U_FAILURE(status)) {
|
||||
result = new RuleBasedBreakIterator(file, status);
|
||||
/* test for NULL */
|
||||
if(result == 0) {
|
||||
status = U_MEMORY_ALLOCATION_ERROR;
|
||||
return 0;
|
||||
}
|
||||
if(result == 0) {
|
||||
status = U_MEMORY_ALLOCATION_ERROR;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
@ -199,10 +199,10 @@ BreakIterator::createTitleInstance(const Locale& key, UErrorCode& status)
|
||||
if (!U_FAILURE(status)) {
|
||||
result = new RuleBasedBreakIterator(file, status);
|
||||
/* test for NULL */
|
||||
if(result == 0) {
|
||||
status = U_MEMORY_ALLOCATION_ERROR;
|
||||
return 0;
|
||||
}
|
||||
if(result == 0) {
|
||||
status = U_MEMORY_ALLOCATION_ERROR;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -568,10 +568,10 @@ DictionaryBasedBreakIterator::divideUpDictionaryRange(int32_t startPos, int32_t
|
||||
}
|
||||
cachedBreakPositions = (int32_t *)uprv_malloc((currentBreakPositions.size() + 1) * sizeof(int32_t));
|
||||
/* Test for NULL */
|
||||
if(cachedBreakPositions == NULL) {
|
||||
status = U_MEMORY_ALLOCATION_ERROR;
|
||||
return;
|
||||
}
|
||||
if(cachedBreakPositions == NULL) {
|
||||
status = U_MEMORY_ALLOCATION_ERROR;
|
||||
return;
|
||||
}
|
||||
numCachedBreakPositions = currentBreakPositions.size() + 1;
|
||||
cachedBreakPositions[0] = startPos;
|
||||
|
||||
|
@ -176,9 +176,9 @@ ucmp8_openAdopt(uint16_t *indexArray,
|
||||
int32_t count)
|
||||
{
|
||||
CompactByteArray* this_obj = (CompactByteArray*) uprv_malloc(sizeof(CompactByteArray));
|
||||
/* test for NULL */
|
||||
if(this_obj == NULL)
|
||||
return NULL;
|
||||
/* test for NULL */
|
||||
if(this_obj == NULL)
|
||||
return NULL;
|
||||
ucmp8_initAdopt(this_obj, indexArray, newValues, count);
|
||||
this_obj->fIAmOwned = FALSE;
|
||||
return this_obj;
|
||||
@ -189,11 +189,11 @@ ucmp8_openAlias(uint16_t *indexArray,
|
||||
int8_t *newValues,
|
||||
int32_t count)
|
||||
{
|
||||
CompactByteArray* this_obj = (CompactByteArray*) uprv_malloc(sizeof(CompactByteArray));
|
||||
/* test for NULL */
|
||||
if(this_obj == NULL)
|
||||
return NULL;
|
||||
ucmp8_initAlias(this_obj, indexArray, newValues, count);
|
||||
CompactByteArray* this_obj = (CompactByteArray*) uprv_malloc(sizeof(CompactByteArray));
|
||||
/* test for NULL */
|
||||
if(this_obj == NULL)
|
||||
return NULL;
|
||||
ucmp8_initAlias(this_obj, indexArray, newValues, count);
|
||||
this_obj->fIAmOwned = FALSE;
|
||||
return this_obj;
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ stringIteratorMove(UCharIterator *iter, int32_t delta, UCharIteratorOrigin origi
|
||||
pos=iter->length+delta;
|
||||
break;
|
||||
default:
|
||||
return -1; /* Error */
|
||||
return -1; /* Error */
|
||||
}
|
||||
|
||||
if(pos<iter->start) {
|
||||
|
@ -328,7 +328,7 @@ UnicodeString::UnicodeString(const UnicodeString& that)
|
||||
}
|
||||
|
||||
UnicodeString::UnicodeString(const UnicodeString& that,
|
||||
int32_t srcStart)
|
||||
int32_t srcStart)
|
||||
: Replaceable(),
|
||||
fLength(0),
|
||||
fCapacity(US_STACKBUF_SIZE),
|
||||
@ -339,8 +339,8 @@ UnicodeString::UnicodeString(const UnicodeString& that,
|
||||
}
|
||||
|
||||
UnicodeString::UnicodeString(const UnicodeString& that,
|
||||
int32_t srcStart,
|
||||
int32_t srcLength)
|
||||
int32_t srcStart,
|
||||
int32_t srcLength)
|
||||
: Replaceable(),
|
||||
fLength(0),
|
||||
fCapacity(US_STACKBUF_SIZE),
|
||||
|
@ -332,12 +332,12 @@ UnicodeSet* UnicodePropertySet::createCombiningClassSet(const UnicodeString& val
|
||||
double value = uprv_strtod(cvalueName, &end);
|
||||
int32_t ivalue = (int32_t) value;
|
||||
if (ivalue != value || ivalue < 0 || *end != 0) {
|
||||
// We have a non-integral or negative value, or non-numeric text.
|
||||
// Try to lookup a symbolic combining class name
|
||||
ivalue = COMBINING_CLASS_MAP->geti(valueName) - MAPVAL;
|
||||
// We have a non-integral or negative value, or non-numeric text.
|
||||
// Try to lookup a symbolic combining class name
|
||||
ivalue = COMBINING_CLASS_MAP->geti(valueName) - MAPVAL;
|
||||
}
|
||||
if (ivalue >= 0) {
|
||||
// We have a potentially valid combining class
|
||||
// We have a potentially valid combining class
|
||||
initSetFromFilter(*set, _combiningClassFilter, &ivalue);
|
||||
}
|
||||
return set;
|
||||
|
@ -519,7 +519,7 @@ static UResourceBundle *init_resb_result(const ResourceData *rdata, Resource r,
|
||||
/* test for NULL */
|
||||
if(chAlias == NULL) {
|
||||
*status = U_MEMORY_ALLOCATION_ERROR;
|
||||
return NULL;
|
||||
return NULL;
|
||||
}
|
||||
u_UCharsToChars(alias, chAlias, len);
|
||||
chAlias[len] = 0;
|
||||
@ -621,10 +621,10 @@ static UResourceBundle *init_resb_result(const ResourceData *rdata, Resource r,
|
||||
if(resB == NULL) {
|
||||
resB = (UResourceBundle *)uprv_malloc(sizeof(UResourceBundle));
|
||||
/* test for NULL */
|
||||
if (resB == NULL) {
|
||||
*status = U_MEMORY_ALLOCATION_ERROR;
|
||||
return NULL;
|
||||
}
|
||||
if (resB == NULL) {
|
||||
*status = U_MEMORY_ALLOCATION_ERROR;
|
||||
return NULL;
|
||||
}
|
||||
ures_setIsStackObject(resB, FALSE);
|
||||
resB->fResPath = NULL;
|
||||
} else {
|
||||
@ -678,10 +678,10 @@ UResourceBundle *ures_copyResb(UResourceBundle *r, const UResourceBundle *origin
|
||||
isStackObject = FALSE;
|
||||
r = (UResourceBundle *)uprv_malloc(sizeof(UResourceBundle));
|
||||
/* test for NULL */
|
||||
if (r == NULL) {
|
||||
*status = U_MEMORY_ALLOCATION_ERROR;
|
||||
return NULL;
|
||||
}
|
||||
if (r == NULL) {
|
||||
*status = U_MEMORY_ALLOCATION_ERROR;
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
isStackObject = ures_isStackObject(r);
|
||||
if(U_FAILURE(*status)) {
|
||||
@ -691,10 +691,10 @@ UResourceBundle *ures_copyResb(UResourceBundle *r, const UResourceBundle *origin
|
||||
if(isStackObject == FALSE) {
|
||||
r = (UResourceBundle *)uprv_malloc(sizeof(UResourceBundle));
|
||||
/* test for NULL */
|
||||
if (r == NULL) {
|
||||
*status = U_MEMORY_ALLOCATION_ERROR;
|
||||
return NULL;
|
||||
}
|
||||
if (r == NULL) {
|
||||
*status = U_MEMORY_ALLOCATION_ERROR;
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
uprv_memcpy(r, original, sizeof(UResourceBundle));
|
||||
@ -1479,10 +1479,10 @@ ures_openW(const wchar_t* myPath,
|
||||
size_t pathSize = (uprv_wcslen(myPath) + 1) * sizeof(int32_t);
|
||||
char *path = (char *)uprv_malloc(pathSize);
|
||||
/* test for NULL */
|
||||
if (path == NULL) {
|
||||
*status = U_MEMORY_ALLOCATION_ERROR;
|
||||
return NULL;
|
||||
}
|
||||
if (path == NULL) {
|
||||
*status = U_MEMORY_ALLOCATION_ERROR;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
uprv_wcstombs(path, myPath, pathSize);
|
||||
|
||||
@ -1507,10 +1507,10 @@ U_CAPI UResourceBundle* U_EXPORT2 ures_openU(const UChar* myPath,
|
||||
int32_t pathSize = u_strlen(myPath) + 1;
|
||||
char *path = (char *)uprv_malloc(pathSize);
|
||||
/* test for NULL */
|
||||
if(path == NULL) {
|
||||
*status = U_MEMORY_ALLOCATION_ERROR;
|
||||
return NULL;
|
||||
}
|
||||
if(path == NULL) {
|
||||
*status = U_MEMORY_ALLOCATION_ERROR;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
u_UCharsToChars(myPath, path, pathSize);
|
||||
|
||||
|
@ -501,11 +501,11 @@ removeLamAlefSpaces(UChar *dest, int32_t sourceLength,
|
||||
switch(options&U_SHAPE_LENGTH_MASK) {
|
||||
case U_SHAPE_LENGTH_GROW_SHRINK :
|
||||
tempbuffer = (UChar *)uprv_malloc((sourceLength+1)*U_SIZEOF_UCHAR);
|
||||
/* Test for NULL */
|
||||
if(tempbuffer == NULL) {
|
||||
*pErrorCode = U_MEMORY_ALLOCATION_ERROR;
|
||||
return 0;
|
||||
}
|
||||
/* Test for NULL */
|
||||
if(tempbuffer == NULL) {
|
||||
*pErrorCode = U_MEMORY_ALLOCATION_ERROR;
|
||||
return 0;
|
||||
}
|
||||
|
||||
uprv_memset(tempbuffer, 0, (sourceLength+1)*U_SIZEOF_UCHAR);
|
||||
|
||||
@ -544,12 +544,12 @@ removeLamAlefSpaces(UChar *dest, int32_t sourceLength,
|
||||
|
||||
case U_SHAPE_LENGTH_FIXED_SPACES_AT_BEGINNING :
|
||||
tempbuffer = (UChar *)uprv_malloc((sourceLength+1)*U_SIZEOF_UCHAR);
|
||||
|
||||
/* Test for NULL */
|
||||
if(tempbuffer == NULL) {
|
||||
*pErrorCode = U_MEMORY_ALLOCATION_ERROR;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Test for NULL */
|
||||
if(tempbuffer == NULL) {
|
||||
*pErrorCode = U_MEMORY_ALLOCATION_ERROR;
|
||||
return 0;
|
||||
}
|
||||
|
||||
uprv_memset(tempbuffer, 0, (sourceLength+1)*U_SIZEOF_UCHAR);
|
||||
|
||||
@ -574,11 +574,11 @@ removeLamAlefSpaces(UChar *dest, int32_t sourceLength,
|
||||
case U_SHAPE_LENGTH_FIXED_SPACES_AT_END :
|
||||
tempbuffer = (UChar *)uprv_malloc((sourceLength+1)*U_SIZEOF_UCHAR);
|
||||
|
||||
/* Test for NULL */
|
||||
if(tempbuffer == NULL) {
|
||||
*pErrorCode = U_MEMORY_ALLOCATION_ERROR;
|
||||
return 0;
|
||||
}
|
||||
/* Test for NULL */
|
||||
if(tempbuffer == NULL) {
|
||||
*pErrorCode = U_MEMORY_ALLOCATION_ERROR;
|
||||
return 0;
|
||||
}
|
||||
|
||||
uprv_memset(tempbuffer, 0, (sourceLength+1)*U_SIZEOF_UCHAR);
|
||||
|
||||
@ -643,11 +643,11 @@ expandLamAlef(UChar *dest, int32_t sourceLength,
|
||||
destSize = calculateSize(dest,sourceLength,destSize,options);
|
||||
tempbuffer = (UChar *)uprv_malloc((destSize+1)*U_SIZEOF_UCHAR);
|
||||
|
||||
/* Test for NULL */
|
||||
if(tempbuffer == NULL) {
|
||||
*pErrorCode = U_MEMORY_ALLOCATION_ERROR;
|
||||
return 0;
|
||||
}
|
||||
/* Test for NULL */
|
||||
if(tempbuffer == NULL) {
|
||||
*pErrorCode = U_MEMORY_ALLOCATION_ERROR;
|
||||
return 0;
|
||||
}
|
||||
|
||||
uprv_memset(tempbuffer, 0, (destSize+1)*U_SIZEOF_UCHAR);
|
||||
|
||||
@ -685,11 +685,11 @@ expandLamAlef(UChar *dest, int32_t sourceLength,
|
||||
case U_SHAPE_LENGTH_FIXED_SPACES_AT_BEGINNING :
|
||||
tempbuffer = (UChar *)uprv_malloc((sourceLength+1)*U_SIZEOF_UCHAR);
|
||||
|
||||
/* Test for NULL */
|
||||
if(tempbuffer == NULL) {
|
||||
*pErrorCode = U_MEMORY_ALLOCATION_ERROR;
|
||||
return 0;
|
||||
}
|
||||
/* Test for NULL */
|
||||
if(tempbuffer == NULL) {
|
||||
*pErrorCode = U_MEMORY_ALLOCATION_ERROR;
|
||||
return 0;
|
||||
}
|
||||
|
||||
uprv_memset(tempbuffer, 0, (sourceLength+1)*U_SIZEOF_UCHAR);
|
||||
|
||||
@ -726,11 +726,11 @@ expandLamAlef(UChar *dest, int32_t sourceLength,
|
||||
*/
|
||||
tempbuffer = (UChar *)uprv_malloc((sourceLength+1)*U_SIZEOF_UCHAR);
|
||||
|
||||
/* Test for NULL */
|
||||
if(tempbuffer == NULL) {
|
||||
*pErrorCode = U_MEMORY_ALLOCATION_ERROR;
|
||||
return 0;
|
||||
}
|
||||
/* Test for NULL */
|
||||
if(tempbuffer == NULL) {
|
||||
*pErrorCode = U_MEMORY_ALLOCATION_ERROR;
|
||||
return 0;
|
||||
}
|
||||
|
||||
uprv_memset(tempbuffer, 0, (sourceLength+1)*U_SIZEOF_UCHAR);
|
||||
|
||||
@ -1025,11 +1025,11 @@ u_shapeArabic(const UChar *source, int32_t sourceLength,
|
||||
} else {
|
||||
tempbuffer = (UChar *)uprv_malloc(outputSize*U_SIZEOF_UCHAR);
|
||||
|
||||
/*Test for NULL*/
|
||||
if(tempbuffer == NULL) {
|
||||
*pErrorCode = U_MEMORY_ALLOCATION_ERROR;
|
||||
return 0;
|
||||
}
|
||||
/*Test for NULL*/
|
||||
if(tempbuffer == NULL) {
|
||||
*pErrorCode = U_MEMORY_ALLOCATION_ERROR;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
uprv_memcpy(tempbuffer, source, sourceLength*U_SIZEOF_UCHAR);
|
||||
if(sourceLength<outputSize) {
|
||||
|
Loading…
Reference in New Issue
Block a user