epoc32/include/stdapis/libxml2/libxml2_chvalid.h
branchSymbian3
changeset 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/stdapis/libxml2/libxml2_chvalid.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -0,0 +1,251 @@
     1.4 +/*
     1.5 + * Summary: Unicode character range checking
     1.6 + * Description: this module exports interfaces for the character
     1.7 + *       range validation APIs
     1.8 + *
     1.9 + * This file is automatically generated from the cvs source
    1.10 + * definition files using the genChRanges.py Python script
    1.11 + *
    1.12 + * Generation date: Tue Nov 18 08:14:21 2003
    1.13 + * Sources: chvalid.def
    1.14 + * Author: William Brack <wbrack@mmm.com.hk>
    1.15 + * 
    1.16 + * See Copyright for the status of this software.
    1.17 + * Portion Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. 
    1.18 + */
    1.19 +
    1.20 +/** @file
    1.21 +@publishedAll
    1.22 +@released
    1.23 +*/
    1.24 +
    1.25 +#ifndef XML_CHVALID_H
    1.26 +#define XML_CHVALID_H
    1.27 +
    1.28 +#pragma warning(disable: 4127 4132 4510 4512 4610)
    1.29 +
    1.30 +#include "libxml2_xmlstring.h"
    1.31 +
    1.32 +#ifdef __cplusplus
    1.33 +extern "C" {
    1.34 +#endif
    1.35 +
    1.36 +/*
    1.37 + * Define our typedefs and structures
    1.38 + *
    1.39 + */
    1.40 +
    1.41 +// XMLENGINE: xmlChSRangePtr declared as const now
    1.42 +typedef struct _xmlChSRange xmlChSRange;
    1.43 +typedef const xmlChSRange* xmlChSRangePtr;
    1.44 +struct _xmlChSRange {
    1.45 +    const unsigned short    low;
    1.46 +    const unsigned short    high;
    1.47 +};
    1.48 +
    1.49 +typedef struct _xmlChLRange xmlChLRange;
    1.50 +typedef const xmlChLRange* xmlChLRangePtr;
    1.51 +struct _xmlChLRange {
    1.52 +    const unsigned int  low;
    1.53 +    const unsigned int  high;
    1.54 +};
    1.55 +
    1.56 +typedef struct _xmlChRangeGroup xmlChRangeGroup;
    1.57 +typedef const xmlChRangeGroup *xmlChRangeGroupPtr;
    1.58 +struct _xmlChRangeGroup {
    1.59 +    const int            nbShortRange;
    1.60 +    const int            nbLongRange;
    1.61 +    const xmlChSRangePtr shortRange;    /* points to an array of ranges */
    1.62 +    const xmlChLRangePtr longRange;
    1.63 +};
    1.64 +
    1.65 +/**
    1.66 + * Range checking routine
    1.67 + */
    1.68 +XMLPUBFUN int XMLCALL
    1.69 +        xmlCharInRange(unsigned int val, const xmlChRangeGroupPtr group);
    1.70 +
    1.71 +
    1.72 +/**
    1.73 + * xmlIsBaseChar_ch:
    1.74 + * @c: char to validate
    1.75 + *
    1.76 + * Automatically generated by genChRanges.py
    1.77 + */
    1.78 +#define xmlIsBaseChar_ch(c) (((0x41 <= (c)) && ((c) <= 0x5a)) || \
    1.79 +                 ((0x61 <= (c)) && ((c) <= 0x7a)) || \
    1.80 +                 ((0xc0 <= (c)) && ((c) <= 0xd6)) || \
    1.81 +                 ((0xd8 <= (c)) && ((c) <= 0xf6)) || \
    1.82 +                  (0xf8 <= (c)))
    1.83 +#ifndef UNDEF_IMPORT_C_IN_DATA
    1.84 +XMLPUBVAR const xmlChSRange  xmlIsBaseChar_srng[197];
    1.85 +#endif
    1.86 +/**
    1.87 + * xmlIsBaseCharQ:
    1.88 + * @c: char to validate
    1.89 + *
    1.90 + * Automatically generated by genChRanges.py
    1.91 + */
    1.92 +#define xmlIsBaseCharQ(c)   (((c) < 0x100) ? \
    1.93 +                 xmlIsBaseChar_ch((c)) : \
    1.94 +                 xmlCharInRange((c), &xmlIsBaseCharGroup))
    1.95 +#ifndef UNDEF_IMPORT_C_IN_DATA
    1.96 +XMLPUBVAR const xmlChRangeGroup xmlIsBaseCharGroup;
    1.97 +#endif
    1.98 +/**
    1.99 + * xmlIsBlank_ch:
   1.100 + * @c: char to validate
   1.101 + *
   1.102 + * Automatically generated by genChRanges.py
   1.103 + *
   1.104 + * OOM: never
   1.105 + */ 
   1.106 +#define xmlIsBlank_ch(c)    (((c) == 0x20) || \
   1.107 +                 ((0x9 <= (c)) && ((c) <= 0xa)) || \
   1.108 +                 ((c) == 0xd))
   1.109 +
   1.110 +/**
   1.111 + * xmlIsBlankQ:
   1.112 + * @c: char to validate
   1.113 + *
   1.114 + * Automatically generated by genChRanges.py
   1.115 + */
   1.116 +#define xmlIsBlankQ(c)      (((c) < 0x100) ? \
   1.117 +                 xmlIsBlank_ch((c)) : 0)
   1.118 +
   1.119 +
   1.120 +/**
   1.121 + * xmlIsChar_ch:
   1.122 + * @c: char to validate
   1.123 + *
   1.124 + * Automatically generated by genChRanges.py
   1.125 + */
   1.126 +#define xmlIsChar_ch(c)     (((0x9 <= (c)) && ((c) <= 0xa)) || \
   1.127 +                 ((c) == 0xd) || \
   1.128 +                  (0x20 <= (c)))
   1.129 +
   1.130 +/**
   1.131 + * xmlIsCharQ:
   1.132 + * @c: char to validate
   1.133 + *
   1.134 + * Automatically generated by genChRanges.py
   1.135 + */
   1.136 +#define xmlIsCharQ(c)       (((c) < 0x100) ? \
   1.137 +                 xmlIsChar_ch((c)) :\
   1.138 +                (((0x100 <= (c)) && ((c) <= 0xd7ff)) || \
   1.139 +                 ((0xe000 <= (c)) && ((c) <= 0xfffd)) || \
   1.140 +                 ((0x10000 <= (c)) && ((c) <= 0x10ffff))))
   1.141 +
   1.142 +//XMLPUBVAR const xmlChRangeGroup xmlIsCharGroup;
   1.143 +
   1.144 +/**
   1.145 + * xmlIsCombiningQ:
   1.146 + * @c: char to validate
   1.147 + *
   1.148 + * Automatically generated by genChRanges.py
   1.149 + */
   1.150 +#define xmlIsCombiningQ(c)  (((c) < 0x100) ? \
   1.151 +                 0 : \
   1.152 +                 xmlCharInRange((c), &xmlIsCombiningGroup))
   1.153 +#ifndef UNDEF_IMPORT_C_IN_DATA
   1.154 +XMLPUBVAR const xmlChSRange xmlIsCombining_srng[];
   1.155 +XMLPUBVAR const xmlChRangeGroup xmlIsCombiningGroup;
   1.156 +#endif
   1.157 +/**
   1.158 + * xmlIsDigit_ch:
   1.159 + * @c: char to validate
   1.160 + *
   1.161 + * Automatically generated by genChRanges.py
   1.162 + */
   1.163 +#define xmlIsDigit_ch(c)    (((0x30 <= (c)) && ((c) <= 0x39)))
   1.164 +
   1.165 +/**
   1.166 + * xmlIsDigitQ:
   1.167 + * @c: char to validate
   1.168 + *
   1.169 + * Automatically generated by genChRanges.py
   1.170 + */
   1.171 +#define xmlIsDigitQ(c)      (((c) < 0x100) ? \
   1.172 +                 xmlIsDigit_ch((c)) : \
   1.173 +                 xmlCharInRange((c), &xmlIsDigitGroup))
   1.174 +#ifndef UNDEF_IMPORT_C_IN_DATA
   1.175 +XMLPUBVAR const xmlChRangeGroup xmlIsDigitGroup;
   1.176 +XMLPUBVAR const xmlChSRange xmlIsDigit_srng[];
   1.177 +#endif
   1.178 +/**
   1.179 + * xmlIsExtender_ch:
   1.180 + * @c: char to validate
   1.181 + *
   1.182 + * Automatically generated by genChRanges.py
   1.183 + */
   1.184 +#define xmlIsExtender_ch(c) (((c) == 0xb7))
   1.185 +
   1.186 +/**
   1.187 + * xmlIsExtenderQ:
   1.188 + * @c: char to validate
   1.189 + *
   1.190 + * Automatically generated by genChRanges.py
   1.191 + */
   1.192 +#define xmlIsExtenderQ(c)   (((c) < 0x100) ?                \
   1.193 +                 xmlIsExtender_ch((c)) :                    \
   1.194 +                 xmlCharInRange((c), &xmlIsExtenderGroup))
   1.195 +#ifndef UNDEF_IMPORT_C_IN_DATA
   1.196 +XMLPUBVAR const xmlChSRange xmlIsExtender_srng[];
   1.197 +XMLPUBVAR const xmlChRangeGroup xmlIsExtenderGroup;
   1.198 +#endif
   1.199 +/**
   1.200 + * xmlIsIdeographicQ:
   1.201 + * @c: char to validate
   1.202 + *
   1.203 + * Automatically generated by genChRanges.py
   1.204 + */
   1.205 +#define xmlIsIdeographicQ(c)    (((c) < 0x100) ?  0 :       \
   1.206 +                (((0x4e00 <= (c)) && ((c) <= 0x9fa5)) ||    \
   1.207 +                 ((c) == 0x3007) ||                         \
   1.208 +                 ((0x3021 <= (c)) && ((c) <= 0x3029))))
   1.209 +
   1.210 +/**
   1.211 + * xmlIsPubidChar_ch:
   1.212 + * @c: char to validate
   1.213 + *
   1.214 + * Automatically generated by genChRanges.py
   1.215 + */
   1.216 +#define xmlIsPubidChar_ch(c)    (xmlIsPubidChar_tab[(c)])
   1.217 +
   1.218 +/*
   1.219 + * The initial tables ({func_name}_tab) are used to validate whether a
   1.220 + * single-byte character is within the specified group.  Each table
   1.221 + * contains 256 bytes, with each byte representing one of the 256
   1.222 + * possible characters.  If the table byte is set, the character is
   1.223 + * allowed.
   1.224 + *
   1.225 + */
   1.226 +#ifndef UNDEF_IMPORT_C_IN_DATA
   1.227 +XMLPUBVAR const unsigned char xmlIsPubidChar_tab[256];
   1.228 +#endif
   1.229 +/**
   1.230 + * xmlIsPubidCharQ:
   1.231 + * @c: char to validate
   1.232 + *
   1.233 + * Automatically generated by genChRanges.py
   1.234 + */
   1.235 +#define xmlIsPubidCharQ(c)  (((c) < 0x100) ? xmlIsPubidChar_ch((c)) : 0)
   1.236 +
   1.237 +#ifndef XMLENGINE_EXCLUDE_UNUSED
   1.238 +// these are deprecated and replaced by macroses (for performance reasons)
   1.239 +XMLPUBFUN int XMLCALL   xmlIsBaseChar   (unsigned int ch);
   1.240 +XMLPUBFUN int XMLCALL   xmlIsBlank      (unsigned int ch);
   1.241 +XMLPUBFUN int XMLCALL   xmlIsChar       (unsigned int ch);
   1.242 +XMLPUBFUN int XMLCALL   xmlIsCombining  (unsigned int ch);
   1.243 +XMLPUBFUN int XMLCALL   xmlIsDigit      (unsigned int ch);
   1.244 +XMLPUBFUN int XMLCALL   xmlIsExtender   (unsigned int ch);
   1.245 +XMLPUBFUN int XMLCALL   xmlIsIdeographic(unsigned int ch);
   1.246 +XMLPUBFUN int XMLCALL   xmlIsPubidChar  (unsigned int ch);
   1.247 +#endif /* ifndef XMLENGINE_EXCLUDE_UNUSED */
   1.248 +
   1.249 +
   1.250 +#ifdef __cplusplus
   1.251 +}
   1.252 +#endif
   1.253 +#endif /* XML_CHVALID_H */
   1.254 +