From 6b0ec252008a2073441218840d8fb12d0e7541d2 Mon Sep 17 00:00:00 2001 From: George Rhoten Date: Fri, 14 Feb 2003 01:44:49 +0000 Subject: [PATCH] ICU-2710 Remove obsolete code X-SVN-Rev: 11041 --- icu4c/source/i18n/anytrans.cpp | 2 +- icu4c/source/i18n/choicfmt.cpp | 10 - icu4c/source/i18n/cpdtrans.cpp | 5 +- icu4c/source/i18n/{unicode => }/cpdtrans.h | 70 +------ icu4c/source/i18n/dtfmtsym.cpp | 26 --- icu4c/source/i18n/hextouni.cpp | 5 +- icu4c/source/i18n/{unicode => }/hextouni.h | 3 - icu4c/source/i18n/i18n.dsp | 225 +-------------------- icu4c/source/i18n/nultrans.cpp | 5 +- icu4c/source/i18n/{unicode => }/nultrans.h | 2 - icu4c/source/i18n/rbt.cpp | 5 +- icu4c/source/i18n/{unicode => }/rbt.h | 3 - icu4c/source/i18n/rbt_pars.cpp | 2 +- icu4c/source/i18n/rbt_pars.h | 2 +- icu4c/source/i18n/simpletz.cpp | 10 - icu4c/source/i18n/timezone.cpp | 4 - icu4c/source/i18n/translit.cpp | 10 +- icu4c/source/i18n/transreg.cpp | 11 +- icu4c/source/i18n/ucln_in.c | 4 - icu4c/source/i18n/ucln_in.h | 4 - icu4c/source/i18n/unicode/choicfmt.h | 41 ---- icu4c/source/i18n/unicode/dtfmtsym.h | 8 - icu4c/source/i18n/unicode/simpletz.h | 7 - icu4c/source/i18n/unicode/timezone.h | 17 -- icu4c/source/i18n/unicode/translit.h | 124 ++---------- icu4c/source/i18n/unicode/utrans.h | 2 +- icu4c/source/i18n/unitohex.cpp | 5 +- icu4c/source/i18n/{unicode => }/unitohex.h | 4 - icu4c/source/i18n/unum.cpp | 90 --------- icu4c/source/i18n/utrans.cpp | 5 +- icu4c/source/test/intltest/cpdtrtst.cpp | 5 +- icu4c/source/test/intltest/cpdtrtst.h | 2 +- icu4c/source/test/intltest/hxuntrts.cpp | 5 +- icu4c/source/test/intltest/hxuntrts.h | 5 +- icu4c/source/test/intltest/jamotest.cpp | 8 +- icu4c/source/test/intltest/restest.cpp | 35 ---- icu4c/source/test/intltest/restsnew.cpp | 36 +--- icu4c/source/test/intltest/tchcfmt.cpp | 208 ------------------- icu4c/source/test/intltest/tchcfmt.h | 17 -- icu4c/source/test/intltest/transapi.cpp | 10 +- icu4c/source/test/intltest/transrt.cpp | 2 +- icu4c/source/test/intltest/transtst.cpp | 17 +- icu4c/source/test/intltest/trnserr.cpp | 15 +- icu4c/source/test/intltest/unhxtrts.cpp | 2 +- icu4c/source/test/intltest/unhxtrts.h | 5 +- icu4c/source/test/intltest/uobjtest.cpp | 24 +-- 46 files changed, 65 insertions(+), 1042 deletions(-) rename icu4c/source/i18n/{unicode => }/cpdtrans.h (78%) rename icu4c/source/i18n/{unicode => }/hextouni.h (98%) rename icu4c/source/i18n/{unicode => }/nultrans.h (97%) rename icu4c/source/i18n/{unicode => }/rbt.h (99%) rename icu4c/source/i18n/{unicode => }/unitohex.h (98%) diff --git a/icu4c/source/i18n/anytrans.cpp b/icu4c/source/i18n/anytrans.cpp index 58a989071f6..ee5ee68f13f 100644 --- a/icu4c/source/i18n/anytrans.cpp +++ b/icu4c/source/i18n/anytrans.cpp @@ -13,8 +13,8 @@ #if !UCONFIG_NO_TRANSLITERATION #include "unicode/uobject.h" -#include "unicode/nultrans.h" #include "unicode/uscript.h" +#include "nultrans.h" #include "anytrans.h" #include "uvector.h" #include "tridpars.h" diff --git a/icu4c/source/i18n/choicfmt.cpp b/icu4c/source/i18n/choicfmt.cpp index 7c9cc08da1b..12dad1fa81e 100644 --- a/icu4c/source/i18n/choicfmt.cpp +++ b/icu4c/source/i18n/choicfmt.cpp @@ -697,16 +697,6 @@ ChoiceFormat::clone() const return aCopy; } -// ------------------------------------- - -#ifdef ICU_NEXTDOUBLE_USE_DEPRECATES -double -ChoiceFormat::nextDouble( double d, UBool positive ) -{ - return uprv_nextDouble( d, positive ); -} -#endif /* ICU_NEXTDOUBLE_USE_DEPRECATES */ - U_NAMESPACE_END #endif /* #if !UCONFIG_NO_FORMATTING */ diff --git a/icu4c/source/i18n/cpdtrans.cpp b/icu4c/source/i18n/cpdtrans.cpp index 7d30430b728..caf17d8b019 100644 --- a/icu4c/source/i18n/cpdtrans.cpp +++ b/icu4c/source/i18n/cpdtrans.cpp @@ -12,13 +12,10 @@ #if !UCONFIG_NO_TRANSLITERATION -/* These APIs are becoming private */ -#define ICU_COMPOUNDTRANSLITERATOR_USE_DEPRECATES 1 - -#include "unicode/cpdtrans.h" #include "unicode/unifilt.h" #include "unicode/unifltlg.h" #include "unicode/uniset.h" +#include "cpdtrans.h" #include "uvector.h" #include "tridpars.h" #include "cmemory.h" diff --git a/icu4c/source/i18n/unicode/cpdtrans.h b/icu4c/source/i18n/cpdtrans.h similarity index 78% rename from icu4c/source/i18n/unicode/cpdtrans.h rename to icu4c/source/i18n/cpdtrans.h index 2dcb2f49e3a..4d4d855215f 100644 --- a/icu4c/source/i18n/unicode/cpdtrans.h +++ b/icu4c/source/i18n/cpdtrans.h @@ -16,8 +16,6 @@ #include "unicode/translit.h" -#ifdef ICU_COMPOUNDTRANSLITERATOR_USE_DEPRECATES - U_NAMESPACE_BEGIN class U_I18N_API UVector; @@ -175,12 +173,7 @@ public: */ virtual UnicodeSet& getTargetSet(UnicodeSet& result) const; -// handleTransliterate should be protected, but was declared public before ICU 2.2. -// We do not have a separate deprecation date for this method since the entire class -// will become internal after 2002-sep-30. -#ifndef U_USE_DEPRECATED_TRANSLITERATOR_API - protected: -#endif +protected: /** * Implements {@link Transliterator#handleTransliterate}. * @obsolete ICU 2.4. Use transliterator factory methods instead since this class will be removed in that release. @@ -188,9 +181,7 @@ public: virtual void handleTransliterate(Replaceable& text, UTransPosition& index, UBool incremental) const; -#ifndef U_USE_DEPRECATED_TRANSLITERATOR_API - public: -#endif +public: /** * ICU "poor man's RTTI", returns a UClassID for the actual class. @@ -258,35 +249,6 @@ private: * for ICU "poor man's RTTI". */ static const char fgClassID; - -#ifdef U_USE_DEPRECATED_TRANSLITERATOR_API - -public: - - /** - * Constructs a new compound transliterator. - * Use Transliterator::createInstance factory method. - * @param filter the filter. Any character for which - * filter.isIn() returns false will not be - * altered by this transliterator. If filter is - * null then no filtering is applied. - * @obsolete ICU 2.4. Use transliterator factory methods instead since this class will be removed in that release. - */ - CompoundTransliterator(const UnicodeString& id, - UTransDirection dir, - UnicodeFilter* adoptedFilter, - UErrorCode& status); - - /** - * Constructs a new compound transliterator in the FORWARD - * direction with a NULL filter. - * Use Transliterator::createInstance factory method. - * @obsolete ICU 2.4. Use transliterator factory methods instead since this class will be removed in that release. - */ - CompoundTransliterator(const UnicodeString& id, - UErrorCode& status); - -#endif }; inline UClassID @@ -297,35 +259,7 @@ inline UClassID CompoundTransliterator::getDynamicClassID() const { return CompoundTransliterator::getStaticClassID(); } -/** - * Definitions for obsolete API - * TODO: Remove after Aug 2002 - */ - -#ifdef U_USE_DEPRECATED_TRANSLITERATOR_API - -inline CompoundTransliterator::CompoundTransliterator( const UnicodeString& id, - UTransDirection dir, - UnicodeFilter* adoptedFilter, - UErrorCode& status): - Transliterator(id, adoptedFilter), - trans(0), compoundRBTIndex(-1) { - UParseError parseError; - init(id, dir, -1, 0, TRUE,parseError,status); -} - -inline CompoundTransliterator::CompoundTransliterator(const UnicodeString& id, - UErrorCode& status) : - Transliterator(id, 0), // set filter to 0 here! - trans(0), compoundRBTIndex(-1) { - UParseError parseError; - init(id, UTRANS_FORWARD, -1, 0, TRUE,parseError,status); -} - -#endif - U_NAMESPACE_END -#endif /* ICU_COMPOUNDTRANSLITERATOR_USE_DEPRECATES */ #endif /* #if !UCONFIG_NO_TRANSLITERATION */ diff --git a/icu4c/source/i18n/dtfmtsym.cpp b/icu4c/source/i18n/dtfmtsym.cpp index c8881dd4dcb..68829125e5f 100644 --- a/icu4c/source/i18n/dtfmtsym.cpp +++ b/icu4c/source/i18n/dtfmtsym.cpp @@ -108,17 +108,6 @@ static const UChar gLastResortZoneStrings[5][4] = {0x0047, 0x004D, 0x0054, 0x0000} /* "GMT" */ }; -#ifdef ICU_DATEFORMATSYMBOLS_USE_DEPRECATES -static UnicodeString *gPatternCharsStr = NULL; - -U_CFUNC UBool dateFormatSymbols_cleanup() { - if (gPatternCharsStr != NULL) { - delete gPatternCharsStr; - } - return TRUE; -} -#endif - U_NAMESPACE_BEGIN const char DateFormatSymbols::fgClassID=0; @@ -468,21 +457,6 @@ DateFormatSymbols::setZoneStrings(const UnicodeString* const *strings, int32_t r //------------------------------------------------------ -#ifdef ICU_DATEFORMATSYMBOLS_USE_DEPRECATES -const UnicodeString& -DateFormatSymbols::getPatternChars(void) -{ - Mutex lock; // We don't care if this is slow because this is deprecated API. - if (gPatternCharsStr == NULL) { - gPatternCharsStr = new UnicodeString(gPatternChars); - ucln_i18n_registerCleanup(); - } - return *gPatternCharsStr; -} -#endif - -//------------------------------------------------------ - const UChar * DateFormatSymbols::getPatternUChars(void) { diff --git a/icu4c/source/i18n/hextouni.cpp b/icu4c/source/i18n/hextouni.cpp index f8ab6a0893e..3a4520afb88 100644 --- a/icu4c/source/i18n/hextouni.cpp +++ b/icu4c/source/i18n/hextouni.cpp @@ -12,13 +12,10 @@ #if !UCONFIG_NO_TRANSLITERATION -/* These APIs are becoming private */ -#define ICU_HEXTOUNICODETRANSLITERATOR_USE_DEPRECATES 1 - -#include "unicode/hextouni.h" #include "unicode/rep.h" #include "unicode/unifilt.h" #include "unicode/uchar.h" +#include "hextouni.h" U_NAMESPACE_BEGIN diff --git a/icu4c/source/i18n/unicode/hextouni.h b/icu4c/source/i18n/hextouni.h similarity index 98% rename from icu4c/source/i18n/unicode/hextouni.h rename to icu4c/source/i18n/hextouni.h index 96b420f4681..439eb3b491d 100644 --- a/icu4c/source/i18n/unicode/hextouni.h +++ b/icu4c/source/i18n/hextouni.h @@ -16,8 +16,6 @@ #include "unicode/translit.h" -#ifdef ICU_HEXTOUNICODETRANSLITERATOR_USE_DEPRECATES - U_NAMESPACE_BEGIN /** @@ -194,7 +192,6 @@ HexToUnicodeTransliterator::getDynamicClassID() const { return HexToUnicodeTransliterator::getStaticClassID(); } U_NAMESPACE_END -#endif /* ICU_HEXTOUNICODETRANSLITERATOR_USE_DEPRECATES */ #endif /* #if !UCONFIG_NO_TRANSLITERATION */ diff --git a/icu4c/source/i18n/i18n.dsp b/icu4c/source/i18n/i18n.dsp index 1b1ff9021de..37cd68a3b31 100644 --- a/icu4c/source/i18n/i18n.dsp +++ b/icu4c/source/i18n/i18n.dsp @@ -1886,50 +1886,7 @@ SOURCE=.\cpdtrans.cpp # End Source File # Begin Source File -SOURCE=.\unicode\cpdtrans.h - -!IF "$(CFG)" == "i18n - Win32 Release" - -# Begin Custom Build -InputPath=.\unicode\cpdtrans.h - -"..\..\include\unicode\cpdtrans.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy $(InputPath) ..\..\include\unicode - -# End Custom Build - -!ELSEIF "$(CFG)" == "i18n - Win32 Debug" - -# Begin Custom Build -InputPath=.\unicode\cpdtrans.h - -"..\..\include\unicode\cpdtrans.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy $(InputPath) ..\..\include\unicode - -# End Custom Build - -!ELSEIF "$(CFG)" == "i18n - Win64 Release" - -# Begin Custom Build -InputPath=.\unicode\cpdtrans.h - -"..\..\include\unicode\cpdtrans.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy $(InputPath) ..\..\include\unicode - -# End Custom Build - -!ELSEIF "$(CFG)" == "i18n - Win64 Debug" - -# Begin Custom Build -InputPath=.\unicode\cpdtrans.h - -"..\..\include\unicode\cpdtrans.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy $(InputPath) ..\..\include\unicode - -# End Custom Build - -!ENDIF - +SOURCE=.\cpdtrans.h # End Source File # Begin Source File @@ -1953,50 +1910,7 @@ SOURCE=.\hextouni.cpp # End Source File # Begin Source File -SOURCE=.\unicode\hextouni.h - -!IF "$(CFG)" == "i18n - Win32 Release" - -# Begin Custom Build -InputPath=.\unicode\hextouni.h - -"..\..\include\unicode\hextouni.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy $(InputPath) ..\..\include\unicode - -# End Custom Build - -!ELSEIF "$(CFG)" == "i18n - Win32 Debug" - -# Begin Custom Build -InputPath=.\unicode\hextouni.h - -"..\..\include\unicode\hextouni.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy $(InputPath) ..\..\include\unicode - -# End Custom Build - -!ELSEIF "$(CFG)" == "i18n - Win64 Release" - -# Begin Custom Build -InputPath=.\unicode\hextouni.h - -"..\..\include\unicode\hextouni.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy $(InputPath) ..\..\include\unicode - -# End Custom Build - -!ELSEIF "$(CFG)" == "i18n - Win64 Debug" - -# Begin Custom Build -InputPath=.\unicode\hextouni.h - -"..\..\include\unicode\hextouni.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy $(InputPath) ..\..\include\unicode - -# End Custom Build - -!ENDIF - +SOURCE=.\hextouni.h # End Source File # Begin Source File @@ -2020,50 +1934,7 @@ SOURCE=.\nultrans.cpp # End Source File # Begin Source File -SOURCE=.\unicode\nultrans.h - -!IF "$(CFG)" == "i18n - Win32 Release" - -# Begin Custom Build -InputPath=.\unicode\nultrans.h - -"..\..\include\unicode\nultrans.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy $(InputPath) ..\..\include\unicode - -# End Custom Build - -!ELSEIF "$(CFG)" == "i18n - Win32 Debug" - -# Begin Custom Build -InputPath=.\unicode\nultrans.h - -"..\..\include\unicode\nultrans.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy $(InputPath) ..\..\include\unicode - -# End Custom Build - -!ELSEIF "$(CFG)" == "i18n - Win64 Release" - -# Begin Custom Build -InputPath=.\unicode\nultrans.h - -"..\..\include\unicode\nultrans.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy $(InputPath) ..\..\include\unicode - -# End Custom Build - -!ELSEIF "$(CFG)" == "i18n - Win64 Debug" - -# Begin Custom Build -InputPath=.\unicode\nultrans.h - -"..\..\include\unicode\nultrans.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy $(InputPath) ..\..\include\unicode - -# End Custom Build - -!ENDIF - +SOURCE=.\nultrans.h # End Source File # Begin Source File @@ -2079,50 +1950,7 @@ SOURCE=.\rbt.cpp # End Source File # Begin Source File -SOURCE=.\unicode\rbt.h - -!IF "$(CFG)" == "i18n - Win32 Release" - -# Begin Custom Build -InputPath=.\unicode\rbt.h - -"..\..\include\unicode\rbt.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy $(InputPath) ..\..\include\unicode - -# End Custom Build - -!ELSEIF "$(CFG)" == "i18n - Win32 Debug" - -# Begin Custom Build -InputPath=.\unicode\rbt.h - -"..\..\include\unicode\rbt.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy $(InputPath) ..\..\include\unicode - -# End Custom Build - -!ELSEIF "$(CFG)" == "i18n - Win64 Release" - -# Begin Custom Build -InputPath=.\unicode\rbt.h - -"..\..\include\unicode\rbt.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy $(InputPath) ..\..\include\unicode - -# End Custom Build - -!ELSEIF "$(CFG)" == "i18n - Win64 Debug" - -# Begin Custom Build -InputPath=.\unicode\rbt.h - -"..\..\include\unicode\rbt.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy $(InputPath) ..\..\include\unicode - -# End Custom Build - -!ENDIF - +SOURCE=.\rbt.h # End Source File # Begin Source File @@ -2383,50 +2211,7 @@ SOURCE=.\unitohex.cpp # End Source File # Begin Source File -SOURCE=.\unicode\unitohex.h - -!IF "$(CFG)" == "i18n - Win32 Release" - -# Begin Custom Build -InputPath=.\unicode\unitohex.h - -"..\..\include\unicode\unitohex.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy $(InputPath) ..\..\include\unicode - -# End Custom Build - -!ELSEIF "$(CFG)" == "i18n - Win32 Debug" - -# Begin Custom Build -InputPath=.\unicode\unitohex.h - -"..\..\include\unicode\unitohex.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy $(InputPath) ..\..\include\unicode - -# End Custom Build - -!ELSEIF "$(CFG)" == "i18n - Win64 Release" - -# Begin Custom Build -InputPath=.\unicode\unitohex.h - -"..\..\include\unicode\unitohex.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy $(InputPath) ..\..\include\unicode - -# End Custom Build - -!ELSEIF "$(CFG)" == "i18n - Win64 Debug" - -# Begin Custom Build -InputPath=.\unicode\unitohex.h - -"..\..\include\unicode\unitohex.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy $(InputPath) ..\..\include\unicode - -# End Custom Build - -!ENDIF - +SOURCE=.\unitohex.h # End Source File # Begin Source File diff --git a/icu4c/source/i18n/nultrans.cpp b/icu4c/source/i18n/nultrans.cpp index 05938a8f57e..a614f5658de 100644 --- a/icu4c/source/i18n/nultrans.cpp +++ b/icu4c/source/i18n/nultrans.cpp @@ -12,10 +12,7 @@ #if !UCONFIG_NO_TRANSLITERATION -/* These APIs are becoming private */ -#define ICU_NULLTRANSLITERATOR_USE_DEPRECATES 1 - -#include "unicode/nultrans.h" +#include "nultrans.h" U_NAMESPACE_BEGIN diff --git a/icu4c/source/i18n/unicode/nultrans.h b/icu4c/source/i18n/nultrans.h similarity index 97% rename from icu4c/source/i18n/unicode/nultrans.h rename to icu4c/source/i18n/nultrans.h index 3e25569520c..383a1277bd3 100644 --- a/icu4c/source/i18n/unicode/nultrans.h +++ b/icu4c/source/i18n/nultrans.h @@ -16,7 +16,6 @@ #include "unicode/translit.h" -#ifdef ICU_NULLTRANSLITERATOR_USE_DEPRECATES U_NAMESPACE_BEGIN /** @@ -101,7 +100,6 @@ NullTransliterator::getDynamicClassID() const { return NullTransliterator::getStaticClassID(); } U_NAMESPACE_END -#endif /* ICU_NULLTRANSLITERATOR_USE_DEPRECATES */ #endif /* #if !UCONFIG_NO_TRANSLITERATION */ diff --git a/icu4c/source/i18n/rbt.cpp b/icu4c/source/i18n/rbt.cpp index 1f0e5a2b1be..3ebf55b722a 100644 --- a/icu4c/source/i18n/rbt.cpp +++ b/icu4c/source/i18n/rbt.cpp @@ -12,15 +12,12 @@ #if !UCONFIG_NO_TRANSLITERATION -/* These APIs are becoming private */ -#define ICU_RULEBASEDTRANSLITERATOR_USE_DEPRECATES 1 - -#include "unicode/rbt.h" #include "unicode/rep.h" #include "unicode/uniset.h" #include "rbt_pars.h" #include "rbt_data.h" #include "rbt_rule.h" +#include "rbt.h" U_NAMESPACE_BEGIN diff --git a/icu4c/source/i18n/unicode/rbt.h b/icu4c/source/i18n/rbt.h similarity index 99% rename from icu4c/source/i18n/unicode/rbt.h rename to icu4c/source/i18n/rbt.h index c1a27ab4bb8..89983e3d9f5 100644 --- a/icu4c/source/i18n/unicode/rbt.h +++ b/icu4c/source/i18n/rbt.h @@ -15,8 +15,6 @@ #if !UCONFIG_NO_TRANSLITERATION #include "unicode/translit.h" - -#ifdef ICU_RULEBASEDTRANSLITERATOR_USE_DEPRECATES #include "unicode/utypes.h" #include "unicode/parseerr.h" @@ -563,7 +561,6 @@ inline RuleBasedTransliterator::RuleBasedTransliterator( } U_NAMESPACE_END -#endif /* ICU_RULEBASEDTRANSLITERATOR_USE_DEPRECATES */ #endif /* #if !UCONFIG_NO_TRANSLITERATION */ diff --git a/icu4c/source/i18n/rbt_pars.cpp b/icu4c/source/i18n/rbt_pars.cpp index 20b33db127e..632ca4b0e9f 100644 --- a/icu4c/source/i18n/rbt_pars.cpp +++ b/icu4c/source/i18n/rbt_pars.cpp @@ -16,7 +16,6 @@ #include "unicode/parseerr.h" #include "unicode/parsepos.h" #include "unicode/putil.h" -#include "unicode/rbt.h" #include "unicode/uchar.h" #include "unicode/ustring.h" #include "unicode/uniset.h" @@ -24,6 +23,7 @@ #include "funcrepl.h" #include "hash.h" #include "quant.h" +#include "rbt.h" #include "rbt_data.h" #include "rbt_pars.h" #include "rbt_rule.h" diff --git a/icu4c/source/i18n/rbt_pars.h b/icu4c/source/i18n/rbt_pars.h index 053d7fff0ff..33590f6c642 100644 --- a/icu4c/source/i18n/rbt_pars.h +++ b/icu4c/source/i18n/rbt_pars.h @@ -13,9 +13,9 @@ #if !UCONFIG_NO_TRANSLITERATION #include "unicode/uobject.h" -#include "unicode/rbt.h" #include "unicode/parseerr.h" #include "unicode/unorm.h" +#include "rbt.h" U_NAMESPACE_BEGIN diff --git a/icu4c/source/i18n/simpletz.cpp b/icu4c/source/i18n/simpletz.cpp index 22c4bea2f1d..32e691a084f 100644 --- a/icu4c/source/i18n/simpletz.cpp +++ b/icu4c/source/i18n/simpletz.cpp @@ -398,16 +398,6 @@ SimpleTimeZone::setEndRule(int32_t month, int32_t dayOfMonth, int32_t dayOfWeek, } // ------------------------------------- -#ifdef ICU_TIMEZONE_USE_DEPRECATES -// deprecated version -int32_t -SimpleTimeZone::getOffset(uint8_t era, int32_t year, int32_t month, int32_t day, - uint8_t dayOfWeek, int32_t millis) const -{ - UErrorCode status = U_ZERO_ERROR; - return getOffset(era, year, month, day, dayOfWeek, millis, status); -} -#endif int32_t SimpleTimeZone::getOffset(uint8_t era, int32_t year, int32_t month, int32_t day, diff --git a/icu4c/source/i18n/timezone.cpp b/icu4c/source/i18n/timezone.cpp index 9b81da0bf5a..75c5ba88519 100644 --- a/icu4c/source/i18n/timezone.cpp +++ b/icu4c/source/i18n/timezone.cpp @@ -60,10 +60,6 @@ static const UChar CUSTOM_ID[] = 0x43, 0x75, 0x73, 0x74, 0x6F, 0x6D, 0x00 /* "Custom" */ }; -#ifdef ICU_TIMEZONE_USE_DEPRECATES -const TimeZone* TimeZone::GMT = getGMT(); -#endif - // See header file for documentation of the following static const TZHeader * DATA = NULL; static const uint32_t* INDEX_BY_ID = 0; diff --git a/icu4c/source/i18n/translit.cpp b/icu4c/source/i18n/translit.cpp index 6e5697e7bc5..459d11c146a 100644 --- a/icu4c/source/i18n/translit.cpp +++ b/icu4c/source/i18n/translit.cpp @@ -12,15 +12,8 @@ #if !UCONFIG_NO_TRANSLITERATION -/* These APIs are becoming private */ -#define ICU_COMPOUNDTRANSLITERATOR_USE_DEPRECATES 1 -#define ICU_NULLTRANSLITERATOR_USE_DEPRECATES 1 -#define ICU_RULEBASEDTRANSLITERATOR_USE_DEPRECATES 1 - #include "unicode/putil.h" #include "unicode/translit.h" -#include "unicode/cpdtrans.h" -#include "unicode/nultrans.h" #include "unicode/locid.h" #include "unicode/msgfmt.h" #include "unicode/rep.h" @@ -29,8 +22,11 @@ #include "unicode/unifltlg.h" #include "unicode/uniset.h" #include "unicode/uscript.h" +#include "cpdtrans.h" +#include "nultrans.h" #include "rbt_data.h" #include "rbt_pars.h" +#include "rbt.h" #include "transreg.h" #include "name2uni.h" #include "nortrans.h" diff --git a/icu4c/source/i18n/transreg.cpp b/icu4c/source/i18n/transreg.cpp index 5f8c92924c4..b91a9b5c6ae 100644 --- a/icu4c/source/i18n/transreg.cpp +++ b/icu4c/source/i18n/transreg.cpp @@ -12,21 +12,16 @@ #if !UCONFIG_NO_TRANSLITERATION -/* These APIs are becoming private */ -#define ICU_RULEBASEDTRANSLITERATOR_USE_DEPRECATES 1 -#define ICU_COMPOUNDTRANSLITERATOR_USE_DEPRECATES 1 -#define ICU_NULLTRANSLITERATOR_USE_DEPRECATES 1 - #include "unicode/utypes.h" #include "unicode/uobject.h" -#include "unicode/cpdtrans.h" -#include "unicode/nultrans.h" #include "unicode/parseerr.h" -#include "unicode/rbt.h" #include "unicode/resbund.h" #include "unicode/translit.h" #include "unicode/uniset.h" #include "unicode/uscript.h" +#include "rbt.h" +#include "cpdtrans.h" +#include "nultrans.h" #include "transreg.h" #include "rbt_data.h" #include "rbt_pars.h" diff --git a/icu4c/source/i18n/ucln_in.c b/icu4c/source/i18n/ucln_in.c index c90b0422acc..4be59926595 100644 --- a/icu4c/source/i18n/ucln_in.c +++ b/icu4c/source/i18n/ucln_in.c @@ -19,10 +19,6 @@ static UBool i18n_cleanup(void) { -#if defined(ICU_DATEFORMATSYMBOLS_USE_DEPRECATES) && !UCONFIG_NO_FORMATTING - dateFormatSymbols_cleanup(); -#endif - #if !UCONFIG_NO_TRANSLITERATION transliterator_cleanup(); #endif diff --git a/icu4c/source/i18n/ucln_in.h b/icu4c/source/i18n/ucln_in.h index ec31b303311..83e849590a5 100644 --- a/icu4c/source/i18n/ucln_in.h +++ b/icu4c/source/i18n/ucln_in.h @@ -34,8 +34,4 @@ U_CFUNC UBool ucol_bld_cleanup(void); U_CFUNC UBool regex_cleanup(void); -#ifdef ICU_DATEFORMATSYMBOLS_USE_DEPRECATES -U_CFUNC UBool dateFormatSymbols_cleanup(void); -#endif - #endif diff --git a/icu4c/source/i18n/unicode/choicfmt.h b/icu4c/source/i18n/unicode/choicfmt.h index de34685ee52..2094c9f6196 100644 --- a/icu4c/source/i18n/unicode/choicfmt.h +++ b/icu4c/source/i18n/unicode/choicfmt.h @@ -637,35 +637,6 @@ public: */ static inline UClassID getStaticClassID(void); -#ifdef ICU_NEXTDOUBLE_USE_DEPRECATES - /** - * Finds the least double greater than d (if positive == true), - * or the greatest double less than d (if positive == false). - * If NaN, returns same value. - *

