mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-21 14:53:44 +03:00
added two new macros IS_ASCII_LETTER and IS_ASCII_DIGIT used with (html)
* include/libxml/parserInternals.h: added two new macros IS_ASCII_LETTER and IS_ASCII_DIGIT used with (html) parsing and xpath for testing data not necessarily unicode. * HTMLparser.c, xpath.c: changed use of IS_LETTER_CH and IS_DIGIT_CH macros to ascii versions (bug 153936).
This commit is contained in:
@@ -197,6 +197,26 @@ XMLPUBVAR unsigned int xmlParserMaxDepth;
|
||||
*
|
||||
*/
|
||||
#define IS_LETTER_CH(c) xmlIsBaseChar_ch(c)
|
||||
|
||||
/**
|
||||
* IS_ASCII_LETTER(c)
|
||||
* @c: an xmlChar value
|
||||
*
|
||||
* Macro to check [a-zA-Z]
|
||||
*
|
||||
*/
|
||||
#define IS_ASCII_LETTER(c) (((0x41 <= (c)) && ((c) <= 0x5a)) || \
|
||||
((0x61 <= (c)) && ((c) <= 0x7a)))
|
||||
|
||||
/**
|
||||
* IS_ASCII_DIGIT(c)
|
||||
* @c: an xmlChar value
|
||||
*
|
||||
* Macro to check [0-9]
|
||||
*
|
||||
*/
|
||||
#define IS_ASCII_DIGIT(c) ((0x30 <= (c)) && ((c) <= 0x39))
|
||||
|
||||
/**
|
||||
* IS_PUBIDCHAR:
|
||||
* @c: an UNICODE value (int)
|
||||
|
||||
Reference in New Issue
Block a user