Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

chvalid.h

Go to the documentation of this file.
00001 /*
00002  * chvalid.h: this header exports interfaces for the character
00003  *               range validation APIs
00004  *
00005  * This file is automatically generated from the cvs source
00006  * definition files using the genChRanges.py Python script
00007  *
00008  * Generation date: Sat Oct 18 20:32:35 2003
00009  * Sources: chvalid.def
00010  * William Brack <wbrack@mmm.com.hk>
00011  */
00012 
00013 #ifndef __XML_CHVALID_H__
00014 #define __XML_CHVALID_H__
00015 
00016 #include <libxml/xmlversion.h>
00017 
00018 #ifdef __cplusplus
00019 extern "C" {
00020 #endif
00021 
00022 /*
00023  * Define our typedefs and structures
00024  *
00025  */
00026 typedef struct _xmlChSRange xmlChSRange;
00027 typedef xmlChSRange *xmlChSRangePtr;
00028 struct _xmlChSRange {
00029     unsigned short      low;
00030     unsigned short      high;
00031 };
00032 
00033 typedef struct _xmlChLRange xmlChLRange;
00034 typedef xmlChLRange *xmlChLRangePtr;
00035 struct _xmlChLRange {
00036     unsigned int        low;
00037     unsigned int        high;
00038 };
00039 
00040 typedef struct _xmlChRangeGroup xmlChRangeGroup;
00041 typedef xmlChRangeGroup *xmlChRangeGroupPtr;
00042 struct _xmlChRangeGroup {
00043     int                 nbShortRange;
00044     int                 nbLongRange;
00045     xmlChSRangePtr      shortRange;     /* points to an array of ranges */
00046     xmlChLRangePtr      longRange;
00047 };
00048 
00052 XMLPUBFUN int XMLCALL
00053                 xmlCharInRange(unsigned int val, const xmlChRangeGroupPtr rptr);
00054 
00055 
00063 #define xmlIsBaseChar_ch(c)     (((0x41 <= (c)) && ((c) <= 0x5a)) || \
00064                                  ((0x61 <= (c)) && ((c) <= 0x7a)) || \
00065                                  ((0xc0 <= (c)) && ((c) <= 0xd6)) || \
00066                                  ((0xd8 <= (c)) && ((c) <= 0xf6)) || \
00067                                  ((0xf8 <= (c)) && ((c) <= 0xff)))
00068 
00075 #define xmlIsBaseCharQ(c)       (((c) < 0x100) ? \
00076                                  xmlIsBaseChar_ch((c)) : \
00077                                  xmlCharInRange((c), &xmlIsBaseCharGroup))
00078 
00079 XMLPUBVAR xmlChRangeGroup xmlIsBaseCharGroup;
00080 
00088 #define xmlIsBlank_ch(c)        (((c) == 0x20) || \
00089                                  ((0x9 <= (c)) && ((c) <= 0xa)) || \
00090                                  ((c) == 0xd))
00091 
00098 #define xmlIsBlankQ(c)          (((c) < 0x100) ? \
00099                                  xmlIsBlank_ch((c)) : 0)
00100 
00101 
00109 #define xmlIsChar_ch(c)         (((0x9 <= (c)) && ((c) <= 0xa)) || \
00110                                  ((c) == 0xd) || \
00111                                  ((0x20 <= (c)) && ((c) <= 0xff)))
00112 
00119 #define xmlIsCharQ(c)           (((c) < 0x100) ? \
00120                                  xmlIsChar_ch((c)) :\
00121                                 (((0x100 <= (c)) && ((c) <= 0xd7ff)) || \
00122                                  ((0xe000 <= (c)) && ((c) <= 0xfffd)) || \
00123                                  ((0x10000 <= (c)) && ((c) <= 0x10ffff))))
00124 
00125 XMLPUBVAR xmlChRangeGroup xmlIsCharGroup;
00126 
00133 #define xmlIsCombiningQ(c)      (((c) < 0x100) ? \
00134                                  0 : \
00135                                  xmlCharInRange((c), &xmlIsCombiningGroup))
00136 
00137 XMLPUBVAR xmlChRangeGroup xmlIsCombiningGroup;
00138 
00146 #define xmlIsDigit_ch(c)        (((0x30 <= (c)) && ((c) <= 0x39)))
00147 
00154 #define xmlIsDigitQ(c)          (((c) < 0x100) ? \
00155                                  xmlIsDigit_ch((c)) : \
00156                                  xmlCharInRange((c), &xmlIsDigitGroup))
00157 
00158 XMLPUBVAR xmlChRangeGroup xmlIsDigitGroup;
00159 
00167 #define xmlIsExtender_ch(c)     (((c) == 0xb7))
00168 
00175 #define xmlIsExtenderQ(c)       (((c) < 0x100) ? \
00176                                  xmlIsExtender_ch((c)) : \
00177                                  xmlCharInRange((c), &xmlIsExtenderGroup))
00178 
00179 XMLPUBVAR xmlChRangeGroup xmlIsExtenderGroup;
00180 
00187 #define xmlIsIdeographicQ(c)    (((c) < 0x100) ? \
00188                                  0 :\
00189                                 (((0x4e00 <= (c)) && ((c) <= 0x9fa5)) || \
00190                                  ((c) == 0x3007) || \
00191                                  ((0x3021 <= (c)) && ((c) <= 0x3029))))
00192 
00193 XMLPUBVAR xmlChRangeGroup xmlIsIdeographicGroup;
00194 XMLPUBVAR unsigned char xmlIsPubidChar_tab[256];
00195 
00202 #define xmlIsPubidChar_ch(c)    (xmlIsPubidChar_tab[(c)])
00203 
00210 #define xmlIsPubidCharQ(c)      (((c) < 0x100) ? \
00211                                  xmlIsPubidChar_ch((c)) : 0)
00212 
00213 XMLPUBFUN int XMLCALL
00214                 xmlIsBaseChar(unsigned int ch);
00215 XMLPUBFUN int XMLCALL
00216                 xmlIsBlank(unsigned int ch);
00217 XMLPUBFUN int XMLCALL
00218                 xmlIsChar(unsigned int ch);
00219 XMLPUBFUN int XMLCALL
00220                 xmlIsCombining(unsigned int ch);
00221 XMLPUBFUN int XMLCALL
00222                 xmlIsDigit(unsigned int ch);
00223 XMLPUBFUN int XMLCALL
00224                 xmlIsExtender(unsigned int ch);
00225 XMLPUBFUN int XMLCALL
00226                 xmlIsIdeographic(unsigned int ch);
00227 XMLPUBFUN int XMLCALL
00228                 xmlIsPubidChar(unsigned int ch);
00229 
00230 #ifdef __cplusplus
00231 }
00232 #endif
00233 #endif /* __XML_CHVALID_H__ */
00234 

Generated on Wed Mar 16 00:10:26 2005 for Dibbler - a portable DHCPv6 by  doxygen 1.3.9.1