ReactOS 0.4.15-dev-8109-gd7be748
chvalid.h File Reference
Include dependency graph for chvalid.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _xmlChSRange
 
struct  _xmlChLRange
 
struct  _xmlChRangeGroup
 

Macros

#define xmlIsBaseChar_ch(c)
 
#define xmlIsBaseCharQ(c)
 
#define xmlIsBlank_ch(c)
 
#define xmlIsBlankQ(c)
 
#define xmlIsChar_ch(c)
 
#define xmlIsCharQ(c)
 
#define xmlIsCombiningQ(c)
 
#define xmlIsDigit_ch(c)   (((0x30 <= (c)) && ((c) <= 0x39)))
 
#define xmlIsDigitQ(c)
 
#define xmlIsExtender_ch(c)   (((c) == 0xb7))
 
#define xmlIsExtenderQ(c)
 
#define xmlIsIdeographicQ(c)
 
#define xmlIsPubidChar_ch(c)   (xmlIsPubidChar_tab[(c)])
 
#define xmlIsPubidCharQ(c)
 

Typedefs

typedef struct _xmlChSRange xmlChSRange
 
typedef xmlChSRangexmlChSRangePtr
 
typedef struct _xmlChLRange xmlChLRange
 
typedef xmlChLRangexmlChLRangePtr
 
typedef struct _xmlChRangeGroup xmlChRangeGroup
 
typedef xmlChRangeGroupxmlChRangeGroupPtr
 

Functions

XMLPUBFUN int XMLCALL xmlCharInRange (unsigned int val, const xmlChRangeGroup *group)
 
XMLPUBFUN int XMLCALL xmlIsBaseChar (unsigned int ch)
 
XMLPUBFUN int XMLCALL xmlIsBlank (unsigned int ch)
 
XMLPUBFUN int XMLCALL xmlIsChar (unsigned int ch)
 
XMLPUBFUN int XMLCALL xmlIsCombining (unsigned int ch)
 
XMLPUBFUN int XMLCALL xmlIsDigit (unsigned int ch)
 
XMLPUBFUN int XMLCALL xmlIsExtender (unsigned int ch)
 
XMLPUBFUN int XMLCALL xmlIsIdeographic (unsigned int ch)
 
XMLPUBFUN int XMLCALL xmlIsPubidChar (unsigned int ch)
 

Variables

XMLPUBVAR const xmlChRangeGroup xmlIsBaseCharGroup
 
XMLPUBVAR const xmlChRangeGroup xmlIsCharGroup
 
XMLPUBVAR const xmlChRangeGroup xmlIsCombiningGroup
 
XMLPUBVAR const xmlChRangeGroup xmlIsDigitGroup
 
XMLPUBVAR const xmlChRangeGroup xmlIsExtenderGroup
 
XMLPUBVAR const xmlChRangeGroup xmlIsIdeographicGroup
 
XMLPUBVAR const unsigned char xmlIsPubidChar_tab [256]
 

Macro Definition Documentation

◆ xmlIsBaseChar_ch

#define xmlIsBaseChar_ch (   c)
Value:
(((0x41 <= (c)) && ((c) <= 0x5a)) || \
((0x61 <= (c)) && ((c) <= 0x7a)) || \
((0xc0 <= (c)) && ((c) <= 0xd6)) || \
((0xd8 <= (c)) && ((c) <= 0xf6)) || \
(0xf8 <= (c)))
const GLubyte * c
Definition: glext.h:8905
#define c
Definition: ke_i.h:80

xmlIsBaseChar_ch: : char to validate

Automatically generated by genChRanges.py

Definition at line 64 of file chvalid.h.

◆ xmlIsBaseCharQ

