mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 928231 follow-up - Rename the SIZE_OF_TABLES macro
This commit is contained in:
parent
15c9fbb611
commit
3986c21083
@ -17,20 +17,20 @@ static const int16_t g0201ShiftOutTable[] = {
|
||||
ShiftOutCell(u1BytePrefix8EChar, 2, 0x00, 0xA1, 0x00, 0xDF)
|
||||
};
|
||||
|
||||
#define SIZE_OF_TABLES 3
|
||||
static const uScanClassID gScanClassIDs[SIZE_OF_TABLES] = {
|
||||
#define SIZE_OF_EUCJP_TABLES 3
|
||||
static const uScanClassID gScanClassIDs[SIZE_OF_EUCJP_TABLES] = {
|
||||
u2BytesGRCharset,
|
||||
u2BytesGRCharset,
|
||||
uMultibytesCharset
|
||||
};
|
||||
|
||||
static const int16_t *gShiftTables[SIZE_OF_TABLES] = {
|
||||
static const int16_t *gShiftTables[SIZE_OF_EUCJP_TABLES] = {
|
||||
0,
|
||||
0,
|
||||
g0201ShiftOutTable
|
||||
};
|
||||
|
||||
static const uint16_t *gMappingTables[SIZE_OF_TABLES] = {
|
||||
static const uint16_t *gMappingTables[SIZE_OF_EUCJP_TABLES] = {
|
||||
g_uf0208Mapping,
|
||||
g_uf0208extMapping,
|
||||
g_uf0201Mapping
|
||||
@ -40,7 +40,7 @@ nsresult
|
||||
nsUnicodeToEUCJPConstructor(nsISupports *aOuter, REFNSIID aIID,
|
||||
void **aResult)
|
||||
{
|
||||
return CreateMultiTableEncoder(SIZE_OF_TABLES,
|
||||
return CreateMultiTableEncoder(SIZE_OF_EUCJP_TABLES,
|
||||
(uScanClassID*) gScanClassIDs,
|
||||
(uShiftOutTable**) gShiftTables,
|
||||
(uMappingTable**) gMappingTables,
|
||||
|
@ -49,8 +49,8 @@ static const uint16_t g_ufAsciiMapping [] = {
|
||||
0x0001, 0x0004, 0x0005, 0x0008, 0x0000, 0x0000, 0x007F, 0x0000
|
||||
};
|
||||
|
||||
#define SIZE_OF_TABLES 5
|
||||
static const uint16_t * g_ufMappingTables[SIZE_OF_TABLES] = {
|
||||
#define SIZE_OF_ISO2022JP_TABLES 5
|
||||
static const uint16_t * g_ufMappingTables[SIZE_OF_ISO2022JP_TABLES] = {
|
||||
g_ufAsciiMapping, // ASCII ISOREG 6
|
||||
g_uf0201GLMapping, // JIS X 0201-1976 ISOREG 14
|
||||
g_uf0208Mapping, // JIS X 0208-1983 ISOREG 87
|
||||
@ -58,7 +58,7 @@ static const uint16_t * g_ufMappingTables[SIZE_OF_TABLES] = {
|
||||
g_uf0208Mapping, // JIS X 0208-1978 ISOREG 42
|
||||
};
|
||||
|
||||
static const uScanClassID g_ufScanClassIDs[SIZE_OF_TABLES] = {
|
||||
static const uScanClassID g_ufScanClassIDs[SIZE_OF_ISO2022JP_TABLES] = {
|
||||
u1ByteCharset, // ASCII ISOREG 6
|
||||
u1ByteCharset, // JIS X 0201-1976 ISOREG 14
|
||||
u2BytesCharset, // JIS X 0208-1983 ISOREG 87
|
||||
@ -211,7 +211,7 @@ NS_IMETHODIMP nsUnicodeToISO2022JP::ConvertNoBuffNoErr(
|
||||
int32_t i;
|
||||
|
||||
while (src < srcEnd) {
|
||||
for (i=0; i< SIZE_OF_TABLES ; i++) {
|
||||
for (i=0; i< SIZE_OF_ISO2022JP_TABLES ; i++) {
|
||||
bcr = 1;
|
||||
bcw = destEnd - dest;
|
||||
res = nsUnicodeEncodeHelper::ConvertByTable(src, &bcr, dest, &bcw,
|
||||
@ -220,7 +220,7 @@ NS_IMETHODIMP nsUnicodeToISO2022JP::ConvertNoBuffNoErr(
|
||||
if (res != NS_ERROR_UENC_NOMAPPING) break;
|
||||
}
|
||||
|
||||
if ( i>= SIZE_OF_TABLES) {
|
||||
if ( i>= SIZE_OF_ISO2022JP_TABLES) {
|
||||
if (IS_HANKAKU(*src)) {
|
||||
bcr = srcEnd - src;
|
||||
bcw = destEnd - dest;
|
||||
|
Loading…
Reference in New Issue
Block a user