diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2006-03-26 22:52:40 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2006-03-26 22:52:40 +0000 |
commit | 8ea29c48f03ff33747040fbc3c47237422e52f20 (patch) | |
tree | 6d2194eaf9a63e03fbacebfdec8c64cc9a4a1185 | |
parent | 2a8c4c47da3699cb1ed498bec5114fd011a2e726 (diff) | |
download | libxml2-8ea29c48f03ff33747040fbc3c47237422e52f20.tar.gz |
fixed bug #335603 and resync'ed genChRanges.py to the expected output.
* chvalid.c genChRanges.py include/libxml/chvalid.h: fixed bug
#335603 and resync'ed genChRanges.py to the expected output.
Daniel
-rw-r--r-- | ChangeLog | 5 | ||||
-rwxr-xr-x | chvalid.c | 4 | ||||
-rwxr-xr-x | genChRanges.py | 13 | ||||
-rw-r--r-- | include/libxml/chvalid.h | 6 |
4 files changed, 20 insertions, 8 deletions
@@ -1,3 +1,8 @@ +Mon Mar 27 00:51:40 CEST 2006 Daniel Veillard <daniel@veillard.com> + + * chvalid.c genChRanges.py include/libxml/chvalid.h: fixed bug + #335603 and resync'ed genChRanges.py to the expected output. + Wed Mar 22 00:14:34 CET 2006 Daniel Veillard <daniel@veillard.com> * xmlregexp.c: applied patch from Youri Golovanov fixing bug @@ -5,7 +5,7 @@ * This file is automatically generated from the cvs source * definition files using the genChRanges.py Python script * - * Generation date: Tue Nov 18 08:14:21 2003 + * Generation date: Mon Mar 27 00:45:29 2006 * Sources: chvalid.def * William Brack <wbrack@mmm.com.hk> */ @@ -22,7 +22,7 @@ * allowed. * */ -unsigned char xmlIsPubidChar_tab[256] = { +const unsigned char xmlIsPubidChar_tab[256] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, diff --git a/genChRanges.py b/genChRanges.py index d613148b..2d7b0af3 100755 --- a/genChRanges.py +++ b/genChRanges.py @@ -223,6 +223,7 @@ header.write( #define __XML_CHVALID_H__ #include <libxml/xmlversion.h> +#include <libxml/xmlstring.h> #ifdef __cplusplus extern "C" { @@ -311,7 +312,7 @@ for f in fkeys: rangeTable = makeRange(Functs[f][0]) numRanges = len(rangeTable) if numRanges >= minTableSize: # table is worthwhile - header.write("XMLPUBVAR unsigned char %s_tab[256];\n" % f) + header.write("XMLPUBVAR const unsigned char %s_tab[256];\n" % f) header.write(""" /** * %s_ch: @@ -323,7 +324,7 @@ for f in fkeys: header.write("#define %s_ch(c)\t(%s_tab[(c)])\n" % (f, f)) # write the constant data to the code file - output.write("unsigned char %s_tab[256] = {\n" % f) + output.write("const unsigned char %s_tab[256] = {\n" % f) pline = " " for n in range(255): pline += " 0x%02x," % Functs[f][0][n] @@ -490,6 +491,8 @@ xmlCharInRange (unsigned int val, const xmlChRangeGroupPtr rptr) { int low, high, mid; xmlChSRangePtr sptr; xmlChLRangePtr lptr; + + if (rptr == NULL) return(0); if (val < 0x10000) { /* is val in 'short' or 'long' array? */ if (rptr->nbShortRange == 0) return 0; @@ -564,8 +567,12 @@ header.write(""" } #endif #endif /* __XML_CHVALID_H__ */ -"""); +""") header.close() + +output.write("""#define bottom_chvalid +#include "elfgcchack.h" +""") output.close() diff --git a/include/libxml/chvalid.h b/include/libxml/chvalid.h index 6301a91f..339db1a3 100644 --- a/include/libxml/chvalid.h +++ b/include/libxml/chvalid.h @@ -1,12 +1,12 @@ /* * Summary: Unicode character range checking * Description: this module exports interfaces for the character - * range validation APIs + * range validation APIs * * This file is automatically generated from the cvs source * definition files using the genChRanges.py Python script * - * Generation date: Tue Nov 18 08:14:21 2003 + * Generation date: Mon Mar 27 00:45:29 2006 * Sources: chvalid.def * Author: William Brack <wbrack@mmm.com.hk> */ @@ -188,7 +188,7 @@ XMLPUBVAR xmlChRangeGroup xmlIsExtenderGroup; ((0x3021 <= (c)) && ((c) <= 0x3029)))) XMLPUBVAR xmlChRangeGroup xmlIsIdeographicGroup; -XMLPUBVAR unsigned char xmlIsPubidChar_tab[256]; +XMLPUBVAR const unsigned char xmlIsPubidChar_tab[256]; /** * xmlIsPubidChar_ch: |