X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/51004dcb01e06fef634b61be77ed73dd61cb6db9..a0b4f637ba1a6c3c5651b61a69303b029bacf7d3:/icuSources/tools/toolutil/pkg_icu.cpp diff --git a/icuSources/tools/toolutil/pkg_icu.cpp b/icuSources/tools/toolutil/pkg_icu.cpp index 87ed0914..c2f39048 100644 --- a/icuSources/tools/toolutil/pkg_icu.cpp +++ b/icuSources/tools/toolutil/pkg_icu.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (C) 2008-2012, International Business Machines + * Copyright (C) 2008-2014, International Business Machines * Corporation and others. All Rights Reserved. ******************************************************************************* */ @@ -16,9 +16,6 @@ #include #include - -#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0])) - // read a file list -------------------------------------------------------- *** U_NAMESPACE_USE @@ -38,7 +35,7 @@ isListTextFile(const char *listname) { const char *listNameEnd=strchr(listname, 0); const char *suffix; int32_t i, length; - for(i=0; ilength && 0==memcmp(listNameEnd-length, suffix, length)) { @@ -135,6 +132,8 @@ readList(const char *filesPath, const char *listname, UBool readContents, Packag fclose(file); } else if((listNameEnd-listname)>4 && 0==memcmp(listNameEnd-4, ".dat", 4)) { // read the ICU .dat package + // Accept a .dat file whose name differs from the ToC prefixes. + listPkg->setAutoPrefix(); listPkg->readPackage(listname); } else { // list the single file itself