/*
*******************************************************************************
*
-* Copyright (C) 1997-2011, International Business Machines
+* Copyright (C) 1997-2012, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
**/
char tagBuffer[ULOC_FULLNAME_CAPACITY];
char likelySubtagsBuffer[ULOC_FULLNAME_CAPACITY];
- int32_t tagBufferLength = 0;
if(U_FAILURE(*err)) {
goto error;
const char* likelySubtags = NULL;
- tagBufferLength = createTagString(
+ createTagString(
lang,
langLength,
script,
const char* likelySubtags = NULL;
- tagBufferLength = createTagString(
+ createTagString(
lang,
langLength,
script,
/*
***************************************************************************
-* Copyright (C) 1999-2011 International Business Machines Corporation
+* Copyright (C) 1999-2012 International Business Machines Corporation
* and others. All rights reserved.
***************************************************************************
*/
//-----------------------------------------------------------------------------------
int32_t RuleBasedBreakIterator::handleNext(const RBBIStateTable *statetable) {
int32_t state;
- int16_t category = 0;
+ uint16_t category = 0;
RBBIRunMode mode;
RBBIStateTableRow *row;
//-----------------------------------------------------------------------------------
int32_t RuleBasedBreakIterator::handlePrevious(const RBBIStateTable *statetable) {
int32_t state;
- int16_t category = 0;
+ uint16_t category = 0;
RBBIRunMode mode;
RBBIStateTableRow *row;
UChar32 c;
/*
**********************************************************************
-* Copyright (C) 2002-2011, International Business Machines
+* Copyright (C) 2002-2012, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* file name: ucnv_u8.c
ucnv_UTF8FromUTF8(UConverterFromUnicodeArgs *pFromUArgs,
UConverterToUnicodeArgs *pToUArgs,
UErrorCode *pErrorCode) {
- UConverter *utf8, *cnv;
+ UConverter *utf8;
const uint8_t *source, *sourceLimit;
uint8_t *target;
int32_t targetCapacity;
/* set up the local pointers */
utf8=pToUArgs->converter;
- cnv=pFromUArgs->converter;
source=(uint8_t *)pToUArgs->source;
sourceLimit=(uint8_t *)pToUArgs->sourceLimit;
target=(uint8_t *)pFromUArgs->target;
/*
******************************************************************************
*
-* Copyright (C) 2000-2011, International Business Machines
+* Copyright (C) 2000-2012, International Business Machines
* Corporation and others. All Rights Reserved.
*
******************************************************************************
uint32_t stage2Entry;
uint32_t asciiRoundtrips;
- uint16_t value, minValue;
+ uint16_t value;
UBool hasSupplementary;
/* set up the local pointers */
}
asciiRoundtrips=cnv->sharedData->mbcs.asciiRoundtrips;
- if(cnv->useFallback) {
- /* use all roundtrip and fallback results */
- minValue=0x800;
- } else {
- /* use only roundtrips and fallbacks from private-use characters */
- minValue=0xc00;
- }
hasSupplementary=(UBool)(cnv->sharedData->mbcs.unicodeMask&UCNV_HAS_SUPPLEMENTARY);
/* get the converter state from the UTF-8 UConverter */
/*
*******************************************************************************
*
-* Copyright (C) 2003-2011, International Business Machines
+* Copyright (C) 2003-2012, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
U_CAPI UBool U_EXPORT2
ucol_looksLikeCollationBinary(const UDataSwapper *ds,
const void *inData, int32_t length) {
- const uint8_t *inBytes;
const UCATableHeader *inHeader;
UCATableHeader header;
return FALSE;
}
- inBytes=(const uint8_t *)inData;
inHeader=(const UCATableHeader *)inData;
/*
/*
**********************************************************************
-* Copyright (C) 2009-2011, International Business Machines
+* Copyright (C) 2009-2012, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*/
ExtensionListEntry *pExtension;
AttributeListEntry *pAttribute;
char *pExtValueSubtag, *pExtValueSubtagEnd;
- char *pAttrValue;
int32_t i;
UBool isLDMLExtension, reqLDMLType, privateuseVar = FALSE;
pExtValueSubtag = NULL;
pExtValueSubtagEnd = NULL;
pAttribute = NULL;
- pAttrValue = NULL;
isLDMLExtension = FALSE;
reqLDMLType = FALSE;
/*
******************************************************************************
-* Copyright (C) 1997-2011, International Business Machines Corporation and *
+* Copyright (C) 1997-2012, International Business Machines Corporation and *
* others. All Rights Reserved. *
******************************************************************************
*
char aliasName[100] = { 0 };
int32_t aliasLen = 0;
/*UBool isAlias = FALSE;*/
- UHashTok hashkey;
+ /*UHashTok hashkey; */
if(U_FAILURE(*status)) {
return NULL;
find.fPath = (char *)path;
/* calculate the hash value of the entry */
- hashkey.pointer = (void *)&find;
+ /*hashkey.pointer = (void *)&find;*/
/*hashValue = hashEntry(hashkey);*/
/* check to see if we already have this entry */
/*
******************************************************************************
*
- * Copyright (C) 2000-2011, International Business Machines
+ * Copyright (C) 2000-2012, International Business Machines
* Corporation and others. All Rights Reserved.
*
******************************************************************************
if( countl>0 && isLamAlefChar(dest[i])) {
tempbuffer[j] = LAM_CHAR;
/* to ensure the array index is within the range */
- U_ASSERT(dest[i]-0xFEF5 >= 0
- && dest[i]-0xFEF5 < sizeof(convertLamAlef)/sizeof(convertLamAlef[0]));
+ U_ASSERT(dest[i] >= 0xFEF5u
+ && dest[i]-0xFEF5u < sizeof(convertLamAlef)/sizeof(convertLamAlef[0]));
tempbuffer[j-1] = convertLamAlef[ dest[i] - 0xFEF5 ];
j--;
countl--;
tashkeelFound = 1;
} else {
/* to ensure the array index is within the range */
- U_ASSERT(dest[i]-0x064B >= 0
- && dest[i]-0x064B < sizeof(IrrelevantPos)/sizeof(IrrelevantPos[0]));
+ U_ASSERT(dest[i] >= 0x064Bu
+ && dest[i]-0x064Bu < sizeof(IrrelevantPos)/sizeof(IrrelevantPos[0]));
dest[i] = 0xFE70 + IrrelevantPos[(dest[i] - 0x064B)] + Shape;
}
}else if ((currLink & APRESENT) > 0) {
/*
*******************************************************************************
-* Copyright (C) 1997-2011, International Business Machines Corporation and *
+* Copyright (C) 1997-2012, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*
regionLen = uloc_getCountry(canonicalName, region, sizeof(region) - 1, &status);
if (regionLen == 0) {
char fullLoc[256];
- int32_t fullLocLen = 0;
- fullLocLen = uloc_addLikelySubtags(locid, fullLoc, sizeof(fullLoc) - 1, &status);
+ uloc_addLikelySubtags(locid, fullLoc, sizeof(fullLoc) - 1, &status);
regionLen = uloc_getCountry(fullLoc, region, sizeof(region) - 1, &status);
}
if (U_FAILURE(status)) {
DateTimePatternGenerator::addICUPatterns(const Locale& locale, UErrorCode& status) {
UnicodeString dfPattern;
UnicodeString conflictingString;
- UDateTimePatternConflict conflictingStatus;
DateFormat* df;
if (U_FAILURE(status)) {
df = DateFormat::createDateInstance(style, locale);
SimpleDateFormat* sdf;
if (df != NULL && (sdf = dynamic_cast<SimpleDateFormat*>(df)) != NULL) {
- conflictingStatus = addPattern(sdf->toPattern(dfPattern), FALSE, conflictingString, status);
+ addPattern(sdf->toPattern(dfPattern), FALSE, conflictingString, status);
}
// TODO Maybe we should return an error when the date format isn't simple.
delete df;
df = DateFormat::createTimeInstance(style, locale);
if (df != NULL && (sdf = dynamic_cast<SimpleDateFormat*>(df)) != NULL) {
- conflictingStatus = addPattern(sdf->toPattern(dfPattern), FALSE, conflictingString, status);
+ addPattern(sdf->toPattern(dfPattern), FALSE, conflictingString, status);
// HACK for hh:ss
if ( i==DateFormat::kMedium ) {
hackPattern = dfPattern;
void
DateTimePatternGenerator::hackTimes(const UnicodeString& hackPattern, UErrorCode& status) {
- UDateTimePatternConflict conflictingStatus;
UnicodeString conflictingString;
fp->set(hackPattern);
break;
}
mmss+= field;
- conflictingStatus = addPattern(mmss, FALSE, conflictingString, status);
+ addPattern(mmss, FALSE, conflictingString, status);
break;
}
else {
UResourceBundle *patBundle, *fieldBundle, *fBundle;
UnicodeString rbPattern, value, field;
UnicodeString conflictingPattern;
- UDateTimePatternConflict conflictingStatus;
const char *key=NULL;
int32_t i;
setAvailableFormat(retKey, err);
// Add pattern with its associated skeleton. Override any duplicate derived from std patterns,
// but not a previous availableFormats entry:
- conflictingStatus = addPatternWithSkeleton(format, &retKey, TRUE, conflictingPattern, err);
+ addPatternWithSkeleton(format, &retKey, TRUE, conflictingPattern, err);
}
#if defined(U_USE_ASCII_BUNDLE_ITERATOR)
ures_a_close(&aiter);
setAvailableFormat(retKey, err);
// Add pattern with its associated skeleton. Override any duplicate derived from std patterns,
// but not a previous availableFormats entry:
- conflictingStatus = addPatternWithSkeleton(format, &retKey, TRUE, conflictingPattern, err);
+ addPatternWithSkeleton(format, &retKey, TRUE, conflictingPattern, err);
}
}
#if defined(U_USE_ASCII_BUNDLE_ITERATOR)
void
DateTimePatternGenerator::addCanonicalItems() {
UnicodeString conflictingPattern;
- UDateTimePatternConflict conflictingStatus;
UErrorCode status = U_ZERO_ERROR;
for (int32_t i=0; i<UDATPG_FIELD_COUNT; i++) {
- conflictingStatus = addPattern(UnicodeString(Canonical_Items[i]), FALSE, conflictingPattern, status);
+ addPattern(UnicodeString(Canonical_Items[i]), FALSE, conflictingPattern, status);
}
}
/*
*******************************************************************************
-* Copyright (C) 2010-2011, International Business Machines Corporation and
+* Copyright (C) 2010-2012, International Business Machines Corporation and
* others. All Rights Reserved.
*******************************************************************************
*
StringCharacterIterator it(str);
UChar32 c;
- UChar32 prev = 0;
int32_t i = 0;
for ( it.setToStart(); it.hasNext(); ) {
return FALSE;
}
i++;
- prev = c;
}
return TRUE;
}
/*
******************************************************************************
- * Copyright (C) 2003-2008, International Business Machines Corporation
+ * Copyright (C) 2003-2012, International Business Machines Corporation
* and others. All Rights Reserved.
******************************************************************************
*
static void julian_to_jalali (int32_t daysNo, int *h_y, int *h_m, int *h_d)
{
- int year=0, month=0, day=0,scalarDays=0;
+ int year=0, month=0, day=0;
int i;
daysNo+=856493;
- scalarDays=daysNo;
year=(daysNo/1029983)*2820;
daysNo=daysNo%1029983;
/*
*******************************************************************************
-* Copyright (C) 2011, International Business Machines Corporation and
+* Copyright (C) 2012, International Business Machines Corporation and
* others. All Rights Reserved.
*******************************************************************************
*/
int32_t bestMatchLen = 0;
UTimeZoneTimeType bestMatchTimeType = UTZFMT_TIME_TYPE_UNKNOWN;
UnicodeString bestMatchTzID;
- UBool isLongStandard = FALSE; // workaround - see the comments below
+ // UBool isLongStandard = FALSE; // workaround - see the comments below
UBool isStandard = FALSE; // TODO: Temporary hack (on hack) for short standard name/location name conflict (found in zh_Hant), should be removed after CLDR 21m1 integration
if (tznamesMatches != NULL) {
UTimeZoneNameType nameType = tznamesMatches->getNameType(i);
switch (nameType) {
case UTZNM_LONG_STANDARD:
- isLongStandard = TRUE;
+ // isLongStandard = TRUE;
case UTZNM_SHORT_STANDARD: // this one is never used for generic, but just in case
isStandard = TRUE; // TODO: Remove this later, see the comments above.
bestMatchTimeType = UTZFMT_TIME_TYPE_STANDARD;
prefRegionLength = uloc_getCountry(locale, prefRegion, sizeof(prefRegion), status);
if (prefRegionLength == 0) {
char loc[ULOC_FULLNAME_CAPACITY] = "";
- int32_t locLength = 0;
- locLength = uloc_addLikelySubtags(locale, loc, sizeof(loc), status);
+ uloc_addLikelySubtags(locale, loc, sizeof(loc), status);
prefRegionLength = uloc_getCountry(loc, prefRegion, sizeof(prefRegion), status);
}
/*
*******************************************************************************
*
-* Copyright (C) 2001-2011, International Business Machines
+* Copyright (C) 2001-2012, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
const UHashElement *e = NULL;
UCAElements *element = NULL;
UChar NFCbuf[256];
- uint32_t NFCbufLen = 0;
while((e = uhash_nextElement(t->prefixLookup, &i)) != NULL) {
element = (UCAElements *)e->value.pointer;
// codepoints here are in the NFD form. We need to add the
// first code point of the NFC form to unsafe, because
// strcoll needs to backup over them.
- NFCbufLen = unorm_normalize(element->cPoints, element->cSize, UNORM_NFC, 0,
+ unorm_normalize(element->cPoints, element->cSize, UNORM_NFC, 0,
NFCbuf, 256, status);
unsafeCPSet(t->unsafeCP, NFCbuf[0]);
}
UChar comp[256];
CompData precomp[256]; // precomposed array
int32_t precompLen = 0; // count for precomp
- int32_t i, len, decompLen, curClass, replacedPos;
+ int32_t i, len, decompLen, replacedPos;
tempTailorContext c;
if ( cmLookup == NULL ) {
// Save the current precomposed char and its class to find any
// other combining mark combinations.
precomp[precompLen].cp=comp[0];
- curClass = precomp[precompLen].cClass =
+ precomp[precompLen].cClass =
index[nfcImpl->getFCD16(decomp[1]) & 0xff];
precompLen++;
replacedPos=0;
/*
*******************************************************************************
*
-* Copyright (C) 2001-2011, International Business Machines
+* Copyright (C) 2001-2012, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
collIterate s;
uint32_t baseCE = UCOL_NOT_FOUND, baseContCE = UCOL_NOT_FOUND;
uint32_t CE, SecondCE;
- uint32_t invPos;
+ // uint32_t invPos;
if(sourceToken != NULL) {
uprv_init_collIterate(src->UCA, src->source+((sourceToken->source)&0xFFFFFF), 1, &s, status);
} else {
}
} else {
- invPos = ucol_inv_getPrevCE(src, baseCE, baseContCE, &CE, &SecondCE, strength);
+ /* invPos = */ ucol_inv_getPrevCE(src, baseCE, baseContCE, &CE, &SecondCE, strength);
// we got the previous CE. Now we need to see if the difference between
// the two CEs is really of the requested strength.
UErrorCode* ec)
{
int32_t currCount = 0;
- int32_t resLen = 0;
if (ec != NULL && U_SUCCESS(*ec))
{
// local variables
UErrorCode localStatus = U_ZERO_ERROR;
char id[ULOC_FULLNAME_CAPACITY];
- resLen = uloc_getKeywordValue(locale, "currency", id, ULOC_FULLNAME_CAPACITY, &localStatus);
+ uloc_getKeywordValue(locale, "currency", id, ULOC_FULLNAME_CAPACITY, &localStatus);
// get country or country_variant in `id'
/*uint32_t variantType =*/ idForLocale(locale, id, sizeof(id), ec);
prefRegionLength = uloc_getCountry(locale, prefRegion, sizeof(prefRegion), status);
if (prefRegionLength == 0) {
char loc[ULOC_FULLNAME_CAPACITY] = "";
- int32_t locLength = 0;
- locLength = uloc_addLikelySubtags(locale, loc, sizeof(loc), status);
+ uloc_addLikelySubtags(locale, loc, sizeof(loc), status);
prefRegionLength = uloc_getCountry(loc, prefRegion, sizeof(prefRegion), status);
}
/*
/ *
- * (C) Copyright IBM Corp. 1998-2011 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1998-2012 - All Rights Reserved
*
*/
LEUnicode currentChar;
- LEUnicode virama;
LEUnicode workChars[2];
LEGlyphStorage workGlyphs;
//le_int32 offset = 0;
+#if 0
+// TODO: Should this section of code have actually been doing something?
// First find the relevant virama for the script we are dealing with
-
+ LEUnicode virama;
for ( currentChar = classTable->firstChar ; currentChar <= classTable->lastChar ; currentChar++ ) {
if ( classTable->isVirama(currentChar)) {
virama = currentChar;
break;
}
}
+#endif
for ( currentChar = classTable->firstChar ; currentChar <= classTable->lastChar ; currentChar++ ) {
if ( classTable->isConsonant(currentChar)) {
/*
*
- * (C) Copyright IBM Corp. 1998-2010 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1998-2012 - All Rights Reserved
*
*/
{
LEUnicode *outChars = NULL;
LEGlyphStorage fakeGlyphStorage;
- le_int32 outCharCount, outGlyphCount, fakeGlyphCount;
+ le_int32 outCharCount, outGlyphCount;
if (LE_FAILURE(success)) {
return 0;
}
if (outChars != NULL) {
- fakeGlyphCount = glyphProcessing(outChars, 0, outCharCount, outCharCount, rightToLeft, fakeGlyphStorage, success);
+ // le_int32 fakeGlyphCount =
+ glyphProcessing(outChars, 0, outCharCount, outCharCount, rightToLeft, fakeGlyphStorage, success);
LE_DELETE_ARRAY(outChars); // FIXME: a subclass may have allocated this, in which case this delete might not work...
//adjustGlyphs(outChars, 0, outCharCount, rightToLeft, fakeGlyphs, fakeGlyphCount);
} else {
- fakeGlyphCount = glyphProcessing(chars, offset, count, max, rightToLeft, fakeGlyphStorage, success);
+ // le_int32 fakeGlyphCount =
+ glyphProcessing(chars, offset, count, max, rightToLeft, fakeGlyphStorage, success);
//adjustGlyphs(chars, offset, count, rightToLeft, fakeGlyphs, fakeGlyphCount);
}
/*
********************************************************************************
*
-* Copyright (C) 1996-2011, International Business Machines
+* Copyright (C) 1996-2012, International Business Machines
* Corporation and others. All Rights Reserved.
*
********************************************************************************
initArgs( int argc, const char* const argv[], ArgHandlerPtr argHandler, void *context)
{
int i;
- int doList = FALSE;
- int argSkip = 0;
+ int argSkip = 0;
VERBOSITY = FALSE;
ERR_MSG = TRUE;
}
else if (strcmp( argv[i], "-l" )==0 )
{
- doList = TRUE;
+ /* doList = TRUE; */
}
else if (strcmp( argv[i], "-e1") == 0)
{
/*
*******************************************************************************
*
-* Copyright (C) 1998-2011, International Business Machines
+* Copyright (C) 1998-2012, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
enum ETokenType token;
char subtag[1024];
UVersionInfo version;
- UBool override = FALSE;
uint32_t line;
GenrbData genrbdata;
/* '{' . (name resource)* '}' */
}
else if (uprv_strcmp(subtag, "Override") == 0)
{
- override = FALSE;
-
- if (u_strncmp(member->u.fString.fChars, trueValue, u_strlen(trueValue)) == 0)
- {
- override = TRUE;
- }
+ // UBool override = (u_strncmp(member->u.fString.fChars, trueValue, u_strlen(trueValue)) == 0);
table_add(result, member, line, status);
}
char *filename;
uint32_t line;
char *fullname = NULL;
- int32_t numRead = 0;
filename = getInvariantString(state, &line, NULL, status);
if (U_FAILURE(*status))
return NULL;
}
- numRead = T_FileStream_read (file, data, len);
+ /* int32_t numRead = */ T_FileStream_read (file, data, len);
T_FileStream_close (file);
result = bin_open(state->bundle, tag, len, data, fullname, comment, status);
/*
*******************************************************************************
*
-* Copyright (C) 2000-2011, International Business Machines
+* Copyright (C) 2000-2012, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
uint32_t i = 0;
const char* arr ="new String[] { \n";
struct SResource *current = NULL;
- struct SResource *first =NULL;
- UBool decrementTabs = FALSE;
UBool allStrings = TRUE;
if (U_FAILURE(*status)) {
write_tabs(out);
T_FileStream_write(out, object, (int32_t)uprv_strlen(object));
tabCount++;
- decrementTabs = TRUE;
}else{
write_tabs(out);
T_FileStream_write(out, arr, (int32_t)uprv_strlen(arr));
tabCount++;
}
- first=current;
while (current != NULL) {
/*if(current->fType==URES_STRING){
write_tabs(out);
static void
table_write_java(struct SResource *res, UErrorCode *status) {
uint32_t i = 0;
- UBool allStrings =TRUE;
struct SResource *current = NULL;
- struct SResource *save = NULL;
const char* obj = "new Object[][]{\n";
if (U_FAILURE(*status)) {
tabCount++;
}
start = FALSE;
- save = current = res->u.fTable.fFirst;
+ current = res->u.fTable.fFirst;
i = 0;
tabCount++;
- allStrings=FALSE;
write_tabs(out);
if(currentKeyString != NULL) {
/*
*******************************************************************************
*
-* Copyright (C) 2002-2009, International Business Machines
+* Copyright (C) 2002-2012, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
int index = 0;
struct SResource *current = NULL;
- struct SResource *first =NULL;
sid = printContainer(res, group, array_restype, NULL, id, status);
current = res->u.fArray.fFirst;
- first=current;
while (current != NULL) {
char c[256] = {0};
uint32_t i = 0;
struct SResource *current = NULL;
- struct SResource *save = NULL;
char* sid = NULL;
if (U_FAILURE(*status)) {
sid[0] = '\0';
}
- save = current = res->u.fTable.fFirst;
+ current = res->u.fTable.fFirst;
i = 0;
while (current != NULL) {
/*
*******************************************************************************
*
-* Copyright (C) 1999-2011, International Business Machines
+* Copyright (C) 1999-2012, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
/* folding value: just store the offset (16 bits) if there is any non-0 entry */
static uint32_t U_CALLCONV
getFoldedValue(UNewTrie *trie, UChar32 start, int32_t offset) {
- uint32_t foldedValue, value;
+ uint32_t value;
UChar32 limit=0;
UBool inBlockZero;
- foldedValue=0;
-
limit=start+0x400;
while(start<limit) {
value=utrie_get32(trie, start, &inBlockZero);
/*
*******************************************************************************
*
-* Copyright (C) 1999-2011, International Business Machines
+* Copyright (C) 1999-2012, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
printf("Milliseconds since Epoch: %.0f\n", uprv_getUTCtime());
}
-void cmd_version(UBool noLoad, UErrorCode &errorCode)
+void cmd_version(UBool /* noLoad */, UErrorCode &errorCode)
{
- char str[2000];
- UVersionInfo icu;
-
do_init();
/*
*******************************************************************************
*
-* Copyright (C) 1999-2011, International Business Machines
+* Copyright (C) 1999-2012, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
Item *newItems = (Item*)uprv_malloc(max * sizeof(items[0]));
Item *oldItems = items;
if(newItems == NULL) {
- fprintf(stderr, "icupkg: Out of memory trying to allocate %u bytes for %d items\n", max*sizeof(items[0]), max);
+ fprintf(stderr, "icupkg: Out of memory trying to allocate %lu bytes for %d items\n", max*sizeof(items[0]), max);
exit(U_MEMORY_ALLOCATION_ERROR);
}
if(items && itemCount>0) {
/******************************************************************************
- * Copyright (C) 2008-2011, International Business Machines
+ * Copyright (C) 2008-2012, International Business Machines
* Corporation and others. All Rights Reserved.
*******************************************************************************
*/
fullPath[0] = 0;
}
n = (int32_t)uprv_strlen(fullPath);
+ fullPath[n] = 0; /* Suppress compiler warning for unused variable n */
+ /* when conditional code below is not compiled. */
uprv_strcat(fullPath, path);
#if (U_FILE_ALT_SEP_CHAR != U_TREE_ENTRY_SEP_CHAR)
if(U_FAILURE(errorCode)) { return NO_LINE; }
// Select the next available line buffer.
while(!isLineBufferAvailable(lineIndex)) {
- lineIndex= (lineIndex==kNumLineBuffers-1) ? lineIndex=0 : lineIndex+1;
+ ++lineIndex;
+ if (lineIndex == kNumLineBuffers) {
+ lineIndex = 0;
+ }
}
char *line=lines[lineIndex];
*line=0;
UErrorCode *pErrorCode) {
char dataFormatChars[4];
const UDataInfo *pInfo;
- int32_t headerSize, i, swappedLength;
+ int32_t i, swappedLength;
if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
return 0;
* information. Otherwise we would have to pass some of the information
* and not be able to use the UDataSwapFn signature.
*/
- headerSize=udata_swapDataHeader(ds, inData, -1, NULL, pErrorCode);
+ udata_swapDataHeader(ds, inData, -1, NULL, pErrorCode);
/*
* If we wanted udata_swap() to also handle non-loadable data like a UTrie,
/********************************************************************
* COPYRIGHT:
- * Copyright (c) 2007-2011, International Business Machines Corporation and
+ * Copyright (c) 2007-2012, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
if(i>=0 && i< (int32_t)U_SYSPARAM_COUNT) {
return systemParams[i].paramFunction(&(systemParams[i]),buffer,bufferCapacity,status);
} else {
- return NULL;
+ return 0;
}
}