add new support for GL
git-svn-id: svn://10.0.0.236/trunk@34956 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
a16b45eba6
commit
005c5554ca
@ -48,6 +48,7 @@ typedef enum {
|
||||
u2BytesGRPrefix8EA5Charset,
|
||||
u2BytesGRPrefix8EA6Charset,
|
||||
u2BytesGRPrefix8EA7Charset,
|
||||
u1ByteGLCharset,
|
||||
uNumOfCharsetType
|
||||
} uScanClassID;
|
||||
|
||||
|
||||
@ -163,6 +163,14 @@ PRIVATE PRBool uCheckAndGen2ByteGRPrefix8EA7(
|
||||
PRUint32 outbuflen,
|
||||
PRUint32* outlen
|
||||
);
|
||||
PRIVATE PRBool uCheckAndGenAlways1ByteShiftGL(
|
||||
uShiftTable *shift,
|
||||
PRInt32* state,
|
||||
PRUint16 in,
|
||||
unsigned char* out,
|
||||
PRUint32 outbuflen,
|
||||
PRUint32* outlen
|
||||
);
|
||||
|
||||
PRIVATE PRBool uGenAlways2Byte(
|
||||
PRUint16 in,
|
||||
@ -207,6 +215,7 @@ PRIVATE uGeneratorFunc m_generator[uNumOfCharsetType] =
|
||||
uCheckAndGen2ByteGRPrefix8EA5,
|
||||
uCheckAndGen2ByteGRPrefix8EA6,
|
||||
uCheckAndGen2ByteGRPrefix8EA7,
|
||||
uCheckAndGenAlways1ByteShiftGL,
|
||||
};
|
||||
|
||||
/*=================================================================================
|
||||
@ -645,3 +654,26 @@ PRIVATE PRBool uCheckAndGen2ByteGRPrefix8EA7( uShiftTable *shift,
|
||||
return PR_TRUE;
|
||||
}
|
||||
}
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
PRIVATE PRBool uCheckAndGenAlways1ByteShiftGL(
|
||||
uShiftTable *shift,
|
||||
PRInt32* state,
|
||||
PRUint16 in,
|
||||
unsigned char* out,
|
||||
PRUint32 outbuflen,
|
||||
PRUint32* outlen
|
||||
)
|
||||
{
|
||||
/* Don't check inlen. The caller should ensure it is larger than 0 */
|
||||
/* Oops, I don't agree. Code changed to check every time. [CATA] */
|
||||
if(outbuflen < 1)
|
||||
return PR_FALSE;
|
||||
else
|
||||
{
|
||||
*outlen = 1;
|
||||
out[0] = in & 0x7f;
|
||||
return PR_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
@ -157,6 +157,14 @@ PRIVATE PRBool uCheckAndScan2ByteGRPrefix8EA7(
|
||||
PRUint32 inbuflen,
|
||||
PRUint32* inscanlen
|
||||
);
|
||||
PRIVATE PRBool uCheckAndScanAlways1ByteShiftGL(
|
||||
uShiftTable *shift,
|
||||
PRInt32* state,
|
||||
unsigned char *in,
|
||||
PRUint16 *out,
|
||||
PRUint32 inbuflen,
|
||||
PRUint32* inscanlen
|
||||
);
|
||||
|
||||
PRIVATE PRBool uScanAlways2Byte(
|
||||
unsigned char* in,
|
||||
@ -201,6 +209,7 @@ PRIVATE uScannerFunc m_scanner[uNumOfCharsetType] =
|
||||
uCheckAndScan2ByteGRPrefix8EA5,
|
||||
uCheckAndScan2ByteGRPrefix8EA6,
|
||||
uCheckAndScan2ByteGRPrefix8EA7,
|
||||
uCheckAndScanAlways1ByteShiftGL,
|
||||
};
|
||||
|
||||
/*=================================================================================
|
||||
@ -610,3 +619,21 @@ PRIVATE PRBool uCheckAndScan2ByteGRPrefix8EA7(
|
||||
return PR_TRUE;
|
||||
}
|
||||
}
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
PRIVATE PRBool uCheckAndScanAlways1ByteShiftGL(
|
||||
uShiftTable *shift,
|
||||
PRInt32* state,
|
||||
unsigned char *in,
|
||||
PRUint16 *out,
|
||||
PRUint32 inbuflen,
|
||||
PRUint32* inscanlen
|
||||
)
|
||||
{
|
||||
/* Don't check inlen. The caller should ensure it is larger than 0 */
|
||||
*inscanlen = 1;
|
||||
*out = (PRUint16) in[0] | 0x80;
|
||||
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
@ -163,6 +163,14 @@ PRIVATE PRBool uCheckAndGen2ByteGRPrefix8EA7(
|
||||
PRUint32 outbuflen,
|
||||
PRUint32* outlen
|
||||
);
|
||||
PRIVATE PRBool uCheckAndGenAlways1ByteShiftGL(
|
||||
uShiftTable *shift,
|
||||
PRInt32* state,
|
||||
PRUint16 in,
|
||||
unsigned char* out,
|
||||
PRUint32 outbuflen,
|
||||
PRUint32* outlen
|
||||
);
|
||||
|
||||
PRIVATE PRBool uGenAlways2Byte(
|
||||
PRUint16 in,
|
||||
@ -207,6 +215,7 @@ PRIVATE uGeneratorFunc m_generator[uNumOfCharsetType] =
|
||||
uCheckAndGen2ByteGRPrefix8EA5,
|
||||
uCheckAndGen2ByteGRPrefix8EA6,
|
||||
uCheckAndGen2ByteGRPrefix8EA7,
|
||||
uCheckAndGenAlways1ByteShiftGL,
|
||||
};
|
||||
|
||||
/*=================================================================================
|
||||
@ -645,3 +654,26 @@ PRIVATE PRBool uCheckAndGen2ByteGRPrefix8EA7( uShiftTable *shift,
|
||||
return PR_TRUE;
|
||||
}
|
||||
}
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
PRIVATE PRBool uCheckAndGenAlways1ByteShiftGL(
|
||||
uShiftTable *shift,
|
||||
PRInt32* state,
|
||||
PRUint16 in,
|
||||
unsigned char* out,
|
||||
PRUint32 outbuflen,
|
||||
PRUint32* outlen
|
||||
)
|
||||
{
|
||||
/* Don't check inlen. The caller should ensure it is larger than 0 */
|
||||
/* Oops, I don't agree. Code changed to check every time. [CATA] */
|
||||
if(outbuflen < 1)
|
||||
return PR_FALSE;
|
||||
else
|
||||
{
|
||||
*outlen = 1;
|
||||
out[0] = in & 0x7f;
|
||||
return PR_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
@ -157,6 +157,14 @@ PRIVATE PRBool uCheckAndScan2ByteGRPrefix8EA7(
|
||||
PRUint32 inbuflen,
|
||||
PRUint32* inscanlen
|
||||
);
|
||||
PRIVATE PRBool uCheckAndScanAlways1ByteShiftGL(
|
||||
uShiftTable *shift,
|
||||
PRInt32* state,
|
||||
unsigned char *in,
|
||||
PRUint16 *out,
|
||||
PRUint32 inbuflen,
|
||||
PRUint32* inscanlen
|
||||
);
|
||||
|
||||
PRIVATE PRBool uScanAlways2Byte(
|
||||
unsigned char* in,
|
||||
@ -201,6 +209,7 @@ PRIVATE uScannerFunc m_scanner[uNumOfCharsetType] =
|
||||
uCheckAndScan2ByteGRPrefix8EA5,
|
||||
uCheckAndScan2ByteGRPrefix8EA6,
|
||||
uCheckAndScan2ByteGRPrefix8EA7,
|
||||
uCheckAndScanAlways1ByteShiftGL,
|
||||
};
|
||||
|
||||
/*=================================================================================
|
||||
@ -610,3 +619,21 @@ PRIVATE PRBool uCheckAndScan2ByteGRPrefix8EA7(
|
||||
return PR_TRUE;
|
||||
}
|
||||
}
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
PRIVATE PRBool uCheckAndScanAlways1ByteShiftGL(
|
||||
uShiftTable *shift,
|
||||
PRInt32* state,
|
||||
unsigned char *in,
|
||||
PRUint16 *out,
|
||||
PRUint32 inbuflen,
|
||||
PRUint32* inscanlen
|
||||
)
|
||||
{
|
||||
/* Don't check inlen. The caller should ensure it is larger than 0 */
|
||||
*inscanlen = 1;
|
||||
*out = (PRUint16) in[0] | 0x80;
|
||||
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user