ICU-1087 Add static keyword to the local variables and functions
X-SVN-Rev: 5707
This commit is contained in:
parent
fee8fb8162
commit
1451cc22bd
@ -368,7 +368,7 @@ static const UConverterImpl _ISO2022Impl={
|
||||
_ISO_2022_WriteSub,
|
||||
_ISO_2022_SafeClone
|
||||
};
|
||||
const UConverterStaticData _ISO2022StaticData={
|
||||
static const UConverterStaticData _ISO2022StaticData={
|
||||
sizeof(UConverterStaticData),
|
||||
"ISO_2022",
|
||||
2022,
|
||||
@ -417,7 +417,7 @@ static const UConverterImpl _ISO2022JPImpl={
|
||||
_ISO_2022_WriteSub,
|
||||
_ISO_2022_SafeClone
|
||||
};
|
||||
const UConverterStaticData _ISO2022JPStaticData={
|
||||
static const UConverterStaticData _ISO2022JPStaticData={
|
||||
sizeof(UConverterStaticData),
|
||||
"ISO_2022_JP",
|
||||
0,
|
||||
@ -466,7 +466,7 @@ static const UConverterImpl _ISO2022KRImpl={
|
||||
_ISO_2022_WriteSub,
|
||||
_ISO_2022_SafeClone
|
||||
};
|
||||
const UConverterStaticData _ISO2022KRStaticData={
|
||||
static const UConverterStaticData _ISO2022KRStaticData={
|
||||
sizeof(UConverterStaticData),
|
||||
"ISO_2022_KR",
|
||||
0,
|
||||
@ -516,7 +516,7 @@ static const UConverterImpl _ISO2022CNImpl={
|
||||
_ISO_2022_WriteSub,
|
||||
_ISO_2022_SafeClone
|
||||
};
|
||||
const UConverterStaticData _ISO2022CNStaticData={
|
||||
static const UConverterStaticData _ISO2022CNStaticData={
|
||||
sizeof(UConverterStaticData),
|
||||
"ISO_2022_CN",
|
||||
0,
|
||||
|
@ -41,55 +41,6 @@ U_CFUNC void T_UConverter_fromUnicode_UTF8_OFFSETS_LOGIC(UConverterFromUnicodeAr
|
||||
U_CFUNC UChar32 T_UConverter_getNextUChar_UTF8(UConverterToUnicodeArgs *args,
|
||||
UErrorCode *err);
|
||||
|
||||
U_CFUNC void _UTF16PEToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
|
||||
UErrorCode *pErrorCode);
|
||||
U_CFUNC void _UTF16PEFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
|
||||
UErrorCode *pErrorCode);
|
||||
U_CFUNC void _UTF16OEToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
|
||||
UErrorCode *pErrorCode);
|
||||
U_CFUNC void _UTF16OEFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
|
||||
UErrorCode *pErrorCode);
|
||||
U_CFUNC UChar32 T_UConverter_getNextUChar_UTF16_BE(UConverterToUnicodeArgs* args,
|
||||
UErrorCode* err);
|
||||
U_CFUNC UChar32 T_UConverter_getNextUChar_UTF16_LE(UConverterToUnicodeArgs* args,
|
||||
UErrorCode* err);
|
||||
|
||||
U_CFUNC void T_UConverter_toUnicode_UTF32_BE(UConverterToUnicodeArgs *args,
|
||||
UErrorCode *err);
|
||||
U_CFUNC void T_UConverter_toUnicode_UTF32_BE_OFFSET_LOGIC(UConverterToUnicodeArgs *args,
|
||||
UErrorCode *err);
|
||||
U_CFUNC void T_UConverter_fromUnicode_UTF32_BE(UConverterFromUnicodeArgs *args,
|
||||
UErrorCode *err);
|
||||
U_CFUNC void T_UConverter_fromUnicode_UTF32_BE_OFFSET_LOGIC(UConverterFromUnicodeArgs *args,
|
||||
UErrorCode *err);
|
||||
U_CFUNC UChar32 T_UConverter_getNextUChar_UTF32_BE(UConverterToUnicodeArgs *args,
|
||||
UErrorCode *err);
|
||||
|
||||
U_CFUNC void T_UConverter_toUnicode_UTF32_LE(UConverterToUnicodeArgs *args,
|
||||
UErrorCode *err);
|
||||
U_CFUNC void T_UConverter_toUnicode_UTF32_LE_OFFSET_LOGIC(UConverterToUnicodeArgs *args,
|
||||
UErrorCode *err);
|
||||
U_CFUNC void T_UConverter_fromUnicode_UTF32_LE(UConverterFromUnicodeArgs *args,
|
||||
UErrorCode *err);
|
||||
U_CFUNC void T_UConverter_fromUnicode_UTF32_LE_OFFSET_LOGIC(UConverterFromUnicodeArgs *args,
|
||||
UErrorCode *err);
|
||||
U_CFUNC UChar32 T_UConverter_getNextUChar_UTF32_LE(UConverterToUnicodeArgs *args,
|
||||
UErrorCode *err);
|
||||
|
||||
U_CFUNC void _UTF7Reset(UConverter *cnv, UConverterResetChoice choice);
|
||||
U_CFUNC void _UTF7Open(UConverter *cnv,
|
||||
const char *name,
|
||||
const char *locale,
|
||||
uint32_t options,
|
||||
UErrorCode *pErrorCode);
|
||||
U_CFUNC void _UTF7ToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
|
||||
UErrorCode *pErrorCode);
|
||||
U_CFUNC UChar32 _UTF7GetNextUChar(UConverterToUnicodeArgs *pArgs,
|
||||
UErrorCode *pErrorCode);
|
||||
U_CFUNC void _UTF7FromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
|
||||
UErrorCode *pErrorCode);
|
||||
U_CFUNC const char * _UTF7GetName(const UConverter *cnv);
|
||||
|
||||
|
||||
/* UTF-8 -------------------------------------------------------------------- */
|
||||
|
||||
@ -849,7 +800,7 @@ static const UConverterImpl _UTF8Impl={
|
||||
};
|
||||
|
||||
/* Todo: verify that UTF-8 == (ccsid (ibm-codepage) 1208) for unicode version 2.0 and 3.0 */
|
||||
const UConverterStaticData _UTF8StaticData={
|
||||
static const UConverterStaticData _UTF8StaticData={
|
||||
sizeof(UConverterStaticData),
|
||||
"UTF8",
|
||||
1208, UCNV_IBM, UCNV_UTF8, 1, 4,
|
||||
@ -868,7 +819,7 @@ const UConverterSharedData _UTF8Data={
|
||||
|
||||
/* UTF-16 Platform Endian --------------------------------------------------- */
|
||||
|
||||
U_CFUNC void
|
||||
static void
|
||||
_UTF16PEToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
|
||||
UErrorCode *pErrorCode) {
|
||||
UConverter *cnv = pArgs->converter;
|
||||
@ -949,7 +900,7 @@ _UTF16PEToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
|
||||
pArgs->offsets = offsets;
|
||||
}
|
||||
|
||||
U_CFUNC void
|
||||
static void
|
||||
_UTF16PEFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
|
||||
UErrorCode *pErrorCode) {
|
||||
UConverter *cnv = pArgs->converter;
|
||||
@ -1029,7 +980,7 @@ _UTF16PEFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
|
||||
* and copy two bytes at a time and reverse them.
|
||||
*/
|
||||
|
||||
U_CFUNC void
|
||||
static void
|
||||
_UTF16OEToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
|
||||
UErrorCode *pErrorCode) {
|
||||
UConverter *cnv = pArgs->converter;
|
||||
@ -1119,7 +1070,7 @@ _UTF16OEToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
|
||||
pArgs->offsets = offsets;
|
||||
}
|
||||
|
||||
U_CFUNC void
|
||||
static void
|
||||
_UTF16OEFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
|
||||
UErrorCode *pErrorCode) {
|
||||
UConverter *cnv = pArgs->converter;
|
||||
@ -1203,7 +1154,7 @@ _UTF16OEFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
|
||||
|
||||
/* UTF-16BE ----------------------------------------------------------------- */
|
||||
|
||||
U_CFUNC UChar32 T_UConverter_getNextUChar_UTF16_BE(UConverterToUnicodeArgs* args,
|
||||
static UChar32 T_UConverter_getNextUChar_UTF16_BE(UConverterToUnicodeArgs* args,
|
||||
UErrorCode* err)
|
||||
{
|
||||
UChar32 myUChar;
|
||||
@ -1279,7 +1230,7 @@ static const UConverterImpl _UTF16BEImpl={
|
||||
};
|
||||
|
||||
/* Todo: verify that UTF-16BE == (ccsid (ibm-codepage) 1200) for unicode version 2.0 and 3.0 */
|
||||
const UConverterStaticData _UTF16BEStaticData={
|
||||
static const UConverterStaticData _UTF16BEStaticData={
|
||||
sizeof(UConverterStaticData),
|
||||
"UTF16_BigEndian",
|
||||
1200, UCNV_IBM, UCNV_UTF16_BigEndian, 2, 2,
|
||||
@ -1298,7 +1249,7 @@ const UConverterSharedData _UTF16BEData={
|
||||
|
||||
/* UTF-16LE ----------------------------------------------------------------- */
|
||||
|
||||
U_CFUNC UChar32 T_UConverter_getNextUChar_UTF16_LE(UConverterToUnicodeArgs* args,
|
||||
static UChar32 T_UConverter_getNextUChar_UTF16_LE(UConverterToUnicodeArgs* args,
|
||||
UErrorCode* err)
|
||||
{
|
||||
UChar32 myUChar;
|
||||
@ -1380,7 +1331,7 @@ static const UConverterImpl _UTF16LEImpl={
|
||||
|
||||
|
||||
/* Todo: verify that UTF-16LE == (ccsid (ibm-codepage) 1200) for unicode version 2.0 and 3.0 */
|
||||
const UConverterStaticData _UTF16LEStaticData={
|
||||
static const UConverterStaticData _UTF16LEStaticData={
|
||||
sizeof(UConverterStaticData),
|
||||
"UTF16_LittleEndian",
|
||||
1200, UCNV_IBM, UCNV_UTF16_LittleEndian, 2, 2,
|
||||
@ -1399,7 +1350,7 @@ const UConverterSharedData _UTF16LEData={
|
||||
|
||||
/* UTF-32BE ----------------------------------------------------------------- */
|
||||
|
||||
U_CFUNC void
|
||||
static void
|
||||
T_UConverter_toUnicode_UTF32_BE(UConverterToUnicodeArgs * args,
|
||||
UErrorCode * err)
|
||||
{
|
||||
@ -1507,7 +1458,7 @@ donefornow:
|
||||
args->source = (const char *) mySource;
|
||||
}
|
||||
|
||||
U_CFUNC void
|
||||
static void
|
||||
T_UConverter_toUnicode_UTF32_BE_OFFSET_LOGIC(UConverterToUnicodeArgs * args,
|
||||
UErrorCode * err)
|
||||
{
|
||||
@ -1622,7 +1573,7 @@ donefornow:
|
||||
args->source = (const char *) mySource;
|
||||
}
|
||||
|
||||
U_CFUNC void
|
||||
static void
|
||||
T_UConverter_fromUnicode_UTF32_BE(UConverterFromUnicodeArgs * args,
|
||||
UErrorCode * err)
|
||||
{
|
||||
@ -1695,7 +1646,7 @@ lowsurogate:
|
||||
args->source = mySource;
|
||||
}
|
||||
|
||||
U_CFUNC void
|
||||
static void
|
||||
T_UConverter_fromUnicode_UTF32_BE_OFFSET_LOGIC(UConverterFromUnicodeArgs * args,
|
||||
UErrorCode * err)
|
||||
{
|
||||
@ -1772,7 +1723,7 @@ lowsurogate:
|
||||
args->source = mySource;
|
||||
}
|
||||
|
||||
U_CFUNC UChar32
|
||||
static UChar32
|
||||
T_UConverter_getNextUChar_UTF32_BE(UConverterToUnicodeArgs* args,
|
||||
UErrorCode* err)
|
||||
{
|
||||
@ -1858,7 +1809,7 @@ static const UConverterImpl _UTF32BEImpl = {
|
||||
NULL
|
||||
};
|
||||
|
||||
const UConverterStaticData _UTF32BEStaticData = {
|
||||
static const UConverterStaticData _UTF32BEStaticData = {
|
||||
sizeof(UConverterStaticData),
|
||||
"UTF32_BigEndian",
|
||||
0, /* TODO: Change this number to the UTF-32 CCSID which currently does not exist */
|
||||
@ -1877,7 +1828,7 @@ const UConverterSharedData _UTF32BEData = {
|
||||
|
||||
/* UTF-32LE ---------------------------------------------------------- */
|
||||
|
||||
U_CFUNC void
|
||||
static void
|
||||
T_UConverter_toUnicode_UTF32_LE(UConverterToUnicodeArgs * args,
|
||||
UErrorCode * err)
|
||||
{
|
||||
@ -1986,7 +1937,7 @@ donefornow:
|
||||
args->source = (const char *) mySource;
|
||||
}
|
||||
|
||||
U_CFUNC void
|
||||
static void
|
||||
T_UConverter_toUnicode_UTF32_LE_OFFSET_LOGIC(UConverterToUnicodeArgs * args,
|
||||
UErrorCode * err)
|
||||
{
|
||||
@ -2102,7 +2053,7 @@ donefornow:
|
||||
args->source = (const char *) mySource;
|
||||
}
|
||||
|
||||
U_CFUNC void
|
||||
static void
|
||||
T_UConverter_fromUnicode_UTF32_LE(UConverterFromUnicodeArgs * args,
|
||||
UErrorCode * err)
|
||||
{
|
||||
@ -2175,7 +2126,7 @@ lowsurogate:
|
||||
args->source = mySource;
|
||||
}
|
||||
|
||||
U_CFUNC void
|
||||
static void
|
||||
T_UConverter_fromUnicode_UTF32_LE_OFFSET_LOGIC(UConverterFromUnicodeArgs * args,
|
||||
UErrorCode * err)
|
||||
{
|
||||
@ -2252,7 +2203,7 @@ lowsurogate:
|
||||
args->source = mySource;
|
||||
}
|
||||
|
||||
U_CFUNC UChar32
|
||||
static UChar32
|
||||
T_UConverter_getNextUChar_UTF32_LE(UConverterToUnicodeArgs* args,
|
||||
UErrorCode* err)
|
||||
{
|
||||
@ -2338,7 +2289,7 @@ static const UConverterImpl _UTF32LEImpl = {
|
||||
NULL
|
||||
};
|
||||
|
||||
const UConverterStaticData _UTF32LEStaticData = {
|
||||
static const UConverterStaticData _UTF32LEStaticData = {
|
||||
sizeof(UConverterStaticData),
|
||||
"UTF32_LittleEndian",
|
||||
0, /* TODO: Change this number to the UTF-32 CCSID which currently does not exist */
|
||||
@ -2508,7 +2459,7 @@ fromBase64[128]={
|
||||
*
|
||||
*/
|
||||
|
||||
U_CFUNC void
|
||||
static void
|
||||
_UTF7Reset(UConverter *cnv, UConverterResetChoice choice) {
|
||||
if(choice<=UCNV_RESET_TO_UNICODE) {
|
||||
/* reset toUnicode */
|
||||
@ -2521,7 +2472,7 @@ _UTF7Reset(UConverter *cnv, UConverterResetChoice choice) {
|
||||
}
|
||||
}
|
||||
|
||||
U_CFUNC void
|
||||
static void
|
||||
_UTF7Open(UConverter *cnv,
|
||||
const char *name,
|
||||
const char *locale,
|
||||
@ -2535,7 +2486,7 @@ _UTF7Open(UConverter *cnv,
|
||||
}
|
||||
}
|
||||
|
||||
U_CFUNC void
|
||||
static void
|
||||
_UTF7ToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
|
||||
UErrorCode *pErrorCode) {
|
||||
UConverter *cnv;
|
||||
@ -2831,13 +2782,13 @@ callback:
|
||||
}
|
||||
}
|
||||
|
||||
U_CFUNC UChar32
|
||||
static UChar32
|
||||
_UTF7GetNextUChar(UConverterToUnicodeArgs *pArgs,
|
||||
UErrorCode *pErrorCode) {
|
||||
return ucnv_getNextUCharFromToUImpl(pArgs, _UTF7ToUnicodeWithOffsets, TRUE, pErrorCode);
|
||||
}
|
||||
|
||||
U_CFUNC void
|
||||
static void
|
||||
_UTF7FromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
|
||||
UErrorCode *pErrorCode) {
|
||||
UConverter *cnv;
|
||||
@ -3101,7 +3052,7 @@ unicodeMode:
|
||||
return;
|
||||
}
|
||||
|
||||
U_CFUNC const char *
|
||||
static const char *
|
||||
_UTF7GetName(const UConverter *cnv) {
|
||||
switch(cnv->fromUnicodeStatus>>28) {
|
||||
case 1:
|
||||
|
@ -50,81 +50,6 @@
|
||||
}
|
||||
|
||||
|
||||
/*********** HZ Converter Protos ***********/
|
||||
static void
|
||||
_HZOpen(UConverter *cnv, const char *name, const char *locale, uint32_t options,UErrorCode *errorCode);
|
||||
|
||||
static void
|
||||
_HZClose(UConverter *converter);
|
||||
|
||||
U_CFUNC void
|
||||
_HZReset(UConverter *converter, UConverterResetChoice choice);
|
||||
|
||||
U_CFUNC void
|
||||
_HZ_WriteSub(UConverterFromUnicodeArgs *args, int32_t offsetIndex, UErrorCode *err);
|
||||
|
||||
U_CFUNC UConverter *
|
||||
_HZ_SafeClone(const UConverter *cnv, void *stackBuffer, int32_t *pBufferSize, UErrorCode *status);
|
||||
|
||||
U_CFUNC void
|
||||
UConverter_toUnicode_HZ_OFFSETS_LOGIC (UConverterToUnicodeArgs *args,UErrorCode *err);
|
||||
|
||||
U_CFUNC void
|
||||
UConverter_fromUnicode_HZ_OFFSETS_LOGIC (UConverterFromUnicodeArgs *args,UErrorCode *err);
|
||||
|
||||
static const UConverterImpl _HZImpl={
|
||||
|
||||
UCNV_HZ,
|
||||
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
_HZOpen,
|
||||
_HZClose,
|
||||
_HZReset,
|
||||
|
||||
UConverter_toUnicode_HZ_OFFSETS_LOGIC,
|
||||
UConverter_toUnicode_HZ_OFFSETS_LOGIC,
|
||||
UConverter_fromUnicode_HZ_OFFSETS_LOGIC,
|
||||
UConverter_fromUnicode_HZ_OFFSETS_LOGIC,
|
||||
NULL,
|
||||
|
||||
NULL,
|
||||
NULL,
|
||||
_HZ_WriteSub,
|
||||
_HZ_SafeClone
|
||||
};
|
||||
|
||||
const UConverterStaticData _HZStaticData={
|
||||
sizeof(UConverterStaticData),
|
||||
"HZ",
|
||||
0,
|
||||
UCNV_IBM,
|
||||
UCNV_HZ,
|
||||
1,
|
||||
4,
|
||||
{ 0x1a, 0, 0, 0 },
|
||||
1,
|
||||
FALSE,
|
||||
FALSE,
|
||||
0,
|
||||
0,
|
||||
{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }, /* reserved */
|
||||
|
||||
};
|
||||
|
||||
|
||||
const UConverterSharedData _HZData={
|
||||
sizeof(UConverterSharedData),
|
||||
~((uint32_t) 0),
|
||||
NULL,
|
||||
NULL,
|
||||
&_HZStaticData,
|
||||
FALSE,
|
||||
&_HZImpl,
|
||||
0
|
||||
};
|
||||
|
||||
typedef struct{
|
||||
int32_t targetIndex;
|
||||
int32_t sourceIndex;
|
||||
@ -163,7 +88,7 @@ _HZClose(UConverter *cnv){
|
||||
|
||||
}
|
||||
|
||||
U_CFUNC void
|
||||
static void
|
||||
_HZReset(UConverter *cnv, UConverterResetChoice choice){
|
||||
if(choice<=UCNV_RESET_TO_UNICODE) {
|
||||
cnv->toUnicodeStatus = 0;
|
||||
@ -205,7 +130,7 @@ _HZReset(UConverter *cnv, UConverterResetChoice choice){
|
||||
*/
|
||||
|
||||
|
||||
U_CFUNC void
|
||||
static void
|
||||
UConverter_toUnicode_HZ_OFFSETS_LOGIC(UConverterToUnicodeArgs *args,
|
||||
UErrorCode* err){
|
||||
char tempBuf[3];
|
||||
@ -407,7 +332,7 @@ SAVE_STATE:
|
||||
}
|
||||
|
||||
|
||||
U_CFUNC void
|
||||
static void
|
||||
UConverter_fromUnicode_HZ_OFFSETS_LOGIC (UConverterFromUnicodeArgs * args,
|
||||
UErrorCode * err){
|
||||
const UChar *mySource = args->source;
|
||||
@ -640,7 +565,7 @@ getTrail:
|
||||
myConverterData->isTargetUCharDBCS = isTargetUCharDBCS;
|
||||
}
|
||||
|
||||
U_CFUNC void
|
||||
static void
|
||||
_HZ_WriteSub(UConverterFromUnicodeArgs *args, int32_t offsetIndex, UErrorCode *err) {
|
||||
UConverter *cnv = args->converter;
|
||||
UConverterDataHZ *convData=(UConverterDataHZ *) cnv->extraInfo;
|
||||
@ -668,7 +593,7 @@ struct cloneStruct
|
||||
};
|
||||
|
||||
|
||||
U_CFUNC UConverter *
|
||||
static UConverter *
|
||||
_HZ_SafeClone(const UConverter *cnv,
|
||||
void *stackBuffer,
|
||||
int32_t *pBufferSize,
|
||||
@ -697,3 +622,57 @@ _HZ_SafeClone(const UConverter *cnv,
|
||||
}
|
||||
|
||||
|
||||
|
||||
static const UConverterImpl _HZImpl={
|
||||
|
||||
UCNV_HZ,
|
||||
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
_HZOpen,
|
||||
_HZClose,
|
||||
_HZReset,
|
||||
|
||||
UConverter_toUnicode_HZ_OFFSETS_LOGIC,
|
||||
UConverter_toUnicode_HZ_OFFSETS_LOGIC,
|
||||
UConverter_fromUnicode_HZ_OFFSETS_LOGIC,
|
||||
UConverter_fromUnicode_HZ_OFFSETS_LOGIC,
|
||||
NULL,
|
||||
|
||||
NULL,
|
||||
NULL,
|
||||
_HZ_WriteSub,
|
||||
_HZ_SafeClone
|
||||
};
|
||||
|
||||
static const UConverterStaticData _HZStaticData={
|
||||
sizeof(UConverterStaticData),
|
||||
"HZ",
|
||||
0,
|
||||
UCNV_IBM,
|
||||
UCNV_HZ,
|
||||
1,
|
||||
4,
|
||||
{ 0x1a, 0, 0, 0 },
|
||||
1,
|
||||
FALSE,
|
||||
FALSE,
|
||||
0,
|
||||
0,
|
||||
{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }, /* reserved */
|
||||
|
||||
};
|
||||
|
||||
|
||||
const UConverterSharedData _HZData={
|
||||
sizeof(UConverterSharedData),
|
||||
~((uint32_t) 0),
|
||||
NULL,
|
||||
NULL,
|
||||
&_HZStaticData,
|
||||
FALSE,
|
||||
&_HZImpl,
|
||||
0
|
||||
};
|
||||
|
||||
|
@ -54,25 +54,6 @@
|
||||
/* TODO:
|
||||
* Add getName() function.
|
||||
*/
|
||||
/*********** ISCII Converter Protos ***********/
|
||||
static void
|
||||
_ISCIIOpen(UConverter *cnv, const char *name, const char *locale, uint32_t options,UErrorCode *errorCode);
|
||||
|
||||
static void
|
||||
_ISCIIClose(UConverter *converter);
|
||||
|
||||
U_CFUNC void
|
||||
_ISCIIReset(UConverter *converter, UConverterResetChoice choice);
|
||||
|
||||
U_CFUNC UConverter *
|
||||
_ISCII_SafeClone(const UConverter *cnv, void *stackBuffer, int32_t *pBufferSize, UErrorCode *status);
|
||||
|
||||
U_CFUNC void
|
||||
UConverter_toUnicode_ISCII_OFFSETS_LOGIC (UConverterToUnicodeArgs *args,UErrorCode *err);
|
||||
|
||||
U_CFUNC void
|
||||
UConverter_fromUnicode_ISCII_OFFSETS_LOGIC (UConverterFromUnicodeArgs *args,UErrorCode *err);
|
||||
|
||||
|
||||
typedef enum {
|
||||
DEVANAGARI =0,
|
||||
@ -125,58 +106,6 @@ typedef enum{
|
||||
ZERO =0x00
|
||||
}MaskEnum;
|
||||
|
||||
static const UConverterImpl _ISCIIImpl={
|
||||
|
||||
UCNV_ISCII,
|
||||
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
_ISCIIOpen,
|
||||
_ISCIIClose,
|
||||
_ISCIIReset,
|
||||
|
||||
UConverter_toUnicode_ISCII_OFFSETS_LOGIC,
|
||||
UConverter_toUnicode_ISCII_OFFSETS_LOGIC,
|
||||
UConverter_fromUnicode_ISCII_OFFSETS_LOGIC,
|
||||
UConverter_fromUnicode_ISCII_OFFSETS_LOGIC,
|
||||
NULL,
|
||||
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
_ISCII_SafeClone
|
||||
};
|
||||
|
||||
const UConverterStaticData _ISCIIStaticData={
|
||||
sizeof(UConverterStaticData),
|
||||
"ISCII",
|
||||
0,
|
||||
UCNV_IBM,
|
||||
UCNV_ISCII,
|
||||
1,
|
||||
4,
|
||||
{ 0x1a, 0, 0, 0 },
|
||||
0x1,
|
||||
FALSE,
|
||||
FALSE,
|
||||
0x0,
|
||||
0x0,
|
||||
{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }, /* reserved */
|
||||
|
||||
};
|
||||
|
||||
const UConverterSharedData _ISCIIData={
|
||||
sizeof(UConverterSharedData),
|
||||
~((uint32_t) 0),
|
||||
NULL,
|
||||
NULL,
|
||||
&_ISCIIStaticData,
|
||||
FALSE,
|
||||
&_ISCIIImpl,
|
||||
0
|
||||
};
|
||||
|
||||
typedef struct{
|
||||
UChar contextCharToUnicode; /* previous Unicode codepoint for contextual analysis */
|
||||
UChar contextCharFromUnicode; /* previous Unicode codepoint for contextual analysis */
|
||||
@ -236,7 +165,7 @@ _ISCIIClose(UConverter *cnv){
|
||||
}
|
||||
}
|
||||
|
||||
U_CFUNC void
|
||||
static void
|
||||
_ISCIIReset(UConverter *cnv, UConverterResetChoice choice){
|
||||
UConverterDataISCII* data =(UConverterDataISCII *) (cnv->extraInfo);
|
||||
if(choice<=UCNV_RESET_TO_UNICODE) {
|
||||
@ -825,7 +754,7 @@ static const uint16_t nuktaSpecialCases[][2]={
|
||||
* <HALANT> + <ZWJ>
|
||||
*/
|
||||
|
||||
U_CFUNC void
|
||||
static void
|
||||
UConverter_fromUnicode_ISCII_OFFSETS_LOGIC (UConverterFromUnicodeArgs * args,
|
||||
UErrorCode * err){
|
||||
const UChar *source = args->source;
|
||||
@ -1129,7 +1058,7 @@ static const int32_t lookupTable[][2]={
|
||||
} \
|
||||
}
|
||||
|
||||
U_CFUNC void
|
||||
static void
|
||||
UConverter_toUnicode_ISCII_OFFSETS_LOGIC(UConverterToUnicodeArgs *args,
|
||||
UErrorCode* err){
|
||||
const char *source = ( char *) args->source;
|
||||
@ -1426,7 +1355,7 @@ struct cloneStruct
|
||||
};
|
||||
|
||||
|
||||
U_CFUNC UConverter *
|
||||
static UConverter *
|
||||
_ISCII_SafeClone(const UConverter *cnv,
|
||||
void *stackBuffer,
|
||||
int32_t *pBufferSize,
|
||||
@ -1453,3 +1382,56 @@ _ISCII_SafeClone(const UConverter *cnv,
|
||||
|
||||
return &localClone->cnv;
|
||||
}
|
||||
|
||||
static const UConverterImpl _ISCIIImpl={
|
||||
|
||||
UCNV_ISCII,
|
||||
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
_ISCIIOpen,
|
||||
_ISCIIClose,
|
||||
_ISCIIReset,
|
||||
|
||||
UConverter_toUnicode_ISCII_OFFSETS_LOGIC,
|
||||
UConverter_toUnicode_ISCII_OFFSETS_LOGIC,
|
||||
UConverter_fromUnicode_ISCII_OFFSETS_LOGIC,
|
||||
UConverter_fromUnicode_ISCII_OFFSETS_LOGIC,
|
||||
NULL,
|
||||
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
_ISCII_SafeClone
|
||||
};
|
||||
|
||||
static const UConverterStaticData _ISCIIStaticData={
|
||||
sizeof(UConverterStaticData),
|
||||
"ISCII",
|
||||
0,
|
||||
UCNV_IBM,
|
||||
UCNV_ISCII,
|
||||
1,
|
||||
4,
|
||||
{ 0x1a, 0, 0, 0 },
|
||||
0x1,
|
||||
FALSE,
|
||||
FALSE,
|
||||
0x0,
|
||||
0x0,
|
||||
{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }, /* reserved */
|
||||
|
||||
};
|
||||
|
||||
const UConverterSharedData _ISCIIData={
|
||||
sizeof(UConverterSharedData),
|
||||
~((uint32_t) 0),
|
||||
NULL,
|
||||
NULL,
|
||||
&_ISCIIStaticData,
|
||||
FALSE,
|
||||
&_ISCIIImpl,
|
||||
0
|
||||
};
|
||||
|
||||
|
@ -26,42 +26,6 @@
|
||||
#include "ucnv_cnv.h"
|
||||
#include "cmemory.h"
|
||||
|
||||
/* Prototypes ------------------------------------------------------------- */
|
||||
|
||||
/* Keep these here to make finicky compilers happy */
|
||||
|
||||
U_CFUNC void
|
||||
_SCSUReset(UConverter *cnv, UConverterResetChoice choice);
|
||||
U_CFUNC void
|
||||
_SCSUOpen(UConverter *cnv,
|
||||
const char *name,
|
||||
const char *locale,
|
||||
uint32_t options,
|
||||
UErrorCode *pErrorCode);
|
||||
U_CFUNC void
|
||||
_SCSUClose(UConverter *cnv);
|
||||
U_CFUNC void
|
||||
_SCSUToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
|
||||
UErrorCode *pErrorCode);
|
||||
U_CFUNC UChar32
|
||||
_SCSUGetNextUChar(UConverterToUnicodeArgs *pArgs,
|
||||
UErrorCode *pErrorCode);
|
||||
U_CFUNC void
|
||||
_SCSUFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
|
||||
UErrorCode *pErrorCode);
|
||||
U_CFUNC const char *
|
||||
_SCSUGetName(const UConverter *cnv);
|
||||
U_CFUNC void
|
||||
_SCSUWriteSub(UConverterFromUnicodeArgs *pArgs,
|
||||
int32_t offsetIndex,
|
||||
UErrorCode *pErrorCode);
|
||||
U_CFUNC UConverter *
|
||||
_SCSUSafeClone(const UConverter *cnv,
|
||||
void *stackBuffer,
|
||||
int32_t *pBufferSize,
|
||||
UErrorCode *status);
|
||||
|
||||
|
||||
/* SCSU definitions --------------------------------------------------------- */
|
||||
|
||||
/* SCSU command byte values */
|
||||
@ -183,9 +147,9 @@ enum {
|
||||
lGeneric, l_ja
|
||||
};
|
||||
|
||||
/* MBCS setup functions ----------------------------------------------------- */
|
||||
/* SCSU setup functions ----------------------------------------------------- */
|
||||
|
||||
U_CFUNC void
|
||||
static void
|
||||
_SCSUReset(UConverter *cnv, UConverterResetChoice choice) {
|
||||
SCSUData *scsu=(SCSUData *)cnv->extraInfo;
|
||||
|
||||
@ -221,7 +185,7 @@ _SCSUReset(UConverter *cnv, UConverterResetChoice choice) {
|
||||
}
|
||||
}
|
||||
|
||||
U_CFUNC void
|
||||
static void
|
||||
_SCSUOpen(UConverter *cnv,
|
||||
const char *name,
|
||||
const char *locale,
|
||||
@ -240,7 +204,7 @@ _SCSUOpen(UConverter *cnv,
|
||||
}
|
||||
}
|
||||
|
||||
U_CFUNC void
|
||||
static void
|
||||
_SCSUClose(UConverter *cnv) {
|
||||
if(!cnv->isCopyLocal){
|
||||
if(cnv->extraInfo!=NULL) {
|
||||
@ -254,7 +218,7 @@ _SCSUClose(UConverter *cnv) {
|
||||
|
||||
/* ### check operator precedence | << + < */
|
||||
|
||||
U_CFUNC void
|
||||
static void
|
||||
_SCSUToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
|
||||
UErrorCode *pErrorCode) {
|
||||
UConverter *cnv;
|
||||
@ -640,7 +604,7 @@ callback:
|
||||
}
|
||||
}
|
||||
|
||||
U_CFUNC UChar32
|
||||
static UChar32
|
||||
_SCSUGetNextUChar(UConverterToUnicodeArgs *pArgs,
|
||||
UErrorCode *pErrorCode) {
|
||||
return ucnv_getNextUCharFromToUImpl(pArgs, _SCSUToUnicodeWithOffsets, TRUE, pErrorCode);
|
||||
@ -786,7 +750,7 @@ getDynamicOffset(uint32_t c, uint32_t *pOffset) {
|
||||
* - Only replace the result after an SDX or SCU?
|
||||
*/
|
||||
|
||||
U_CFUNC void
|
||||
static void
|
||||
_SCSUFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
|
||||
UErrorCode *pErrorCode) {
|
||||
UConverter *cnv;
|
||||
@ -1333,7 +1297,7 @@ callback:
|
||||
|
||||
/* miscellaneous ------------------------------------------------------------ */
|
||||
|
||||
U_CFUNC const char *
|
||||
static const char *
|
||||
_SCSUGetName(const UConverter *cnv) {
|
||||
SCSUData *scsu=(SCSUData *)cnv->extraInfo;
|
||||
|
||||
@ -1345,7 +1309,7 @@ _SCSUGetName(const UConverter *cnv) {
|
||||
}
|
||||
}
|
||||
|
||||
U_CFUNC void
|
||||
static void
|
||||
_SCSUWriteSub(UConverterFromUnicodeArgs *pArgs,
|
||||
int32_t offsetIndex,
|
||||
UErrorCode *pErrorCode) {
|
||||
@ -1376,7 +1340,7 @@ struct cloneStruct
|
||||
SCSUData mydata;
|
||||
};
|
||||
|
||||
U_CFUNC UConverter *
|
||||
static UConverter *
|
||||
_SCSUSafeClone(const UConverter *cnv,
|
||||
void *stackBuffer,
|
||||
int32_t *pBufferSize,
|
||||
|
@ -69,7 +69,7 @@
|
||||
#include "cmemory.h"
|
||||
|
||||
/* the global mutex. Use it proudly and wash it often. */
|
||||
UMTX gGlobalMutex = NULL;
|
||||
static UMTX gGlobalMutex = NULL;
|
||||
|
||||
#if defined(WIN32)
|
||||
static CRITICAL_SECTION gPlatformMutex;
|
||||
|
Loading…
Reference in New Issue
Block a user