diff --git a/icu4c/source/common/ubidi_props.c b/icu4c/source/common/ubidi_props.c index 746af1cab1b..010a3db05d4 100644 --- a/icu4c/source/common/ubidi_props.c +++ b/icu4c/source/common/ubidi_props.c @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 2004-2006, International Business Machines +* Copyright (C) 2004-2007, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -129,7 +129,7 @@ ubidi_openData(UBiDiProps *bdpProto, } } -U_CAPI UBiDiProps * U_EXPORT2 +U_CFUNC UBiDiProps * ubidi_openProps(UErrorCode *pErrorCode) { UBiDiProps bdpProto={ NULL }, *bdp; @@ -151,7 +151,7 @@ ubidi_openProps(UErrorCode *pErrorCode) { } } -U_CAPI UBiDiProps * U_EXPORT2 +U_CFUNC UBiDiProps * ubidi_openBinary(const uint8_t *bin, int32_t length, UErrorCode *pErrorCode) { UBiDiProps bdpProto={ NULL }; const DataHeader *hdr; @@ -188,7 +188,7 @@ ubidi_openBinary(const uint8_t *bin, int32_t length, UErrorCode *pErrorCode) { #endif -U_CAPI void U_EXPORT2 +U_CFUNC void ubidi_closeProps(UBiDiProps *bdp) { if(bdp!=NULL) { #if !UBIDI_HARDCODE_DATA @@ -220,7 +220,7 @@ ubidi_cleanup(void) { return TRUE; } -U_CAPI const UBiDiProps * U_EXPORT2 +U_CFUNC const UBiDiProps * ubidi_getSingleton(UErrorCode *pErrorCode) { #if UBIDI_HARDCODE_DATA if(U_FAILURE(*pErrorCode)) { @@ -268,7 +268,7 @@ ubidi_getSingleton(UErrorCode *pErrorCode) { #endif } -U_CAPI const UBiDiProps * U_EXPORT2 +U_CAPI const UBiDiProps * ubidi_getDummy(UErrorCode *pErrorCode) { UBiDiProps *bdp; @@ -330,7 +330,7 @@ _enumPropertyStartsRange(const void *context, UChar32 start, UChar32 limit, uint return TRUE; } -U_CAPI void U_EXPORT2 +U_CFUNC void ubidi_addPropertyStarts(const UBiDiProps *bdp, const USetAdder *sa, UErrorCode *pErrorCode) { int32_t i, length; UChar32 c, start, limit; @@ -404,21 +404,21 @@ ubidi_getMaxValue(const UBiDiProps *bdp, UProperty which) { } } -U_CAPI UCharDirection U_EXPORT2 +U_CAPI UCharDirection ubidi_getClass(const UBiDiProps *bdp, UChar32 c) { uint32_t props; GET_PROPS(bdp, c, props); return (UCharDirection)UBIDI_GET_CLASS(props); } -U_CAPI UBool U_EXPORT2 +U_CFUNC UBool ubidi_isMirrored(const UBiDiProps *bdp, UChar32 c) { uint32_t props; GET_PROPS(bdp, c, props); return (UBool)UBIDI_GET_FLAG(props, UBIDI_IS_MIRRORED_SHIFT); } -U_CAPI UChar32 U_EXPORT2 +U_CFUNC UChar32 ubidi_getMirror(const UBiDiProps *bdp, UChar32 c) { uint32_t props; int32_t delta; @@ -454,28 +454,28 @@ ubidi_getMirror(const UBiDiProps *bdp, UChar32 c) { } } -U_CAPI UBool U_EXPORT2 +U_CFUNC UBool ubidi_isBidiControl(const UBiDiProps *bdp, UChar32 c) { uint32_t props; GET_PROPS(bdp, c, props); return (UBool)UBIDI_GET_FLAG(props, UBIDI_BIDI_CONTROL_SHIFT); } -U_CAPI UBool U_EXPORT2 +U_CFUNC UBool ubidi_isJoinControl(const UBiDiProps *bdp, UChar32 c) { uint32_t props; GET_PROPS(bdp, c, props); return (UBool)UBIDI_GET_FLAG(props, UBIDI_JOIN_CONTROL_SHIFT); } -U_CAPI UJoiningType U_EXPORT2 +U_CFUNC UJoiningType ubidi_getJoiningType(const UBiDiProps *bdp, UChar32 c) { uint32_t props; GET_PROPS(bdp, c, props); return (UJoiningType)((props&UBIDI_JT_MASK)>>UBIDI_JT_SHIFT); } -U_CAPI UJoiningGroup U_EXPORT2 +U_CFUNC UJoiningGroup ubidi_getJoiningGroup(const UBiDiProps *bdp, UChar32 c) { UChar32 start, limit; @@ -490,7 +490,7 @@ ubidi_getJoiningGroup(const UBiDiProps *bdp, UChar32 c) { /* public API (see uchar.h) ------------------------------------------------- */ -U_CAPI UCharDirection U_EXPORT2 +U_CFUNC UCharDirection u_charDirection(UChar32 c) { UErrorCode errorCode=U_ZERO_ERROR; const UBiDiProps *bdp=ubidi_getSingleton(&errorCode); @@ -501,14 +501,14 @@ u_charDirection(UChar32 c) { } } -U_CAPI UBool U_EXPORT2 +U_CFUNC UBool u_isMirrored(UChar32 c) { UErrorCode errorCode=U_ZERO_ERROR; const UBiDiProps *bdp=ubidi_getSingleton(&errorCode); return (UBool)(bdp!=NULL && ubidi_isMirrored(bdp, c)); } -U_CAPI UChar32 U_EXPORT2 +U_CFUNC UChar32 u_charMirror(UChar32 c) { UErrorCode errorCode=U_ZERO_ERROR; const UBiDiProps *bdp=ubidi_getSingleton(&errorCode); diff --git a/icu4c/source/common/ubidi_props.h b/icu4c/source/common/ubidi_props.h index 7788c8b46c3..d6da311f9e5 100644 --- a/icu4c/source/common/ubidi_props.h +++ b/icu4c/source/common/ubidi_props.h @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 2004-2005, International Business Machines +* Copyright (C) 2004-2007, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -31,17 +31,17 @@ U_CDECL_BEGIN struct UBiDiProps; typedef struct UBiDiProps UBiDiProps; -U_CAPI UBiDiProps * U_EXPORT2 +U_CFUNC UBiDiProps * ubidi_openProps(UErrorCode *pErrorCode); -U_CAPI UBiDiProps * U_EXPORT2 +U_CFUNC UBiDiProps * ubidi_openBinary(const uint8_t *bin, int32_t length, UErrorCode *pErrorCode); -U_CAPI void U_EXPORT2 +U_CFUNC void ubidi_closeProps(UBiDiProps *bdp); -U_CAPI const UBiDiProps * U_EXPORT2 +U_CFUNC const UBiDiProps * ubidi_getSingleton(UErrorCode *pErrorCode); /** @@ -49,16 +49,16 @@ ubidi_getSingleton(UErrorCode *pErrorCode); * This can be used when the real data is not available. * Using the dummy can reduce checks for available data after an initial failure. */ -U_CAPI const UBiDiProps * U_EXPORT2 +U_CAPI const UBiDiProps * ubidi_getDummy(UErrorCode *pErrorCode); -U_CAPI int32_t U_EXPORT2 +U_CAPI int32_t ubidi_swap(const UDataSwapper *ds, const void *inData, int32_t length, void *outData, UErrorCode *pErrorCode); -U_CAPI void U_EXPORT2 +U_CFUNC void ubidi_addPropertyStarts(const UBiDiProps *bdp, const USetAdder *sa, UErrorCode *pErrorCode); /* property access functions */ @@ -66,25 +66,25 @@ ubidi_addPropertyStarts(const UBiDiProps *bdp, const USetAdder *sa, UErrorCode * U_CFUNC int32_t ubidi_getMaxValue(const UBiDiProps *bdp, UProperty which); -U_CAPI UCharDirection U_EXPORT2 +U_CAPI UCharDirection ubidi_getClass(const UBiDiProps *bdp, UChar32 c); -U_CAPI UBool U_EXPORT2 +U_CFUNC UBool ubidi_isMirrored(const UBiDiProps *bdp, UChar32 c); -U_CAPI UChar32 U_EXPORT2 +U_CFUNC UChar32 ubidi_getMirror(const UBiDiProps *bdp, UChar32 c); -U_CAPI UBool U_EXPORT2 +U_CFUNC UBool ubidi_isBidiControl(const UBiDiProps *bdp, UChar32 c); -U_CAPI UBool U_EXPORT2 +U_CFUNC UBool ubidi_isJoinControl(const UBiDiProps *bdp, UChar32 c); -U_CAPI UJoiningType U_EXPORT2 +U_CFUNC UJoiningType ubidi_getJoiningType(const UBiDiProps *bdp, UChar32 c); -U_CAPI UJoiningGroup U_EXPORT2 +U_CFUNC UJoiningGroup ubidi_getJoiningGroup(const UBiDiProps *bdp, UChar32 c); /* file definitions --------------------------------------------------------- */ diff --git a/icu4c/source/common/uchar.c b/icu4c/source/common/uchar.c index 718e87a4c9d..8b9fe3bb8c6 100644 --- a/icu4c/source/common/uchar.c +++ b/icu4c/source/common/uchar.c @@ -1,6 +1,6 @@ /* ******************************************************************************** -* Copyright (C) 1996-2006, International Business Machines +* Copyright (C) 1996-2007, International Business Machines * Corporation and others. All Rights Reserved. ******************************************************************************** * @@ -958,7 +958,7 @@ uchar_addPropertyStarts(const USetAdder *sa, UErrorCode *pErrorCode) { USET_ADD_CP_AND_NEXT(sa, CGJ); } -U_CAPI void U_EXPORT2 +U_CFUNC void U_EXPORT2 upropsvec_addPropertyStarts(const USetAdder *sa, UErrorCode *pErrorCode) { if(U_FAILURE(*pErrorCode)) { return; diff --git a/icu4c/source/common/unorm.cpp b/icu4c/source/common/unorm.cpp index c21840be53f..00ee9ec3e7d 100644 --- a/icu4c/source/common/unorm.cpp +++ b/icu4c/source/common/unorm.cpp @@ -1,6 +1,6 @@ /* ****************************************************************************** -* Copyright (c) 1996-2006, International Business Machines +* Copyright (c) 1996-2007, International Business Machines * Corporation and others. All Rights Reserved. ****************************************************************************** * File unorm.cpp @@ -971,7 +971,7 @@ u_getCombiningClass(UChar32 c) { #endif } -U_CAPI UBool U_EXPORT2 +U_CFUNC UBool U_EXPORT2 unorm_internalIsFullCompositionExclusion(UChar32 c) { #if UNORM_HARDCODE_DATA if(auxTrie.index!=NULL) { @@ -988,7 +988,7 @@ unorm_internalIsFullCompositionExclusion(UChar32 c) { } } -U_CAPI UBool U_EXPORT2 +U_CFUNC UBool U_EXPORT2 unorm_isCanonSafeStart(UChar32 c) { #if UNORM_HARDCODE_DATA if(auxTrie.index!=NULL) { @@ -1249,7 +1249,7 @@ unorm_addPropertyStarts(const USetAdder *sa, UErrorCode *pErrorCode) { sa->add(sa->set, HANGUL_BASE+HANGUL_COUNT); /* add Hangul+1 to continue with other properties */ } -U_CAPI UNormalizationCheckResult U_EXPORT2 +U_CFUNC UNormalizationCheckResult U_EXPORT2 unorm_getQuickCheck(UChar32 c, UNormalizationMode mode) { static const uint32_t qcMask[UNORM_MODE_COUNT]={ 0, 0, _NORM_QC_NFD, _NORM_QC_NFKD, _NORM_QC_NFC, _NORM_QC_NFKC @@ -1276,7 +1276,7 @@ unorm_getQuickCheck(UChar32 c, UNormalizationMode mode) { } } -U_CAPI uint16_t U_EXPORT2 +U_CFUNC uint16_t U_EXPORT2 unorm_getFCD16FromCodePoint(UChar32 c) { uint16_t fcd; #if !UNORM_HARDCODE_DATA diff --git a/icu4c/source/common/unormimp.h b/icu4c/source/common/unormimp.h index dacde5049e0..498bf0a8b5d 100644 --- a/icu4c/source/common/unormimp.h +++ b/icu4c/source/common/unormimp.h @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 2001-2006, International Business Machines +* Copyright (C) 2001-2007, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -310,7 +310,7 @@ unorm_internalQuickCheck(const UChar *src, * for u_getIntPropertyValue(). * @internal */ -U_CAPI uint16_t U_EXPORT2 +U_CFUNC uint16_t U_EXPORT2 unorm_getFCD16FromCodePoint(UChar32 c); /** @@ -408,14 +408,14 @@ unorm_getDecomposition(UChar32 c, UBool compat, * internal API, used by uprops.cpp * @internal */ -U_CAPI UBool U_EXPORT2 +U_CFUNC UBool U_EXPORT2 unorm_internalIsFullCompositionExclusion(UChar32 c); /** * Internal API, used by enumeration of canonically equivalent strings * @internal */ -U_CAPI UBool U_EXPORT2 +U_CFUNC UBool U_EXPORT2 unorm_isCanonSafeStart(UChar32 c); /** @@ -465,7 +465,7 @@ unorm_swap(const UDataSwapper *ds, * Get the NF*_QC property for a code point, for u_getIntPropertyValue(). * @internal */ -U_CAPI UNormalizationCheckResult U_EXPORT2 +U_CFUNC UNormalizationCheckResult U_EXPORT2 unorm_getQuickCheck(UChar32 c, UNormalizationMode mode); /** diff --git a/icu4c/source/common/uprops.c b/icu4c/source/common/uprops.c index 86464e54e30..2fb4e603f88 100644 --- a/icu4c/source/common/uprops.c +++ b/icu4c/source/common/uprops.c @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 2002-2006, International Business Machines +* Copyright (C) 2002-2007, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -354,7 +354,7 @@ u_getIntPropertyMaxValue(UProperty which) { } } -U_CAPI UPropertySource U_EXPORT2 +U_CFUNC UPropertySource U_EXPORT2 uprops_getSource(UProperty which) { if(which julian day * @internal */ -class U_I18N_API CalendarCache : public UMemory { +class CalendarCache : public UMemory { public: static int32_t get(CalendarCache** cache, int32_t key, UErrorCode &status); static void put(CalendarCache** cache, int32_t key, int32_t value, UErrorCode &status); diff --git a/icu4c/source/i18n/buddhcal.h b/icu4c/source/i18n/buddhcal.h index bb3316b4379..ab389aad32e 100644 --- a/icu4c/source/i18n/buddhcal.h +++ b/icu4c/source/i18n/buddhcal.h @@ -1,5 +1,6 @@ /* - * Copyright (C) 2003-2004, International Business Machines Corporation + ******************************************************************************** + * Copyright (C) 2003-2007, International Business Machines Corporation * and others. All Rights Reserved. ******************************************************************************** * @@ -43,7 +44,7 @@ U_NAMESPACE_BEGIN *

* @internal */ -class U_I18N_API BuddhistCalendar : public GregorianCalendar { +class BuddhistCalendar : public GregorianCalendar { public: /** @@ -117,7 +118,7 @@ public: * @return The class ID for all objects of this class. * @internal */ - static UClassID U_EXPORT2 getStaticClassID(void); + U_I18N_API static UClassID U_EXPORT2 getStaticClassID(void); /** * return the calendar type, "buddhist". diff --git a/icu4c/source/i18n/esctrn.h b/icu4c/source/i18n/esctrn.h index 6dae51b8774..96872b91684 100644 --- a/icu4c/source/i18n/esctrn.h +++ b/icu4c/source/i18n/esctrn.h @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (c) 2001-2006, International Business Machines +* Copyright (c) 2001-2007, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * Date Name Description @@ -41,7 +41,7 @@ U_NAMESPACE_BEGIN * * @author Alan Liu */ -class U_I18N_API EscapeTransliterator : public Transliterator { +class EscapeTransliterator : public Transliterator { private: @@ -123,7 +123,7 @@ class U_I18N_API EscapeTransliterator : public Transliterator { /** * ICU "poor man's RTTI", returns a UClassID for this class. */ - static UClassID U_EXPORT2 getStaticClassID(); + U_I18N_API static UClassID U_EXPORT2 getStaticClassID(); protected: diff --git a/icu4c/source/i18n/hebrwcal.h b/icu4c/source/i18n/hebrwcal.h index 64d19e8a276..ead8bfae0b5 100644 --- a/icu4c/source/i18n/hebrwcal.h +++ b/icu4c/source/i18n/hebrwcal.h @@ -1,6 +1,6 @@ /* ****************************************************************************** -* Copyright (C) 2003-2006, International Business Machines Corporation +* Copyright (C) 2003-2007, International Business Machines Corporation * and others. All Rights Reserved. ****************************************************************************** * @@ -80,7 +80,7 @@ U_NAMESPACE_BEGIN *

* @internal */ -class U_I18N_API HebrewCalendar : public Calendar { +class HebrewCalendar : public Calendar { public: /** * Useful constants for HebrewCalendar. @@ -216,7 +216,7 @@ public: * @return The class ID for all objects of this class. * @internal */ - static UClassID U_EXPORT2 getStaticClassID(void); + U_I18N_API static UClassID U_EXPORT2 getStaticClassID(void); /** * return the calendar type, "hebrew". diff --git a/icu4c/source/i18n/islamcal.h b/icu4c/source/i18n/islamcal.h index fbcd9511a9f..0b4080d35f1 100644 --- a/icu4c/source/i18n/islamcal.h +++ b/icu4c/source/i18n/islamcal.h @@ -1,5 +1,6 @@ /* - * Copyright (C) 2003-2004, International Business Machines Corporation + ******************************************************************************** + * Copyright (C) 2003-2007, International Business Machines Corporation * and others. All Rights Reserved. ****************************************************************************** * @@ -80,7 +81,7 @@ U_NAMESPACE_BEGIN * @author Steven R. Loomis * @internal */ -class U_I18N_API IslamicCalendar : public Calendar { +class IslamicCalendar : public Calendar { public: //------------------------------------------------------------------------- // Constants... @@ -362,7 +363,7 @@ class U_I18N_API IslamicCalendar : public Calendar { * @return The class ID for all objects of this class. * @internal */ - static UClassID U_EXPORT2 getStaticClassID(void); + U_I18N_API static UClassID U_EXPORT2 getStaticClassID(void); /** * return the calendar type, "buddhist". diff --git a/icu4c/source/i18n/japancal.cpp b/icu4c/source/i18n/japancal.cpp index ad3d2f410c1..ad27329b94c 100644 --- a/icu4c/source/i18n/japancal.cpp +++ b/icu4c/source/i18n/japancal.cpp @@ -1,6 +1,6 @@ /* ******************************************************************************* -* Copyright (C) 2003-2006, International Business Machines Corporation and * +* Copyright (C) 2003-2007, International Business Machines Corporation and * * others. All Rights Reserved. * ******************************************************************************* * @@ -278,7 +278,12 @@ static const struct { #define kEraCount (sizeof(kEraInfo)/sizeof(kEraInfo[0])) -const uint32_t JapaneseCalendar::kCurrentEra = (kEraCount-1); +static const uint32_t kCurrentEra = (kEraCount-1); + +/* Some platforms don't like to export constants, like old Palm OS and some z/OS configurations. */ +uint32_t JapaneseCalendar::getCurrentEra() { + return kCurrentEra; +} JapaneseCalendar::JapaneseCalendar(const Locale& aLocale, UErrorCode& success) : GregorianCalendar(aLocale, success) @@ -470,7 +475,7 @@ int32_t JapaneseCalendar::defaultCenturyStartYear() const static int32_t gJapanCalendarLimits[2][4] = { // Minimum Greatest min Least max Greatest max - { 0, 0, JapaneseCalendar::kCurrentEra, JapaneseCalendar::kCurrentEra }, // ERA + { 0, 0, kCurrentEra, kCurrentEra }, // ERA { 1, 1, 0, 0 }, // YEAR least-max/greatest-max computed at runtime }; diff --git a/icu4c/source/i18n/japancal.h b/icu4c/source/i18n/japancal.h index 7ae515e952d..05749340bf3 100644 --- a/icu4c/source/i18n/japancal.h +++ b/icu4c/source/i18n/japancal.h @@ -1,5 +1,6 @@ /* - * Copyright (C) 2003-2004, International Business Machines Corporation + ******************************************************************************** + * Copyright (C) 2003-2007, International Business Machines Corporation * and others. All Rights Reserved. ******************************************************************************** * @@ -52,14 +53,14 @@ U_NAMESPACE_BEGIN *

* @internal */ -class U_I18N_API JapaneseCalendar : public GregorianCalendar { +class JapaneseCalendar : public GregorianCalendar { public: /** * Useful constants for JapaneseCalendar. * @internal */ - static const uint32_t kCurrentEra; // the current era + U_I18N_API static uint32_t U_EXPORT2 getCurrentEra(void); // the current era /** * Constructs a JapaneseCalendar based on the current time in the default time zone @@ -131,7 +132,7 @@ public: * @return The class ID for all objects of this class. * @internal */ - static UClassID U_EXPORT2 getStaticClassID(void); + U_I18N_API static UClassID U_EXPORT2 getStaticClassID(void); /** * return the calendar type, "japanese". diff --git a/icu4c/source/i18n/name2uni.h b/icu4c/source/i18n/name2uni.h index 74f6cd2a660..d53ba24b8cc 100644 --- a/icu4c/source/i18n/name2uni.h +++ b/icu4c/source/i18n/name2uni.h @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (C) 2001-2006, International Business Machines +* Copyright (C) 2001-2007, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * Date Name Description @@ -24,7 +24,7 @@ U_NAMESPACE_BEGIN * It recognizes the Perl syntax \N{name}. * @author Alan Liu */ -class U_I18N_API NameUnicodeTransliterator : public Transliterator { +class NameUnicodeTransliterator : public Transliterator { public: /** @@ -62,7 +62,7 @@ public: /** * ICU "poor man's RTTI", returns a UClassID for this class. */ - static UClassID U_EXPORT2 getStaticClassID(); + U_I18N_API static UClassID U_EXPORT2 getStaticClassID(); protected: diff --git a/icu4c/source/i18n/nortrans.h b/icu4c/source/i18n/nortrans.h index 4dc9f271c0d..3dccc5eecea 100644 --- a/icu4c/source/i18n/nortrans.h +++ b/icu4c/source/i18n/nortrans.h @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (C) 2001-2006, International Business Machines +* Copyright (C) 2001-2007, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * Date Name Description @@ -23,7 +23,7 @@ U_NAMESPACE_BEGIN * A transliterator that performs normalization. * @author Alan Liu */ -class U_I18N_API NormalizationTransliterator : public Transliterator { +class NormalizationTransliterator : public Transliterator { /** * The normalization mode of this transliterator. @@ -66,7 +66,7 @@ class U_I18N_API NormalizationTransliterator : public Transliterator { /** * ICU "poor man's RTTI", returns a UClassID for this class. */ - static UClassID U_EXPORT2 getStaticClassID(); + U_I18N_API static UClassID U_EXPORT2 getStaticClassID(); protected: diff --git a/icu4c/source/i18n/olsontz.h b/icu4c/source/i18n/olsontz.h index 6f7d71cdc4c..b934779833f 100644 --- a/icu4c/source/i18n/olsontz.h +++ b/icu4c/source/i18n/olsontz.h @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (c) 2003-2005, International Business Machines +* Copyright (c) 2003-2007, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * Author: Alan Liu @@ -113,7 +113,7 @@ class SimpleTimeZone; * count, the metadata entry itself is considered a rule resource, * since its key begins with an underscore. */ -class U_I18N_API OlsonTimeZone: public TimeZone { +class OlsonTimeZone: public TimeZone { public: /** * Construct from a resource bundle. @@ -153,7 +153,7 @@ class U_I18N_API OlsonTimeZone: public TimeZone { /** * TimeZone API. */ - static UClassID U_EXPORT2 getStaticClassID(); + U_I18N_API static UClassID U_EXPORT2 getStaticClassID(); /** * TimeZone API. diff --git a/icu4c/source/i18n/persncal.h b/icu4c/source/i18n/persncal.h index 7dd0a39de7f..8314b543a39 100644 --- a/icu4c/source/i18n/persncal.h +++ b/icu4c/source/i18n/persncal.h @@ -1,4 +1,5 @@ /* + ****************************************************************************** * Copyright (C) 2003-2007, International Business Machines Corporation * and others. All Rights Reserved. ****************************************************************************** @@ -44,7 +45,7 @@ U_NAMESPACE_BEGIN * @author Mehran Mehr * @internal */ -class U_I18N_API PersianCalendar : public Calendar { +class PersianCalendar : public Calendar { public: //------------------------------------------------------------------------- // Constants... @@ -265,7 +266,7 @@ class U_I18N_API PersianCalendar : public Calendar { * @return The class ID for all objects of this class. * @internal */ - static UClassID U_EXPORT2 getStaticClassID(void); + U_I18N_API static UClassID U_EXPORT2 getStaticClassID(void); /** * return the calendar type, "persian". diff --git a/icu4c/source/i18n/rbt_data.h b/icu4c/source/i18n/rbt_data.h index 5913460728c..ce833dc26dd 100644 --- a/icu4c/source/i18n/rbt_data.h +++ b/icu4c/source/i18n/rbt_data.h @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (C) 1999-2006, International Business Machines Corporation +* Copyright (C) 1999-2007, International Business Machines Corporation * and others. All Rights Reserved. ********************************************************************** * Date Name Description @@ -42,7 +42,7 @@ class UnicodeReplacer; * data structure handles this. See the parsing code for more * details. */ -class U_I18N_API TransliterationRuleData : public UMemory { +class TransliterationRuleData : public UMemory { public: diff --git a/icu4c/source/i18n/rbt_set.h b/icu4c/source/i18n/rbt_set.h index 45ce7c1e3e6..f92e13002c2 100644 --- a/icu4c/source/i18n/rbt_set.h +++ b/icu4c/source/i18n/rbt_set.h @@ -1,5 +1,7 @@ /* -* Copyright (C) {1999}, International Business Machines Corporation and others. All Rights Reserved. +********************************************************************** +* Copyright (C) 1999-2007, International Business Machines Corporation +* and others. All Rights Reserved. ********************************************************************** * Date Name Description * 11/17/99 aliu Creation. @@ -29,7 +31,7 @@ class UnicodeSet; * A set of rules for a RuleBasedTransliterator. * @author Alan Liu */ -class U_I18N_API TransliterationRuleSet : public UMemory { +class TransliterationRuleSet : public UMemory { /** * Vector of rules, in the order added. This is used while the * rule set is getting built. After that, freeze() reorders and diff --git a/icu4c/source/i18n/reldtfmt.h b/icu4c/source/i18n/reldtfmt.h index baf1b269749..ef20a082cd9 100644 --- a/icu4c/source/i18n/reldtfmt.h +++ b/icu4c/source/i18n/reldtfmt.h @@ -37,7 +37,7 @@ struct URelativeString; * @draft ICU 3.8 */ -class U_I18N_API RelativeDateFormat : public DateFormat { +class RelativeDateFormat : public DateFormat { public: RelativeDateFormat( UDateFormatStyle timeStyle, UDateFormatStyle dateStyle, const Locale& locale, UErrorCode& status); @@ -247,7 +247,7 @@ public: * @return The class ID for all objects of this class. * @draft ICU 3.8 */ - static UClassID U_EXPORT2 getStaticClassID(void); + U_I18N_API static UClassID U_EXPORT2 getStaticClassID(void); /** * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This diff --git a/icu4c/source/i18n/remtrans.h b/icu4c/source/i18n/remtrans.h index 24633238118..25a5609dffe 100644 --- a/icu4c/source/i18n/remtrans.h +++ b/icu4c/source/i18n/remtrans.h @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (c) 2001-2006, International Business Machines +* Copyright (c) 2001-2007, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * Date Name Description @@ -22,7 +22,7 @@ U_NAMESPACE_BEGIN * A transliterator that removes text. * @author Alan Liu */ -class U_I18N_API RemoveTransliterator : public Transliterator { +class RemoveTransliterator : public Transliterator { public: @@ -67,7 +67,7 @@ public: /** * ICU "poor man's RTTI", returns a UClassID for this class. */ - static UClassID U_EXPORT2 getStaticClassID(); + U_I18N_API static UClassID U_EXPORT2 getStaticClassID(); }; diff --git a/icu4c/source/i18n/titletrn.h b/icu4c/source/i18n/titletrn.h index ae08db88f63..376e0efb611 100644 --- a/icu4c/source/i18n/titletrn.h +++ b/icu4c/source/i18n/titletrn.h @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (C) 2001-2006, International Business Machines +* Copyright (C) 2001-2007, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * Date Name Description @@ -27,7 +27,7 @@ U_NAMESPACE_BEGIN * case using u_totitle(). * @author Alan Liu */ -class U_I18N_API TitlecaseTransliterator : public CaseMapTransliterator { +class TitlecaseTransliterator : public CaseMapTransliterator { public: /** @@ -65,7 +65,7 @@ class U_I18N_API TitlecaseTransliterator : public CaseMapTransliterator { /** * ICU "poor man's RTTI", returns a UClassID for this class. */ - static UClassID U_EXPORT2 getStaticClassID(); + U_I18N_API static UClassID U_EXPORT2 getStaticClassID(); protected: diff --git a/icu4c/source/i18n/tolowtrn.h b/icu4c/source/i18n/tolowtrn.h index 77af67a6a27..1d8374aafed 100644 --- a/icu4c/source/i18n/tolowtrn.h +++ b/icu4c/source/i18n/tolowtrn.h @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (C) 2001-2006, International Business Machines +* Copyright (C) 2001-2007, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * Date Name Description @@ -24,7 +24,7 @@ U_NAMESPACE_BEGIN * case mapping. * @author Alan Liu */ -class U_I18N_API LowercaseTransliterator : public CaseMapTransliterator { +class LowercaseTransliterator : public CaseMapTransliterator { public: @@ -63,7 +63,7 @@ class U_I18N_API LowercaseTransliterator : public CaseMapTransliterator { /** * ICU "poor man's RTTI", returns a UClassID for this class. */ - static UClassID U_EXPORT2 getStaticClassID(); + U_I18N_API static UClassID U_EXPORT2 getStaticClassID(); }; U_NAMESPACE_END diff --git a/icu4c/source/i18n/toupptrn.h b/icu4c/source/i18n/toupptrn.h index e0f4ef5db19..e1ff991efa7 100644 --- a/icu4c/source/i18n/toupptrn.h +++ b/icu4c/source/i18n/toupptrn.h @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (C) 2001-2006, International Business Machines +* Copyright (C) 2001-2007, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * Date Name Description @@ -24,7 +24,7 @@ U_NAMESPACE_BEGIN * case mapping. * @author Alan Liu */ -class U_I18N_API UppercaseTransliterator : public CaseMapTransliterator { +class UppercaseTransliterator : public CaseMapTransliterator { public: @@ -63,7 +63,7 @@ class U_I18N_API UppercaseTransliterator : public CaseMapTransliterator { /** * ICU "poor man's RTTI", returns a UClassID for this class. */ - static UClassID U_EXPORT2 getStaticClassID(); + U_I18N_API static UClassID U_EXPORT2 getStaticClassID(); }; U_NAMESPACE_END diff --git a/icu4c/source/i18n/ucol.cpp b/icu4c/source/i18n/ucol.cpp index e6e785b5137..0d7d418ec31 100644 --- a/icu4c/source/i18n/ucol.cpp +++ b/icu4c/source/i18n/ucol.cpp @@ -556,7 +556,7 @@ ucol_close(UCollator *coll) /* This one is currently used by genrb & tests. After constructing from rules (tailoring),*/ /* you should be able to get the binary chunk to write out... Doesn't look very full now */ -U_CAPI uint8_t* U_EXPORT2 +U_CFUNC uint8_t* U_EXPORT2 ucol_cloneRuleData(const UCollator *coll, int32_t *length, UErrorCode *status) { uint8_t *result = NULL; @@ -975,7 +975,7 @@ uprv_uca_getImplicitFromRaw(UChar32 cp) { } } -U_CAPI uint32_t U_EXPORT2 +static uint32_t U_EXPORT2 uprv_uca_getImplicitPrimary(UChar32 cp) { //if (DEBUG) System.out.println("Incoming: " + Utility.hex(cp)); @@ -1947,7 +1947,7 @@ inline uint32_t ucol_IGetPrevCE(const UCollator *coll, collIterate *data, /* ucol_getPrevCE, out-of-line version for use from other files. */ -U_CAPI uint32_t U_EXPORT2 +U_CFUNC uint32_t U_EXPORT2 ucol_getPrevCE(const UCollator *coll, collIterate *data, UErrorCode *status) { return ucol_IGetPrevCE(coll, data, status); @@ -1955,7 +1955,7 @@ ucol_getPrevCE(const UCollator *coll, collIterate *data, /* this should be connected to special Jamo handling */ -U_CAPI uint32_t U_EXPORT2 +U_CFUNC uint32_t U_EXPORT2 ucol_getFirstCE(const UCollator *coll, UChar u, UErrorCode *status) { collIterate colIt; uint32_t order; diff --git a/icu4c/source/i18n/ucol_bld.cpp b/icu4c/source/i18n/ucol_bld.cpp index d6ef415fcbc..6fbc38a32ac 100644 --- a/icu4c/source/i18n/ucol_bld.cpp +++ b/icu4c/source/i18n/ucol_bld.cpp @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 2001-2006, International Business Machines +* Copyright (C) 2001-2007, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -191,7 +191,7 @@ U_CAPI int32_t U_EXPORT2 ucol_inv_getNextCE(const UColTokenParser *src, return iCE; } -U_CAPI int32_t U_EXPORT2 ucol_inv_getPrevCE(const UColTokenParser *src, +U_CFUNC int32_t U_EXPORT2 ucol_inv_getPrevCE(const UColTokenParser *src, uint32_t CE, uint32_t contCE, uint32_t *prevCE, uint32_t *prevContCE, uint32_t strength) @@ -223,7 +223,7 @@ U_CAPI int32_t U_EXPORT2 ucol_inv_getPrevCE(const UColTokenParser *src, return iCE; } -U_CAPI uint32_t U_EXPORT2 ucol_getCEStrengthDifference(uint32_t CE, uint32_t contCE, +U_CFUNC uint32_t U_EXPORT2 ucol_getCEStrengthDifference(uint32_t CE, uint32_t contCE, uint32_t prevCE, uint32_t prevContCE) { if(prevCE == CE && prevContCE == contCE) { diff --git a/icu4c/source/i18n/ucol_imp.h b/icu4c/source/i18n/ucol_imp.h index db6e2dc4900..09eb9c72f7b 100644 --- a/icu4c/source/i18n/ucol_imp.h +++ b/icu4c/source/i18n/ucol_imp.h @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 1998-2006, International Business Machines +* Copyright (C) 1998-2007, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -426,7 +426,7 @@ U_CFUNC uint32_t ucol_prv_getSpecialPrevCE(const UCollator *coll, UChar ch, uint32_t CE, collIterate *source, UErrorCode *status); U_CAPI uint32_t U_EXPORT2 ucol_getNextCE(const UCollator *coll, collIterate *collationSource, UErrorCode *status); -U_CAPI uint32_t U_EXPORT2 ucol_getPrevCE(const UCollator *coll, +U_CFUNC uint32_t U_EXPORT2 ucol_getPrevCE(const UCollator *coll, collIterate *collationSource, UErrorCode *status); /* function used by C++ getCollationKey to prevent restarting the calculation */ @@ -481,7 +481,7 @@ ucol_cloneRuleData(const UCollator *coll, int32_t *length, UErrorCode *status); * Used to set requested and valid locales on a collator returned by the collator * service. */ -U_CAPI void U_EXPORT2 +U_CFUNC void U_EXPORT2 ucol_setReqValidLocales(UCollator *coll, char *requestedLocaleToAdopt, char *validLocaleToAdopt); #define UCOL_SPECIAL_FLAG 0xF0000000 @@ -954,7 +954,7 @@ void ucol_putOptionsToHeader(UCollator* result, UColOptionSet * opts, UErrorCode U_CFUNC void ucol_updateInternalState(UCollator *coll, UErrorCode *status); -U_CAPI uint32_t U_EXPORT2 ucol_getFirstCE(const UCollator *coll, UChar u, UErrorCode *status); +U_CFUNC uint32_t U_EXPORT2 ucol_getFirstCE(const UCollator *coll, UChar u, UErrorCode *status); U_CAPI UBool U_EXPORT2 ucol_isTailored(const UCollator *coll, const UChar u, UErrorCode *status); U_CAPI const InverseUCATableHeader* U_EXPORT2 ucol_initInverseUCA(UErrorCode *status); @@ -965,8 +965,8 @@ uprv_uca_initImplicitConstants(int32_t minPrimary, int32_t maxPrimary, UErrorCod U_CAPI uint32_t U_EXPORT2 uprv_uca_getImplicitFromRaw(UChar32 cp); -U_CAPI uint32_t U_EXPORT2 -uprv_uca_getImplicitPrimary(UChar32 cp); +/*U_CFUNC uint32_t U_EXPORT2 +uprv_uca_getImplicitPrimary(UChar32 cp);*/ U_CAPI UChar32 U_EXPORT2 uprv_uca_getRawFromImplicit(uint32_t implicit); diff --git a/icu4c/source/i18n/ucol_res.cpp b/icu4c/source/i18n/ucol_res.cpp index fdd31d688a8..e4a78ded5b0 100644 --- a/icu4c/source/i18n/ucol_res.cpp +++ b/icu4c/source/i18n/ucol_res.cpp @@ -1,6 +1,6 @@ /* ******************************************************************************* -* Copyright (C) 1996-2006, International Business Machines +* Copyright (C) 1996-2007, International Business Machines * Corporation and others. All Rights Reserved. ******************************************************************************* * file name: ucol_res.cpp @@ -666,7 +666,7 @@ ucol_getLocaleByType(const UCollator *coll, ULocDataLocaleType type, UErrorCode return result; } -U_CAPI void U_EXPORT2 +U_CFUNC void U_EXPORT2 ucol_setReqValidLocales(UCollator *coll, char *requestedLocaleToAdopt, char *validLocaleToAdopt) { if (coll) { diff --git a/icu4c/source/i18n/unesctrn.h b/icu4c/source/i18n/unesctrn.h index 2418bce7a5a..bfde6fc134f 100644 --- a/icu4c/source/i18n/unesctrn.h +++ b/icu4c/source/i18n/unesctrn.h @@ -1,6 +1,6 @@ /* ********************************************************************** - * Copyright (c) 2001-2006, International Business Machines + * Copyright (c) 2001-2007, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * Date Name Description @@ -28,7 +28,7 @@ U_NAMESPACE_BEGIN * * @author Alan Liu */ -class U_I18N_API UnescapeTransliterator : public Transliterator { +class UnescapeTransliterator : public Transliterator { private: @@ -85,7 +85,7 @@ class U_I18N_API UnescapeTransliterator : public Transliterator { /** * ICU "poor man's RTTI", returns a UClassID for this class. */ - static UClassID U_EXPORT2 getStaticClassID(); + U_I18N_API static UClassID U_EXPORT2 getStaticClassID(); protected: diff --git a/icu4c/source/i18n/uni2name.h b/icu4c/source/i18n/uni2name.h index 3e9412fe34d..a145d64c102 100644 --- a/icu4c/source/i18n/uni2name.h +++ b/icu4c/source/i18n/uni2name.h @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (C) 2001-2006, International Business Machines +* Copyright (C) 2001-2007, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * Date Name Description @@ -23,7 +23,7 @@ U_NAMESPACE_BEGIN * It generates the Perl syntax \N{name}. * @author Alan Liu */ -class U_I18N_API UnicodeNameTransliterator : public Transliterator { +class UnicodeNameTransliterator : public Transliterator { public: @@ -61,7 +61,7 @@ class U_I18N_API UnicodeNameTransliterator : public Transliterator { /** * ICU "poor man's RTTI", returns a UClassID for this class. */ - static UClassID U_EXPORT2 getStaticClassID(); + U_I18N_API static UClassID U_EXPORT2 getStaticClassID(); protected: diff --git a/icu4c/source/test/intltest/incaltst.cpp b/icu4c/source/test/intltest/incaltst.cpp index 55dd4c0b54d..bbaa139b050 100644 --- a/icu4c/source/test/intltest/incaltst.cpp +++ b/icu4c/source/test/intltest/incaltst.cpp @@ -601,7 +601,7 @@ void IntlCalendarTest::TestJapanese3860() int32_t gotYear = cal2->get(UCAL_YEAR, s2); int32_t gotEra = cal2->get(UCAL_ERA, s2); int32_t expectYear = 1; - int32_t expectEra = JapaneseCalendar::kCurrentEra; + int32_t expectEra = JapaneseCalendar::getCurrentEra(); if((gotYear!=1) || (gotEra != expectEra)) { errln(UnicodeString("parse "+samplestr+" of 'y.m.d' as Japanese Calendar, expected year ") + expectYear + UnicodeString(" and era ") + expectEra +", but got year " + gotYear + " and era " + gotEra + " (Gregorian:" + str +")"); diff --git a/icu4c/source/test/intltest/uobjtest.cpp b/icu4c/source/test/intltest/uobjtest.cpp index b1c0eee249e..95a3c52b61b 100644 --- a/icu4c/source/test/intltest/uobjtest.cpp +++ b/icu4c/source/test/intltest/uobjtest.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 2002-2006, International Business Machines Corporation and + * Copyright (c) 2002-2007, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -152,8 +152,10 @@ UObject *UObjectTest::testClass(UObject *obj, #include "islamcal.h" #include "japancal.h" #include "hebrwcal.h" +#include "persncal.h" #include "ustrenum.h" #include "olsontz.h" +#include "reldtfmt.h" // External Things #include "unicode/brkiter.h" @@ -212,13 +214,6 @@ public: }; #endif -#if !UCONFIG_NO_FORMATTING -class TestOlsonTimeZone : public OlsonTimeZone { -public: - TestOlsonTimeZone(int32_t) : OlsonTimeZone() {} -}; -#endif - void UObjectTest::testIDs() { ids_count = 0; @@ -253,17 +248,19 @@ void UObjectTest::testIDs() TESTCLASSID_CTOR(ChoiceFormat, (UNICODE_STRING_SIMPLE("0#are no files|1#is one file|1