diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2006-03-27 09:30:13 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2006-03-27 09:30:13 +0000 |
commit | 05e9db806d9eeb2fbe40580ce1a903a70745cafc (patch) | |
tree | 1a3bbf40d29b2c6259b7cdf731bd278d1ce97b09 /genChRanges.py | |
parent | 8ea29c48f03ff33747040fbc3c47237422e52f20 (diff) | |
download | libxml2-05e9db806d9eeb2fbe40580ce1a903a70745cafc.tar.gz |
applied patches from Aivars Kalvans to make unicode tables const, fixes
* chvalid.c genChRanges.py genUnicode.py xmlunicode.c
include/libxml/chvalid.h include/libxml/xmlunicode.h: applied
patches from Aivars Kalvans to make unicode tables const, fixes
bug #336096, this also updates to Unicode 4.01 final with a couple
of character ranges fixes.
Daniel
Diffstat (limited to 'genChRanges.py')
-rwxr-xr-x | genChRanges.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/genChRanges.py b/genChRanges.py index 2d7b0af3..c1383193 100755 --- a/genChRanges.py +++ b/genChRanges.py @@ -252,15 +252,15 @@ typedef xmlChRangeGroup *xmlChRangeGroupPtr; struct _xmlChRangeGroup { int nbShortRange; int nbLongRange; - xmlChSRangePtr shortRange; /* points to an array of ranges */ - xmlChLRangePtr longRange; + const xmlChSRange *shortRange; /* points to an array of ranges */ + const xmlChLRange *longRange; }; /** * Range checking routine */ XMLPUBFUN int XMLCALL - xmlCharInRange(unsigned int val, const xmlChRangeGroupPtr group); + xmlCharInRange(unsigned int val, const xmlChRangeGroup *group); """ % (date, sources)); output.write( @@ -424,7 +424,7 @@ for f in fkeys: if len(Functs[f][1]) > 0: - header.write("XMLPUBVAR xmlChRangeGroup %sGroup;\n" % f) + header.write("XMLPUBVAR const xmlChRangeGroup %sGroup;\n" % f) # @@ -440,7 +440,7 @@ for f in fkeys: for rg in rangeTable: if rg[1] < 0x10000: # if short value if numShort == 0: # first occurence - pline = "static xmlChSRange %s_srng[] = { " % f + pline = "static const xmlChSRange %s_srng[] = { " % f else: pline += ", " numShort += 1 @@ -452,7 +452,7 @@ for f in fkeys: if numLong == 0: # first occurence if numShort > 0: # if there were shorts, finish them off output.write(pline + "};\n") - pline = "static xmlChLRange %s_lrng[] = { " % f + pline = "static const xmlChLRange %s_lrng[] = { " % f else: pline += ", " numLong += 1 @@ -462,7 +462,7 @@ for f in fkeys: pline += "{0x%x, 0x%x}" % (rg[0], rg[1]) output.write(pline + "};\n") # finish off last group - pline = "xmlChRangeGroup %sGroup =\n\t{%d, %d, " % (f, numShort, numLong) + pline = "const xmlChRangeGroup %sGroup =\n\t{%d, %d, " % (f, numShort, numLong) if numShort > 0: pline += "%s_srng" % f else: @@ -487,10 +487,10 @@ output.write( * Returns: true if character valid, false otherwise */ int -xmlCharInRange (unsigned int val, const xmlChRangeGroupPtr rptr) { +xmlCharInRange (unsigned int val, const xmlChRangeGroup *rptr) { int low, high, mid; - xmlChSRangePtr sptr; - xmlChLRangePtr lptr; + const xmlChSRange *sptr; + const xmlChLRange *lptr; if (rptr == NULL) return(0); if (val < 0x10000) { /* is val in 'short' or 'long' array? */ |