diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-10-11 12:43:48 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-10-11 12:43:48 +0200 |
commit | 9553149aa6b6561c49981adf2848607a43765054 (patch) | |
tree | ff941ad89aa2c87ec5ddbd7a7bdd189fc33f87ba /libxsde/xsde/c/regexp/chvalid.h | |
parent | 0dd6d623af5dfe3590d0c269f76a2fa322e75e58 (diff) |
Support for validation of the pattern facet
New test: hybrid/pattern.
Diffstat (limited to 'libxsde/xsde/c/regexp/chvalid.h')
-rw-r--r-- | libxsde/xsde/c/regexp/chvalid.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/libxsde/xsde/c/regexp/chvalid.h b/libxsde/xsde/c/regexp/chvalid.h new file mode 100644 index 0000000..9865350 --- /dev/null +++ b/libxsde/xsde/c/regexp/chvalid.h @@ -0,0 +1,63 @@ +/* + * Summary: Unicode character range checking + * Description: this module 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: Mon Mar 27 11:09:48 2006 + * Sources: chvalid.def + */ + +#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 int low; + unsigned int high; +}; + +typedef struct _xmlChRangeGroup xmlChRangeGroup; +typedef xmlChRangeGroup *xmlChRangeGroupPtr; +struct _xmlChRangeGroup { + int nbShortRange; + int nbLongRange; + const xmlChSRange *shortRange; /* points to an array of ranges */ + const xmlChLRange *longRange; +}; + + + +/** + * Range checking routine + */ +int xmlCharInRange(unsigned int val, const xmlChRangeGroup *group); + +int xmlIsDigit (int c); +int xmlIsLetter (int c); +int xmlIsCombining (int c); +int xmlIsExtender (int c); +int xmlIsChar (int c); + +#ifdef __cplusplus +} +#endif +#endif /* __XML_CHVALID_H__ */ |