From 2b6b8c73c4e83aad746a85eb2a01b2742e8e0328 Mon Sep 17 00:00:00 2001 From: gnrunge <41129501+gnrunge@users.noreply.github.com> Date: Mon, 24 Sep 2018 13:11:40 -0700 Subject: [PATCH] ICU-20119 urename.h update, header test fixes for icu 63 (#165) * ICU-20119 Update and fixes for the following BRS tasks: - Update urename.h - Test uconfig.h variations * ICU-20119 Updates copyright scanner script exclusions: don't scan ./git/*. * ICU-20119 Changes in reply to comments for pull requst #165. --- icu4c/source/common/rbbitblb.h | 6 ++ icu4c/source/common/unicode/urename.h | 37 ++++++- icu4c/source/i18n/fphdlimp.h | 3 +- icu4c/source/i18n/listformatter.cpp | 4 + icu4c/source/i18n/shareddateformatsymbols.h | 5 + .../test/intltest/listformattertest.cpp | 4 + icu4c/source/test/intltest/tsmthred.cpp | 8 +- icu4c/source/test/intltest/ucdtest.cpp | 6 ++ tools/scripts/cpysearch/.cpyskip.txt | 101 ++++++++++++++++++ 9 files changed, 165 insertions(+), 9 deletions(-) create mode 100644 tools/scripts/cpysearch/.cpyskip.txt diff --git a/icu4c/source/common/rbbitblb.h b/icu4c/source/common/rbbitblb.h index 844f7ecaab0..bc6077bb4da 100644 --- a/icu4c/source/common/rbbitblb.h +++ b/icu4c/source/common/rbbitblb.h @@ -15,6 +15,9 @@ #define RBBITBLB_H #include "unicode/utypes.h" + +#if !UCONFIG_NO_BREAK_ITERATION + #include "unicode/uobject.h" #include "unicode/rbbi.h" #include "rbbirb.h" @@ -207,4 +210,7 @@ private: U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_BREAK_ITERATION */ + #endif diff --git a/icu4c/source/common/unicode/urename.h b/icu4c/source/common/unicode/urename.h index 6d5f8ae39c3..3ca837bae9d 100644 --- a/icu4c/source/common/unicode/urename.h +++ b/icu4c/source/common/unicode/urename.h @@ -110,6 +110,7 @@ #define _UTF7Data U_ICU_ENTRY_POINT_RENAME(_UTF7Data) #define _UTF8Data U_ICU_ENTRY_POINT_RENAME(_UTF8Data) #define allowedHourFormatsCleanup U_ICU_ENTRY_POINT_RENAME(allowedHourFormatsCleanup) +#define checkImpl U_ICU_ENTRY_POINT_RENAME(checkImpl) #define cmemory_cleanup U_ICU_ENTRY_POINT_RENAME(cmemory_cleanup) #define dayPeriodRulesCleanup U_ICU_ENTRY_POINT_RENAME(dayPeriodRulesCleanup) #define deleteAllowedHourFormats U_ICU_ENTRY_POINT_RENAME(deleteAllowedHourFormats) @@ -256,12 +257,14 @@ #define u_fstropen U_ICU_ENTRY_POINT_RENAME(u_fstropen) #define u_fungetc U_ICU_ENTRY_POINT_RENAME(u_fungetc) #define u_getBidiPairedBracket U_ICU_ENTRY_POINT_RENAME(u_getBidiPairedBracket) +#define u_getBinaryPropertySet U_ICU_ENTRY_POINT_RENAME(u_getBinaryPropertySet) #define u_getCombiningClass U_ICU_ENTRY_POINT_RENAME(u_getCombiningClass) #define u_getDataDirectory U_ICU_ENTRY_POINT_RENAME(u_getDataDirectory) #define u_getDataVersion U_ICU_ENTRY_POINT_RENAME(u_getDataVersion) #define u_getDefaultConverter U_ICU_ENTRY_POINT_RENAME(u_getDefaultConverter) #define u_getFC_NFKC_Closure U_ICU_ENTRY_POINT_RENAME(u_getFC_NFKC_Closure) #define u_getISOComment U_ICU_ENTRY_POINT_RENAME(u_getISOComment) +#define u_getIntPropertyMap U_ICU_ENTRY_POINT_RENAME(u_getIntPropertyMap) #define u_getIntPropertyMaxValue U_ICU_ENTRY_POINT_RENAME(u_getIntPropertyMaxValue) #define u_getIntPropertyMinValue U_ICU_ENTRY_POINT_RENAME(u_getIntPropertyMinValue) #define u_getIntPropertyValue U_ICU_ENTRY_POINT_RENAME(u_getIntPropertyValue) @@ -766,6 +769,20 @@ #define ucol_swap U_ICU_ENTRY_POINT_RENAME(ucol_swap) #define ucol_swapInverseUCA U_ICU_ENTRY_POINT_RENAME(ucol_swapInverseUCA) #define ucol_tertiaryOrder U_ICU_ENTRY_POINT_RENAME(ucol_tertiaryOrder) +#define ucpmap_get U_ICU_ENTRY_POINT_RENAME(ucpmap_get) +#define ucpmap_getRange U_ICU_ENTRY_POINT_RENAME(ucpmap_getRange) +#define ucptrie_close U_ICU_ENTRY_POINT_RENAME(ucptrie_close) +#define ucptrie_get U_ICU_ENTRY_POINT_RENAME(ucptrie_get) +#define ucptrie_getRange U_ICU_ENTRY_POINT_RENAME(ucptrie_getRange) +#define ucptrie_getType U_ICU_ENTRY_POINT_RENAME(ucptrie_getType) +#define ucptrie_getValueWidth U_ICU_ENTRY_POINT_RENAME(ucptrie_getValueWidth) +#define ucptrie_internalGetRange U_ICU_ENTRY_POINT_RENAME(ucptrie_internalGetRange) +#define ucptrie_internalSmallIndex U_ICU_ENTRY_POINT_RENAME(ucptrie_internalSmallIndex) +#define ucptrie_internalSmallU8Index U_ICU_ENTRY_POINT_RENAME(ucptrie_internalSmallU8Index) +#define ucptrie_internalU8PrevIndex U_ICU_ENTRY_POINT_RENAME(ucptrie_internalU8PrevIndex) +#define ucptrie_openFromBinary U_ICU_ENTRY_POINT_RENAME(ucptrie_openFromBinary) +#define ucptrie_swap U_ICU_ENTRY_POINT_RENAME(ucptrie_swap) +#define ucptrie_toBinary U_ICU_ENTRY_POINT_RENAME(ucptrie_toBinary) #define ucsdet_close U_ICU_ENTRY_POINT_RENAME(ucsdet_close) #define ucsdet_detect U_ICU_ENTRY_POINT_RENAME(ucsdet_detect) #define ucsdet_detectAll U_ICU_ENTRY_POINT_RENAME(ucsdet_detectAll) @@ -1082,6 +1099,7 @@ #define ulocdata_getPaperSize U_ICU_ENTRY_POINT_RENAME(ulocdata_getPaperSize) #define ulocdata_open U_ICU_ENTRY_POINT_RENAME(ulocdata_open) #define ulocdata_setNoSubstitute U_ICU_ENTRY_POINT_RENAME(ulocdata_setNoSubstitute) +#define ulocimp_forLanguageTag U_ICU_ENTRY_POINT_RENAME(ulocimp_forLanguageTag) #define ulocimp_getCountry U_ICU_ENTRY_POINT_RENAME(ulocimp_getCountry) #define ulocimp_getLanguage U_ICU_ENTRY_POINT_RENAME(ulocimp_getLanguage) #define ulocimp_getRegionForSupplementalData U_ICU_ENTRY_POINT_RENAME(ulocimp_getRegionForSupplementalData) @@ -1109,6 +1127,16 @@ #define umtx_condWait U_ICU_ENTRY_POINT_RENAME(umtx_condWait) #define umtx_lock U_ICU_ENTRY_POINT_RENAME(umtx_lock) #define umtx_unlock U_ICU_ENTRY_POINT_RENAME(umtx_unlock) +#define umutablecptrie_buildImmutable U_ICU_ENTRY_POINT_RENAME(umutablecptrie_buildImmutable) +#define umutablecptrie_clone U_ICU_ENTRY_POINT_RENAME(umutablecptrie_clone) +#define umutablecptrie_close U_ICU_ENTRY_POINT_RENAME(umutablecptrie_close) +#define umutablecptrie_fromUCPMap U_ICU_ENTRY_POINT_RENAME(umutablecptrie_fromUCPMap) +#define umutablecptrie_fromUCPTrie U_ICU_ENTRY_POINT_RENAME(umutablecptrie_fromUCPTrie) +#define umutablecptrie_get U_ICU_ENTRY_POINT_RENAME(umutablecptrie_get) +#define umutablecptrie_getRange U_ICU_ENTRY_POINT_RENAME(umutablecptrie_getRange) +#define umutablecptrie_open U_ICU_ENTRY_POINT_RENAME(umutablecptrie_open) +#define umutablecptrie_set U_ICU_ENTRY_POINT_RENAME(umutablecptrie_set) +#define umutablecptrie_setRange U_ICU_ENTRY_POINT_RENAME(umutablecptrie_setRange) #define uniset_getUnicode32Instance U_ICU_ENTRY_POINT_RENAME(uniset_getUnicode32Instance) #define unorm2_append U_ICU_ENTRY_POINT_RENAME(unorm2_append) #define unorm2_close U_ICU_ENTRY_POINT_RENAME(unorm2_close) @@ -1221,6 +1249,7 @@ #define uplug_setPlugLevel U_ICU_ENTRY_POINT_RENAME(uplug_setPlugLevel) #define uplug_setPlugName U_ICU_ENTRY_POINT_RENAME(uplug_setPlugName) #define uplug_setPlugNoUnload U_ICU_ENTRY_POINT_RENAME(uplug_setPlugNoUnload) +#define uprops_addPropertyStarts U_ICU_ENTRY_POINT_RENAME(uprops_addPropertyStarts) #define uprops_getSource U_ICU_ENTRY_POINT_RENAME(uprops_getSource) #define upropsvec_addPropertyStarts U_ICU_ENTRY_POINT_RENAME(upropsvec_addPropertyStarts) #define uprv_add32_overflow U_ICU_ENTRY_POINT_RENAME(uprv_add32_overflow) @@ -1239,6 +1268,7 @@ #define uprv_convertToPosix U_ICU_ENTRY_POINT_RENAME(uprv_convertToPosix) #define uprv_copyAscii U_ICU_ENTRY_POINT_RENAME(uprv_copyAscii) #define uprv_copyEbcdic U_ICU_ENTRY_POINT_RENAME(uprv_copyEbcdic) +#define uprv_currencyLeads U_ICU_ENTRY_POINT_RENAME(uprv_currencyLeads) #define uprv_decContextClearStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextClearStatus) #define uprv_decContextDefault U_ICU_ENTRY_POINT_RENAME(uprv_decContextDefault) #define uprv_decContextGetRounding U_ICU_ENTRY_POINT_RENAME(uprv_decContextGetRounding) @@ -1332,7 +1362,6 @@ #define uprv_fmod U_ICU_ENTRY_POINT_RENAME(uprv_fmod) #define uprv_free U_ICU_ENTRY_POINT_RENAME(uprv_free) #define uprv_getCharNameCharacters U_ICU_ENTRY_POINT_RENAME(uprv_getCharNameCharacters) -#define uprv_getDefaultCodepage U_ICU_ENTRY_POINT_RENAME(uprv_getDefaultCodepage) #define uprv_getDefaultLocaleID U_ICU_ENTRY_POINT_RENAME(uprv_getDefaultLocaleID) #define uprv_getInfinity U_ICU_ENTRY_POINT_RENAME(uprv_getInfinity) #define uprv_getMaxCharNameLength U_ICU_ENTRY_POINT_RENAME(uprv_getMaxCharNameLength) @@ -1757,7 +1786,6 @@ #define utrie2_fromUTrie U_ICU_ENTRY_POINT_RENAME(utrie2_fromUTrie) #define utrie2_get32 U_ICU_ENTRY_POINT_RENAME(utrie2_get32) #define utrie2_get32FromLeadSurrogateCodeUnit U_ICU_ENTRY_POINT_RENAME(utrie2_get32FromLeadSurrogateCodeUnit) -#define utrie2_getVersion U_ICU_ENTRY_POINT_RENAME(utrie2_getVersion) #define utrie2_internalU8NextIndex U_ICU_ENTRY_POINT_RENAME(utrie2_internalU8NextIndex) #define utrie2_internalU8PrevIndex U_ICU_ENTRY_POINT_RENAME(utrie2_internalU8PrevIndex) #define utrie2_isFrozen U_ICU_ENTRY_POINT_RENAME(utrie2_isFrozen) @@ -1769,7 +1797,6 @@ #define utrie2_set32ForLeadSurrogateCodeUnit U_ICU_ENTRY_POINT_RENAME(utrie2_set32ForLeadSurrogateCodeUnit) #define utrie2_setRange32 U_ICU_ENTRY_POINT_RENAME(utrie2_setRange32) #define utrie2_swap U_ICU_ENTRY_POINT_RENAME(utrie2_swap) -#define utrie2_swapAnyVersion U_ICU_ENTRY_POINT_RENAME(utrie2_swapAnyVersion) #define utrie_clone U_ICU_ENTRY_POINT_RENAME(utrie_clone) #define utrie_close U_ICU_ENTRY_POINT_RENAME(utrie_close) #define utrie_defaultGetFoldingOffset U_ICU_ENTRY_POINT_RENAME(utrie_defaultGetFoldingOffset) @@ -1781,6 +1808,7 @@ #define utrie_set32 U_ICU_ENTRY_POINT_RENAME(utrie_set32) #define utrie_setRange32 U_ICU_ENTRY_POINT_RENAME(utrie_setRange32) #define utrie_swap U_ICU_ENTRY_POINT_RENAME(utrie_swap) +#define utrie_swapAnyVersion U_ICU_ENTRY_POINT_RENAME(utrie_swapAnyVersion) #define utrie_unserialize U_ICU_ENTRY_POINT_RENAME(utrie_unserialize) #define utrie_unserializeDummy U_ICU_ENTRY_POINT_RENAME(utrie_unserializeDummy) #define vzone_clone U_ICU_ENTRY_POINT_RENAME(vzone_clone) @@ -1831,7 +1859,6 @@ #define ztrans_setTo U_ICU_ENTRY_POINT_RENAME(ztrans_setTo) #endif /* defined(_MSC_VER) && !defined(__INTELLISENSE__) */ - #endif /* U_DISABLE_RENAMING */ - #endif /* URENAME_H */ + diff --git a/icu4c/source/i18n/fphdlimp.h b/icu4c/source/i18n/fphdlimp.h index 2e9d5622b1b..a6827e01e98 100644 --- a/icu4c/source/i18n/fphdlimp.h +++ b/icu4c/source/i18n/fphdlimp.h @@ -10,9 +10,10 @@ #ifndef FPHDLIMP_H #define FPHDLIMP_H +#include "unicode/utypes.h" + #if !UCONFIG_NO_FORMATTING -#include "unicode/utypes.h" #include "unicode/fieldpos.h" #include "unicode/fpositer.h" diff --git a/icu4c/source/i18n/listformatter.cpp b/icu4c/source/i18n/listformatter.cpp index 6517bb08a5b..3b49c05302f 100644 --- a/icu4c/source/i18n/listformatter.cpp +++ b/icu4c/source/i18n/listformatter.cpp @@ -367,6 +367,7 @@ UnicodeString& ListFormatter::format( return format(items, nItems, appendTo, -1, offset, errorCode); } +#if !UCONFIG_NO_FORMATTING UnicodeString& ListFormatter::format( const UnicodeString items[], int32_t nItems, @@ -377,6 +378,7 @@ UnicodeString& ListFormatter::format( FieldPositionIteratorHandler handler(posIter, errorCode); return format_(items, nItems, appendTo, -1, offset, &handler, errorCode); }; +#endif UnicodeString& ListFormatter::format( const UnicodeString items[], @@ -396,6 +398,7 @@ UnicodeString& ListFormatter::format_( int32_t &offset, FieldPositionHandler* handler, UErrorCode& errorCode) const { +#if !UCONFIG_NO_FORMATTING offset = -1; if (U_FAILURE(errorCode)) { return appendTo; @@ -515,6 +518,7 @@ UnicodeString& ListFormatter::format_( } appendTo += result; } +#endif return appendTo; } diff --git a/icu4c/source/i18n/shareddateformatsymbols.h b/icu4c/source/i18n/shareddateformatsymbols.h index ca9a2108190..66a06ecae54 100644 --- a/icu4c/source/i18n/shareddateformatsymbols.h +++ b/icu4c/source/i18n/shareddateformatsymbols.h @@ -12,6 +12,9 @@ #define __SHARED_DATEFORMATSYMBOLS_H__ #include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + #include "sharedobject.h" #include "unicode/dtfmtsym.h" @@ -33,4 +36,6 @@ private: U_NAMESPACE_END +#endif /* !UCONFIG_NO_FORMATTING */ + #endif diff --git a/icu4c/source/test/intltest/listformattertest.cpp b/icu4c/source/test/intltest/listformattertest.cpp index 2590b30ed49..4cd1c1411c6 100644 --- a/icu4c/source/test/intltest/listformattertest.cpp +++ b/icu4c/source/test/intltest/listformattertest.cpp @@ -20,6 +20,8 @@ #include "unicode/ulistformatter.h" #include +#if !UCONFIG_NO_FORMATTING + namespace { const char* attrString(int32_t attrId) { switch (attrId) { @@ -583,3 +585,5 @@ void ListFormatterTest::runIndexedTest(int32_t index, UBool exec, default: name = ""; break; } } + +#endif /* #if !UCONFIG_NO_FORMATTING */ diff --git a/icu4c/source/test/intltest/tsmthred.cpp b/icu4c/source/test/intltest/tsmthred.cpp index cfcd1f77db0..0c8219a9ba5 100644 --- a/icu4c/source/test/intltest/tsmthred.cpp +++ b/icu4c/source/test/intltest/tsmthred.cpp @@ -82,8 +82,10 @@ void MultithreadTest::runIndexedTest( int32_t index, UBool exec, #if !UCONFIG_NO_TRANSLITERATION TESTCASE_AUTO(TestBreakTranslit); TESTCASE_AUTO(TestIncDec); -#endif /* #if !UCONFIG_NO_TRANSLITERATION */ +#if !UCONFIG_NO_FORMATTING TESTCASE_AUTO(Test20104); +#endif /* #if !UCONFIG_NO_FORMATTING */ +#endif /* #if !UCONFIG_NO_TRANSLITERATION */ TESTCASE_AUTO_END } @@ -1550,7 +1552,7 @@ void MultithreadTest::TestIncDec() assertEquals("TestIncDec", NUM_THREADS, gIncDecCounter); } - +#if !UCONFIG_NO_FORMATTING static Calendar *gSharedCalendar = {}; class Test20104Thread : public SimpleThread { @@ -1580,6 +1582,6 @@ void MultithreadTest::Test20104() { delete gSharedCalendar; // Note: failure is reported by Thread Sanitizer. Test itself succeeds. } - +#endif /* !UCONFIG_NO_FORMATTING */ #endif /* !UCONFIG_NO_TRANSLITERATION */ diff --git a/icu4c/source/test/intltest/ucdtest.cpp b/icu4c/source/test/intltest/ucdtest.cpp index cdad0ae7c98..6b784b7b1b2 100644 --- a/icu4c/source/test/intltest/ucdtest.cpp +++ b/icu4c/source/test/intltest/ucdtest.cpp @@ -70,8 +70,10 @@ void UnicodeTest::runIndexedTest( int32_t index, UBool exec, const char* &name, TESTCASE_AUTO(TestVerticalOrientation); TESTCASE_AUTO(TestDefaultScriptExtensions); TESTCASE_AUTO(TestInvalidCodePointFolding); +#if !UCONFIG_NO_NORMALIZATION TESTCASE_AUTO(TestBinaryCharacterProperties); TESTCASE_AUTO(TestIntCharacterProperties); +#endif TESTCASE_AUTO_END; } @@ -622,6 +624,7 @@ void UnicodeTest::TestInvalidCodePointFolding(void) { } void UnicodeTest::TestBinaryCharacterProperties() { +#if !UCONFIG_NO_NORMALIZATION IcuTestErrorCode errorCode(*this, "TestBinaryCharacterProperties()"); // Spot-check getBinaryPropertySet() vs. hasBinaryProperty(). for (int32_t prop = 0; prop < UCHAR_BINARY_LIMIT; ++prop) { @@ -663,9 +666,11 @@ void UnicodeTest::TestBinaryCharacterProperties() { } } } +#endif } void UnicodeTest::TestIntCharacterProperties() { +#if !UCONFIG_NO_NORMALIZATION IcuTestErrorCode errorCode(*this, "TestIntCharacterProperties()"); // Spot-check getIntPropertyMap() vs. getIntPropertyValue(). for (int32_t prop = UCHAR_INT_START; prop < UCHAR_INT_LIMIT; ++prop) { @@ -689,4 +694,5 @@ void UnicodeTest::TestIntCharacterProperties() { "int property upcmap_get(U+0061)", u_getIntPropertyValue(0x61, (UProperty)prop), ucpmap_get(map, 0x61)); } +#endif } diff --git a/tools/scripts/cpysearch/.cpyskip.txt b/tools/scripts/cpysearch/.cpyskip.txt new file mode 100644 index 00000000000..f1b5f303cb8 --- /dev/null +++ b/tools/scripts/cpysearch/.cpyskip.txt @@ -0,0 +1,101 @@ +# +# Copyright (C) 2017 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# Copyright (c) 2005-2011 International Business Machines +# Corporation and others. All Rights Reserved. +## see NOTE below. +## Also see: http://icu-project.org/copyright-scan.html +# +# suffix matches - start with '*'. They are turned into as RE, '.brk$' +*.brk +*.bz2 +*.class +*.classpath +*.csproj +*.cvsignore +*.dat +*.DS_Store +*.doc +*.gif +*.gz +*.ico +*.icu +*.intaglio +*.jar +*.jpg +*.launch +*.nrm +*.odp +*.otf +*.pdf +*.png +*.ppt +*.prefs +*.project +*.res +*.rtf +*.sln +*.sxd +*.sxg +*.sxw +*.tri2 +*.vcproj +*.vcxproj +*.vcxproj.filters +*.zip + +# UnicodeData.txt does not have any header. +*/UnicodeData.txt + +# +# ICU4C +# +icu4c/source/aclocal.m4 +icu4c/source/config.guess +icu4c/source/config.log +icu4c/source/config.status +icu4c/source/config.sub +icu4c/source/install-sh +icu4c/source/extra/uconv/samples/* +icu4c/source/samples/layout/Sample.txt +icu4c/source/samples/ucnv/data01.txt +icu4c/source/samples/ufortune/resources/res-file-list.txt +icu4c/source/test/testdata/ConverterSelectorTestUTF8.txt +icu4c/source/test/testdata/encoded.utf16be +icu4c/source/test/testdata/idna_conf.txt +icu4c/source/test/testdata/ra.xlf +icu4c/source/test/testdata/re_tests.txt +icu4c/source/test/thaitest/space.txt +icu4c/source/tools/tzcode/asctime.c +icu4c/source/tools/tzcode/ialloc.c +icu4c/source/tools/tzcode/localtime.c +icu4c/source/tools/tzcode/private.h +icu4c/source/tools/tzcode/scheck.c +icu4c/source/tools/tzcode/tzfile.h +icu4c/source/tools/tzcode/tzselect.ksh +icu4c/source/tools/tzcode/zdump.c +icu4c/source/tools/tzcode/zic.c +# +# ICU4J +# +icu4j/eclipse-build/pdebuild/allElements.xml +icu4j/eclipse-build/pdebuild/customTargets.xml +icu4j/main/tests/core/src/com/ibm/icu/dev/data/IDNATestInput.txt +icu4j/main/tests/core/src/com/ibm/icu/dev/data/unicode/confusablesWholeScript.txt +icu4j/main/tests/core/src/com/ibm/icu/dev/data/unicode/UnicodeData.txt +icu4j/main/tests/core/src/com/ibm/icu/dev/test/duration/testdata/* +icu4j/perf-tests/data/conversion/* +# +# tools +# +tools/trac/IcuCodeTools/* +tools/unicodetools/* +# +# vendor +# +vendor/double-conversion/upstream/* +# +# git +# +.git/*