diff --git a/icu4c/source/common/ucnv2022.cpp b/icu4c/source/common/ucnv2022.cpp index d4c3f5299c6..195c56b18be 100644 --- a/icu4c/source/common/ucnv2022.cpp +++ b/icu4c/source/common/ucnv2022.cpp @@ -394,13 +394,13 @@ static void U_CALLCONV static void U_CALLCONV _ISO2022Reset(UConverter *converter, UConverterResetChoice choice); -static const char U_CALLCONV* +static const char * U_CALLCONV _ISO2022getName(const UConverter* cnv); static void U_CALLCONV _ISO_2022_WriteSub(UConverterFromUnicodeArgs *args, int32_t offsetIndex, UErrorCode *err); -static UConverter U_CALLCONV* +static UConverter * U_CALLCONV _ISO_2022_SafeClone(const UConverter *cnv, void *stackBuffer, int32_t *pBufferSize, UErrorCode *status); #ifdef U_ENABLE_GENERIC_ISO_2022 @@ -716,7 +716,7 @@ _ISO2022Reset(UConverter *converter, UConverterResetChoice choice) { } } -static const char U_CALLCONV* +static const char * U_CALLCONV _ISO2022getName(const UConverter* cnv){ if(cnv->extraInfo){ UConverterDataISO2022* myData= (UConverterDataISO2022*)cnv->extraInfo; @@ -3580,7 +3580,7 @@ struct cloneStruct }; -static UConverter U_CALLCONV * +static UConverter * U_CALLCONV _ISO_2022_SafeClone( const UConverter *cnv, void *stackBuffer, diff --git a/icu4c/source/common/ucnv_io.cpp b/icu4c/source/common/ucnv_io.cpp index 9c94ab3c708..d656a65066d 100644 --- a/icu4c/source/common/ucnv_io.cpp +++ b/icu4c/source/common/ucnv_io.cpp @@ -778,7 +778,7 @@ ucnv_io_countStandardAliases(UEnumeration *enumerator, UErrorCode * /*pErrorCode return value; } -static const char U_CALLCONV * +static const char * U_CALLCONV ucnv_io_nextStandardAliases(UEnumeration *enumerator, int32_t* resultLength, UErrorCode * /*pErrorCode*/) @@ -1017,7 +1017,7 @@ ucnv_io_countAllConverters(UEnumeration * /*enumerator*/, UErrorCode * /*pErrorC return gMainTable.converterListSize; } -static const char U_CALLCONV * +static const char * U_CALLCONV ucnv_io_nextAllConverters(UEnumeration *enumerator, int32_t* resultLength, UErrorCode * /*pErrorCode*/) @@ -1087,7 +1087,7 @@ ucnv_io_countKnownConverters(UErrorCode *pErrorCode) { /* alias table swapping ----------------------------------------------------- */ -typedef char U_CALLCONV * StripForCompareFn(char *dst, const char *name); +typedef char * U_CALLCONV StripForCompareFn(char *dst, const char *name); /* * row of a temporary array diff --git a/icu4c/source/common/ucnv_io.h b/icu4c/source/common/ucnv_io.h index bfaca1794c1..c88247cab52 100644 --- a/icu4c/source/common/ucnv_io.h +++ b/icu4c/source/common/ucnv_io.h @@ -77,10 +77,10 @@ typedef struct UConverterAlias { # error U_CHARSET_FAMILY is not valid #endif -U_CAPI char U_CALLCONV * +U_CAPI char * U_CALLCONV ucnv_io_stripASCIIForCompare(char *dst, const char *name); -U_CAPI char U_CALLCONV * +U_CAPI char * U_CALLCONV ucnv_io_stripEBCDICForCompare(char *dst, const char *name); /** diff --git a/icu4c/source/common/ucnvmbcs.cpp b/icu4c/source/common/ucnvmbcs.cpp index c5ea059cbed..d4fa574b56d 100644 --- a/icu4c/source/common/ucnvmbcs.cpp +++ b/icu4c/source/common/ucnvmbcs.cpp @@ -400,7 +400,7 @@ ucnv_MBCSGetStarters(const UConverter* cnv, UBool starters[256], UErrorCode *pErrorCode); -static const char U_CALLCONV * +static const char* U_CALLCONV ucnv_MBCSGetName(const UConverter *cnv); static void U_CALLCONV @@ -1982,7 +1982,7 @@ ucnv_MBCSOpen(UConverter *cnv, #endif } -static const char U_CALLCONV * +static const char* U_CALLCONV ucnv_MBCSGetName(const UConverter *cnv) { if((cnv->options&UCNV_OPTION_SWAP_LFNL)!=0 && cnv->sharedData->mbcs.swapLFNLName!=NULL) { return cnv->sharedData->mbcs.swapLFNLName; diff --git a/icu4c/source/common/uloc.cpp b/icu4c/source/common/uloc.cpp index da254a59566..ec4a30a6229 100644 --- a/icu4c/source/common/uloc.cpp +++ b/icu4c/source/common/uloc.cpp @@ -1492,7 +1492,7 @@ uloc_kw_countKeywords(UEnumeration *en, UErrorCode * /*status*/) { return result; } -static const char U_CALLCONV* +static const char * U_CALLCONV uloc_kw_nextKeyword(UEnumeration* en, int32_t* resultLength, UErrorCode* /*status*/) { diff --git a/icu4c/source/common/umutex.h b/icu4c/source/common/umutex.h index f1fc4bb5d9b..de512ff1166 100644 --- a/icu4c/source/common/umutex.h +++ b/icu4c/source/common/umutex.h @@ -231,7 +231,7 @@ struct UInitOnce { U_COMMON_API UBool U_EXPORT2 umtx_initImplPreInit(UInitOnce &); U_COMMON_API void U_EXPORT2 umtx_initImplPostInit(UInitOnce &); -template void umtx_initOnce(UInitOnce &uio, T *obj, void (T::*U_CALLCONV fp)()) { +template void umtx_initOnce(UInitOnce &uio, T *obj, void (U_CALLCONV T::*fp)()) { if (umtx_loadAcquire(uio.fState) == 2) { return; } @@ -244,7 +244,7 @@ template void umtx_initOnce(UInitOnce &uio, T *obj, void (T::*U_CALLCON // umtx_initOnce variant for plain functions, or static class functions. // No context parameter. -inline void umtx_initOnce(UInitOnce &uio, void (*U_CALLCONV fp)()) { +inline void umtx_initOnce(UInitOnce &uio, void (U_CALLCONV *fp)()) { if (umtx_loadAcquire(uio.fState) == 2) { return; } @@ -256,7 +256,7 @@ inline void umtx_initOnce(UInitOnce &uio, void (*U_CALLCONV fp)()) { // umtx_initOnce variant for plain functions, or static class functions. // With ErrorCode, No context parameter. -inline void umtx_initOnce(UInitOnce &uio, void (*U_CALLCONV fp)(UErrorCode &), UErrorCode &errCode) { +inline void umtx_initOnce(UInitOnce &uio, void (U_CALLCONV *fp)(UErrorCode &), UErrorCode &errCode) { if (U_FAILURE(errCode)) { return; } @@ -275,7 +275,7 @@ inline void umtx_initOnce(UInitOnce &uio, void (*U_CALLCONV fp)(UErrorCode &), U // umtx_initOnce variant for plain functions, or static class functions, // with a context parameter. -template void umtx_initOnce(UInitOnce &uio, void (*U_CALLCONV fp)(T), T context) { +template void umtx_initOnce(UInitOnce &uio, void (U_CALLCONV *fp)(T), T context) { if (umtx_loadAcquire(uio.fState) == 2) { return; } @@ -287,7 +287,7 @@ template void umtx_initOnce(UInitOnce &uio, void (*U_CALLCONV fp)(T), T // umtx_initOnce variant for plain functions, or static class functions, // with a context parameter and an error code. -template void umtx_initOnce(UInitOnce &uio, void (*U_CALLCONV fp)(T, UErrorCode &), T context, UErrorCode &errCode) { +template void umtx_initOnce(UInitOnce &uio, void (U_CALLCONV *fp)(T, UErrorCode &), T context, UErrorCode &errCode) { if (U_FAILURE(errCode)) { return; } diff --git a/icu4c/source/common/unicode/platform.h b/icu4c/source/common/unicode/platform.h index 157c951d046..b42bef83234 100644 --- a/icu4c/source/common/unicode/platform.h +++ b/icu4c/source/common/unicode/platform.h @@ -844,10 +844,10 @@ * When a function is a public ICU API, * you must use the U_CAPI and U_EXPORT2 qualifiers. * - * Please note, you need to use U_CALLCONV before the *. + * Please note, you need to use U_CALLCONV after the *. * - * YES: "static const char U_CALLCONV *func( . . . )" - * NO: "static const char* U_CALLCONV func( . . . )" + * NO : "static const char U_CALLCONV *func( . . . )" + * YES: "static const char* U_CALLCONV func( . . . )" * * @stable ICU 2.0 */ diff --git a/icu4c/source/common/uresbund.cpp b/icu4c/source/common/uresbund.cpp index 2e524eb07dd..b4393ef4cff 100644 --- a/icu4c/source/common/uresbund.cpp +++ b/icu4c/source/common/uresbund.cpp @@ -2408,7 +2408,7 @@ ures_loc_countLocales(UEnumeration *en, UErrorCode * /*status*/) { return ures_getSize(&ctx->installed); } -static const char U_CALLCONV * +static const char * U_CALLCONV ures_loc_nextLocale(UEnumeration* en, int32_t* resultLength, UErrorCode* status) { diff --git a/icu4c/source/i18n/ucol_res.cpp b/icu4c/source/i18n/ucol_res.cpp index b3774fd6417..314b766ee6d 100644 --- a/icu4c/source/i18n/ucol_res.cpp +++ b/icu4c/source/i18n/ucol_res.cpp @@ -78,9 +78,7 @@ ucol_res_cleanup() { return TRUE; } -U_CDECL_END - -U_CAPI void U_CALLCONV +void U_CALLCONV CollationLoader::loadRootRules(UErrorCode &errorCode) { if(U_FAILURE(errorCode)) { return; } rootBundle = ures_open(U_ICUDATA_COLL, kRootLocaleName, &errorCode); @@ -94,6 +92,8 @@ CollationLoader::loadRootRules(UErrorCode &errorCode) { ucln_i18n_registerCleanup(UCLN_I18N_UCOL_RES, ucol_res_cleanup); } +U_CDECL_END + void CollationLoader::appendRootRules(UnicodeString &s) { UErrorCode errorCode = U_ZERO_ERROR;