]> granicus.if.org Git - icu/commitdiff
ICU-10398 Fix uconfig test errors in ICU 52
authorMichael Ow <mow@svn.icu-project.org>
Thu, 19 Sep 2013 20:47:22 +0000 (20:47 +0000)
committerMichael Ow <mow@svn.icu-project.org>
Thu, 19 Sep 2013 20:47:22 +0000 (20:47 +0000)
X-SVN-Rev: 34404

13 files changed:
icu4c/source/common/unicode/unistr.h
icu4c/source/i18n/unicode/dcfmtsym.h
icu4c/source/i18n/unicode/decimfmt.h
icu4c/source/i18n/unicode/dtfmtsym.h
icu4c/source/i18n/unicode/fmtable.h
icu4c/source/i18n/unicode/numsys.h
icu4c/source/i18n/unicode/tblcoll.h
icu4c/source/i18n/unicode/translit.h
icu4c/source/i18n/unicode/tzfmt.h
icu4c/source/i18n/unicode/unum.h
icu4c/source/test/cintltst/cloctst.c
icu4c/source/test/intltest/csdetest.cpp
icu4c/source/tools/genrb/derb.c

index 248f1d5412ec9a49b353e351f6cb29de550cb4eb..c6e8b4466ad13a239e762777acda1cfe367b267e 100644 (file)
@@ -54,12 +54,10 @@ U_STABLE int32_t U_EXPORT2
 u_strlen(const UChar *s);
 #endif
 
-#ifndef U_HIDE_INTERNAL_API
 /**
  * \def U_STRING_CASE_MAPPER_DEFINED
  * @internal
  */
-
 #ifndef U_STRING_CASE_MAPPER_DEFINED
 #define U_STRING_CASE_MAPPER_DEFINED
 
@@ -74,7 +72,6 @@ UStringCaseMapper(const UCaseMap *csm,
                   UErrorCode *pErrorCode);
 
 #endif
-#endif  /* U_HIDE_INTERNAL_API */
 
 U_NAMESPACE_BEGIN
 
index bfb14500524294333017514a2afe92caa4ad0a41..609ce027ace761622fe9325fe1aaba025eaa5aa2 100644 (file)
@@ -350,7 +350,6 @@ private:
     void setCurrencyForSymbols();
 
 public:
-#ifndef U_HIDE_INTERNAL_API
     /**
      * _Internal_ function - more efficient version of getSymbol,
      * returning a const reference to one of the symbol strings.
@@ -364,6 +363,7 @@ public:
      */
     inline const UnicodeString &getConstSymbol(ENumberFormatSymbol symbol) const;
 
+#ifndef U_HIDE_INTERNAL_API
     /**
      * Returns that pattern stored in currecy info. Internal API for use by NumberFormat API.
      * @internal
@@ -458,10 +458,12 @@ DecimalFormatSymbols::getLocale() const {
     return locale;
 }
 
+#ifndef U_HIDE_INTERNAL_API
 inline const UChar*
 DecimalFormatSymbols::getCurrencyPattern() const {
     return currPattern;
 }
+#endif /* U_HIDE_INTERNAL_API */
 
 U_NAMESPACE_END
 
index 5f14de4460d5885adbe00352db3b1df6919b6fe0..ab167ce4711228a8e99bd11670a2dac1bb646f49 100644 (file)
@@ -41,7 +41,6 @@
 #include "unicode/curramt.h"
 #include "unicode/enumset.h"
 
-#ifndef U_HIDE_INTERNAL_API
 /**
  * \def UNUM_DECIMALFORMAT_INTERNAL_SIZE
  * @internal
@@ -49,7 +48,6 @@
 #if UCONFIG_FORMAT_FASTPATHS_49
 #define UNUM_DECIMALFORMAT_INTERNAL_SIZE 16
 #endif
-#endif  /* U_HIDE_INTERNAL_API */
 
 U_NAMESPACE_BEGIN
 
index e246bdfb0ec3bde37015c030f9643af9e77a262e..bc82f6fc1cd9b691017ea324af8806d0e387fbe8 100644 (file)
@@ -505,7 +505,6 @@ public:
      */
     Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const;
 
