[KoCo-CVS] [Commit] KoreanCodecs/src tablegen.py
Brought to you by:
perky
From: Chang <pe...@us...> - 2002-10-16 16:30:24
|
perky 02/10/16 09:30:24 Modified: src tablegen.py Log: We use char instead of unsigned char for strict typing compilers. Revision Changes Path 1.14 +7 -7 KoreanCodecs/src/tablegen.py Index: tablegen.py =================================================================== RCS file: /cvsroot/koco/KoreanCodecs/src/tablegen.py,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- tablegen.py 23 Jul 2002 18:05:16 -0000 1.13 +++ tablegen.py 16 Oct 2002 16:30:23 -0000 1.14 @@ -1,10 +1,10 @@ # -# tablegen.py - $Revision: 1.13 $ +# tablegen.py - $Revision: 1.14 $ # # Code Table Generator # # Author: Hye-Shik Chang <pe...@Fr...> -# Date : $Date: 2002/07/23 18:05:16 $ +# Date : $Date: 2002/10/16 16:30:23 $ # # # This file is part of KoreanCodecs. @@ -26,7 +26,7 @@ import time -UNICODE_FILL = "UNIFIL," +UNICODE_INVALID = "UNIINV," COPYRIGHT_HEADER = """\ /* @@ -47,7 +47,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Generated by tablegen.py on %s - * $Id: tablegen.py,v 1.13 2002/07/23 18:05:16 perky Exp $ + * $Id: tablegen.py,v 1.14 2002/10/16 16:30:23 perky Exp $ */ """ % time.asctime(time.gmtime()) @@ -81,7 +81,7 @@ dp = seckeys[:8] del seckeys[:8] print >> fo, " ", ' '.join([ - fmap[fk].has_key(i) and ("0x%04x," % ord(fmap[fk][i])) or UNICODE_FILL + fmap[fk].has_key(i) and ("0x%04x," % ord(fmap[fk][i])) or UNICODE_INVALID for i in dp ]) print >> fo, "};" @@ -114,7 +114,7 @@ blkcount = 0 for blk in eblocks[1:]: - print >> fo, "static unsigned char *%s_page%d[%d] = { /* 0x%04x - 0x%04x */" % \ + print >> fo, "static char *%s_page%d[%d] = { /* 0x%04x - 0x%04x */" % \ (prefix, blkcount, blk[1]-blk[0]+1, blk[0], blk[1]) blkcount += 1 obl = range(blk[0], blk[1]+1) @@ -215,6 +215,6 @@ encodemapgen(uhctable, "uhc_encode", uhc.encoding_map, 512) # -# $Id: tablegen.py,v 1.13 2002/07/23 18:05:16 perky Exp $ +# $Id: tablegen.py,v 1.14 2002/10/16 16:30:23 perky Exp $ # # -*- End-Of-File -*- |