- * Does not affect floating-point flags, - * @obsolete ICU 2.4. Use closures instead since this API will be removed in that release. - */ - static double nextDouble(double d, UBool positive); - - /** - * Finds the least double greater than d. - * If NaN, returns same value. - * Used to make half-open intervals. - * @see ChoiceFormat::previousDouble - * @obsolete ICU 2.4. Use closures instead since this API will be removed in that release. - */ - static double nextDouble(double d ); - - /** - * Finds the greatest double less than d. - * If NaN, returns same value. - * @see ChoiceFormat::nextDouble - * @obsolete ICU 2.4. Use closures instead since this API will be removed in that release. - */ - static double previousDouble(double d ); -#endif /* ICU_NEXTDOUBLE_USE_DEPRECATES */ - private: // static cache management (thread-safe) // static NumberFormat* getNumberFormat(UErrorCode &status); // call this function to 'check out' a numberformat from the cache. @@ -765,18 +736,6 @@ ChoiceFormat::getDynamicClassID() const return ChoiceFormat::getStaticClassID(); } -#ifdef ICU_NEXTDOUBLE_USE_DEPRECATES -inline double ChoiceFormat::nextDouble( double d ) -{ - return ChoiceFormat::nextDouble( d, TRUE ); -} - -inline double ChoiceFormat::previousDouble( double d ) -{ - return ChoiceFormat::nextDouble( d, FALSE ); -} -#endif /* ICU_NEXTDOUBLE_USE_DEPRECATES */ - inline UnicodeString& ChoiceFormat::format(const Formattable& obj, UnicodeString& appendTo, diff --git a/icu4c/source/i18n/unicode/dtfmtsym.h b/icu4c/source/i18n/unicode/dtfmtsym.h index 1a906371556..69d0b11f7f6 100644 --- a/icu4c/source/i18n/unicode/dtfmtsym.h +++ b/icu4c/source/i18n/unicode/dtfmtsym.h @@ -245,14 +245,6 @@ public: */ void setZoneStrings(const UnicodeString* const* strings, int32_t rowCount, int32_t columnCount); -#ifdef ICU_DATEFORMATSYMBOLS_USE_DEPRECATES - /** - * Get the non-localized date-time pattern characters. - * @obsolete ICU 2.4. Use getPatternUChars instead since this API will be removed in that release. - */ - static const UnicodeString& getPatternChars(void); -#endif /* ICU_DATEFORMATSYMBOLS_USE_DEPRECATES */ - /** * Get the non-localized date-time pattern characters. * @return the non-localized date-time pattern characters diff --git a/icu4c/source/i18n/unicode/simpletz.h b/icu4c/source/i18n/unicode/simpletz.h index dc2ada56fa5..94e5e3d4950 100644 --- a/icu4c/source/i18n/unicode/simpletz.h +++ b/icu4c/source/i18n/unicode/simpletz.h @@ -563,13 +563,6 @@ public: */ virtual int32_t getOffset(uint8_t era, int32_t year, int32_t month, int32_t day, uint8_t dayOfWeek, int32_t millis, UErrorCode& status) const; -#ifdef ICU_TIMEZONE_USE_DEPRECATES - /** - * @obsolete ICU 1.8. Use the other getOffset() since this API will be removed in that release. - */ - virtual int32_t getOffset(uint8_t era, int32_t year, int32_t month, int32_t day, - uint8_t dayOfWeek, int32_t millis) const; -#endif /** * Gets the time zone offset, for current date, modified in case of diff --git a/icu4c/source/i18n/unicode/timezone.h b/icu4c/source/i18n/unicode/timezone.h index 1d5031d67bb..411fc261655 100644 --- a/icu4c/source/i18n/unicode/timezone.h +++ b/icu4c/source/i18n/unicode/timezone.h @@ -116,15 +116,6 @@ public: */ virtual ~TimeZone(); -#ifdef ICU_TIMEZONE_USE_DEPRECATES - /** - * The GMT zone has a raw offset of zero and does not use daylight - * savings time. - * @obsolete ICU 2.6. Use getGMT() instead since this variable will be removed in that release. - */ - static const TimeZone* GMT; -#endif - /** * The GMT time zone has a raw offset of zero and does not use daylight * savings time. This is a commonly used time zone. @@ -367,14 +358,6 @@ public: virtual int32_t getOffset(uint8_t era, int32_t year, int32_t month, int32_t day, uint8_t dayOfWeek, int32_t millis, UErrorCode& status) const = 0; -#ifdef ICU_TIMEZONE_USE_DEPRECATES - /** - * @obsolete ICU 1.8. Use the other getOffset() since this API will be removed in that release. - */ - virtual int32_t getOffset(uint8_t era, int32_t year, int32_t month, int32_t day, - uint8_t dayOfWeek, int32_t millis) const = 0; -#endif /* ICU_TIMEZONE_USE_DEPRECATES */ - /** * Gets the time zone offset, for current date, modified in case of * daylight savings. This is the offset to add *to* UTC to get local time. diff --git a/icu4c/source/i18n/unicode/translit.h b/icu4c/source/i18n/unicode/translit.h index b8fdeeaa375..7b840e0acb7 100644 --- a/icu4c/source/i18n/unicode/translit.h +++ b/icu4c/source/i18n/unicode/translit.h @@ -769,19 +769,6 @@ public: */ UnicodeFilter* orphanFilter(void); -#ifdef U_USE_DEPRECATED_TRANSLITERATOR_API - /** - * Changes the filter used by this transliterator. If the filter - * is set to null then no filtering will occur. - * - *