#define xmlIsBaseCharQ (   c)
Value:
(((c) < 0x100) ? \
xmlIsBaseChar_ch((c)) : \
XMLPUBVAR const xmlChRangeGroup xmlIsBaseCharGroup
Definition: chvalid.h:80
XMLPUBFUN int XMLCALL xmlCharInRange(unsigned int val, const xmlChRangeGroup *group)
Definition: chvalid.c:168

xmlIsBaseCharQ: : char to validate

Automatically generated by genChRanges.py

Definition at line 76 of file chvalid.h.

◆ xmlIsBlank_ch

#define xmlIsBlank_ch (   c)
Value:
(((c) == 0x20) || \
((0x9 <= (c)) && ((c) <= 0xa)) || \
((c) == 0xd))

xmlIsBlank_ch: : char to validate

Automatically generated by genChRanges.py

Definition at line 88 of file chvalid.h.

◆ xmlIsBlankQ

#define xmlIsBlankQ (   c)
Value:
(((c) < 0x100) ? \
xmlIsBlank_ch((c)) : 0)

xmlIsBlankQ: : char to validate

Automatically generated by genChRanges.py

Definition at line 98 of file chvalid.h.

◆ xmlIsChar_ch

#define xmlIsChar_ch (   c)
Value:
(((0x9 <= (c)) && ((c) <= 0xa)) || \
((c) == 0xd) || \
(0x20 <= (c)))

xmlIsChar_ch: : char to validate

Automatically generated by genChRanges.py

Definition at line 108 of file chvalid.h.

◆ xmlIsCharQ

#define xmlIsCharQ (   c)
Value:
(((c) < 0x100) ? \
xmlIsChar_ch((c)) :\
(((0x100 <= (c)) && ((c) <= 0xd7ff)) || \
((0xe000 <= (c)) && ((c) <= 0xfffd)) || \
((0x10000 <= (c)) && ((c) <= 0x10ffff))))

xmlIsCharQ: : char to validate

Automatically generated by genChRanges.py

Definition at line 118 of file chvalid.h.

◆ xmlIsCombiningQ

#define xmlIsCombiningQ (   c)
Value:
(((c) < 0x100) ? \
0 : \
xmlCharInRange((c), &xmlIsCombiningGroup))
XMLPUBVAR const xmlChRangeGroup xmlIsCombiningGroup
Definition: chvalid.h:136

xmlIsCombiningQ: : char to validate

Automatically generated by genChRanges.py

Definition at line 132 of file chvalid.h.

◆ xmlIsDigit_ch

#define xmlIsDigit_ch (   c)    (((0x30 <= (c)) && ((c) <= 0x39)))

xmlIsDigit_ch: : char to validate

Automatically generated by genChRanges.py

Definition at line 144 of file chvalid.h.

◆ xmlIsDigitQ

#define xmlIsDigitQ (   c)
Value:
(((c) < 0x100) ? \
xmlIsDigit_ch((c)) : \
XMLPUBVAR const xmlChRangeGroup xmlIsDigitGroup
Definition: chvalid.h:156

xmlIsDigitQ: : char to validate

Automatically generated by genChRanges.py

Definition at line 152 of file chvalid.h.

◆ xmlIsExtender_ch

#define xmlIsExtender_ch (   c)    (((c) == 0xb7))

xmlIsExtender_ch: : char to validate

Automatically generated by genChRanges.py

Definition at line 164 of file chvalid.h.

◆ xmlIsExtenderQ

#define xmlIsExtenderQ (   c)
Value:
(((c) < 0x100) ? \
xmlIsExtender_ch((c)) : \
XMLPUBVAR const xmlChRangeGroup xmlIsExtenderGroup
Definition: chvalid.h:176

xmlIsExtenderQ: : char to validate

Automatically generated by genChRanges.py

Definition at line 172 of file chvalid.h.

◆ xmlIsIdeographicQ

#define xmlIsIdeographicQ (   c)
Value:
(((c) < 0x100) ? \
0 :\
(((0x4e00 <= (c)) && ((c) <= 0x9fa5)) || \
((c) == 0x3007) || \
((0x3021 <= (c)) && ((c) <= 0x3029))))

xmlIsIdeographicQ: : char to validate

Automatically generated by genChRanges.py

Definition at line 184 of file chvalid.h.

◆ xmlIsPubidChar_ch

#define xmlIsPubidChar_ch (   c)    (xmlIsPubidChar_tab[(c)])

xmlIsPubidChar_ch: : char to validate

Automatically generated by genChRanges.py

Definition at line 199 of file chvalid.h.

◆ xmlIsPubidCharQ

#define xmlIsPubidCharQ (   c)
Value:
(((c) < 0x100) ? \
xmlIsPubidChar_ch((c)) : 0)

xmlIsPubidCharQ: : char to validate

Automatically generated by genChRanges.py

Definition at line 207 of file chvalid.h.

Typedef Documentation

◆ xmlChLRange

Definition at line 35 of file chvalid.h.

◆ xmlChLRangePtr

Definition at line 36 of file chvalid.h.

◆ xmlChRangeGroup

Definition at line 42 of file chvalid.h.

◆ xmlChRangeGroupPtr

Definition at line 43 of file chvalid.h.

◆ xmlChSRange

Definition at line 28 of file chvalid.h.

◆ xmlChSRangePtr

Definition at line 29 of file chvalid.h.

Function Documentation

◆ xmlCharInRange()

XMLPUBFUN int XMLCALL xmlCharInRange ( unsigned int  val,
const xmlChRangeGroup rptr 
)

Range checking routine

xmlCharInRange: @val: character to be validated @rptr: pointer to range to be used to validate

Does a binary search of the range table to determine if char is valid

Returns: true if character valid, false otherwise

Definition at line 168 of file chvalid.c.

168 {
169 int low, high, mid;
170 const xmlChSRange *sptr;
171 const xmlChLRange *lptr;
172
173 if (rptr == NULL) return(0);
174 if (val < 0x10000) { /* is val in 'short' or 'long' array? */
175 if (rptr->nbShortRange == 0)
176 return 0;
177 low = 0;
178 high = rptr->nbShortRange - 1;
179 sptr = rptr->shortRange;
180 while (low <= high) {
181 mid = (low + high) / 2;
182 if ((unsigned short) val < sptr[mid].low) {
183 high = mid - 1;
184 } else {
185 if ((unsigned short) val > sptr[mid].high) {
186 low = mid + 1;
187 } else {
188 return 1;
189 }
190 }
191 }
192 } else {
193 if (rptr->nbLongRange == 0) {
194 return 0;
195 }
196 low = 0;
197 high = rptr->nbLongRange - 1;
198 lptr = rptr->longRange;
199 while (low <= high) {
200 mid = (low + high) / 2;
201 if (val < lptr[mid].low) {
202 high = mid - 1;
203 } else {
204 if (val > lptr[mid].high) {
205 low = mid + 1;
206 } else {
207 return 1;
208 }
209 }
210 }
211 }
212 return 0;
213}
#define NULL
Definition: types.h:112
GLuint GLfloat * val
Definition: glext.h:7180
const xmlChLRange * longRange
Definition: chvalid.h:48
int nbShortRange
Definition: chvalid.h:45
const xmlChSRange * shortRange
Definition: chvalid.h:47
unsigned short high
Definition: chvalid.h:32
unsigned short low
Definition: chvalid.h:31

◆ xmlIsBaseChar()

XMLPUBFUN int XMLCALL xmlIsBaseChar ( unsigned int  ch)

xmlIsBaseChar: @ch: character to validate

This function is DEPRECATED. Use xmlIsBaseChar_ch or xmlIsBaseCharQ instead

Returns true if argument valid, false otherwise

Definition at line 226 of file chvalid.c.

226 {
227 return(xmlIsBaseCharQ(ch));
228}
#define xmlIsBaseCharQ(c)
Definition: chvalid.h:76

◆ xmlIsBlank()

XMLPUBFUN int XMLCALL xmlIsBlank ( unsigned int  ch)

xmlIsBlank: @ch: character to validate

This function is DEPRECATED. Use xmlIsBlank_ch or xmlIsBlankQ instead

Returns true if argument valid, false otherwise

Definition at line 241 of file chvalid.c.

241 {
242 return(xmlIsBlankQ(ch));
243}
#define xmlIsBlankQ(c)
Definition: chvalid.h:98

◆ xmlIsChar()

XMLPUBFUN int XMLCALL xmlIsChar ( unsigned int  ch)

xmlIsChar: @ch: character to validate

This function is DEPRECATED. Use xmlIsChar_ch or xmlIsCharQ instead

Returns true if argument valid, false otherwise

Definition at line 256 of file chvalid.c.

256 {
257 return(xmlIsCharQ(ch));
258}
#define xmlIsCharQ(c)
Definition: chvalid.h:118

◆ xmlIsCombining()

XMLPUBFUN int XMLCALL xmlIsCombining ( unsigned int  ch)

xmlIsCombining: @ch: character to validate

This function is DEPRECATED. Use xmlIsCombiningQ instead

Returns true if argument valid, false otherwise

Definition at line 271 of file chvalid.c.

271 {
272 return(xmlIsCombiningQ(ch));
273}
#define xmlIsCombiningQ(c)
Definition: chvalid.h:132

◆ xmlIsDigit()

XMLPUBFUN int XMLCALL xmlIsDigit ( unsigned int  ch)

xmlIsDigit: @ch: character to validate

This function is DEPRECATED. Use xmlIsDigit_ch or xmlIsDigitQ instead

Returns true if argument valid, false otherwise

Definition at line 286 of file chvalid.c.

286 {
287 return(xmlIsDigitQ(ch));
288}
#define xmlIsDigitQ(c)
Definition: chvalid.h:152

◆ xmlIsExtender()

XMLPUBFUN int XMLCALL xmlIsExtender ( unsigned int  ch)

xmlIsExtender: @ch: character to validate

This function is DEPRECATED. Use xmlIsExtender_ch or xmlIsExtenderQ instead

Returns true if argument valid, false otherwise

Definition at line 301 of file chvalid.c.

301 {
302 return(xmlIsExtenderQ(ch));
303}
#define xmlIsExtenderQ(c)
Definition: chvalid.h:172

◆ xmlIsIdeographic()

XMLPUBFUN int XMLCALL xmlIsIdeographic ( unsigned int  ch)

xmlIsIdeographic: @ch: character to validate

This function is DEPRECATED. Use xmlIsIdeographicQ instead

Returns true if argument valid, false otherwise

Definition at line 316 of file chvalid.c.

316 {
317 return(xmlIsIdeographicQ(ch));
318}
#define xmlIsIdeographicQ(c)
Definition: chvalid.h:184

◆ xmlIsPubidChar()

XMLPUBFUN int XMLCALL xmlIsPubidChar ( unsigned int  ch)

xmlIsPubidChar: @ch: character to validate

This function is DEPRECATED. Use xmlIsPubidChar_ch or xmlIsPubidCharQ instead

Returns true if argument valid, false otherwise

Definition at line 331 of file chvalid.c.

331 {
332 return(xmlIsPubidCharQ(ch));
333}
#define xmlIsPubidCharQ(c)
Definition: chvalid.h:207

Variable Documentation

◆ xmlIsBaseCharGroup

XMLPUBVAR const xmlChRangeGroup xmlIsBaseCharGroup

Definition at line 80 of file chvalid.h.

◆ xmlIsCharGroup

Definition at line 124 of file chvalid.h.

◆ xmlIsCombiningGroup

XMLPUBVAR const xmlChRangeGroup xmlIsCombiningGroup

Definition at line 136 of file chvalid.h.

◆ xmlIsDigitGroup

XMLPUBVAR const xmlChRangeGroup xmlIsDigitGroup

Definition at line 156 of file chvalid.h.

◆ xmlIsExtenderGroup

XMLPUBVAR const xmlChRangeGroup xmlIsExtenderGroup

Definition at line 176 of file chvalid.h.

◆ xmlIsIdeographicGroup

XMLPUBVAR const xmlChRangeGroup xmlIsIdeographicGroup

Definition at line 190 of file chvalid.h.

◆ xmlIsPubidChar_tab

XMLPUBVAR const unsigned char xmlIsPubidChar_tab[256]

Definition at line 191 of file chvalid.h.