ICU-1947 Better usage for U_EXPORT2 and U_CALLCONV

X-SVN-Rev: 9295
This commit is contained in:
George Rhoten 2002-07-23 23:01:08 +00:00
parent 475af1aae9
commit 7e92471c93
19 changed files with 43 additions and 41 deletions

View file

@ -65,7 +65,7 @@ getFoldingPropsOffset(uint32_t data) {
}
}
static UBool
static UBool U_CALLCONV
isAcceptable(void *context,
const char *type, const char *name,
const UDataInfo *pInfo) {

View file

@ -142,7 +142,7 @@ U_CAPI UBool U_EXPORT2 ucnv_cleanup(void) {
return (SHARED_DATA_HASHTABLE == NULL);
}
static UBool
static UBool U_CALLCONV
isCnvAcceptable(void *context,
const char *type, const char *name,
const UDataInfo *pInfo) {

View file

@ -179,7 +179,7 @@ static const char *defaultConverterName = NULL;
#define GET_STRING(idx) (const char *)(stringTable + (idx))
#define NUM_RESERVED_TAGS 2
static UBool
static UBool U_CALLCONV
isAcceptable(void *context,
const char *type, const char *name,
const UDataInfo *pInfo) {

View file

@ -68,7 +68,7 @@ static UCharNames *uCharNames=NULL;
static UBool
isDataLoaded(UErrorCode *pErrorCode);
static UBool
static UBool U_CALLCONV
isAcceptable(void *context,
const char *type, const char *name,
const UDataInfo *pInfo);
@ -465,7 +465,7 @@ isDataLoaded(UErrorCode *pErrorCode) {
return TRUE;
}
static UBool
static UBool U_CALLCONV
isAcceptable(void *context,
const char *type, const char *name,
const UDataInfo *pInfo) {

View file

@ -751,7 +751,7 @@ u_unescape(const char *src,
* @stable
*/
U_CDECL_BEGIN
typedef UChar (*UNESCAPE_CHAR_AT)(int32_t offset, void *context);
typedef UChar (U_CALLCONV *UNESCAPE_CHAR_AT)(int32_t offset, void *context);
U_CDECL_END
/**

View file

@ -178,7 +178,7 @@ _res_findTableIndex(const Resource *pRoot, const Resource res, const char *key)
/* helper for res_load() ---------------------------------------------------- */
static UBool
static UBool U_CALLCONV
isAcceptable(void *context,
const char *type, const char *name,
const UDataInfo *pInfo) {

View file

@ -1091,7 +1091,8 @@ u_unescapeAt(UNESCAPE_CHAR_AT charAt,
}
/* u_unescapeAt() callback to return a UChar from a char* */
static UChar _charPtr_charAt(int32_t offset, void *context) {
static UChar U_CALLCONV
_charPtr_charAt(int32_t offset, void *context) {
UChar c16;
/* It would be more efficient to access the invariant tables
* directly but there is no API for that. */

View file

@ -26,7 +26,7 @@
/* The global cache */
UHashtable *gLocaleCache = NULL;
static U_EXPORT2 void U_CALLCONV
static void U_CALLCONV
hash_freeBundle(void* obj)
{
u_locbund_delete((ULocaleBundle *)obj);

View file

@ -536,7 +536,8 @@ u_fgetc(UFILE *f)
}
/* u_unescapeAt() callback to return a UChar from a UFILE */
static UChar _charAt(int32_t offset, void *context) {
static UChar U_CALLCONV
_charAt(int32_t offset, void *context) {
return ((UFILE*) context)->fUCPos[offset];
}

View file

@ -506,7 +506,7 @@ void ucol_uprv_tok_initData() {
}
}
const UChar *
U_CAPI const UChar * U_EXPORT2
ucol_tok_getNextArgument(const UChar *start, const UChar *end,
UColAttribute *attrib, UColAttributeValue *value,
UErrorCode *status) {

View file

@ -554,7 +554,7 @@ static void TestIdentifier()
* Then it should check that the areas contain all the same properties except where overridden.
* For this, it would have had to set a flag for which code points were listed explicitly.
*/
static void
static void U_CALLCONV
unicodeDataLineFn(void *context,
char *fields[][2], int32_t fieldCount,
UErrorCode *pErrorCode)

View file

@ -3102,7 +3102,7 @@ static void TestConv(const uint16_t in[],int len, const char* conv, const char*
free(cBuf);
free(offsets);
}
static UChar
static UChar U_CALLCONV
_charAt(int32_t offset, void *context) {
return ((char*)context)[offset];
}

View file

@ -355,7 +355,7 @@ cleanupAndReturn:
}
static UBool
static UBool U_CALLCONV
isAcceptable1(void *context,
const char *type, const char *name,
const UDataInfo *pInfo) {
@ -387,7 +387,7 @@ isAcceptable1(void *context,
}
}
static UBool
static UBool U_CALLCONV
isAcceptable2(void *context,
const char *type, const char *name,
const UDataInfo *pInfo){
@ -411,7 +411,7 @@ isAcceptable2(void *context,
}
static UBool
static UBool U_CALLCONV
isAcceptable3(void *context,
const char *type, const char *name,
const UDataInfo *pInfo){
@ -483,7 +483,7 @@ static void TestUDataOpenChoiceDemo1() {
}
}
static UBool
static UBool U_CALLCONV
isAcceptable(void *context,
const char *type, const char *name,
const UDataInfo *pInfo){

View file

@ -483,7 +483,7 @@ void doBinarySearch()
if (opt_strcmp || opt_strcmpCPO)
{
unsigned long startTime = timeGetTime();
typedef int32_t (*PF)(const UChar *, const UChar *);
typedef int32_t (U_EXPORT2 *PF)(const UChar *, const UChar *);
PF pf = u_strcmp;
if (opt_strcmpCPO) {pf = u_strcmpCodePointOrder;}
if (opt_strcmp && opt_win) {pf = (PF)wcscmp;} // Damn the difference between int32_t and int

View file

@ -354,7 +354,7 @@ init() {
/* parsing ------------------------------------------------------------------ */
static void
static void U_CALLCONV
lineFn(void *context,
char *fields[][2], int32_t fieldCount,
UErrorCode *pErrorCode) {

View file

@ -183,7 +183,7 @@ main(int argc, char* argv[]) {
/* parser for DerivedNormalizationProperties.txt ---------------------------- */
static void
static void U_CALLCONV
derivedNormalizationPropertiesLineFn(void *context,
char *fields[][2], int32_t fieldCount,
UErrorCode *pErrorCode) {
@ -281,7 +281,7 @@ parseDerivedNormalizationProperties(const char *filename, UErrorCode *pErrorCode
/* parser for UnicodeData.txt ----------------------------------------------- */
static void
static void U_CALLCONV
unicodeDataLineFn(void *context,
char *fields[][2], int32_t fieldCount,
UErrorCode *pErrorCode) {

View file

@ -239,7 +239,7 @@ getTokenIndex(const char *const tokens[], int32_t countTokens, const char *s) {
static uint32_t mirrorMappings[MAX_MIRROR_COUNT][2];
static int32_t mirrorCount=0;
static void
static void U_CALLCONV
mirrorLineFn(void *context,
char *fields[][2], int32_t fieldCount,
UErrorCode *pErrorCode) {
@ -295,7 +295,7 @@ parseBidiMirroring(const char *filename, UErrorCode *pErrorCode) {
static SpecialCasing specialCasings[MAX_SPECIAL_CASING_COUNT];
static int32_t specialCasingCount=0;
static void
static void U_CALLCONV
specialCasingLineFn(void *context,
char *fields[][2], int32_t fieldCount,
UErrorCode *pErrorCode) {
@ -390,7 +390,7 @@ parseSpecialCasing(const char *filename, UErrorCode *pErrorCode) {
static CaseFolding caseFoldings[MAX_CASE_FOLDING_COUNT];
static int32_t caseFoldingCount=0;
static void
static void U_CALLCONV
caseFoldingLineFn(void *context,
char *fields[][2], int32_t fieldCount,
UErrorCode *pErrorCode) {
@ -546,7 +546,7 @@ static struct {
static int32_t unicodeAreaIndex=0, mirrorIndex=0, specialCasingIndex=0, caseFoldingIndex=0;
static void
static void U_CALLCONV
unicodeDataLineFn(void *context,
char *fields[][2], int32_t fieldCount,
UErrorCode *pErrorCode) {

View file

@ -52,37 +52,37 @@ parseArabicShaping(char *filename, char *basename,
const char *suffix,
UErrorCode *pErrorCode);
static void
static void U_CALLCONV
ageLineFn(void *context,
char *fields[][2], int32_t fieldCount,
UErrorCode *pErrorCode);
static void
static void U_CALLCONV
scriptsLineFn(void *context,
char *fields[][2], int32_t fieldCount,
UErrorCode *pErrorCode);
static void
static void U_CALLCONV
blocksLineFn(void *context,
char *fields[][2], int32_t fieldCount,
UErrorCode *pErrorCode);
static void
static void U_CALLCONV
propListLineFn(void *context,
char *fields[][2], int32_t fieldCount,
UErrorCode *pErrorCode);
static void
static void U_CALLCONV
derivedPropListLineFn(void *context,
char *fields[][2], int32_t fieldCount,
UErrorCode *pErrorCode);
static void
static void U_CALLCONV
eaWidthLineFn(void *context,
char *fields[][2], int32_t fieldCount,
UErrorCode *pErrorCode);
static void
static void U_CALLCONV
lineBreakLineFn(void *context,
char *fields[][2], int32_t fieldCount,
UErrorCode *pErrorCode);
@ -191,7 +191,7 @@ parseTwoFieldFile(char *filename, char *basename,
/* DerivedAge.txt ----------------------------------------------------------- */
static void
static void U_CALLCONV
ageLineFn(void *context,
char *fields[][2], int32_t fieldCount,
UErrorCode *pErrorCode) {
@ -235,7 +235,7 @@ ageLineFn(void *context,
/* Scripts.txt -------------------------------------------------------------- */
static void
static void U_CALLCONV
scriptsLineFn(void *context,
char *fields[][2], int32_t fieldCount,
UErrorCode *pErrorCode) {
@ -394,7 +394,7 @@ blockNames[UBLOCK_COUNT]={
"Supplementary Private Use Area-B" /* 110 */
};
static void
static void U_CALLCONV
blocksLineFn(void *context,
char *fields[][2], int32_t fieldCount,
UErrorCode *pErrorCode) {
@ -471,7 +471,7 @@ propListNames[]={
"Logical_Order_Exception"
};
static void
static void U_CALLCONV
propListLineFn(void *context,
char *fields[][2], int32_t fieldCount,
UErrorCode *pErrorCode) {
@ -509,7 +509,7 @@ derivedPropListNames[]={
"XID_Continue"
};
static void
static void U_CALLCONV
derivedPropListLineFn(void *context,
char *fields[][2], int32_t fieldCount,
UErrorCode *pErrorCode) {
@ -547,7 +547,7 @@ eaNames[U_EA_COUNT]={
"W" /* Wide, default for plane 2 */
};
static void
static void U_CALLCONV
eaWidthLineFn(void *context,
char *fields[][2], int32_t fieldCount,
UErrorCode *pErrorCode) {
@ -619,7 +619,7 @@ lbNames[U_LB_COUNT]={
"ZW"
};
static void
static void U_CALLCONV
lineBreakLineFn(void *context,
char *fields[][2], int32_t fieldCount,
UErrorCode *pErrorCode) {
@ -715,7 +715,7 @@ jgNames[U_JG_COUNT]={
"ZAIN"
};
static void
static void U_CALLCONV
arabicShapingLineFn(void *context,
char *fields[][2], int32_t fieldCount,
UErrorCode *pErrorCode) {

View file

@ -259,7 +259,7 @@ ucbuf_getc(UCHARBUF* buf,UErrorCode* err){
/* u_unescapeAt() callback to return a UChar*/
static UChar
static UChar U_CALLCONV
_charAt(int32_t offset, void *context) {
return ((UCHARBUF*) context)->currentPos[offset];
}