File tree 1 file changed +5
-5
lines changed
src/backend/utils/mb/conversion_procs/euc_tw_and_big5
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 7
7
*
8
8
* 1999/1/15 Tatsuo Ishii
9
9
*
10
- * $Id: big5.c,v 1.2 2002/09/04 20:31:31 momjian Exp $
10
+ * $Id: big5.c,v 1.3 2003/01/29 01:01:05 tgl Exp $
11
11
*/
12
12
13
13
/* can be used in either frontend or backend */
@@ -299,7 +299,7 @@ BIG5toCNS(unsigned short big5, unsigned char *lc)
299
299
{
300
300
/* level 1 */
301
301
302
- for (i = 0 ; i < sizeof (b1c4 ) / sizeof (unsigned short ); i ++ )
302
+ for (i = 0 ; i < sizeof (b1c4 ) / ( sizeof (unsigned short ) * 2 ); i ++ )
303
303
{
304
304
if (b1c4 [i ][0 ] == big5 )
305
305
{
@@ -320,7 +320,7 @@ BIG5toCNS(unsigned short big5, unsigned char *lc)
320
320
else
321
321
{
322
322
/* level 2 */
323
- for (i = 0 ; i < sizeof (b2c3 ) / sizeof (unsigned short ); i ++ )
323
+ for (i = 0 ; i < sizeof (b2c3 ) / ( sizeof (unsigned short ) * 2 ); i ++ )
324
324
{
325
325
if (b2c3 [i ][0 ] == big5 )
326
326
{
@@ -359,14 +359,14 @@ CNStoBIG5(unsigned short cns, unsigned char lc)
359
359
big5 = BinarySearchRange (cnsPlane2ToBig5Level2 , 47 , cns );
360
360
break ;
361
361
case LC_CNS11643_3 :
362
- for (i = 0 ; i < sizeof (b2c3 ) / sizeof (unsigned short ); i ++ )
362
+ for (i = 0 ; i < sizeof (b2c3 ) / ( sizeof (unsigned short ) * 2 ); i ++ )
363
363
{
364
364
if (b2c3 [i ][1 ] == cns )
365
365
return (b2c3 [i ][0 ]);
366
366
}
367
367
break ;
368
368
case LC_CNS11643_4 :
369
- for (i = 0 ; i < sizeof (b1c4 ) / sizeof (unsigned short ); i ++ )
369
+ for (i = 0 ; i < sizeof (b1c4 ) / ( sizeof (unsigned short ) * 2 ); i ++ )
370
370
{
371
371
if (b1c4 [i ][1 ] == cns )
372
372
return (b1c4 [i ][0 ]);
You can’t perform that action at this time.
0 commit comments