X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/729e4ab9bc6618bc3d8a898e575df7f4019e29ca..0f5d89e82340278ed3d7d50029f37cab2c41a57e:/icuSources/tools/toolutil/pkgitems.cpp diff --git a/icuSources/tools/toolutil/pkgitems.cpp b/icuSources/tools/toolutil/pkgitems.cpp index ba5e827d..cb23b45e 100644 --- a/icuSources/tools/toolutil/pkgitems.cpp +++ b/icuSources/tools/toolutil/pkgitems.cpp @@ -1,12 +1,14 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html /* ******************************************************************************* * -* Copyright (C) 2003-2010, International Business Machines +* Copyright (C) 2003-2015, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* * file name: pkgitems.cpp -* encoding: US-ASCII +* encoding: UTF-8 * tab size: 8 (not used) * indentation:4 * @@ -43,8 +45,6 @@ // general definitions ----------------------------------------------------- *** -#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0])) - U_CDECL_BEGIN static void U_CALLCONV @@ -390,7 +390,7 @@ ures_enumDependencies(const char *itemName, const UDataInfo *pInfo, } } - U_NAMESPACE_QUALIFIER NativeItem nativePool; + icu::NativeItem nativePool; if(resData.usesPoolBundle) { char poolName[200]; @@ -412,7 +412,8 @@ ures_enumDependencies(const char *itemName, const UDataInfo *pInfo, fprintf(stderr, "icupkg: %s is not a pool bundle\n", poolName); return; } - const int32_t *poolIndexes=(const int32_t *)nativePool.getBytes()+1; + const int32_t *poolRoot=(const int32_t *)nativePool.getBytes(); + const int32_t *poolIndexes=poolRoot+1; int32_t poolIndexLength=poolIndexes[URES_INDEX_LENGTH]&0xff; if(!(poolIndexLength>URES_INDEX_POOL_CHECKSUM && (poolIndexes[URES_INDEX_ATTRIBUTES]&URES_ATT_IS_POOL_BUNDLE)) @@ -422,6 +423,7 @@ ures_enumDependencies(const char *itemName, const UDataInfo *pInfo, } if(resData.pRoot[1+URES_INDEX_POOL_CHECKSUM]==poolIndexes[URES_INDEX_POOL_CHECKSUM]) { resData.poolBundleKeys=(const char *)(poolIndexes+poolIndexLength); + resData.poolBundleStrings=(const uint16_t *)(poolRoot+poolIndexes[URES_INDEX_KEYS_TOP]); } else { fprintf(stderr, "icupkg: %s has mismatched checksum for %s\n", poolName, itemName); return;