+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
*******************************************************************************
*
*
*******************************************************************************
* file name: genmbcs.cpp
-* encoding: US-ASCII
+* encoding: UTF-8
* tab size: 8 (not used)
* indentation:4
*
};
/* 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