GME  13
svn_ctype.h
Go to the documentation of this file.
00001 
00028 
00029 #ifndef SVN_CTYPE_H
00030 #define SVN_CTYPE_H
00031 
00032 #include <apr.h>
00033 
00034 
00035 #ifdef __cplusplus
00036 extern "C" {
00037 #endif /* __cplusplus */
00038 
00039 
00041 extern const apr_uint32_t *const svn_ctype_table;
00042 
00043 
00048 #define svn_ctype_test(c, flags) \
00049   (0 != (svn_ctype_table[(unsigned char)(c)] & (flags)))
00050 
00051 
00057 /* Basic character classes */
00058 #define SVN_CTYPE_CNTRL    0x0001 
00059 #define SVN_CTYPE_SPACE    0x0002 
00060 #define SVN_CTYPE_DIGIT    0x0004 
00061 #define SVN_CTYPE_UPPER    0x0008 
00062 #define SVN_CTYPE_LOWER    0x0010 
00063 #define SVN_CTYPE_PUNCT    0x0020 
00064 #define SVN_CTYPE_XALPHA   0x0040 
00065 #define SVN_CTYPE_ASCII    0x0080 
00067 /* Derived character classes */
00068 
00069 #define SVN_CTYPE_ALPHA    (SVN_CTYPE_LOWER | SVN_CTYPE_UPPER)
00070 
00071 #define SVN_CTYPE_ALNUM    (SVN_CTYPE_ALPHA | SVN_CTYPE_DIGIT)
00072 
00073 #define SVN_CTYPE_XDIGIT   (SVN_CTYPE_DIGIT | SVN_CTYPE_XALPHA)
00074 
00075 #define SVN_CTYPE_GRAPH    (SVN_CTYPE_PUNCT | SVN_CTYPE_ALNUM)
00076 
00077 #define SVN_CTYPE_PRINT    (SVN_CTYPE_GRAPH | SVN_CTYPE_SPACE)
00078 
00079 
00081 #define svn_ctype_iscntrl(c)  svn_ctype_test((c), SVN_CTYPE_CNTRL)
00082 
00084 #define svn_ctype_isspace(c)  svn_ctype_test((c), SVN_CTYPE_SPACE)
00085 
00087 #define svn_ctype_isdigit(c)  svn_ctype_test((c), SVN_CTYPE_DIGIT)
00088 
00090 #define svn_ctype_isupper(c)  svn_ctype_test((c), SVN_CTYPE_UPPER)
00091 
00093 #define svn_ctype_islower(c)  svn_ctype_test((c), SVN_CTYPE_LOWER)
00094 
00096 #define svn_ctype_ispunct(c)  svn_ctype_test((c), SVN_CTYPE_PUNCT)
00097 
00099 #define svn_ctype_isascii(c)  svn_ctype_test((c), SVN_CTYPE_ASCII)
00100 
00102 #define svn_ctype_isalpha(c)  svn_ctype_test((c), SVN_CTYPE_ALPHA)
00103 
00105 #define svn_ctype_isalnum(c)  svn_ctype_test((c), SVN_CTYPE_ALNUM)
00106 
00108 #define svn_ctype_isxdigit(c) svn_ctype_test((c), SVN_CTYPE_XDIGIT)
00109 
00111 #define svn_ctype_isgraph(c)  svn_ctype_test((c), SVN_CTYPE_GRAPH)
00112 
00114 #define svn_ctype_isprint(c)  svn_ctype_test((c), SVN_CTYPE_PRINT)
00115 
00117 
00123 /* Basic extended character classes */
00124 #define SVN_CTYPE_UTF8LEAD 0x0100 
00125 #define SVN_CTYPE_UTF8CONT 0x0200 
00126 /* ### TBD
00127 #define SVN_CTYPE_XMLNAME  0x0400
00128 #define SVN_CTYPE_URISAFE  0x0800
00129 */
00130 
00131 /* Derived extended character classes */
00133 #define SVN_CTYPE_UTF8MBC  (SVN_CTYPE_UTF8LEAD | SVN_CTYPE_UTF8CONT)
00134 
00135 #define SVN_CTYPE_UTF8     (SVN_CTYPE_ASCII | SVN_CTYPE_UTF8MBC)
00136 
00138 #define svn_ctype_isutf8lead(c) svn_ctype_test((c), SVN_CTYPE_UTF8LEAD)
00139 
00141 #define svn_ctype_isutf8cont(c) svn_ctype_test((c), SVN_CTYLE_UTF8CONT)
00142 
00144 #define svn_ctype_isutf8mbc(c)  svn_ctype_test((c), SVN_CTYPE_UTF8MBC)
00145 
00147 #define svn_ctype_isutf8(c)     svn_ctype_test((c), SVN_CTYPE_UTF8)
00148 
00156 #define SVN_CTYPE_ASCII_MINUS            45 
00157 #define SVN_CTYPE_ASCII_DOT              46 
00158 #define SVN_CTYPE_ASCII_COLON            58 
00159 #define SVN_CTYPE_ASCII_UNDERSCORE       95 
00160 #define SVN_CTYPE_ASCII_TAB               9 
00161 #define SVN_CTYPE_ASCII_LINEFEED         10 
00162 #define SVN_CTYPE_ASCII_CARRIAGERETURN   13
00163 
00164 #define SVN_CTYPE_ASCII_DELETE          127
00165 
00185 int
00186 svn_ctype_casecmp(int a,
00187                   int b);
00188 
00189 
00192 #ifdef __cplusplus
00193 }
00194 #endif /* __cplusplus */
00195 
00196 #endif /* SVN_CTYPE_H */