77 *
88 * 1999/1/15 Tatsuo Ishii
99 *
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 $
1111 */
1212
1313/* can be used in either frontend or backend */
@@ -299,7 +299,7 @@ BIG5toCNS(unsigned short big5, unsigned char *lc)
299299{
300300/* level 1 */
301301
302- for (i = 0 ;i < sizeof (b1c4 ) /sizeof (unsigned short );i ++ )
302+ for (i = 0 ;i < sizeof (b1c4 ) /( sizeof (unsigned short ) * 2 );i ++ )
303303{
304304if (b1c4 [i ][0 ]== big5 )
305305{
@@ -320,7 +320,7 @@ BIG5toCNS(unsigned short big5, unsigned char *lc)
320320else
321321{
322322/* 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 ++ )
324324{
325325if (b2c3 [i ][0 ]== big5 )
326326{
@@ -359,14 +359,14 @@ CNStoBIG5(unsigned short cns, unsigned char lc)
359359big5 = BinarySearchRange (cnsPlane2ToBig5Level2 ,47 ,cns );
360360break ;
361361case 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 ++ )
363363{
364364if (b2c3 [i ][1 ]== cns )
365365return (b2c3 [i ][0 ]);
366366}
367367break ;
368368case 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 ++ )
370370{
371371if (b1c4 [i ][1 ]== cns )
372372return (b1c4 [i ][0 ]);