]> granicus.if.org Git - icu/commitdiff
ICU-12738 ICU4C BRS, fixes from testing uconfig.h variations
authorPeter Edberg <pedberg@unicode.org>
Wed, 28 Sep 2016 07:37:19 +0000 (07:37 +0000)
committerPeter Edberg <pedberg@unicode.org>
Wed, 28 Sep 2016 07:37:19 +0000 (07:37 +0000)
X-SVN-Rev: 39378

icu4c/source/common/brkiter.cpp
icu4c/source/common/locdspnm.cpp
icu4c/source/common/unicode/unistr.h
icu4c/source/i18n/reldtfmt.cpp
icu4c/source/i18n/reldtfmt.h
icu4c/source/i18n/unicode/reldatefmt.h

index 66dba39c182fd1b894303845eacc2778db7010a9..029ec5e185d8b7b54d004bb5cbf9842c1a376e89 100644 (file)
@@ -420,6 +420,7 @@ BreakIterator::makeInstance(const Locale& loc, int32_t kind, UErrorCode& status)
         break;
     case UBRK_SENTENCE:
         result = BreakIterator::buildInstance(loc, "sentence", kind, status);
+#if !UCONFIG_NO_FILTERED_BREAK_ITERATION
         {
             char ssKeyValue[kKeyValueLenMax] = {0};
             UErrorCode kvStatus = U_ZERO_ERROR;
@@ -432,6 +433,7 @@ BreakIterator::makeInstance(const Locale& loc, int32_t kind, UErrorCode& status)
                 }
             }
         }
+#endif
         break;
     case UBRK_TITLE:
         result = BreakIterator::buildInstance(loc, "title", kind, status);
index 83f8c771ba4a85893fa76c48ff7eb7c5c1fb66d5..a17478ce6d8a611b8ad75d573af7efa74d2518d4 100644 (file)
@@ -280,7 +280,11 @@ class LocaleDisplayNamesImpl : public LocaleDisplayNames {
     SimpleFormatter format;
     SimpleFormatter keyTypeFormat;
     UDisplayContext capitalizationContext;
+#if !UCONFIG_NO_BREAK_ITERATION
     BreakIterator* capitalizationBrkIter;
+#else
+    UObject* capitalizationBrkIter;
+#endif
     static UMutex  capitalizationBrkIterLock;
     UnicodeString formatOpenParen;
     UnicodeString formatReplaceOpenParen;
@@ -509,8 +513,10 @@ LocaleDisplayNamesImpl::initialize(void) {
 }
 
 LocaleDisplayNamesImpl::~LocaleDisplayNamesImpl() {
+#if !UCONFIG_NO_BREAK_ITERATION
     delete capitalizationBrkIter;
- }
+#endif
+}
 
 const Locale&
 LocaleDisplayNamesImpl::getLocale() const {
index 81ba2c5ca19c285fc59ab2222a8540ec58176e4a..6f62244a1e2824c9d312c52f4187c94ad8c7a838 100644 (file)
@@ -76,7 +76,9 @@ UStringCaseMapper(const UCaseMap *csm,
 
 U_NAMESPACE_BEGIN
 
+#if !UCONFIG_NO_BREAK_ITERATION
 class BreakIterator;        // unicode/brkiter.h
+#endif
 class Locale;               // unicode/locid.h
 class StringCharacterIterator;
 class UnicodeStringAppendable;  // unicode/appendable.h
index b2ae37808cf4eccdfbc87b59824a5a94a2078a4e..00cafc84e4cd05e995bd30a1e14b6a80137c5983 100644 (file)
@@ -13,7 +13,6 @@
 
 #include <stdlib.h>
 
-#include "reldtfmt.h"
 #include "unicode/datefmt.h"
 #include "unicode/reldatefmt.h"
 #include "unicode/simpleformatter.h"
@@ -22,6 +21,7 @@
 #include "unicode/uchar.h"
 #include "unicode/brkiter.h"
 
+#include "reldtfmt.h"
 #include "cmemory.h"
 #include "uresimp.h"
 
@@ -592,4 +592,4 @@ int32_t RelativeDateFormat::dayDifference(Calendar &cal, UErrorCode &status) {
 
 U_NAMESPACE_END
 
-#endif
+#endif  /* !UCONFIG_NO_FORMATTING */
index 14d82864eac08b2f4cc521da5c4510954b0e0cb6..3a11dfb150debc3691d853ccbe66ec9757b0c020 100644 (file)
@@ -264,7 +264,11 @@ private:
     UBool fCapitalizationInfoSet;
     UBool fCapitalizationOfRelativeUnitsForUIListMenu;
     UBool fCapitalizationOfRelativeUnitsForStandAlone;
+#if !UCONFIG_NO_BREAK_ITERATION
     BreakIterator* fCapitalizationBrkIter;
+#else
+    UObject* fCapitalizationBrkIter;
+#endif
 
     /**
      * Get the string at a specific offset.
@@ -333,4 +337,3 @@ U_NAMESPACE_END
 #endif /* #if !UCONFIG_NO_FORMATTING */
 
 #endif // RELDTFMT_H
-//eof
index e3ed5914aaf2672ccb51e44aebf017a8e98ed9e1..e91d20667e39af178bf2791e814e747a8cb6cf6a 100644 (file)
@@ -25,7 +25,7 @@
  * \brief C++ API: Formats relative dates such as "1 day ago" or "tomorrow"
  */
 
-#if !UCONFIG_NO_FORMATTING && !UCONFIG_NO_BREAK_ITERATION
+#if !UCONFIG_NO_FORMATTING
 
 /**
  * Represents the unit for formatting a relative date. e.g "in 5 days"
@@ -226,6 +226,7 @@ typedef enum UDateDirection {
 #endif  // U_HIDE_DEPRECATED_API
 } UDateDirection;
 
+#if !UCONFIG_NO_BREAK_ITERATION
 
 U_NAMESPACE_BEGIN
 
@@ -517,5 +518,6 @@ private:
 
 U_NAMESPACE_END
 
-#endif /* !UCONFIG_NO_FORMATTING && !UCONFIG_NO_BREAK_ITERATION*/
-#endif
+#endif /* !UCONFIG_NO_BREAK_ITERATION */
+#endif /* !UCONFIG_NO_FORMATTING */
+#endif /* __RELDATEFMT_H */