2003-10-11 15:22:13 +00:00
/*
2003-11-18 20:56:51 +00:00
* Summary : Unicode character range checking
* Description : this module exports interfaces for the character
2006-03-26 22:52:40 +00:00
* range validation APIs
2003-10-11 15:22:13 +00:00
*
* This file is automatically generated from the cvs source
* definition files using the genChRanges . py Python script
*
2006-03-27 09:30:13 +00:00
* Generation date : Mon Mar 27 11 : 09 : 48 2006
2003-10-11 15:22:13 +00:00
* Sources : chvalid . def
2003-11-18 20:56:51 +00:00
* Author : William Brack < wbrack @ mmm . com . hk >
2003-10-11 15:22:13 +00:00
*/
# ifndef __XML_CHVALID_H__
# define __XML_CHVALID_H__
2003-10-18 04:53:14 +00:00
# include <libxml/xmlversion.h>
moved string and UTF8 routines out of parser.c and encoding.c into a new
* encoding.c, parser.c, xmlstring.c, Makefile.am,
include/libxml/Makefile.am, include/libxml/catalog.c,
include/libxml/chvalid.h, include/libxml/encoding.h,
include/libxml/parser.h, include/libxml/relaxng.h,
include/libxml/tree.h, include/libxml/xmlwriter.h,
include/libxml/xmlstring.h:
moved string and UTF8 routines out of parser.c and encoding.c
into a new module xmlstring.c with include file
include/libxml/xmlstring.h mostly using patches from Reid
Spencer. Since xmlChar now defined in xmlstring.h, several
include files needed to have a #include added for safety.
* doc/apibuild.py: added some additional sorting for various
references displayed in the APIxxx.html files. Rebuilt the
docs, and also added new file for xmlstring module.
* configure.in: small addition to help my testing; no effect on
normal usage.
* doc/search.php: added $_GET[query] so that persistent globals
can be disabled (for recent versions of PHP)
2004-01-06 11:52:13 +00:00
# include <libxml/xmlstring.h>
2003-10-18 04:53:14 +00:00
2003-10-11 15:22:13 +00:00
# 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 {
2003-10-18 12:42:41 +00:00
unsigned int low ;
unsigned int high ;
2003-10-11 15:22:13 +00:00
} ;
typedef struct _xmlChRangeGroup xmlChRangeGroup ;
typedef xmlChRangeGroup * xmlChRangeGroupPtr ;
struct _xmlChRangeGroup {
int nbShortRange ;
int nbLongRange ;
2006-03-27 09:30:13 +00:00
const xmlChSRange * shortRange ; /* points to an array of ranges */
const xmlChLRange * longRange ;
2003-10-11 15:22:13 +00:00
} ;
2003-10-18 12:42:41 +00:00
/**
* Range checking routine
*/
2003-10-18 04:53:14 +00:00
XMLPUBFUN int XMLCALL
2006-03-27 09:30:13 +00:00
xmlCharInRange ( unsigned int val , const xmlChRangeGroup * group ) ;
2003-10-11 15:22:13 +00:00
2003-10-18 12:42:41 +00:00
/**
* xmlIsBaseChar_ch :
* @ c : char to validate
*
* Automatically generated by genChRanges . py
*/
2003-10-12 10:42:46 +00:00
# define xmlIsBaseChar_ch(c) (((0x41 <= (c)) && ((c) <= 0x5a)) || \
( ( 0x61 < = ( c ) ) & & ( ( c ) < = 0x7a ) ) | | \
( ( 0xc0 < = ( c ) ) & & ( ( c ) < = 0xd6 ) ) | | \
( ( 0xd8 < = ( c ) ) & & ( ( c ) < = 0xf6 ) ) | | \
2003-11-14 16:20:34 +00:00
( 0xf8 < = ( c ) ) )
2003-10-18 12:42:41 +00:00
/**
* xmlIsBaseCharQ :
* @ c : char to validate
*
* Automatically generated by genChRanges . py
*/
2003-10-18 04:53:14 +00:00
# define xmlIsBaseCharQ(c) (((c) < 0x100) ? \
2003-10-12 10:42:46 +00:00
xmlIsBaseChar_ch ( ( c ) ) : \
xmlCharInRange ( ( c ) , & xmlIsBaseCharGroup ) )
2003-10-11 15:22:13 +00:00
2006-03-27 09:30:13 +00:00
XMLPUBVAR const xmlChRangeGroup xmlIsBaseCharGroup ;
2003-10-18 12:42:41 +00:00
/**
* xmlIsBlank_ch :
* @ c : char to validate
*
* Automatically generated by genChRanges . py
*/
2003-10-12 10:42:46 +00:00
# define xmlIsBlank_ch(c) (((c) == 0x20) || \
( ( 0x9 < = ( c ) ) & & ( ( c ) < = 0xa ) ) | | \
( ( c ) = = 0xd ) )
2003-10-18 12:42:41 +00:00
/**
* xmlIsBlankQ :
* @ c : char to validate
*
* Automatically generated by genChRanges . py
*/
2003-10-18 04:53:14 +00:00
# define xmlIsBlankQ(c) (((c) < 0x100) ? \
2003-10-12 10:42:46 +00:00
xmlIsBlank_ch ( ( c ) ) : 0 )
2003-10-18 12:42:41 +00:00
/**
* xmlIsChar_ch :
* @ c : char to validate
*
* Automatically generated by genChRanges . py
*/
2003-10-12 10:42:46 +00:00
# define xmlIsChar_ch(c) (((0x9 <= (c)) && ((c) <= 0xa)) || \
( ( c ) = = 0xd ) | | \
2003-11-14 16:20:34 +00:00
( 0x20 < = ( c ) ) )
2003-10-18 12:42:41 +00:00
/**
* xmlIsCharQ :
* @ c : char to validate
*
* Automatically generated by genChRanges . py
*/
2003-10-18 04:53:14 +00:00
# define xmlIsCharQ(c) (((c) < 0x100) ? \
2003-10-12 10:42:46 +00:00
xmlIsChar_ch ( ( c ) ) : \
( ( ( 0x100 < = ( c ) ) & & ( ( c ) < = 0xd7ff ) ) | | \
( ( 0xe000 < = ( c ) ) & & ( ( c ) < = 0xfffd ) ) | | \
( ( 0x10000 < = ( c ) ) & & ( ( c ) < = 0x10ffff ) ) ) )
2003-10-11 15:22:13 +00:00
2006-03-27 09:30:13 +00:00
XMLPUBVAR const xmlChRangeGroup xmlIsCharGroup ;
2003-10-18 12:42:41 +00:00
/**
* xmlIsCombiningQ :
* @ c : char to validate
*
* Automatically generated by genChRanges . py
*/
2003-10-18 04:53:14 +00:00
# define xmlIsCombiningQ(c) (((c) < 0x100) ? \
2003-10-12 10:42:46 +00:00
0 : \
xmlCharInRange ( ( c ) , & xmlIsCombiningGroup ) )
2003-10-11 15:22:13 +00:00
2006-03-27 09:30:13 +00:00
XMLPUBVAR const xmlChRangeGroup xmlIsCombiningGroup ;
2003-10-18 12:42:41 +00:00
/**
* xmlIsDigit_ch :
* @ c : char to validate
*
* Automatically generated by genChRanges . py
*/
2003-10-12 10:42:46 +00:00
# define xmlIsDigit_ch(c) (((0x30 <= (c)) && ((c) <= 0x39)))
2003-10-18 12:42:41 +00:00
/**
* xmlIsDigitQ :
* @ c : char to validate
*
* Automatically generated by genChRanges . py
*/
2003-10-18 04:53:14 +00:00
# define xmlIsDigitQ(c) (((c) < 0x100) ? \
2003-10-12 10:42:46 +00:00
xmlIsDigit_ch ( ( c ) ) : \
xmlCharInRange ( ( c ) , & xmlIsDigitGroup ) )
2003-10-11 15:22:13 +00:00
2006-03-27 09:30:13 +00:00
XMLPUBVAR const xmlChRangeGroup xmlIsDigitGroup ;
2003-10-18 12:42:41 +00:00
/**
* xmlIsExtender_ch :
* @ c : char to validate
*
* Automatically generated by genChRanges . py
*/
2003-10-12 10:42:46 +00:00
# define xmlIsExtender_ch(c) (((c) == 0xb7))
2003-10-18 12:42:41 +00:00
/**
* xmlIsExtenderQ :
* @ c : char to validate
*
* Automatically generated by genChRanges . py
*/
2003-10-18 04:53:14 +00:00
# define xmlIsExtenderQ(c) (((c) < 0x100) ? \
2003-10-12 10:42:46 +00:00
xmlIsExtender_ch ( ( c ) ) : \
xmlCharInRange ( ( c ) , & xmlIsExtenderGroup ) )
2003-10-11 15:22:13 +00:00
2006-03-27 09:30:13 +00:00
XMLPUBVAR const xmlChRangeGroup xmlIsExtenderGroup ;
2003-10-18 12:42:41 +00:00
/**
* xmlIsIdeographicQ :
* @ c : char to validate
*
* Automatically generated by genChRanges . py
*/
2003-10-18 04:53:14 +00:00
# define xmlIsIdeographicQ(c) (((c) < 0x100) ? \
2003-10-12 10:42:46 +00:00
0 : \
( ( ( 0x4e00 < = ( c ) ) & & ( ( c ) < = 0x9fa5 ) ) | | \
( ( c ) = = 0x3007 ) | | \
( ( 0x3021 < = ( c ) ) & & ( ( c ) < = 0x3029 ) ) ) )
2003-10-11 15:22:13 +00:00
2006-03-27 09:30:13 +00:00
XMLPUBVAR const xmlChRangeGroup xmlIsIdeographicGroup ;
2006-03-26 22:52:40 +00:00
XMLPUBVAR const unsigned char xmlIsPubidChar_tab [ 256 ] ;
2003-10-18 12:42:41 +00:00
/**
* xmlIsPubidChar_ch :
* @ c : char to validate
*
* Automatically generated by genChRanges . py
*/
2003-10-11 15:22:13 +00:00
# define xmlIsPubidChar_ch(c) (xmlIsPubidChar_tab[(c)])
2003-10-18 12:42:41 +00:00
/**
* xmlIsPubidCharQ :
* @ c : char to validate
*
* Automatically generated by genChRanges . py
*/
2003-10-18 04:53:14 +00:00
# define xmlIsPubidCharQ(c) (((c) < 0x100) ? \
2003-10-12 10:42:46 +00:00
xmlIsPubidChar_ch ( ( c ) ) : 0 )
2003-10-11 15:22:13 +00:00
2003-10-18 04:53:14 +00:00
XMLPUBFUN int XMLCALL
xmlIsBaseChar ( unsigned int ch ) ;
XMLPUBFUN int XMLCALL
xmlIsBlank ( unsigned int ch ) ;
XMLPUBFUN int XMLCALL
xmlIsChar ( unsigned int ch ) ;
XMLPUBFUN int XMLCALL
xmlIsCombining ( unsigned int ch ) ;
XMLPUBFUN int XMLCALL
xmlIsDigit ( unsigned int ch ) ;
XMLPUBFUN int XMLCALL
xmlIsExtender ( unsigned int ch ) ;
XMLPUBFUN int XMLCALL
xmlIsIdeographic ( unsigned int ch ) ;
XMLPUBFUN int XMLCALL
xmlIsPubidChar ( unsigned int ch ) ;
2003-10-11 15:22:13 +00:00
# ifdef __cplusplus
}
# endif
# endif /* __XML_CHVALID_H__ */