From: Steven R. Loomis Date: Sat, 13 Aug 2011 02:45:09 +0000 (+0000) Subject: ICU-8755 interim fix. MessagePattern still needs fixing. X-Git-Tag: milestone-59-0-1~4585 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1e1f8509d86b033fc99ff8b0b5384f73ab65c8fc;p=icu ICU-8755 interim fix. MessagePattern still needs fixing. X-SVN-Rev: 30505 --- diff --git a/icu4c/source/common/ucnv_bld.cpp b/icu4c/source/common/ucnv_bld.cpp index 5d3266aab93..25e853dd17d 100644 --- a/icu4c/source/common/ucnv_bld.cpp +++ b/icu4c/source/common/ucnv_bld.cpp @@ -88,7 +88,12 @@ converterData[UCNV_NUMBER_OF_SUPPORTED_CONVERTER_TYPES]={ &_ASCIIData, &_UTF7Data, &_Bocu1Data, &_UTF16Data, &_UTF32Data, &_CESU8Data, &_IMAPData, + +#if UCONFIG_NO_LEGACY_CONVERSION + NULL, +#else &_CompoundTextData +#endif }; /* Please keep this in binary sorted order for getAlgorithmicTypeFromName. diff --git a/icu4c/source/common/unicode/caniter.h b/icu4c/source/common/unicode/caniter.h index 23246c5a0f2..4e2a579fcf2 100644 --- a/icu4c/source/common/unicode/caniter.h +++ b/icu4c/source/common/unicode/caniter.h @@ -1,3 +1,5 @@ +/* spam */ + /* ******************************************************************************* * Copyright (C) 1996-2011, International Business Machines Corporation and diff --git a/icu4c/source/common/unicode/messagepattern.h b/icu4c/source/common/unicode/messagepattern.h index 93c2952c73b..d3294e2f517 100644 --- a/icu4c/source/common/unicode/messagepattern.h +++ b/icu4c/source/common/unicode/messagepattern.h @@ -928,6 +928,14 @@ private: U_NAMESPACE_END +#else +U_NAMESPACE_BEGIN +class MessagePattern; /* forward reference, though draft API. */ +enum UMessagePatternApostropheMode{}; +typedef enum UMessagePatternApostropheMode UMessagePatternApostropheMode; + +U_NAMESPACE_END + #endif /* U_HIDE_DRAFT_API */ #endif // !UCONFIG_NO_FORMATTING diff --git a/icu4c/source/common/unicode/ucharstriebuilder.h b/icu4c/source/common/unicode/ucharstriebuilder.h index 7d181ecbad9..c28f93b65b1 100644 --- a/icu4c/source/common/unicode/ucharstriebuilder.h +++ b/icu4c/source/common/unicode/ucharstriebuilder.h @@ -139,6 +139,7 @@ private: virtual int32_t getMinLinearMatch() const { return UCharsTrie::kMinLinearMatch; } virtual int32_t getMaxLinearMatchLength() const { return UCharsTrie::kMaxLinearMatchLength; } +#ifndef U_HIDE_INTERNAL_API class UCTLinearMatchNode : public LinearMatchNode { public: UCTLinearMatchNode(const UChar *units, int32_t len, Node *nextNode); @@ -147,6 +148,7 @@ private: private: const UChar *s; }; +#endif virtual Node *createLinearMatchNode(int32_t i, int32_t unitIndex, int32_t length, Node *nextNode) const; diff --git a/icu4c/source/i18n/alphaindex.cpp b/icu4c/source/i18n/alphaindex.cpp index efdf7a7b90f..47157f0bcb8 100644 --- a/icu4c/source/i18n/alphaindex.cpp +++ b/icu4c/source/i18n/alphaindex.cpp @@ -12,6 +12,8 @@ #include "unicode/utypes.h" +#if !UCONFIG_NO_COLLATION && !UCONFIG_NO_NORMALIZATION + #include "unicode/alphaindex.h" #include "unicode/coll.h" #include "unicode/normalizer2.h" @@ -1309,3 +1311,5 @@ AlphabeticIndex::Bucket::~Bucket() { } U_NAMESPACE_END + +#endif diff --git a/icu4c/source/i18n/unicode/alphaindex.h b/icu4c/source/i18n/unicode/alphaindex.h index 9b8f835e3eb..767b73e57c0 100644 --- a/icu4c/source/i18n/unicode/alphaindex.h +++ b/icu4c/source/i18n/unicode/alphaindex.h @@ -14,6 +14,9 @@ #include "unicode/uobject.h" #include "unicode/locid.h" + +#if !UCONFIG_NO_COLLATION && !UCONFIG_NO_NORMALIZATION + /** * \file * \brief C++ API: Index Characters @@ -620,10 +623,9 @@ private: public: -#ifndef U_HIDE_INTERNAL_API /** * Language Types. For internal ICU use only. - * @internal + * @internal (but not hidden with U_HIDE_INTERNAL_API because it is used in public API) */ enum ELangType { /** @internal */ @@ -639,7 +641,6 @@ private: * @internal */ static ELangType langTypeFromLocale(const Locale &loc); -#endif /* U_HIDE_INTERNAL_API */ private: @@ -725,4 +726,5 @@ private: U_NAMESPACE_END #endif /* U_HIDE_DRAFT_API */ +#endif /* UCONFIG_NO_COLLATION / UCONFIG_NO_NORMALIZATION */ #endif diff --git a/icu4c/source/i18n/unicode/calendar.h b/icu4c/source/i18n/unicode/calendar.h index 20f70e2fa58..cf7f7355cd5 100644 --- a/icu4c/source/i18n/unicode/calendar.h +++ b/icu4c/source/i18n/unicode/calendar.h @@ -2256,11 +2256,13 @@ Calendar::roll(UCalendarDateFields field, UBool up, UErrorCode& status) roll(field, (int32_t)(up ? +1 : -1), status); } +#ifndef U_HIDE_DEPRECATED_API inline void Calendar::roll(EDateFields field, UBool up, UErrorCode& status) { roll((UCalendarDateFields) field, up, status); } +#endif // ------------------------------------- @@ -2278,11 +2280,13 @@ Calendar::internalSet(UCalendarDateFields field, int32_t value) fIsSet[field] = TRUE; // Remove later } + +#ifndef U_HIDE_INTERNAL_API inline int32_t Calendar::weekNumber(int32_t dayOfPeriod, int32_t dayOfWeek) { return weekNumber(dayOfPeriod, dayOfPeriod, dayOfWeek); } - +#endif U_NAMESPACE_END diff --git a/icu4c/source/i18n/unicode/dcfmtsym.h b/icu4c/source/i18n/unicode/dcfmtsym.h index ae3b1e49cfe..6f005eed865 100644 --- a/icu4c/source/i18n/unicode/dcfmtsym.h +++ b/icu4c/source/i18n/unicode/dcfmtsym.h @@ -403,6 +403,7 @@ DecimalFormatSymbols::getSymbol(ENumberFormatSymbol symbol) const { return *strPtr; } +#ifndef U_HIDE_INTERNAL_API inline const UnicodeString & DecimalFormatSymbols::getConstSymbol(ENumberFormatSymbol symbol) const { const UnicodeString *strPtr; @@ -413,6 +414,8 @@ DecimalFormatSymbols::getConstSymbol(ENumberFormatSymbol symbol) const { } return *strPtr; } +#endif + // ------------------------------------- @@ -442,10 +445,13 @@ DecimalFormatSymbols::getLocale() const { return locale; } +#ifndef U_HIDE_INTERNAL_API inline const UChar* DecimalFormatSymbols::getCurrencyPattern() const { return currPattern; } +#endif + U_NAMESPACE_END #endif /* #if !UCONFIG_NO_FORMATTING */ diff --git a/icu4c/source/i18n/unicode/decimfmt.h b/icu4c/source/i18n/unicode/decimfmt.h index 020c9426553..1cdaa7ee3ec 100644 --- a/icu4c/source/i18n/unicode/decimfmt.h +++ b/icu4c/source/i18n/unicode/decimfmt.h @@ -2309,10 +2309,12 @@ DecimalFormat::format(int32_t number, return format((int64_t)number, appendTo, pos); } +#ifndef U_HIDE_INTERNAL_API inline const UnicodeString & DecimalFormat::getConstSymbol(DecimalFormatSymbols::ENumberFormatSymbol symbol) const { return fSymbols->getConstSymbol(symbol); } +#endif U_NAMESPACE_END diff --git a/icu4c/source/i18n/unicode/fmtable.h b/icu4c/source/i18n/unicode/fmtable.h index 409ba1fa552..641236fed49 100644 --- a/icu4c/source/i18n/unicode/fmtable.h +++ b/icu4c/source/i18n/unicode/fmtable.h @@ -665,9 +665,12 @@ inline UnicodeString& Formattable::getString(void) { return *fValue.fString; } +#ifndef U_HIDE_DEPRECATED_API inline int32_t Formattable::getLong(UErrorCode* status) const { return getLong(*status); } +#endif + U_NAMESPACE_END diff --git a/icu4c/source/i18n/unicode/tblcoll.h b/icu4c/source/i18n/unicode/tblcoll.h index 23c44cce539..83e59998987 100644 --- a/icu4c/source/i18n/unicode/tblcoll.h +++ b/icu4c/source/i18n/unicode/tblcoll.h @@ -934,10 +934,12 @@ inline void RuleBasedCollator::setUCollator(UCollator *collator) setRuleStringFromCollator(); } +#ifndef U_HIDE_INTERNAL_API inline const UCollator * RuleBasedCollator::getUCollator() { return ucollator; } +#endif inline Collator::EComparisonResult RuleBasedCollator::getEComparisonResult( const UCollationResult &result) const diff --git a/icu4c/source/i18n/unicode/translit.h b/icu4c/source/i18n/unicode/translit.h index 298496461b4..f2a1d1bc7e6 100644 --- a/icu4c/source/i18n/unicode/translit.h +++ b/icu4c/source/i18n/unicode/translit.h @@ -1309,6 +1309,7 @@ inline void Transliterator::setID(const UnicodeString& id) { ID.truncate(ID.length()-1); } +#ifndef U_HIDE_INTERNAL_API inline Transliterator::Token Transliterator::integerToken(int32_t i) { Token t; t.integer = i; @@ -1320,6 +1321,7 @@ inline Transliterator::Token Transliterator::pointerToken(void* p) { t.pointer = p; return t; } +#endif U_NAMESPACE_END diff --git a/icu4c/source/i18n/unicode/unum.h b/icu4c/source/i18n/unicode/unum.h index 918d94ff8a1..650a3279e9a 100644 --- a/icu4c/source/i18n/unicode/unum.h +++ b/icu4c/source/i18n/unicode/unum.h @@ -254,7 +254,7 @@ typedef enum UNumberFormatPadPosition { UNUM_PAD_AFTER_SUFFIX } UNumberFormatPadPosition; -#ifndef U_HIDE_DRAFT_API +/* #ifndef U_HIDE_DRAFT_API: can't hide- used in dcfmtshm.h for size of DecimalFormatSymbols */ /** * Constants for specifying currency spacing * @draft ICU 4.8 @@ -266,7 +266,7 @@ enum UCurrencySpacing { UNUM_CURRENCY_SPACING_COUNT }; typedef enum UCurrencySpacing UCurrencySpacing; /**< @draft ICU 4.8 */ -#endif /* U_HIDE_DRAFT_API */ +/* #endif U_HIDE_DRAFT_API */ /** * Create and return a new UNumberFormat for formatting and parsing diff --git a/icu4c/source/i18n/unicode/uregex.h b/icu4c/source/i18n/unicode/uregex.h index 8b401c414ae..853725a277f 100644 --- a/icu4c/source/i18n/unicode/uregex.h +++ b/icu4c/source/i18n/unicode/uregex.h @@ -1555,7 +1555,7 @@ uregex_getMatchCallback(const URegularExpression *regexp, const void **context, UErrorCode *status); -#ifndef U_HIDE_DRAFT_API +/* #ifndef U_HIDE_DRAFT_API -- Don't hide this, used in regex.h */ /** * Function pointer for a regular expression find callback function. * @@ -1592,6 +1592,8 @@ typedef UBool U_CALLCONV URegexFindProgressCallback ( int64_t matchIndex); U_CDECL_END +#ifndef U_HIDE_DRAFT_API + /** * Set the find progress callback function for this URegularExpression. * diff --git a/icu4c/source/test/cintltst/cldrtest.c b/icu4c/source/test/cintltst/cldrtest.c index c6ab1f8cdb0..3697d5640c0 100644 --- a/icu4c/source/test/cintltst/cldrtest.c +++ b/icu4c/source/test/cintltst/cldrtest.c @@ -1309,6 +1309,7 @@ static void TestCurrencyList(void){ } static void TestAvailableIsoCodes(void){ +#if !UCONFIG_NO_FORMATTING UErrorCode errorCode = U_ZERO_ERROR; const char* eurCode = "EUR"; const char* usdCode = "USD"; @@ -1404,6 +1405,7 @@ static void TestAvailableIsoCodes(void){ } free(isoCode); +#endif } #define TESTCASE(name) addTest(root, &name, "tsutil/cldrtest/" #name) diff --git a/icu4c/source/test/intltest/alphaindextst.cpp b/icu4c/source/test/intltest/alphaindextst.cpp index e374dd59572..eabfa4d6038 100644 --- a/icu4c/source/test/intltest/alphaindextst.cpp +++ b/icu4c/source/test/intltest/alphaindextst.cpp @@ -15,6 +15,8 @@ #include "unicode/tblcoll.h" #include "unicode/uniset.h" +#if !UCONFIG_NO_COLLATION && !UCONFIG_NO_NORMALIZATION + // #include // #include @@ -56,7 +58,6 @@ void AlphabeticIndexTest::runIndexedTest( int32_t index, UBool exec, const char* // Does not attempt to check complete functionality. // void AlphabeticIndexTest::APITest() { - // // Simple constructor and destructor, getBucketCount() // @@ -415,3 +416,4 @@ void AlphabeticIndexTest::HackPinyinTest() { TEST_ASSERT(bucketCount > 25); TEST_ASSERT(filledBucketCount > 15); } +#endif diff --git a/icu4c/source/test/intltest/tscoll.cpp b/icu4c/source/test/intltest/tscoll.cpp index 17b175de140..872a78b9504 100644 --- a/icu4c/source/test/intltest/tscoll.cpp +++ b/icu4c/source/test/intltest/tscoll.cpp @@ -98,7 +98,9 @@ void IntlTestCollator::runIndexedTest( int32_t index, UBool exec, const char* &n TESTCLASS(20, CollationFinnishTest); // removed by weiv - we have changed Finnish collation //TESTCLASS(21, RandomCollatorTest); // See ticket 5747 about reenabling this test. TESTCLASS(21, SSearchTest); +#if !UCONFIG_NO_COLLATION && !UCONFIG_NO_NORMALIZATION TESTCLASS(22, AlphabeticIndexTest); +#endif default: name = ""; break; } diff --git a/icu4c/source/test/intltest/uobjtest.cpp b/icu4c/source/test/intltest/uobjtest.cpp index 3f5e9cf0e37..83d1ac7fc8e 100644 --- a/icu4c/source/test/intltest/uobjtest.cpp +++ b/icu4c/source/test/intltest/uobjtest.cpp @@ -480,7 +480,10 @@ void UObjectTest::testIDs() // TESTCLASSID_CTOR(LocaleKeyFactory, (42)); //#endif #endif + +#if !UCONFIG_NO_COLLATION && !UCONFIG_NO_NORMALIZATION TESTCLASSID_NONE_CTOR(AlphabeticIndex, (Locale::getEnglish(), status)); +#endif #if UOBJTEST_DUMP_IDS int i;