diff options
author | William M. Brack <wbrack@src.gnome.org> | 2003-10-18 16:20:14 +0000 |
---|---|---|
committer | William M. Brack <wbrack@src.gnome.org> | 2003-10-18 16:20:14 +0000 |
commit | 76e95df05556c9610b564b14cf578c8f9e34c9c1 (patch) | |
tree | 54d9c3de3e733b6c331651ac42afa66157297cca /entities.c | |
parent | 196b38860c1a33e2ee8656a8373e25835f141939 (diff) | |
download | android_external_libxml2-76e95df05556c9610b564b14cf578c8f9e34c9c1.tar.gz android_external_libxml2-76e95df05556c9610b564b14cf578c8f9e34c9c1.tar.bz2 android_external_libxml2-76e95df05556c9610b564b14cf578c8f9e34c9c1.zip |
Changed all (?) occurences where validation macros (IS_xxx) had
* include/libxml/parserInternals.h HTMLparser.c HTMLtree.c
SAX2.c catalog.c debugXML.c entities.c parser.c relaxng.c
testSAX.c tree.c valid.c xmlschemas.c xmlschemastypes.c
xpath.c: Changed all (?) occurences where validation macros
(IS_xxx) had single-byte arguments to use IS_xxx_CH instead
(e.g. IS_BLANK changed to IS_BLANK_CH). This gets rid of
many warning messages on certain platforms, and also high-
lights places in the library which may need to be enhanced
for proper UTF8 handling.
Diffstat (limited to 'entities.c')
-rw-r--r-- | entities.c | 12 |
1 files changed, 2 insertions, 10 deletions
@@ -17,6 +17,7 @@ #include <libxml/hash.h> #include <libxml/entities.h> #include <libxml/parser.h> +#include <libxml/parserInternals.h> #include <libxml/xmlerror.h> #include <libxml/globals.h> @@ -396,15 +397,6 @@ xmlGetDocEntity(xmlDocPtr doc, const xmlChar *name) { } /* - * [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] - * | [#x10000-#x10FFFF] - * any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. - */ -#define IS_CHAR(c) \ - (((c) == 0x09) || ((c) == 0x0a) || ((c) == 0x0d) || \ - (((c) >= 0x20) && ((c) != 0xFFFE) && ((c) != 0xFFFF))) - -/* * Macro used to grow the current buffer. */ #define growBufferReentrant() { \ @@ -563,7 +555,7 @@ xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input) { cur += l; continue; } - } else if (IS_CHAR((unsigned int) *cur)) { + } else if (IS_BYTE_CHAR(*cur)) { char buf[11], *ptr; snprintf(buf, sizeof(buf), "&#%d;", *cur); |