-#ifndef U_HIDE_INTERNAL_API
     /**
      * Constants for capitalization context usage types.
      * @internal
@@ -528,7 +527,6 @@ public:
         kCapContextUsageMetazoneShort,
         kCapContextUsageTypeCount
     };
-#endif  /* U_HIDE_INTERNAL_API */
 
     /**
      * ICU "poor man's RTTI", returns a UClassID for the actual class.
index 4d9e07910347dbff9d5228138838b6647efeb42a..4d6bd3f7388f51c432ed3a3c5c2bc58d799beeaa 100644 (file)
@@ -33,7 +33,6 @@ U_NAMESPACE_BEGIN
 class CharString;
 class DigitList;
 
-#ifndef U_HIDE_INTERNAL_API
 /**
  * \def UNUM_INTERNAL_STACKARRAY_SIZE
  * @internal
@@ -43,7 +42,6 @@ class DigitList;
 #else
 #define UNUM_INTERNAL_STACKARRAY_SIZE 128
 #endif
-#endif  /* U_HIDE_INTERNAL_API */
 
 /**
  * Formattable objects can be passed to the Format class or
@@ -724,9 +722,11 @@ 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_HIDE_DEPRECATED_API */
 
 inline UFormattable* Formattable::toUFormattable() {
   return (UFormattable*)(this);
index 2335228214c631b7bb0fb15319fb5c106757457c..1777d9150400e725a7465c6bd6a71668409df54e 100644 (file)
 
 #include "unicode/utypes.h"
 
-#ifndef U_HIDE_INTERNAL_API
 /**
  * \def NUMSYS_NAME_CAPACITY
  * Size of a numbering system name.
  * @internal
  */
 #define NUMSYS_NAME_CAPACITY 8
-#endif  /* U_HIDE_INTERNAL_API */
 
 
 /**
index 947ac65d59df75708836c2b1c55f5602edb00a6d..367df52c6dc95765789d512c7d830270cfbaa562 100644 (file)
@@ -846,10 +846,12 @@ inline void RuleBasedCollator::setUCollator(UCollator     *collator)
     setRuleStringFromCollator();
 }
 
+#ifndef U_HIDE_INTERNAL_API
 inline const UCollator * RuleBasedCollator::getUCollator()
 {
     return ucollator;
 }
+#endif  /* U_HIDE_INTERNAL_API */
 
 U_NAMESPACE_END
 
index 57f4f059591580abf3a2f06bf4ff8405bc151d4c..469e94316d9e30c1c0c789beaf020221bcd42b68 100644 (file)
@@ -1308,6 +1308,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;
@@ -1319,6 +1320,7 @@ inline Transliterator::Token Transliterator::pointerToken(void* p) {
     t.pointer = p;
     return t;
 }
+#endif  /* U_HIDE_INTERNAL_API */
 
 U_NAMESPACE_END
 
index cc3ef0a387a87b95a894cc6780d414012549a513..b4adc93b5f526703de730bfb85bccbe69fac2cd0 100644 (file)
@@ -190,13 +190,11 @@ typedef enum UTimeZoneFormatGMTOffsetPatternType {
     UTZFMT_PAT_NEGATIVE_H,
 #endif /* U_HIDE_DRAFT_API */
 
-#ifndef U_HIDE_INTERNAL_API
     /**
      * Number of UTimeZoneFormatGMTOffsetPatternType types.
      * @internal
      */
     UTZFMT_PAT_COUNT
-#endif  /* U_HIDE_INTERNAL_API */
 } UTimeZoneFormatGMTOffsetPatternType;
 
 /**
index 82d343e06c68f2a95b0a7e4dba87a4f9e0771310..7cc5f538f9f34cc17a43d7c5775483c99cf090bc 100644 (file)
@@ -880,7 +880,7 @@ typedef enum UNumberFormatAttribute {
    * @draft ICU 51 */
   UNUM_SCALE = UNUM_LENIENT_PARSE + 2,
 #endif /* U_HIDE_DRAFT_API */
-#ifndef U_HIDE_INTERNAL_API
+
   /** Count of "regular" numeric attributes.
    * @internal */
   UNUM_NUMERIC_ATTRIBUTE_COUNT,
@@ -889,7 +889,6 @@ typedef enum UNumberFormatAttribute {
    * All items after this one are stored in boolean form.
    * @internal */
   UNUM_MAX_NONBOOLEAN_ATTRIBUTE = 0x0FFF,
-#endif  /* U_HIDE_INTERNAL_API */
 
   /** If 1, specifies that if setting the "max integer digits" attribute would truncate a value, set an error status rather than silently truncating.
    * For example,  formatting the value 1234 with 4 max int digits would succeed, but formatting 12345 would fail. There is no effect on parsing.
@@ -905,11 +904,9 @@ typedef enum UNumberFormatAttribute {
    */
   UNUM_PARSE_NO_EXPONENT,
 
-#ifndef U_HIDE_INTERNAL_API
   /** Limit of boolean attributes.
    * @internal */
   UNUM_LIMIT_BOOLEAN_ATTRIBUTE
-#endif  /* U_HIDE_INTERNAL_API */
 } UNumberFormatAttribute;
 
 /**
index b4e894046678c0ef3ab1ad53956bf6d12ec5654d..89b46ad4077007219088bdef9ee00e3ddea937b4 100644 (file)
@@ -1073,6 +1073,7 @@ static void TestDisplayNameBrackets()
             log_data_err("uloc_getDisplayName for displayLocale %s and namedLocale %s returns unexpected name or status %s\n", itemPtr->displayLocale, itemPtr->namedLocale, myErrorName(status));
         }
 
+#if !UCONFIG_NO_FORMATTING
         status = U_ZERO_ERROR;
         uldn = uldn_open(itemPtr->displayLocale, ULDN_STANDARD_NAMES, &status);
         if (U_SUCCESS(status)) {
@@ -1092,6 +1093,7 @@ static void TestDisplayNameBrackets()
         } else {
             log_data_err("uldn_open fails for displayLocale %s, status=%s\n", itemPtr->displayLocale, u_errorName(status));
         }
+#endif
     }
 }
 
index 9776e9b10ae22733e9430b9d0fca0e0dc3b174c4..4363380b21229c3e69a46bbc07b629bff468a8f6 100644 (file)
@@ -814,7 +814,7 @@ void CharsetDetectionTest::Ticket6394Test() {
 //               similar Windows and non-Windows SBCS encodings. State was kept in the shared
 //               Charset Recognizer objects, and could be overwritten.
 void CharsetDetectionTest::Ticket6954Test() {
-#if !UCONFIG_NO_CONVERSION
+#if !UCONFIG_NO_CONVERSION && !UCONFIG_NO_FORMATTING
     UErrorCode status = U_ZERO_ERROR;
     UnicodeString sISO = "This is a small sample of some English text. Just enough to be sure that it detects correctly.";
     UnicodeString ssWindows("This is another small sample of some English text. Just enough to be sure that it detects correctly."
index 972e2c3d5bc72d406916ca1603ee7ddc0db7fbc6..8c8fdd81c32eb8df05abb38b5b7e12e03dd5722e 100644 (file)
@@ -27,6 +27,8 @@
 #include "toolutil.h"
 #include "ustrfmt.h"
 
+#if !UCONFIG_NO_FORMATTING
+
 #define DERB_VERSION "1.1"
 
 #define DERB_DEFAULT_TRUNC 80
@@ -667,6 +669,14 @@ static void reportError(const char *pname, UErrorCode *status, const char *when)
   u_fprintf(ustderr, "%s: error %d while %s: %s\n", pname, *status, when, u_errorName(*status));
 }
 
+#else
+extern int
+main(int argc, char* argv[]) {
+    /* Changing stdio.h ustdio.h requires that formatting not be disabled. */
+    return 3;
+}
+#endif /* !UCONFIG_NO_FORMATTING */
+
 /*
  * Local Variables:
  * indent-tabs-mode: nil