Hash :
1a99396b
Author :
Date :
2003-10-11T20:58:06
removed some annoying warnings fixed a bug in the PubidChars definition, * check-xml-test-suite.py: removed some annoying warnings * chvalid.def chvalid.c include/libxml/chvalid.h: fixed a bug in the PubidChars definition, regenerated, there is still a bug left somewhere * genChRanges.py: save the header directly in include/libxml/ * configure.in: I generated a 2.6.0beta6 earlier today Daniel
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
/*
* chvalid.h: this header exports interfaces for the character
* range validation APIs
*
* This file is automatically generated from the cvs source
* definition files using the genChRanges.py Python script
*
* Generation date: Sat Oct 11 22:34:08 2003
* Sources: chvalid.def
* William Brack <wbrack@mmm.com.hk>
*/
#ifndef __XML_CHVALID_H__
#define __XML_CHVALID_H__
#ifdef __cplusplus
extern "C" {
#endif
/*
* Define our typedefs and structures
*
*/
typedef struct _xmlChSRange xmlChSRange;
typedef xmlChSRange *xmlChSRangePtr;
struct _xmlChSRange {
unsigned short low;
unsigned short high;
};
typedef struct _xmlChLRange xmlChLRange;
typedef xmlChLRange *xmlChLRangePtr;
struct _xmlChLRange {
unsigned low;
unsigned high;
};
typedef struct _xmlChRangeGroup xmlChRangeGroup;
typedef xmlChRangeGroup *xmlChRangeGroupPtr;
struct _xmlChRangeGroup {
int nbShortRange;
int nbLongRange;
xmlChSRangePtr shortRange; /* points to an array of ranges */
xmlChLRangePtr longRange;
};
/* Range checking routine */
int xmlCharInRange(unsigned int val, const xmlChRangeGroupPtr group);
#define xmlIsBaseChar_ch(c) ( ((0x41<= (c)) && ((c) <= 0x5a)) || \
((0x61<= (c)) && ((c) <= 0x7a)) || \
((0xc0<= (c)) && ((c) <= 0xd6)) || \
((0xd8<= (c)) && ((c) <= 0xf6)) || \
((0xf8<= (c)) && ((c) <= 0xff)))
#define xmlIsBaseChar(c) (((c) < 0x100) ? \
xmlIsBaseChar_ch((c)) : \
xmlCharInRange((c), &xmlIsBaseCharGroup))
extern xmlChRangeGroup xmlIsBaseCharGroup;
#define xmlIsBlank_ch(c) ( ((c) == 0x20) || \
((0x9<= (c)) && ((c) <= 0xa)) || \
((c) == 0xd))
#define xmlIsBlank(c) (((c) < 0x100) ? \
xmlIsBlank_ch((c)) : 0)
#define xmlIsChar_ch(c) ( ((0x9<= (c)) && ((c) <= 0xa)) || \
((c) == 0xd) || \
((0x20<= (c)) && ((c) <= 0xff)))
#define xmlIsChar(c) (((c) < 0x100) ? \
xmlIsChar_ch((c)) : \
xmlCharInRange((c), &xmlIsCharGroup))
extern xmlChRangeGroup xmlIsCharGroup;
#define xmlIsCombining(c) (((c) < 0x100) ? \
0 : \
xmlCharInRange((c), &xmlIsCombiningGroup))
extern xmlChRangeGroup xmlIsCombiningGroup;
#define xmlIsDigit_ch(c) ( ((0x30<= (c)) && ((c) <= 0x39)))
#define xmlIsDigit(c) (((c) < 0x100) ? \
xmlIsDigit_ch((c)) : \
xmlCharInRange((c), &xmlIsDigitGroup))
extern xmlChRangeGroup xmlIsDigitGroup;
#define xmlIsExtender_ch(c) ( ((c) == 0xb7))
#define xmlIsExtender(c) (((c) < 0x100) ? \
xmlIsExtender_ch((c)) : \
xmlCharInRange((c), &xmlIsExtenderGroup))
extern xmlChRangeGroup xmlIsExtenderGroup;
#define xmlIsIdeographic(c) (((c) < 0x100) ? \
0 : \
xmlCharInRange((c), &xmlIsIdeographicGroup))
extern xmlChRangeGroup xmlIsIdeographicGroup;
extern unsigned char xmlIsPubidChar_tab[256];
#define xmlIsPubidChar_ch(c) (xmlIsPubidChar_tab[(c)])
#define xmlIsPubidChar(c) (((c) < 0x100) ? \
xmlIsPubidChar_ch((c)) : 0)
#ifdef __cplusplus
}
#endif
#endif /* __XML_CHVALID_H__ */