ReactOS 0.4.16-dev-2207-geb15453
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 xmlCharInRange (unsigned int val, const xmlChRangeGroup *group)
 
XMLPUBFUN int xmlIsBaseChar (unsigned int ch)
 
XMLPUBFUN int xmlIsBlank (unsigned int ch)
 
XMLPUBFUN int xmlIsChar (unsigned int ch)
 
XMLPUBFUN int xmlIsCombining (unsigned int ch)
 
XMLPUBFUN int xmlIsDigit (unsigned int ch)
 
XMLPUBFUN int xmlIsExtender (unsigned int ch)
 
XMLPUBFUN int xmlIsIdeographic (unsigned int ch)
 
XMLPUBFUN int 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 xmlCharInRange(unsigned int val, const xmlChRangeGroup *group)
Definition: chvalid.c:170

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 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 170 of file chvalid.c.

170 {
171 int low, high, mid;
172 const xmlChSRange *sptr;
173 const xmlChLRange *lptr;
174
175 if (rptr == NULL) return(0);
176 if (val < 0x10000) { /* is val in 'short' or 'long' array? */
177 if (rptr->nbShortRange == 0)
178 return 0;
179 low = 0;
180 high = rptr->nbShortRange - 1;
181 sptr = rptr->shortRange;
182 while (low <= high) {
183 mid = (low + high) / 2;
184 if ((unsigned short) val < sptr[mid].low) {
185 high = mid - 1;
186 } else {
187 if ((unsigned short) val > sptr[mid].high) {
188 low = mid + 1;
189 } else {
190 return 1;
191 }
192 }
193 }
194 } else {
195 if (rptr->nbLongRange == 0) {
196 return 0;
197 }
198 low = 0;
199 high = rptr->nbLongRange - 1;
200 lptr = rptr->longRange;
201 while (low <= high) {
202 mid = (low + high) / 2;
203 if (val < lptr[mid].low) {
204 high = mid - 1;
205 } else {
206 if (val > lptr[mid].high) {
207 low = mid + 1;
208 } else {
209 return 1;
210 }
211 }
212 }
213 }
214 return 0;
215}
#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 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 228 of file chvalid.c.

228 {
229 return(xmlIsBaseCharQ(ch));
230}
#define xmlIsBaseCharQ(c)
Definition: chvalid.h:76
unsigned char ch[4][2]
Definition: console.c:118

◆ xmlIsBlank()

XMLPUBFUN int 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 243 of file chvalid.c.

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

◆ xmlIsChar()

XMLPUBFUN int 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 258 of file chvalid.c.

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

◆ xmlIsCombining()

XMLPUBFUN int 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 273 of file chvalid.c.

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

◆ xmlIsDigit()

XMLPUBFUN int 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 288 of file chvalid.c.

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

◆ xmlIsExtender()

XMLPUBFUN int 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 303 of file chvalid.c.

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

◆ xmlIsIdeographic()

XMLPUBFUN int 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 318 of file chvalid.c.

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

◆ xmlIsPubidChar()

XMLPUBFUN int 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 333 of file chvalid.c.

333 {
334 return(xmlIsPubidCharQ(ch));
335}
#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.