fix bug 9519 r=ftang sr=brendan a=roc+moz

make uconv code port to 32 bits clean for arm arch
thansk  jeroen.dobbelaere@acunia.com
This commit is contained in:
ftang%netscape.com 2002-03-08 01:12:33 +00:00
Родитель 38783bc81e
Коммит a8393a1bb8
5 изменённых файлов: 20 добавлений и 21 удалений

Просмотреть файл

@ -20,6 +20,7 @@
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* jeroen.dobbelaere@acunia.com
*
*
* Alternatively, the contents of this file may be used under the terms of
@ -87,23 +88,15 @@ typedef enum {
uNumOfCharType
} uScanSubClassID;
typedef struct {
unsigned char MinHB;
unsigned char MinLB;
unsigned char MaxHB;
unsigned char MaxLB;
} uShiftOut;
typedef struct {
unsigned char Min;
unsigned char Max;
} uShiftIn;
typedef struct {
unsigned char classID;
unsigned char reserveLen;
uShiftIn shiftin;
uShiftOut shiftout;
unsigned char shiftin_Min;
unsigned char shiftin_Max;
unsigned char shiftout_MinHB;
unsigned char shiftout_MinLB;
unsigned char shiftout_MaxHB;
unsigned char shiftout_MaxLB;
} uShiftCell;
typedef struct {

Просмотреть файл

@ -20,6 +20,7 @@
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* jeroen.dobbelaere@acunia.com
*
*
* Alternatively, the contents of this file may be used under the terms of
@ -492,10 +493,10 @@ PRIVATE PRBool uCheckAndGenByTable(
inL = (in & 0xff );
for(i=0;i<itemnum;i++)
{
if( ( inL >= cell[i].shiftout.MinLB) &&
( inL <= cell[i].shiftout.MaxLB) &&
( inH >= cell[i].shiftout.MinHB) &&
( inH <= cell[i].shiftout.MaxHB) )
if( ( inL >= cell[i].shiftout_MinLB) &&
( inL <= cell[i].shiftout_MaxLB) &&
( inH >= cell[i].shiftout_MinHB) &&
( inH <= cell[i].shiftout_MaxHB) )
{
if(outbuflen < cell[i].reserveLen)
return PR_FALSE;

Просмотреть файл

@ -20,6 +20,7 @@
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* jeroen.dobbelaere@acunia.com
*
*
* Alternatively, the contents of this file may be used under the terms of
@ -91,7 +92,7 @@ PRIVATE const HitFormateFunc m_hit[uNumFormatTag] =
#define uHit(format,in,cell) (* m_hit[(format)])((in),(cell))
#define uMap(format,in,uT,cell) (* m_map[(format)])((in),(uT),(cell))
#define uFillInfoCell(format,uT,cell,info) (* m_fillinfo[(format)])((uT),(cell),(info))
#define uGetMapCell(uT, item) ((uMapCell *)(((PRUint16 *)uT) + (uT)->offsetToMapCellArray) + (item))
#define uGetMapCell(uT, item) ((uMapCell *)(((PRUint16 *)uT) + (uT)->offsetToMapCellArray + (item)*(UMAPCELL_SIZE/sizeof(PRUint16))))
#define uGetFormat(uT, item) (((((PRUint16 *)uT) + (uT)->offsetToFormatArray)[(item)>> 2 ] >> (((item)% 4 ) << 2)) & 0x0f)
/*=================================================================================

Просмотреть файл

@ -20,6 +20,7 @@
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* jeroen.dobbelaere@acunia.com
*
*
* Alternatively, the contents of this file may be used under the terms of
@ -73,6 +74,8 @@ typedef struct {
} fmt;
} uMapCell;
#define UMAPCELL_SIZE (3*sizeof(PRUint16))
typedef struct {
PRUint16 itemOfList;
PRUint16 offsetToFormatArray;

Просмотреть файл

@ -20,6 +20,7 @@
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* jeroen.dobbelaere@acunia.com
*
*
* Alternatively, the contents of this file may be used under the terms of
@ -505,8 +506,8 @@ PRIVATE PRBool uCheckAndScanByTable(
PRInt16 itemnum = shift->numOfItem;
for(i=0;i<itemnum;i++)
{
if( ( in[0] >= cell[i].shiftin.Min) &&
( in[0] <= cell[i].shiftin.Max))
if( ( in[0] >= cell[i].shiftin_Min) &&
( in[0] <= cell[i].shiftin_Max))
{
if(inbuflen < cell[i].reserveLen)
return PR_FALSE;