]> granicus.if.org Git - icu/commitdiff
ICU-8755 interim fix. MessagePattern still needs fixing.
authorSteven R. Loomis <srl@icu-project.org>
Sat, 13 Aug 2011 02:45:09 +0000 (02:45 +0000)
committerSteven R. Loomis <srl@icu-project.org>
Sat, 13 Aug 2011 02:45:09 +0000 (02:45 +0000)
X-SVN-Rev: 30505

18 files changed:
icu4c/source/common/ucnv_bld.cpp
icu4c/source/common/unicode/caniter.h
icu4c/source/common/unicode/messagepattern.h
icu4c/source/common/unicode/ucharstriebuilder.h
icu4c/source/i18n/alphaindex.cpp
icu4c/source/i18n/unicode/alphaindex.h
icu4c/source/i18n/unicode/calendar.h
icu4c/source/i18n/unicode/dcfmtsym.h
icu4c/source/i18n/unicode/decimfmt.h
icu4c/source/i18n/unicode/fmtable.h
icu4c/source/i18n/unicode/tblcoll.h
icu4c/source/i18n/unicode/translit.h
icu4c/source/i18n/unicode/unum.h
icu4c/source/i18n/unicode/uregex.h
icu4c/source/test/cintltst/cldrtest.c
icu4c/source/test/intltest/alphaindextst.cpp
icu4c/source/test/intltest/tscoll.cpp
icu4c/source/test/intltest/uobjtest.cpp

index 5d3266aab93fb3e4cd3f0f7383daa97c2bc09b74..25e853dd17da5a8392212e059164b82267b4b681 100644 (file)
@@ -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.
index 23246c5a0f2d27401efb1aa89b7322b81fbe021a..4e2a579fcf247c7bbf8abd5f6595e7064fb86b93 100644 (file)
@@ -1,3 +1,5 @@
+/* spam */
+
 /*
  *******************************************************************************
  * Copyright (C) 1996-2011, International Business Machines Corporation and
index 93c2952c73b7ac4558d90dd3536d64e2d119bf74..d3294e2f517104dbba2c76ae8ac366024b5c2048 100644 (file)
@@ -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
 
index 7d181ecbad91e08e405bda5e1009e760abe61f9b..c28f93b65b199f5696204b0f2be018a62e21f2fe 100644 (file)
@@ -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;
index efdf7a7b90fb33459027b9be685fab07a81f2c0a..47157f0bcb82de85d038bedcc19b1c79a1d4cbd1 100644 (file)
@@ -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
index 9b8f835e3ebc3467d849852d3bbebaaf572a7653..767b73e57c05e9c82b405baa2699621b6c438da3 100644 (file)
@@ -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
index 20f70e2fa58c1669c0a10d8570ca8d561cee04be..cf7f7355cd54864614cb4e2af853c1871e4917b4 100644 (file)
@@ -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
 
index ae3b1e49cfec6f80c8ce62c1a07cd9d9a9cadec6..6f005eed865a4ccaff381aaba65f0c6076d02881 100644 (file)
@@ -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 */
index 020c9426553bce49640ef0e42917d73a2e6a12af..1cdaa7ee3eca9b79fc8dd392762411b59eef0c3a 100644 (file)
@@ -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
 
index 409ba1fa55215d4ff565ccf2c6f10fab9e000188..641236fed4962522525df4757c7184430bc8ff52 100644 (file)
@@ -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
 
index 23c44cce539ba2dffd984cb5222c4ddf95381d2c..83e599989878413e36a6c9be9b8224a6557082c2 100644 (file)
@@ -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
index 298496461b473aceddbbe25035594c5cf597f2d4..f2a1d1bc7e6083c51035df881211bbec4f0d0490 100644 (file)
@@ -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
 
index 918d94ff8a16e6d017ce0e152ebf5daee49de2aa..650a3279e9a6825e4aa34097159e7220e0b04c44 100644 (file)
@@ -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
index 8b401c414aeb96125b6e75b49dbb83be244e249e..853725a277f86041fcc1df2ae2febcf8b353474b 100644 (file)
@@ -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.
  *
index c6ab1f8cdb02128c7fd3c91ea710d1f98118d9df..3697d5640c0ebda8843b0b2ec12fc42a76629ee2 100644 (file)
@@ -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)
index e374dd59572f39f1fbb6ca49306fc541ffd09ef1..eabfa4d60389050fd03e0191531bc9ca61976df3 100644 (file)
@@ -15,6 +15,8 @@
 #include "unicode/tblcoll.h"
 #include "unicode/uniset.h"
 
+#if !UCONFIG_NO_COLLATION && !UCONFIG_NO_NORMALIZATION
+
 // #include <string>
 // #include <iostream>
 
@@ -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
index 17b175de14023d30cd13bed58d991b6c267d51c6..872a78b950431d5ec2b3f5265562ce405963a0ea 100644 (file)
@@ -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;
     }
index 3f5e9cf0e374e980fd31280fcf4d171e6fb49182..83d1ac7fc8e9e4ca61b2eadd98e7b825a5897bfd 100644 (file)
@@ -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;