Callers must take care if a transliterator is in use by - * multiple threads. The filter should not be changed by one - * thread while another thread may be transliterating. - * - * @obsolete ICU 2.4. This method will be made non-virtual in that release. - */ - virtual void adoptFilter(UnicodeFilter* adoptedFilter); -#else /** * Changes the filter used by this transliterator. If the filter * is set to null then no filtering will occur. @@ -793,7 +780,6 @@ public: * @stable ICU 2.0 */ void adoptFilter(UnicodeFilter* adoptedFilter); -#endif /** * Returns this transliterator's inverse. See the class @@ -1138,7 +1124,7 @@ public: const UnicodeString& target, UnicodeString& result); - protected: +protected: /** * Non-mutexed internal method @@ -1182,7 +1168,18 @@ public: const UnicodeString& source, const UnicodeString& target, UnicodeString& result); - public: + +protected: + + /** + * Set the ID of this transliterators. Subclasses shouldn't do + * this, unless the underlying script behavior has changed. + * @param id the new id t to be set. + * @draft ICU 2.4 + */ + void setID(const UnicodeString& id); + +public: /** * Return the class ID for this class. This is useful only for @@ -1230,79 +1227,9 @@ private: */ static const char fgClassID; -protected: - - /** - * Set the ID of this transliterators. Subclasses shouldn't do - * this, unless the underlying script behavior has changed. - * @param id the new id t to be set. - * @draft ICU 2.4 - */ - void setID(const UnicodeString& id); - private: static void initializeRegistry(void); -#ifdef U_USE_DEPRECATED_TRANSLITERATOR_API - -public: - /** - * Returns a Transliterator object given its ID. - * The ID must be either a system transliterator ID or a ID registered - * using registerInstance(). - * - * @param ID a valid ID, as enumerated by getAvailableIDs() - * @param dir either FORWARD or REVERSE. - * @param parseError Struct to recieve information on position - * @return A Transliterator object with the given ID - * @exception IllegalArgumentException if the given ID is invalid. - * @see #registerInstance - * @see #getAvailableIDs - * @see #getID - * @obsolete ICU 2.4. Use the factory method that takes UParseError and UErrorCode instead since this API will be removed in that release. - */ - inline Transliterator* createInstance(const UnicodeString& ID, - UTransDirection dir=UTRANS_FORWARD, - UParseError* parseError=0); - /** - * Returns this transliterator's inverse. See the class - * documentation for details. This implementation simply inverts - * the two entities in the ID and attempts to retrieve the - * resulting transliterator. That is, if getID() - * returns "A-B", then this method will return the result of - * createInstance("B-A"), or null if that - * call fails. - * - *

