Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(566)

Unified Diff: source/tools/makeconv/gencnvex.c

Issue 845603002: Update ICU to 54.1 step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@master
Patch Set: remove unusued directories Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/tools/icuswap/icuswap.vcxproj ('k') | source/tools/makeconv/makeconv.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/tools/makeconv/gencnvex.c
diff --git a/source/tools/makeconv/gencnvex.c b/source/tools/makeconv/gencnvex.c
index 10a0571c6b9e36e9b773b62f1322b8b7d07cdeca..6ea944186df2de86423cf8a8583d4ee0029c1975 100644
--- a/source/tools/makeconv/gencnvex.c
+++ b/source/tools/makeconv/gencnvex.c
@@ -1,7 +1,7 @@
/*
*******************************************************************************
*
-* Copyright (C) 2003-2013, International Business Machines
+* Copyright (C) 2003-2014, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
@@ -27,9 +27,6 @@
#include "makeconv.h"
#include "genmbcs.h"
-#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
-
-
static void
CnvExtClose(NewConverter *cnvData);
@@ -849,7 +846,7 @@ addFromUTrieEntry(CnvExtData *extData, UChar32 c, uint32_t value) {
extData->stage1[i1]=(uint16_t)newBlock;
extData->stage2Top=newBlock+MBCS_STAGE_2_BLOCK_SIZE;
- if(extData->stage2Top>LENGTHOF(extData->stage2)) {
+ if(extData->stage2Top>UPRV_LENGTHOF(extData->stage2)) {
fprintf(stderr, "error: too many stage 2 entries at U+%04x\n", (int)c);
exit(U_MEMORY_ALLOCATION_ERROR);
}
@@ -871,7 +868,7 @@ addFromUTrieEntry(CnvExtData *extData, UChar32 c, uint32_t value) {
extData->stage2[i2]=(uint16_t)(newBlock>>UCNV_EXT_STAGE_2_LEFT_SHIFT);
extData->stage3Top=newBlock+MBCS_STAGE_3_BLOCK_SIZE;
- if(extData->stage3Top>LENGTHOF(extData->stage3)) {
+ if(extData->stage3Top>UPRV_LENGTHOF(extData->stage3)) {
fprintf(stderr, "error: too many stage 3 entries at U+%04x\n", (int)c);
exit(U_MEMORY_ALLOCATION_ERROR);
}
@@ -915,7 +912,7 @@ addFromUTrieEntry(CnvExtData *extData, UChar32 c, uint32_t value) {
}
}
} else {
- if((i3b=extData->stage3bTop++)>=LENGTHOF(extData->stage3b)) {
+ if((i3b=extData->stage3bTop++)>=UPRV_LENGTHOF(extData->stage3b)) {
fprintf(stderr, "error: too many stage 3b entries at U+%04x\n", (int)c);
exit(U_MEMORY_ALLOCATION_ERROR);
}
« no previous file with comments | « source/tools/icuswap/icuswap.vcxproj ('k') | source/tools/makeconv/makeconv.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698