U_STABLE void U_EXPORT2
u_cleanup(void);
-
+U_CDECL_BEGIN
/**
* Pointer type for a user supplied memory allocation function.
* @param context user supplied value, obtained from from u_setMemoryFunctions().
* @system
*/
U_STABLE void U_EXPORT2
-u_setMemoryFunctions(const void *context, UMemAllocFn *a, UMemReallocFn *r, UMemFreeFn *f,
+u_setMemoryFunctions(const void *context, UMemAllocFn * U_CALLCONV a, UMemReallocFn * U_CALLCONV r, UMemFreeFn * U_CALLCONV f,
UErrorCode *status);
+U_CDECL_END
#ifndef U_HIDE_DEPRECATED_API
/*********************************************************************************
*/
typedef void *UMTX;
+U_CDECL_BEGIN
/**
* Function Pointer type for a user supplied mutex initialization function.
* The user-supplied function will be called by ICU whenever ICU needs to create a
* @system
*/
typedef void U_CALLCONV UMtxFn (const void *context, UMTX *mutex);
-
+U_CDECL_END
/**
* Set the functions that ICU will use for mutex operations
};
/* prototypes */
+U_CDECL_BEGIN
static void
MBCSClose(NewConverter *cnvData);
static uint32_t
MBCSWrite(NewConverter *cnvData, const UConverterStaticData *staticData,
UNewDataMemory *pData, int32_t tableType);
+U_CDECL_END
/* helper ------------------------------------------------------------------- */
static MBCSData gDummy;
+
U_CFUNC const MBCSData *
MBCSGetDummy() {
uprv_memset(&gDummy, 0, sizeof(MBCSData));
mbcsData->newConverter.write=MBCSWrite;
}
-NewConverter *
+U_CFUNC NewConverter *
MBCSOpen(UCMFile *ucm) {
MBCSData *mbcsData=(MBCSData *)uprv_malloc(sizeof(MBCSData));
if(mbcsData==NULL) {
uprv_free(mbcsData->fromUBytes);
}
+U_CDECL_BEGIN
static void
MBCSClose(NewConverter *cnvData) {
MBCSData *mbcsData=(MBCSData *)cnvData;
uprv_free(mbcsData);
}
}
+U_CDECL_END
static UBool
MBCSStartMappings(MBCSData *mbcsData) {
}
}
+U_CDECL_BEGIN
/* is this byte sequence valid? (this is almost the same as MBCSAddToUnicode()) */
static UBool
MBCSIsValid(NewConverter *cnvData,
return (UBool)(1==ucm_countChars(&mbcsData->ucm->states, bytes, length));
}
-
+U_CDECL_END
static UBool
MBCSSingleAddFromUnicode(MBCSData *mbcsData,
const uint8_t *bytes, int32_t /*length*/,
return TRUE;
}
+U_CDECL_BEGIN
/* we can assume that the table only contains 1:1 mappings with <=4 bytes each */
static UBool
MBCSAddTable(NewConverter *cnvData, UCMTable *table, UConverterStaticData *staticData) {
return isOK;
}
-
+U_CDECL_END
static UBool
transformEUC(MBCSData *mbcsData) {
uint8_t *p8;
}
}
+U_CDECL_BEGIN
static uint32_t
MBCSWrite(NewConverter *cnvData, const UConverterStaticData *staticData,
UNewDataMemory *pData, int32_t tableType) {
/* return the number of bytes that should have been written */
return top;
}
+U_CDECL_END
struct NewConverter;
typedef struct NewConverter NewConverter;
+U_CDECL_BEGIN
struct NewConverter {
void
- (*close)(NewConverter *cnvData);
+ (* U_CALLCONV close)(NewConverter *cnvData);
/** is this byte sequence valid? */
UBool
- (*isValid)(NewConverter *cnvData,
+ (* U_CALLCONV isValid)(NewConverter *cnvData,
const uint8_t *bytes, int32_t length);
UBool
- (*addTable)(NewConverter *cnvData, UCMTable *table, UConverterStaticData *staticData);
+ (* U_CALLCONV addTable)(NewConverter *cnvData, UCMTable *table, UConverterStaticData *staticData);
uint32_t
- (*write)(NewConverter *cnvData, const UConverterStaticData *staticData,
+ (* U_CALLCONV write)(NewConverter *cnvData, const UConverterStaticData *staticData,
UNewDataMemory *pData, int32_t tableType);
};
-
+U_CDECL_END
#endif /* __MAKECONV_H__ */