This method does not take filtering into account. The - * returned transliterator will have no filter. - * - *

Subclasses with knowledge of their inverse may wish to - * override this method. - * - * @return a transliterator that is an inverse, not necessarily - * exact, of this transliterator, or null if no such - * transliterator is registered. - * @obsolete ICU 2.4. Use the factory method that takes UErrorCode instead since this API will be removed in that release. - */ - inline Transliterator* createInverse() const; - -protected: - /** - * Method for subclasses to use to obtain a character in the given - * string, with filtering. If the character at the given offset - * is excluded by this transliterator's filter, then U+FFFE is returned. - * - *

Note: Most subclasses that implement - * handleTransliterator() will not want to use this - * method, since characters they see are already filtered. Only - * subclasses with special requirements, such as those overriding - * filteredTransliterate(), should need this method. - * - * @obsolete ICU 2.4. No need to call this since the new architecture provides filtering at the top level. - */ - UChar filteredCharAt(const Replaceable& text, int32_t i) const; - -#endif }; inline UClassID @@ -1329,31 +1256,6 @@ inline Transliterator::Token Transliterator::pointerToken(void* p) { return t; } -/** - * Definitions for obsolete API - * TODO: Remove after Aug 2002 - */ -#ifdef U_USE_DEPRECATED_TRANSLITERATOR_API - -inline Transliterator* Transliterator::createInstance(const UnicodeString& ID, - UTransDirection dir, - UParseError* parseError){ - UErrorCode status = U_ZERO_ERROR; - UParseError error; - if(parseError == NULL){ - parseError = &error; - } - return Transliterator::createInstance(ID,dir,*parseError,status); - } - -inline Transliterator* Transliterator::createInverse() const{ - - UErrorCode status = U_ZERO_ERROR; - return createInverse(status); -} - -#endif - U_NAMESPACE_END #endif /* #if !UCONFIG_NO_TRANSLITERATION */ diff --git a/icu4c/source/i18n/unicode/utrans.h b/icu4c/source/i18n/unicode/utrans.h index f34a2e3cc29..9095dfc10c7 100644 --- a/icu4c/source/i18n/unicode/utrans.h +++ b/icu4c/source/i18n/unicode/utrans.h @@ -31,7 +31,7 @@ * transliteration services. Transliteration services are implemented * as C++ classes. The comments and documentation in this header * assume the reader is familiar with the C++ headers translit.h and - * rbt.h and associated documentation. + * associated documentation. * * A significant but incomplete subset of the C++ transliteration * services are available to C code through this header. In order to diff --git a/icu4c/source/i18n/unitohex.cpp b/icu4c/source/i18n/unitohex.cpp index 1f393e857b1..f6f369eb610 100644 --- a/icu4c/source/i18n/unitohex.cpp +++ b/icu4c/source/i18n/unitohex.cpp @@ -12,12 +12,9 @@ #if !UCONFIG_NO_TRANSLITERATION -/* These APIs are becoming private */ -#define ICU_UNICODETOHEXTRANSLITERATOR_USE_DEPRECATES 1 - -#include "unicode/unitohex.h" #include "unicode/rep.h" #include "unicode/unifilt.h" +#include "unitohex.h" U_NAMESPACE_BEGIN diff --git a/icu4c/source/i18n/unicode/unitohex.h b/icu4c/source/i18n/unitohex.h similarity index 98% rename from icu4c/source/i18n/unicode/unitohex.h rename to icu4c/source/i18n/unitohex.h index 4112aee7fba..2da285fae31 100644 --- a/icu4c/source/i18n/unicode/unitohex.h +++ b/icu4c/source/i18n/unitohex.h @@ -14,8 +14,6 @@ #if !UCONFIG_NO_TRANSLITERATION #include "unicode/translit.h" - -#ifdef ICU_UNICODETOHEXTRANSLITERATOR_USE_DEPRECATES #include "unicode/unistr.h" U_NAMESPACE_BEGIN @@ -235,8 +233,6 @@ UnicodeToHexTransliterator::getDynamicClassID() const { return UnicodeToHexTransliterator::getStaticClassID(); } U_NAMESPACE_END -#endif /* ICU_COMPOUNDTRANSLITERATOR_USE_DEPRECATES */ - #endif /* #if !UCONFIG_NO_TRANSLITERATION */ #endif diff --git a/icu4c/source/i18n/unum.cpp b/icu4c/source/i18n/unum.cpp index db60c23d28d..3e46b7c853a 100644 --- a/icu4c/source/i18n/unum.cpp +++ b/icu4c/source/i18n/unum.cpp @@ -642,96 +642,6 @@ unum_toPattern( const UNumberFormat* fmt, return pat.extract(result, resultLength, *status); } -#ifdef ICU_DECIMALFORMATSYMBOLS_USE_DEPRECATES -U_CAPI void -unum_getSymbols(const UNumberFormat* fmt, - UNumberFormatSymbols *syms) -{ - - UnicodeString temp; - int32_t len; - const DecimalFormatSymbols *dfs = - ((DecimalFormat*)fmt)->getDecimalFormatSymbols(); - - syms->decimalSeparator = dfs->getDecimalSeparator(); - syms->groupingSeparator = dfs->getGroupingSeparator(); - syms->patternSeparator = dfs->getPatternSeparator(); - syms->percent = dfs->getPercent(); - syms->zeroDigit = dfs->getZeroDigit(); - syms->digit = dfs->getDigit(); - syms->plusSign = dfs->getPlusSign(); - syms->minusSign = dfs->getMinusSign(); - - dfs->getCurrencySymbol(temp); - len = uprv_min(temp.length(), UNFSYMBOLSMAXSIZE); - //u_strncpy(syms->currency, temp.getUChars(), len); - temp.extract(0,len,syms->currency); - syms->currency[len > 0 ? len : 0] = 0x0000; - - dfs->getInternationalCurrencySymbol(temp); - len = uprv_min(temp.length(), UNFSYMBOLSMAXSIZE); - //u_strncpy(syms->intlCurrency, temp.getUChars(), len); - temp.extract(0,len,syms->intlCurrency); - syms->intlCurrency[len > 0 ? len : 0] = 0x0000; - - syms->monetarySeparator = dfs->getMonetaryDecimalSeparator(); - syms->exponential = dfs->getExponentialSymbol(); - syms->perMill = dfs->getPerMill(); - syms->padEscape = dfs->getPadEscape(); - - dfs->getInfinity(temp); - len = uprv_min(temp.length(), UNFSYMBOLSMAXSIZE); - //u_strncpy(syms->infinity, temp.getUChars(), len); - temp.extract(0,len,syms->infinity); - syms->infinity[len > 0 ? len : 0] = 0x0000; - - dfs->getNaN(temp); - len = uprv_min(temp.length(), UNFSYMBOLSMAXSIZE); - //u_strncpy(syms->naN, temp.getUChars(), len); - temp.extract(0,len,syms->naN); - syms->naN[len > 0 ? len : 0] = 0x0000; -} - -U_CAPI void -unum_setSymbols( UNumberFormat* fmt, - const UNumberFormatSymbols* symbolsToSet, - UErrorCode *status) -{ - - if(U_FAILURE(*status)) return; - - DecimalFormatSymbols *syms = new DecimalFormatSymbols(*status); - if(syms == 0) { - *status = U_MEMORY_ALLOCATION_ERROR; - return; - } - - syms->setDecimalSeparator(symbolsToSet->decimalSeparator); - syms->setGroupingSeparator(symbolsToSet->groupingSeparator); - syms->setPatternSeparator(symbolsToSet->patternSeparator); - syms->setPercent(symbolsToSet->percent); - syms->setZeroDigit(symbolsToSet->zeroDigit); - syms->setDigit(symbolsToSet->digit); - syms->setPlusSign(symbolsToSet->plusSign); - syms->setMinusSign(symbolsToSet->minusSign); - - syms->setCurrencySymbol(symbolsToSet->currency); - syms->setInternationalCurrencySymbol(symbolsToSet->intlCurrency); - - syms->setMonetaryDecimalSeparator(symbolsToSet->monetarySeparator); - syms->setExponentialSymbol(symbolsToSet->exponential); - syms->setPerMill(symbolsToSet->perMill); - syms->setPadEscape(symbolsToSet->padEscape); - - syms->setInfinity(symbolsToSet->infinity); - syms->setNaN(symbolsToSet->naN); - - ((DecimalFormat*)fmt)->adoptDecimalFormatSymbols(syms); -} - -#endif /* ICU_DECIMALFORMATSYMBOLS_USE_DEPRECATES */ - - U_CAPI int32_t U_EXPORT2 unum_getSymbol(UNumberFormat *fmt, UNumberFormatSymbol symbol, diff --git a/icu4c/source/i18n/utrans.cpp b/icu4c/source/i18n/utrans.cpp index 54825aaee9d..3e41abf0d72 100644 --- a/icu4c/source/i18n/utrans.cpp +++ b/icu4c/source/i18n/utrans.cpp @@ -12,18 +12,15 @@ #if !UCONFIG_NO_TRANSLITERATION -/* These APIs are becoming private */ -#define ICU_RULEBASEDTRANSLITERATOR_USE_DEPRECATES 1 - #include "unicode/utrans.h" #include "unicode/putil.h" -#include "unicode/rbt.h" #include "unicode/rep.h" #include "unicode/translit.h" #include "unicode/unifilt.h" #include "unicode/uniset.h" #include "unicode/ustring.h" #include "cpputils.h" +#include "rbt.h" // Following macro is to be followed by ';' or just ';' #define utrans_ENTRY(s) if ((s)==NULL || U_FAILURE(*(s))) return diff --git a/icu4c/source/test/intltest/cpdtrtst.cpp b/icu4c/source/test/intltest/cpdtrtst.cpp index 2b0965b613a..a139a28a491 100644 --- a/icu4c/source/test/intltest/cpdtrtst.cpp +++ b/icu4c/source/test/intltest/cpdtrtst.cpp @@ -12,14 +12,11 @@ #if !UCONFIG_NO_TRANSLITERATION -/* These APIs are becoming private */ -#define ICU_COMPOUNDTRANSLITERATOR_USE_DEPRECATES 1 - #include "ittrans.h" #include "cpdtrtst.h" #include "unicode/utypes.h" #include "unicode/translit.h" -#include "unicode/cpdtrans.h" +#include "cpdtrans.h" #include "intltest.h" #include "cmemory.h" #include diff --git a/icu4c/source/test/intltest/cpdtrtst.h b/icu4c/source/test/intltest/cpdtrtst.h index 51ecfaa8acb..a8a239d3606 100644 --- a/icu4c/source/test/intltest/cpdtrtst.h +++ b/icu4c/source/test/intltest/cpdtrtst.h @@ -18,7 +18,7 @@ #if !UCONFIG_NO_TRANSLITERATION #include "unicode/translit.h" -#include "unicode/cpdtrans.h" +#include "cpdtrans.h" #include "intltest.h" /** diff --git a/icu4c/source/test/intltest/hxuntrts.cpp b/icu4c/source/test/intltest/hxuntrts.cpp index 6695186fd9c..02f9e2db51b 100644 --- a/icu4c/source/test/intltest/hxuntrts.cpp +++ b/icu4c/source/test/intltest/hxuntrts.cpp @@ -12,16 +12,13 @@ #if !UCONFIG_NO_TRANSLITERATION -/* These APIs are becoming private */ -#define ICU_HEXTOUNICODETRANSLITERATOR_USE_DEPRECATES 1 - #include "ittrans.h" #include "hxuntrts.h" #include "unicode/utypes.h" #include "unicode/translit.h" -#include "unicode/hextouni.h" #include "unicode/unifilt.h" #include "unicode/uchar.h" +#include "hextouni.h" #include "intltest.h" #include "cmemory.h" #include diff --git a/icu4c/source/test/intltest/hxuntrts.h b/icu4c/source/test/intltest/hxuntrts.h index 6486b14b8cb..86548e28e8d 100644 --- a/icu4c/source/test/intltest/hxuntrts.h +++ b/icu4c/source/test/intltest/hxuntrts.h @@ -15,11 +15,8 @@ #if !UCONFIG_NO_TRANSLITERATION -/* These APIs are becoming private */ -#define ICU_HEXTOUNICODETRANSLITERATOR_USE_DEPRECATES 1 - #include "unicode/translit.h" -#include "unicode/hextouni.h" +#include "hextouni.h" #include "intltest.h" /** diff --git a/icu4c/source/test/intltest/jamotest.cpp b/icu4c/source/test/intltest/jamotest.cpp index c40d65da168..1eab06d2bc5 100644 --- a/icu4c/source/test/intltest/jamotest.cpp +++ b/icu4c/source/test/intltest/jamotest.cpp @@ -13,15 +13,11 @@ #if !UCONFIG_NO_TRANSLITERATION -/* These APIs are becoming private */ -#define ICU_COMPOUNDTRANSLITERATOR_USE_DEPRECATES 1 -#define ICU_RULEBASEDTRANSLITERATOR_USE_DEPRECATES 1 - #include "jamotest.h" #include "unicode/utypes.h" #include "unicode/translit.h" -#include "unicode/rbt.h" -#include "unicode/cpdtrans.h" +#include "rbt.h" +#include "cpdtrans.h" // SEP is the disambiguation separator used by Latin-Jamo and Jamo-Latin #define SEP "'" diff --git a/icu4c/source/test/intltest/restest.cpp b/icu4c/source/test/intltest/restest.cpp index 7c5147b5df5..fd439ab5b51 100644 --- a/icu4c/source/test/intltest/restest.cpp +++ b/icu4c/source/test/intltest/restest.cpp @@ -262,41 +262,6 @@ ResourceBundleTest::TestConstruction() delete[] versionID1; delete[] versionID2; } -#ifdef ICU_RESOURCEBUNDLE_USE_DEPRECATES - { - UErrorCode err = U_ZERO_ERROR; - const char* testdatapath; - Locale locale("te", "IN"); - - testdatapath=loadTestData(err); - if(U_FAILURE(err)) - { - errln("Could not load testdata.dat %s " + UnicodeString(u_errorName(err))); - return; - } - - - wchar_t* wideDirectory = new wchar_t[256]; - mbstowcs(wideDirectory, testdatapath, 256); - //mbstowcs(wideDirectory, "c:\\icu\\icu\\source\\test\\testdata\\testdata", 256); - - ResourceBundle test2(wideDirectory, locale, err); - - UnicodeString result2(test2.getStringEx("string_in_Root_te_te_IN", err)); - - if (U_FAILURE(err)) { - errln("Something threw an error in TestConstruction()"); - return; - } - - logln("for string_in_Root_te_te_IN, te_IN.txt had " + result2); - - if (result2 != "TE_IN") - errln("Construction test failed; run verbose for more information"); - - delete[] wideDirectory; - } -#endif /* ICU_RESOURCEBUNDLE_USE_DEPRECATES */ } //*************************************************************************************** diff --git a/icu4c/source/test/intltest/restsnew.cpp b/icu4c/source/test/intltest/restsnew.cpp index a6ede2617f2..b11970d22c0 100644 --- a/icu4c/source/test/intltest/restsnew.cpp +++ b/icu4c/source/test/intltest/restsnew.cpp @@ -262,42 +262,8 @@ NewResourceBundleTest::TestConstruction() delete[] versionID1; delete[] versionID2; } -#ifdef ICU_RESOURCEBUNDLE_USE_DEPRECATES - { - UErrorCode err = U_ZERO_ERROR; - const char* testdatapath; - Locale locale("te", "IN"); - - testdatapath=loadTestData(err); - if(U_FAILURE(err)) - { - errln("Could not load testdata.dat %s " + UnicodeString(u_errorName(err))); - return; - } - - - wchar_t* wideDirectory = new wchar_t[256]; - mbstowcs(wideDirectory, testdatapath, 256); - - ResourceBundle test2(wideDirectory, locale, err); - - UnicodeString result2; - - result2 = test2.getStringEx("string_in_Root_te_te_IN", err); - if (U_FAILURE(err)) { - errln("Something threw an error in TestConstruction()"); - return; - } - - logln("for string_in_Root_te_te_IN, te_IN.txt had " + result2); - - if (result2 != "TE_IN") - errln("Construction test failed; run verbose for more information"); - - delete[] wideDirectory; - } -#endif /* ICU_RESOURCEBUNDLE_USE_DEPRECATES */ } + void NewResourceBundleTest::TestIteration() { diff --git a/icu4c/source/test/intltest/tchcfmt.cpp b/icu4c/source/test/intltest/tchcfmt.cpp index 1af0819b78e..a6329a11412 100644 --- a/icu4c/source/test/intltest/tchcfmt.cpp +++ b/icu4c/source/test/intltest/tchcfmt.cpp @@ -26,11 +26,6 @@ void TestChoiceFormat::runIndexedTest(int32_t index, UBool exec, TESTCASE(1,TestComplexExample); TESTCASE(2,TestClosures); TESTCASE(3,TestPatterns); -// We can deprecate the test code right away; the API itself goes 2002-Jun-30 -#ifdef ICU_ENABLE_DEPRECATED_NEXTDOUBLE - TESTCASE(4,TestChoiceNextDouble); - TESTCASE(5,TestGapNextDouble); -#endif default: name = ""; break; } } @@ -291,28 +286,6 @@ TestChoiceFormat::TestComplexExample( void ) } } -// We can deprecate the test code right away; the API itself goes 2002-Jun-30 -#ifdef ICU_ENABLE_DEPRECATED_NEXTDOUBLE - double nd = ChoiceFormat::nextDouble( 1.0 ); - double pd = ChoiceFormat::previousDouble( 1.0 ); - if ((ChoiceFormat::nextDouble( 1.0, TRUE ) == nd) - && (ChoiceFormat::nextDouble( 1.0, FALSE ) == pd)) { - it_out << "nextDouble(x, TRUE) and nextDouble(x, FALSE) tested" << endl; - }else{ - it_errln("*** nextDouble( x, BOOL )"); - } - if ((nd > 1.0) && (nd < 1.0001)) { - it_out << "nextDouble(x) tested" << endl; - }else{ - it_errln("*** nextDouble"); - } - if ((pd < 1.0) && (pd > 0.9999)) { - it_out << "prevDouble(x) tested" << endl; - }else{ - it_errln("*** prevDouble"); - } -#endif - const double limits_A[] = {1,2,3,4,5,6,7}; const UnicodeString monthNames_A[] = {"Sun","Mon","Tue","Wed","Thur","Fri","Sat"}; ChoiceFormat* form_A = new ChoiceFormat(limits_A, monthNames_A, 7); @@ -485,187 +458,6 @@ TestChoiceFormat::TestComplexExample( void ) delete pattform; } -// We can deprecate the test code right away; the API itself goes 2002-Jun-30 -#ifdef ICU_ENABLE_DEPRECATED_NEXTDOUBLE -/** - * test the use of next_Double with ChoiceFormat - **/ -void -TestChoiceFormat::TestChoiceNextDouble() -{ - - double limit[] = {0.0, 1.0, 2.0}; - const UnicodeString formats[] = {"0.0<=Arg<=1.0", - "1.0format((int32_t)1, toAppendTo, status); - if (toAppendTo != "0.0<=Arg<=1.0") { - it_errln("ChoiceFormat cmp in testBug1"); - } - it_out << toAppendTo << endl; - delete cf; -} - - -/* - * Return a random double (---Copied here from tsnmfmt.h---) - **/ -static double randDouble() -{ - // Assume 8-bit (or larger) rand values. Also assume - // that the system rand() function is very poor, which it always is. - double d = 0; - uint32_t i; - char* poke = (char*)&d; - for (i=0; i < sizeof(double); ++i) - { - poke[i] = (char)(rand() & 0xFF); - } - return d; -} - -/** - * test the numerical results of next_Double and previous_Double - **/ -void -TestChoiceFormat::TestGapNextDouble() -{ - - double val; - int32_t i; - - //test area between -15 and 15 - logln("TestChoiceFormat::TestGapNextDouble: ----- testing area between -15 and 15..."); - val = -15.0; - while (val < 15.0) { - testValue( val ); - val += 0.31; - } - - //test closely +/- n values around zero - logln("TestChoiceFormat::TestGapNextDouble: ----- testing closely +/- n values around zero..."); - int32_t test_n; - if (quick) { - test_n = 25; - } else { - test_n = 1000; - } - val = 0.0; - for (i = 0; i < test_n; i++ ) { - testValue( val ); - val = ChoiceFormat::nextDouble( val ); - } - for (i = 0; i < (test_n + test_n); i++ ) { - testValue( val ); - val = ChoiceFormat::previousDouble( val ); - } - for (i = 0; i < test_n; i++ ) { - testValue( val ); - val = ChoiceFormat::nextDouble( val ); - } - if (val != 0.0) { - errln("*** TestMessageFormat::TestGapNextDouble didn't come back to zero!"); - } - - // random numbers - logln("TestChoiceFormat::TestGapNextDouble: ----- testing random numbers..."); - if (quick) { - test_n = 25; - } else { - test_n = 5000; - } - srand(0); // use common starting point to make test reproducable - double negTestLimit = -DBL_MAX / 2.0; // has to be larger than this (not larger or equal) - double posTestLimit = DBL_MAX / 2.0; // has to be smaller than this (not smaller or equal) - for (i = 0; i < test_n; i++) { - val = randDouble(); - if ((val > negTestLimit) && (val < posTestLimit)) { - testValue( val ); - } - } - - // extreme positive values - logln("TestChoiceFormat::TestGapNextDouble: ----- testing extreme positive values..."); - val = ChoiceFormat::previousDouble( posTestLimit ); - testValue( val ); - val = ChoiceFormat::nextDouble( DBL_MIN ); - testValue( val ); - val = ChoiceFormat::previousDouble( DBL_MIN ); - //logln((UnicodeString) "prev MIN: " + val ); - testValue( val ); - val = DBL_MIN; - testValue( val ); - - - // extreme negative values - logln("TestChoiceFormat::TestGapNextDouble: ----- testing extreme negative values..."); - val = ChoiceFormat::nextDouble( negTestLimit ); - testValue( val ); - val = ChoiceFormat::previousDouble( -DBL_MIN ); - testValue( val ); - val = ChoiceFormat::nextDouble( -DBL_MIN ); - //logln((UnicodeString) "next -MIN: " + val ); - testValue( val ); - val = -DBL_MIN; - testValue( val ); - - it_out << "MSG: nextDouble & previousDouble tested." << endl; -} - -/** - * test a value for TestGapNextDouble - **/ -void -TestChoiceFormat::testValue( double val ) -{ - double valnext = ChoiceFormat::nextDouble( val ); - double valprev = ChoiceFormat::previousDouble( val ); - - if (val >= valnext) { - errln( (UnicodeString) - "*** TestChoiceFormat::testValue #1 nextDouble returns same or smaller value for:" + val ); - return; - } - - if (val <= valprev) { - errln( (UnicodeString) - "*** TestChoiceFormat::testValue #2 PreviousDouble returns same or larger value for:" + val ); - return; - } - -#ifdef OS400 - /* The AS/400 will signal an underflow exception when - * attempting the rest of the test. No can do. - * Generating values less that DBL_MIN are not allowed on AS/400 - */ - if (valprev == 0.0 || val == 0.0 || valnext == 0.0 ) { - logln("Skipping the rest of testValue(%lf) valprev=%lf valnext=%lf", val, valprev, valnext); - return; - } -#endif - - /* volatile so the compiler doesn't get confused.. --srl */ - volatile double middle; - middle = (val + valnext) / 2.0; - if ((middle != val) && (middle != valnext)) { - errln( (UnicodeString) - "*** TestChoiceFormat::testValue #3 WARNING: There seems to be a gap for:" + val ); - return; - } - - middle = (val + valprev) / 2.0; - - if ((middle != val) && (middle != valprev)) { - errln( (UnicodeString) - "*** TestChoiceFormat::testValue #4 WARNING: There seems to be a gap for:" + val ); - return; - } -} -#endif /** * Test new closure API diff --git a/icu4c/source/test/intltest/tchcfmt.h b/icu4c/source/test/intltest/tchcfmt.h index ef54fd67eca..96f65d53d8e 100644 --- a/icu4c/source/test/intltest/tchcfmt.h +++ b/icu4c/source/test/intltest/tchcfmt.h @@ -31,23 +31,6 @@ class TestChoiceFormat: public IntlTest { **/ void TestComplexExample(void); -// We can deprecate the test code right away; the API itself goes 2002-Jun-30 -#ifdef ICU_ENABLE_DEPRECATED_NEXTDOUBLE - /** - * test the use of next_Double with ChoiceFormat - **/ - void TestChoiceNextDouble(void); - /** - * test the numerical results of next_Double and previous_Double - **/ - void TestGapNextDouble(void); - - /** - * utiltity function for TestGapNextDouble - **/ - void testValue( double val ); -#endif - /** * Test new closure API */ diff --git a/icu4c/source/test/intltest/transapi.cpp b/icu4c/source/test/intltest/transapi.cpp index e61d0ac0bc7..febc0eef512 100644 --- a/icu4c/source/test/intltest/transapi.cpp +++ b/icu4c/source/test/intltest/transapi.cpp @@ -12,18 +12,14 @@ #if !UCONFIG_NO_TRANSLITERATION -/* These APIs are becoming private */ -#define ICU_NULLTRANSLITERATOR_USE_DEPRECATES 1 -#define ICU_RULEBASEDTRANSLITERATOR_USE_DEPRECATES 1 - #include "ittrans.h" #include "transapi.h" #include "unicode/utypes.h" #include "unicode/translit.h" -#include "unicode/rbt.h" +#include "rbt.h" #include "unicode/unifilt.h" -#include "unicode/cpdtrans.h" -#include "unicode/nultrans.h" +#include "cpdtrans.h" +#include "nultrans.h" #include #include #include diff --git a/icu4c/source/test/intltest/transrt.cpp b/icu4c/source/test/intltest/transrt.cpp index f3a18b66dfc..1e806854bc4 100644 --- a/icu4c/source/test/intltest/transrt.cpp +++ b/icu4c/source/test/intltest/transrt.cpp @@ -13,7 +13,7 @@ #if !UCONFIG_NO_TRANSLITERATION #include "unicode/translit.h" -#include "unicode/rbt.h" +#include "rbt.h" #include "unicode/uniset.h" #include "unicode/uchar.h" #include "unicode/normlzr.h" diff --git a/icu4c/source/test/intltest/transtst.cpp b/icu4c/source/test/intltest/transtst.cpp index 046590518e5..d9232626c1d 100644 --- a/icu4c/source/test/intltest/transtst.cpp +++ b/icu4c/source/test/intltest/transtst.cpp @@ -12,32 +12,25 @@ #if !UCONFIG_NO_TRANSLITERATION -/* These APIs are becoming private */ -#define ICU_COMPOUNDTRANSLITERATOR_USE_DEPRECATES 1 -#define ICU_NULLTRANSLITERATOR_USE_DEPRECATES 1 -#define ICU_RULEBASEDTRANSLITERATOR_USE_DEPRECATES 1 -#define ICU_HEXTOUNICODETRANSLITERATOR_USE_DEPRECATES 1 -#define ICU_UNICODETOHEXTRANSLITERATOR_USE_DEPRECATES 1 - #include "transtst.h" #include "unicode/locid.h" -#include "unicode/cpdtrans.h" #include "unicode/dtfmtsym.h" -#include "unicode/hextouni.h" #include "unicode/normlzr.h" -#include "unicode/nultrans.h" -#include "unicode/rbt.h" #include "unicode/translit.h" #include "unicode/ucnv.h" #include "unicode/ucnv_err.h" #include "unicode/uchar.h" #include "unicode/unifilt.h" #include "unicode/uniset.h" -#include "unicode/unitohex.h" +#include "unitohex.h" #include "unicode/utypes.h" #include "unicode/ustring.h" #include "unicode/usetiter.h" #include "unicode/uscript.h" +#include "hextouni.h" +#include "cpdtrans.h" +#include "nultrans.h" +#include "rbt.h" #include "anytrans.h" #include "esctrn.h" #include "name2uni.h" diff --git a/icu4c/source/test/intltest/trnserr.cpp b/icu4c/source/test/intltest/trnserr.cpp index 2161de12137..b6bfa67e49c 100644 --- a/icu4c/source/test/intltest/trnserr.cpp +++ b/icu4c/source/test/intltest/trnserr.cpp @@ -17,22 +17,17 @@ #if !UCONFIG_NO_TRANSLITERATION -/* These APIs are becoming private */ -#define ICU_RULEBASEDTRANSLITERATOR_USE_DEPRECATES 1 -#define ICU_HEXTOUNICODETRANSLITERATOR_USE_DEPRECATES 1 -#define ICU_UNICODETOHEXTRANSLITERATOR_USE_DEPRECATES 1 - #include "ittrans.h" #include "trnserr.h" #include "unicode/utypes.h" #include "unicode/translit.h" #include "unicode/uniset.h" -#include "unicode/rbt.h" -#include "unicode/unitohex.h" -#include "unicode/hextouni.h" +#include "rbt.h" +#include "unitohex.h" +#include "hextouni.h" #include "unicode/unifilt.h" -#include "unicode/cpdtrans.h" -#include "unicode/nultrans.h" +#include "cpdtrans.h" +#include "nultrans.h" #include #include #include diff --git a/icu4c/source/test/intltest/unhxtrts.cpp b/icu4c/source/test/intltest/unhxtrts.cpp index b3ce95d1430..953cd2163f9 100644 --- a/icu4c/source/test/intltest/unhxtrts.cpp +++ b/icu4c/source/test/intltest/unhxtrts.cpp @@ -19,10 +19,10 @@ #include "unhxtrts.h" #include "unicode/utypes.h" #include "unicode/translit.h" -#include "unicode/unitohex.h" #include "unicode/unifilt.h" #include "unicode/uchar.h" #include "intltest.h" +#include "unitohex.h" /*converts a Unicodestring to integer*/ static int32_t getInt(UnicodeString str) { diff --git a/icu4c/source/test/intltest/unhxtrts.h b/icu4c/source/test/intltest/unhxtrts.h index 2820236bdb1..f0d7176ca90 100644 --- a/icu4c/source/test/intltest/unhxtrts.h +++ b/icu4c/source/test/intltest/unhxtrts.h @@ -15,11 +15,8 @@ #if !UCONFIG_NO_TRANSLITERATION -#define ICU_UNICODETOHEXTRANSLITERATOR_USE_DEPRECATES 1 - - #include "unicode/translit.h" -#include "unicode/unitohex.h" +#include "unitohex.h" #include "intltest.h" /** diff --git a/icu4c/source/test/intltest/uobjtest.cpp b/icu4c/source/test/intltest/uobjtest.cpp index eaae7a4f473..71f3ae21950 100644 --- a/icu4c/source/test/intltest/uobjtest.cpp +++ b/icu4c/source/test/intltest/uobjtest.cpp @@ -124,17 +124,13 @@ UObject *UObjectTest::testClass(UObject *obj, #include "iculserv.h" #undef protected -// Deprecated Things -#define ICU_HEXTOUNICODETRANSLITERATOR_USE_DEPRECATES 1 -#define ICU_RULEBASEDTRANSLITERATOR_USE_DEPRECATES 1 - -#include "unicode/hextouni.h" - -#define ICU_UNICODETOHEXTRANSLITERATOR_USE_DEPRECATES 1 -#include "unicode/unitohex.h" - - // Internal Things (woo) +#include "cpdtrans.h" +#include "rbt.h" +#include "rbt_data.h" +#include "hextouni.h" +#include "unitohex.h" +#include "nultrans.h" #include "anytrans.h" #include "digitlst.h" #include "esctrn.h" @@ -156,10 +152,6 @@ UObject *UObjectTest::testClass(UObject *obj, #include "uvector.h" // External Things -#define ICU_COMPOUNDTRANSLITERATOR_USE_DEPRECATES 1 -#define ICU_NULLTRANSLITERATOR_USE_DEPRECATES 1 - - #include "unicode/brkiter.h" #include "unicode/calendar.h" #include "unicode/caniter.h" @@ -167,7 +159,6 @@ UObject *UObjectTest::testClass(UObject *obj, #include "unicode/choicfmt.h" #include "unicode/coleitr.h" #include "unicode/coll.h" -#include "unicode/cpdtrans.h" #include "unicode/datefmt.h" #include "unicode/dbbi.h" #include "unicode/dcfmtsym.h" @@ -180,13 +171,10 @@ UObject *UObjectTest::testClass(UObject *obj, #include "unicode/locid.h" #include "unicode/msgfmt.h" #include "unicode/normlzr.h" -#include "unicode/nultrans.h" #include "unicode/numfmt.h" #include "unicode/parsepos.h" #include "unicode/rbbi.h" #include "unicode/rbnf.h" -#include "unicode/rbt.h" -#include "rbt_data.h" #include "unicode/regex.h" #include "unicode/resbund.h" #include "unicode/schriter.h"