return -1;
}
-static uint32_t offsetTOCEntryCount(const UDataMemory *pData) {
+U_CDECL_BEGIN
+static uint32_t U_CALLCONV
+offsetTOCEntryCount(const UDataMemory *pData) {
int32_t retVal=0;
const UDataOffsetTOC *toc = (UDataOffsetTOC *)pData->toc;
if (toc != NULL) {
return retVal;
}
-static const DataHeader *
+static const DataHeader * U_CALLCONV
offsetTOCLookupFn(const UDataMemory *pData,
const char *tocEntryName,
int32_t *pLength,
}
-static uint32_t pointerTOCEntryCount(const UDataMemory *pData) {
+static uint32_t U_CALLCONV pointerTOCEntryCount(const UDataMemory *pData) {
const PointerTOC *toc = (PointerTOC *)pData->toc;
return (uint32_t)((toc != NULL) ? (toc->count) : 0);
}
-
-static const DataHeader *pointerTOCLookupFn(const UDataMemory *pData,
+static const DataHeader * U_CALLCONV pointerTOCLookupFn(const UDataMemory *pData,
const char *name,
int32_t *pLength,
UErrorCode *pErrorCode) {
return pData->pHeader;
}
}
+U_CDECL_END
+
static const commonDataFuncs CmnDFuncs = {offsetTOCLookupFn, offsetTOCEntryCount};
static const commonDataFuncs ToCPFuncs = {pointerTOCLookupFn, pointerTOCEntryCount};
} UConverterDataCompoundText;
/*********** Compound Text Converter Protos ***********/
-static void
+U_CDECL_BEGIN
+static void U_CALLCONV
_CompoundTextOpen(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode);
-static void
+static void U_CALLCONV
_CompoundTextClose(UConverter *converter);
-static void
+static void U_CALLCONV
_CompoundTextReset(UConverter *converter, UConverterResetChoice choice);
-static const char*
+static const char* U_CALLCONV
_CompoundTextgetName(const UConverter* cnv);
return state;
}
-static void
+static void U_CALLCONV
_CompoundTextOpen(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode){
cnv->extraInfo = uprv_malloc (sizeof (UConverterDataCompoundText));
if (cnv->extraInfo != NULL) {
}
-static void
+static void U_CALLCONV
_CompoundTextClose(UConverter *converter) {
UConverterDataCompoundText* myConverterData = (UConverterDataCompoundText*)(converter->extraInfo);
int32_t i;
}
}
-static void
+static void U_CALLCONV
_CompoundTextReset(UConverter *converter, UConverterResetChoice choice) {
(void)converter;
(void)choice;
}
-static const char*
+static const char* U_CALLCONV
_CompoundTextgetName(const UConverter* cnv){
(void)cnv;
return "x11-compound-text";
}
-static void
+static void U_CALLCONV
UConverter_fromUnicode_CompoundText_OFFSETS(UConverterFromUnicodeArgs* args, UErrorCode* err){
UConverter *cnv = args->converter;
uint8_t *target = (uint8_t *) args->target;
}
-static void
+static void U_CALLCONV
UConverter_toUnicode_CompoundText_OFFSETS(UConverterToUnicodeArgs *args,
UErrorCode* err){
const char *mySource = (char *) args->source;
args->source = mySource;
}
-static void
+static void U_CALLCONV
_CompoundText_GetUnicodeSet(const UConverter *cnv,
const USetAdder *sa,
UConverterUnicodeSet which,
sa->addRange(sa->set, 0x0020, 0x007F);
sa->addRange(sa->set, 0x00A0, 0x00FF);
}
+U_CDECL_END
static const UConverterImpl _CompoundTextImpl = {
NULL,
NULL
};
+
static const UConverterStaticData _CompoundTextStaticData = {
sizeof(UConverterStaticData),
"COMPOUND_TEXT",
}
UConverterDataLMBCS;
-static void _LMBCSClose(UConverter * _this);
+U_CDECL_BEGIN
+static void U_CALLCONV _LMBCSClose(UConverter * _this);
+U_CDECL_END
#define DECLARE_LMBCS_DATA(n) \
static const UConverterImpl _LMBCSImpl##n={\
optimization group. So, we put the common stuff into a worker function,
and set up another macro to stamp out the 12 open functions:*/
#define DEFINE_LMBCS_OPEN(n) \
-static void \
+static void U_CALLCONV \
_LMBCSOpen##n(UConverter* _this, UConverterLoadArgs* pArgs, UErrorCode* err) \
{ _LMBCSOpenWorker(_this, pArgs, err, n); }
}
}
-static void
+U_CDECL_BEGIN
+static void U_CALLCONV
_LMBCSClose(UConverter * _this)
{
if (_this->extraInfo != NULL)
UConverterDataLMBCS lmbcs;
} LMBCSClone;
-static UConverter *
+static UConverter * U_CALLCONV
_LMBCSSafeClone(const UConverter *cnv,
void *stackBuffer,
int32_t *pBufferSize,
/* The main Unicode to LMBCS conversion function */
-static void
+static void U_CALLCONV
_LMBCSFromUnicode(UConverterFromUnicodeArgs* args,
UErrorCode* err)
{
/* Return the Unicode representation for the current LMBCS character */
-static UChar32
+static UChar32 U_CALLCONV
_LMBCSGetNextUCharWorker(UConverterToUnicodeArgs* args,
UErrorCode* err)
{
/* The exported function that converts lmbcs to one or more
UChars - currently UTF-16
*/
-static void
+static void U_CALLCONV
_LMBCSToUnicodeWithOffsets(UConverterToUnicodeArgs* args,
UErrorCode* err)
{
DECLARE_LMBCS_DATA(18)
DECLARE_LMBCS_DATA(19)
+U_CDECL_END
+
#endif /* #if !UCONFIG_NO_LEGACY_CONVERSION */
UCNV_NEED_TO_WRITE_BOM=1
};
+U_CDECL_BEGIN
/*
* The UTF-16 toUnicode implementation is also used for the Java-specific
* "with BOM" variants of UTF-16BE and UTF-16LE.
*/
-static void
+static void U_CALLCONV
_UTF16ToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
UErrorCode *pErrorCode);
#endif
-static void
+static void U_CALLCONV
_UTF16BEFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv;
pArgs->offsets=offsets;
}
-static void
+static void U_CALLCONV
_UTF16BEToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv;
pArgs->offsets=offsets;
}
-static UChar32
+static UChar32 U_CALLCONV
_UTF16BEGetNextUChar(UConverterToUnicodeArgs *pArgs, UErrorCode *err) {
const uint8_t *s, *sourceLimit;
UChar32 c;
return c;
}
-static void
+static void U_CALLCONV
_UTF16BEReset(UConverter *cnv, UConverterResetChoice choice) {
if(choice<=UCNV_RESET_TO_UNICODE) {
/* reset toUnicode state */
}
}
-static void
+static void U_CALLCONV
_UTF16BEOpen(UConverter *cnv,
UConverterLoadArgs *pArgs,
UErrorCode *pErrorCode) {
}
}
-static const char *
+static const char * U_CALLCONV
_UTF16BEGetName(const UConverter *cnv) {
if(UCNV_GET_VERSION(cnv)==0) {
return "UTF-16BE";
return "UTF-16BE,version=1";
}
}
+U_CDECL_END
static const UConverterImpl _UTF16BEImpl={
UCNV_UTF16_BigEndian,
UCNV_IMMUTABLE_SHARED_DATA_INITIALIZER(&_UTF16BEStaticData, &_UTF16BEImpl);
/* UTF-16LE ----------------------------------------------------------------- */
-
-static void
+U_CDECL_BEGIN
+static void U_CALLCONV
_UTF16LEFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv;
pArgs->offsets=offsets;
}
-static void
+static void U_CALLCONV
_UTF16LEToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv;
pArgs->offsets=offsets;
}
-static UChar32
+static UChar32 U_CALLCONV
_UTF16LEGetNextUChar(UConverterToUnicodeArgs *pArgs, UErrorCode *err) {
const uint8_t *s, *sourceLimit;
UChar32 c;
return c;
}
-static void
+static void U_CALLCONV
_UTF16LEReset(UConverter *cnv, UConverterResetChoice choice) {
if(choice<=UCNV_RESET_TO_UNICODE) {
/* reset toUnicode state */
}
}
-static void
+static void U_CALLCONV
_UTF16LEOpen(UConverter *cnv,
UConverterLoadArgs *pArgs,
UErrorCode *pErrorCode) {
}
}
-static const char *
+static const char * U_CALLCONV
_UTF16LEGetName(const UConverter *cnv) {
if(UCNV_GET_VERSION(cnv)==0) {
return "UTF-16LE";
return "UTF-16LE,version=1";
}
}
+U_CDECL_END
static const UConverterImpl _UTF16LEImpl={
UCNV_UTF16_LittleEndian,
* - UTF-16BE,version=1 (Java "UnicodeBig" encoding) and
* UTF-16LE,version=1 (Java "UnicodeLittle" encoding) treat a reverse BOM as an error.
*/
-
-static void
+U_CDECL_BEGIN
+static void U_CALLCONV
_UTF16Reset(UConverter *cnv, UConverterResetChoice choice) {
if(choice<=UCNV_RESET_TO_UNICODE) {
/* reset toUnicode: state=0 */
cnv->fromUnicodeStatus=UCNV_NEED_TO_WRITE_BOM;
}
}
-
+U_CDECL_END
extern const UConverterSharedData _UTF16v2Data;
-
-static void
+U_CDECL_BEGIN
+static void U_CALLCONV
_UTF16Open(UConverter *cnv,
UConverterLoadArgs *pArgs,
UErrorCode *pErrorCode) {
}
}
-static const char *
+static const char * U_CALLCONV
_UTF16GetName(const UConverter *cnv) {
if(UCNV_GET_VERSION(cnv)==0) {
return "UTF-16";
return "UTF-16,version=2";
}
}
-
+U_CDECL_END
extern const UConverterSharedData _UTF16Data;
#define IS_UTF16BE(cnv) ((cnv)->sharedData==&_UTF16BEData)
#define IS_UTF16LE(cnv) ((cnv)->sharedData==&_UTF16LEData)
#define IS_UTF16(cnv) ((cnv)->sharedData==&_UTF16Data || (cnv)->sharedData==&_UTF16v2Data)
-static void
+U_CDECL_BEGIN
+static void U_CALLCONV
_UTF16ToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv=pArgs->converter;
cnv->mode=state;
}
-static UChar32
+static UChar32 U_CALLCONV
_UTF16GetNextUChar(UConverterToUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
switch(pArgs->converter->mode) {
return UCNV_GET_NEXT_UCHAR_USE_TO_U;
}
}
+U_CDECL_END
static const UConverterImpl _UTF16Impl = {
UCNV_UTF16,
};
/* UTF-32BE ----------------------------------------------------------------- */
-
-static void
+U_CDECL_BEGIN
+static void U_CALLCONV
T_UConverter_toUnicode_UTF32_BE(UConverterToUnicodeArgs * args,
UErrorCode * err)
{
args->source = (const char *) mySource;
}
-static void
+static void U_CALLCONV
T_UConverter_toUnicode_UTF32_BE_OFFSET_LOGIC(UConverterToUnicodeArgs * args,
UErrorCode * err)
{
args->offsets = myOffsets;
}
-static void
+static void U_CALLCONV
T_UConverter_fromUnicode_UTF32_BE(UConverterFromUnicodeArgs * args,
UErrorCode * err)
{
args->source = mySource;
}
-static void
+static void U_CALLCONV
T_UConverter_fromUnicode_UTF32_BE_OFFSET_LOGIC(UConverterFromUnicodeArgs * args,
UErrorCode * err)
{
args->offsets = myOffsets;
}
-static UChar32
+static UChar32 U_CALLCONV
T_UConverter_getNextUChar_UTF32_BE(UConverterToUnicodeArgs* args,
UErrorCode* err)
{
*err = U_ILLEGAL_CHAR_FOUND;
return 0xffff;
}
-
+U_CDECL_END
static const UConverterImpl _UTF32BEImpl = {
UCNV_UTF32_BigEndian,
UCNV_IMMUTABLE_SHARED_DATA_INITIALIZER(&_UTF32BEStaticData, &_UTF32BEImpl);
/* UTF-32LE ---------------------------------------------------------- */
-
-static void
+U_CDECL_BEGIN
+static void U_CALLCONV
T_UConverter_toUnicode_UTF32_LE(UConverterToUnicodeArgs * args,
UErrorCode * err)
{
args->source = (const char *) mySource;
}
-static void
+static void U_CALLCONV
T_UConverter_toUnicode_UTF32_LE_OFFSET_LOGIC(UConverterToUnicodeArgs * args,
UErrorCode * err)
{
args->offsets = myOffsets;
}
-static void
+static void U_CALLCONV
T_UConverter_fromUnicode_UTF32_LE(UConverterFromUnicodeArgs * args,
UErrorCode * err)
{
args->source = mySource;
}
-static void
+static void U_CALLCONV
T_UConverter_fromUnicode_UTF32_LE_OFFSET_LOGIC(UConverterFromUnicodeArgs * args,
UErrorCode * err)
{
args->offsets = myOffsets;
}
-static UChar32
+static UChar32 U_CALLCONV
T_UConverter_getNextUChar_UTF32_LE(UConverterToUnicodeArgs* args,
UErrorCode* err)
{
*err = U_ILLEGAL_CHAR_FOUND;
return 0xffff;
}
-
+U_CDECL_END
static const UConverterImpl _UTF32LEImpl = {
UCNV_UTF32_LittleEndian,
*
* On output, emit U+FEFF as the first code point.
*/
-
-static void
+U_CDECL_BEGIN
+static void U_CALLCONV
_UTF32Reset(UConverter *cnv, UConverterResetChoice choice) {
if(choice<=UCNV_RESET_TO_UNICODE) {
/* reset toUnicode: state=0 */
}
}
-static void
+static void U_CALLCONV
_UTF32Open(UConverter *cnv,
UConverterLoadArgs *pArgs,
UErrorCode *pErrorCode) {
static const char utf32BOM[8]={ 0, 0, (char)0xfe, (char)0xff, (char)0xff, (char)0xfe, 0, 0 };
-static void
+static void U_CALLCONV
_UTF32ToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv=pArgs->converter;
cnv->mode=state;
}
-static UChar32
+static UChar32 U_CALLCONV
_UTF32GetNextUChar(UConverterToUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
switch(pArgs->converter->mode) {
return UCNV_GET_NEXT_UCHAR_USE_TO_U;
}
}
-
+U_CDECL_END
static const UConverterImpl _UTF32Impl = {
UCNV_UTF32,
*
*/
-static void
+U_CDECL_BEGIN
+static void U_CALLCONV
_UTF7Reset(UConverter *cnv, UConverterResetChoice choice) {
if(choice<=UCNV_RESET_TO_UNICODE) {
/* reset toUnicode */
}
}
-static void
+static void U_CALLCONV
_UTF7Open(UConverter *cnv,
UConverterLoadArgs *pArgs,
UErrorCode *pErrorCode) {
}
}
-static void
+static void U_CALLCONV
_UTF7ToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv;
return;
}
-static void
+static void U_CALLCONV
_UTF7FromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv;
return;
}
-static const char *
+static const char * U_CALLCONV
_UTF7GetName(const UConverter *cnv) {
switch(cnv->fromUnicodeStatus>>28) {
case 1:
return "UTF-7";
}
}
+U_CDECL_END
static const UConverterImpl _UTF7Impl={
UCNV_UTF7,
* ignore bits 31..25
*/
-static void
+U_CDECL_BEGIN
+static void U_CALLCONV
_IMAPToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv;
return;
}
-static void
+static void U_CALLCONV
_IMAPFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv;
pArgs->offsets=offsets;
return;
}
+U_CDECL_END
static const UConverterImpl _IMAPImpl={
UCNV_IMAP_MAILBOX,
return (UBool)(cnv->sharedData == &_CESU8Data);
#endif
}
-
-static void ucnv_toUnicode_UTF8 (UConverterToUnicodeArgs * args,
+U_CDECL_BEGIN
+static void U_CALLCONV ucnv_toUnicode_UTF8 (UConverterToUnicodeArgs * args,
UErrorCode * err)
{
UConverter *cnv = args->converter;
args->source = (const char *) mySource;
}
-static void ucnv_toUnicode_UTF8_OFFSETS_LOGIC (UConverterToUnicodeArgs * args,
+static void U_CALLCONV ucnv_toUnicode_UTF8_OFFSETS_LOGIC (UConverterToUnicodeArgs * args,
UErrorCode * err)
{
UConverter *cnv = args->converter;
args->source = (const char *) mySource;
args->offsets = myOffsets;
}
+U_CDECL_END
-U_CFUNC void ucnv_fromUnicode_UTF8 (UConverterFromUnicodeArgs * args,
+U_CFUNC void U_CALLCONV ucnv_fromUnicode_UTF8 (UConverterFromUnicodeArgs * args,
UErrorCode * err)
{
UConverter *cnv = args->converter;
args->source = mySource;
}
-U_CFUNC void ucnv_fromUnicode_UTF8_OFFSETS_LOGIC (UConverterFromUnicodeArgs * args,
+U_CFUNC void U_CALLCONV ucnv_fromUnicode_UTF8_OFFSETS_LOGIC (UConverterFromUnicodeArgs * args,
UErrorCode * err)
{
UConverter *cnv = args->converter;
args->offsets = myOffsets;
}
-static UChar32 ucnv_getNextUChar_UTF8(UConverterToUnicodeArgs *args,
+U_CDECL_BEGIN
+static UChar32 U_CALLCONV ucnv_getNextUChar_UTF8(UConverterToUnicodeArgs *args,
UErrorCode *err) {
UConverter *cnv;
const uint8_t *sourceInitial;
*err = U_ILLEGAL_CHAR_FOUND;
return 0xffff;
}
+U_CDECL_END
/* UTF-8-from-UTF-8 conversion functions ------------------------------------ */
static const UChar32
utf8_offsets[7]={ 0, 0, 0x3080, 0xE2080, 0x3C82080 };
+U_CDECL_BEGIN
/* "Convert" UTF-8 to UTF-8: Validate and copy. Modified from ucnv_DBCSFromUTF8(). */
-static void
+static void U_CALLCONV
ucnv_UTF8FromUTF8(UConverterFromUnicodeArgs *pFromUArgs,
UConverterToUnicodeArgs *pToUArgs,
UErrorCode *pErrorCode) {
pFromUArgs->target=(char *)target;
}
+U_CDECL_END
+
/* UTF-8 converter data ----------------------------------------------------- */
static const UConverterImpl _UTF8Impl={
}UConverterDataHZ;
-
-static void
+U_CDECL_BEGIN
+static void U_CALLCONV
_HZOpen(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode){
UConverter *gbConverter;
if(pArgs->onlyTestIsLoadable) {
}
}
-static void
+static void U_CALLCONV
_HZClose(UConverter *cnv){
if(cnv->extraInfo != NULL) {
ucnv_close (((UConverterDataHZ *) (cnv->extraInfo))->gbConverter);
}
}
-static void
+static void U_CALLCONV
_HZReset(UConverter *cnv, UConverterResetChoice choice){
if(choice<=UCNV_RESET_TO_UNICODE) {
cnv->toUnicodeStatus = 0;
*/
-static void
+static void U_CALLCONV
UConverter_toUnicode_HZ_OFFSETS_LOGIC(UConverterToUnicodeArgs *args,
UErrorCode* err){
char tempBuf[2];
}
-static void
+static void U_CALLCONV
UConverter_fromUnicode_HZ_OFFSETS_LOGIC (UConverterFromUnicodeArgs * args,
UErrorCode * err){
const UChar *mySource = args->source;
myConverterData->isTargetUCharDBCS = isTargetUCharDBCS;
}
-static void
+static void U_CALLCONV
_HZ_WriteSub(UConverterFromUnicodeArgs *args, int32_t offsetIndex, UErrorCode *err) {
UConverter *cnv = args->converter;
UConverterDataHZ *convData=(UConverterDataHZ *) cnv->extraInfo;
};
-static UConverter *
+static UConverter * U_CALLCONV
_HZ_SafeClone(const UConverter *cnv,
void *stackBuffer,
int32_t *pBufferSize,
return &localClone->cnv;
}
-static void
+static void U_CALLCONV
_HZ_GetUnicodeSet(const UConverter *cnv,
const USetAdder *sa,
UConverterUnicodeSet which,
sa, which, UCNV_SET_FILTER_HZ,
pErrorCode);
}
-
+U_CDECL_END
static const UConverterImpl _HZImpl={
UCNV_HZ,
return (UBool)(pnjMap[c - 0xa00] >> 1);
}
}
-
-static void _ISCIIOpen(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode) {
+U_CDECL_BEGIN
+static void U_CALLCONV
+_ISCIIOpen(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode) {
if(pArgs->onlyTestIsLoadable) {
return;
}
}
}
-static void _ISCIIClose(UConverter *cnv) {
+static void U_CALLCONV
+_ISCIIClose(UConverter *cnv) {
if (cnv->extraInfo!=NULL) {
if (!cnv->isExtraLocal) {
uprv_free(cnv->extraInfo);
}
}
-static const char* _ISCIIgetName(const UConverter* cnv) {
+static const char* U_CALLCONV
+_ISCIIgetName(const UConverter* cnv) {
if (cnv->extraInfo) {
UConverterDataISCII* myData= (UConverterDataISCII*)cnv->extraInfo;
return myData->name;
return NULL;
}
-static void _ISCIIReset(UConverter *cnv, UConverterResetChoice choice) {
+static void U_CALLCONV
+_ISCIIReset(UConverter *cnv, UConverterResetChoice choice) {
UConverterDataISCII* data =(UConverterDataISCII *) (cnv->extraInfo);
if (choice<=UCNV_RESET_TO_UNICODE) {
cnv->toUnicodeStatus = missingCharMarker;
* Soft Halant :
* <HALANT> + <ZWJ>
*/
-
-static void UConverter_fromUnicode_ISCII_OFFSETS_LOGIC(
+static void U_CALLCONV
+UConverter_fromUnicode_ISCII_OFFSETS_LOGIC(
UConverterFromUnicodeArgs * args, UErrorCode * err) {
const UChar *source = args->source;
const UChar *sourceLimit = args->sourceLimit;
*
*/
-static void UConverter_toUnicode_ISCII_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, UErrorCode* err) {
+static void U_CALLCONV
+UConverter_toUnicode_ISCII_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, UErrorCode* err) {
const char *source = ( char *) args->source;
UChar *target = args->target;
const char *sourceLimit = args->sourceLimit;
UConverterDataISCII mydata;
};
-static UConverter *
+static UConverter * U_CALLCONV
_ISCII_SafeClone(const UConverter *cnv,
void *stackBuffer,
int32_t *pBufferSize,
return &localClone->cnv;
}
-static void
+static void U_CALLCONV
_ISCIIGetUnicodeSet(const UConverter *cnv,
const USetAdder *sa,
UConverterUnicodeSet which,
sa->add(sa->set, ZWNJ);
sa->add(sa->set, ZWJ);
}
-
+U_CDECL_END
static const UConverterImpl _ISCIIImpl={
UCNV_ISCII,
/* ISO 8859-1 --------------------------------------------------------------- */
/* This is a table-less and callback-less version of ucnv_MBCSSingleToBMPWithOffsets(). */
-static void
+U_CDECL_BEGIN
+static void U_CALLCONV
_Latin1ToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
const uint8_t *source;
}
/* This is a table-less and callback-less version of ucnv_MBCSSingleGetNextUChar(). */
-static UChar32
+static UChar32 U_CALLCONV
_Latin1GetNextUChar(UConverterToUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
const uint8_t *source=(const uint8_t *)pArgs->source;
}
/* This is a table-less version of ucnv_MBCSSingleFromBMPWithOffsets(). */
-static void
+static void U_CALLCONV
_Latin1FromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv;
}
/* Convert UTF-8 to Latin-1. Adapted from ucnv_SBCSFromUTF8(). */
-static void
+static void U_CALLCONV
ucnv_Latin1FromUTF8(UConverterFromUnicodeArgs *pFromUArgs,
UConverterToUnicodeArgs *pToUArgs,
UErrorCode *pErrorCode) {
pFromUArgs->target=(char *)target;
}
-static void
+static void U_CALLCONV
_Latin1GetUnicodeSet(const UConverter *cnv,
const USetAdder *sa,
UConverterUnicodeSet which,
(void)pErrorCode;
sa->addRange(sa->set, 0, 0xff);
}
+U_CDECL_END
+
static const UConverterImpl _Latin1Impl={
UCNV_LATIN_1,
/* US-ASCII ----------------------------------------------------------------- */
+U_CDECL_BEGIN
/* This is a table-less version of ucnv_MBCSSingleToBMPWithOffsets(). */
-static void
+static void U_CALLCONV
_ASCIIToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
const uint8_t *source, *sourceLimit;
}
/* This is a table-less version of ucnv_MBCSSingleGetNextUChar(). */
-static UChar32
+static UChar32 U_CALLCONV
_ASCIIGetNextUChar(UConverterToUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
const uint8_t *source;
}
/* "Convert" UTF-8 to US-ASCII: Validate and copy. */
-static void
+static void U_CALLCONV
ucnv_ASCIIFromUTF8(UConverterFromUnicodeArgs *pFromUArgs,
UConverterToUnicodeArgs *pToUArgs,
UErrorCode *pErrorCode) {
pFromUArgs->target=(char *)target;
}
-static void
+static void U_CALLCONV
_ASCIIGetUnicodeSet(const UConverter *cnv,
const USetAdder *sa,
UConverterUnicodeSet which,
(void)pErrorCode;
sa->addRange(sa->set, 0, 0x7f);
}
+U_CDECL_END
static const UConverterImpl _ASCIIImpl={
UCNV_US_ASCII,
};
/* SCSU setup functions ----------------------------------------------------- */
-
-static void
+U_CDECL_BEGIN
+static void U_CALLCONV
_SCSUReset(UConverter *cnv, UConverterResetChoice choice) {
SCSUData *scsu=(SCSUData *)cnv->extraInfo;
}
}
-static void
+static void U_CALLCONV
_SCSUOpen(UConverter *cnv,
UConverterLoadArgs *pArgs,
UErrorCode *pErrorCode) {
cnv->subCharLen=-1;
}
-static void
+static void U_CALLCONV
_SCSUClose(UConverter *cnv) {
if(cnv->extraInfo!=NULL) {
if(!cnv->isExtraLocal) {
/* SCSU-to-Unicode conversion functions ------------------------------------- */
-static void
+static void U_CALLCONV
_SCSUToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv;
* re-copy the original function and remove the variables
* offsets, sourceIndex, and nextSourceIndex.
*/
-static void
+static void U_CALLCONV
_SCSUToUnicode(UConverterToUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv;
pArgs->target=target;
return;
}
-
+U_CDECL_END
/* SCSU-from-Unicode conversion functions ----------------------------------- */
/*
return -1;
}
}
-
+U_CDECL_BEGIN
/*
* Idea for compression:
* - save SCSUData and other state before really starting work
* - Only replace the result after an SDX or SCU?
*/
-static void
+static void U_CALLCONV
_SCSUFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv;
* re-copy the original function and remove the variables
* offsets, sourceIndex, and nextSourceIndex.
*/
-static void
+static void U_CALLCONV
_SCSUFromUnicode(UConverterFromUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv;
/* miscellaneous ------------------------------------------------------------ */
-static const char *
+static const char * U_CALLCONV
_SCSUGetName(const UConverter *cnv) {
SCSUData *scsu=(SCSUData *)cnv->extraInfo;
SCSUData mydata;
};
-static UConverter *
+static UConverter * U_CALLCONV
_SCSUSafeClone(const UConverter *cnv,
void *stackBuffer,
int32_t *pBufferSize,
return &localClone->cnv;
}
-
+U_CDECL_END
static const UConverterImpl _SCSUImpl={
UCNV_SCSU,
# NOCSECT might be used as an optimization option.
# -+ means accept any file extension as a C++ file. By default only .C is accepted.
CFLAGS += -Wc,DLL,ROS,RENT,'ARCH(7)','LOC(POSIX)',NOANSIALIAS,'LANGLVL(EXTENDED)' $(ICU_IEEE)
-CXXFLAGS += -Wc,DLL,ROS,RTTI,'ARCH(7)','LOC(POSIX)',NOANSIALIAS,'LANGLVL(EXTENDED)' $(ICU_IEEE) -+
+CXXFLAGS += -Wc,DLL,ROS,RTTI,'ARCH(7)','LOC(POSIX)',NOANSIALIAS,'LANGLVL(EXTENDED0X)' $(ICU_IEEE) -+
ARFLAGS = -cr
# _MSE_PROTOS usually interacts with _XOPEN_SOURCE. It affects some standard
// for formatting
if (U_SUCCESS(status)) {
- if (number == INT64_MIN) {
+ if (number == U_INT64_MIN) {
// We can't handle this value right now. Provide an accurate default value.
// TODO this section should probably be optimized. The DecimalFormat is shared in ICU4J.
static char *
allocString(uint32_t length);
+U_CDECL_BEGIN
static int
compareFiles(const void *file1, const void *file2);
+U_CDECL_END
static char *
pathToFullPath(const char *path, const char *source);
return fullPath;
}
+U_CDECL_BEGIN
static int
compareFiles(const void *file1, const void *file2) {
/* sort by basename */
return uprv_strcmp(((File *)file1)->basename, ((File *)file2)->basename);
}
+U_CDECL_END
static void
fixDirToTreePath(char *s)
/* compare the flags */
return l->f-r->f;
}
-
+U_CDECL_BEGIN
/* sorting by Unicode first sorts mappings directly */
-static int32_t
+static int32_t U_CALLCONV
compareMappingsUnicodeFirst(const void *context, const void *left, const void *right) {
return compareMappings(
(UCMTable *)context, (const UCMapping *)left,
}
/* sorting by bytes first sorts the reverseMap; use indirection to mappings */
-static int32_t
+static int32_t U_CALLCONV
compareMappingsBytesFirst(const void *context, const void *left, const void *right) {
UCMTable *table=(UCMTable *)context;
int32_t l=*(const int32_t *)left, r=*(const int32_t *)right;
table, table->mappings+l,
table, table->mappings+r, FALSE);
}
+U_CDECL_END
U_CAPI void U_EXPORT2
ucm_sortTable(UCMTable *t) {
}
}
-static int32_t
+U_CDECL_BEGIN
+static int32_t U_CALLCONV
compareFallbacks(const void *context, const void *fb1, const void *fb2) {
(void)context;
return ((const _MBCSToUFallback *)fb1)->offset-((const _MBCSToUFallback *)fb2)->offset;
}
+U_CDECL_END
U_CAPI void U_EXPORT2
ucm_optimizeStates(UCMStates *states,