[KoCo-CVS] [Commit] cjkcodecs/tools genmap_support.py
Brought to you by:
perky
From: Hye-Shik C. <pe...@us...> - 2003-07-06 23:19:32
|
perky 03/07/06 16:19:26 Modified: tools genmap_support.py Log: - Change internal unicode type from Py_UNICODE to ucs2_t (we use only ucs2 range of Py_UNICODE even on ucs4 python) - Seek from first of maps Revision Changes Path 1.9 +5 -3 cjkcodecs/tools/genmap_support.py Index: genmap_support.py =================================================================== RCS file: /cvsroot/koco/cjkcodecs/tools/genmap_support.py,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- genmap_support.py 6 Jul 2003 18:44:41 -0000 1.8 +++ genmap_support.py 6 Jul 2003 23:19:26 -0000 1.9 @@ -26,14 +26,14 @@ # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # -# $Id: genmap_support.py,v 1.8 2003/07/06 18:44:41 perky Exp $ +# $Id: genmap_support.py,v 1.9 2003/07/06 23:19:26 perky Exp $ # import re COPYRIGHT_HEADER = """\ /* - * $Id: genmap_support.py,v 1.8 2003/07/06 18:44:41 perky Exp $ + * $Id: genmap_support.py,v 1.9 2003/07/06 23:19:26 perky Exp $ */ """ @@ -113,7 +113,7 @@ codebunch.append('UNIINV,') def print_decmap(fo, codebunch, fmapprefix, fmap, f2map={}, f2mapprefix=''): - print >> fo, ("static const Py_UNICODE __%s_decmap[%d] = {" % ( + print >> fo, ("static const ucs2_t __%s_decmap[%d] = {" % ( fmapprefix, len(codebunch))) i = 0 while i < len(codebunch): @@ -141,6 +141,8 @@ print >> fo def loadmap(fo, natcol=0, unicol=1, sbcs=0): + print "Loading from", fo + fo.seek(0, 0) decmap = {} for line in fo: line = line.split('#', 1)[0].strip() |