utf.h

Go to the documentation of this file.
00001 /* 00002 ******************************************************************************* 00003 * 00004 * Copyright (C) 1999-2004, International Business Machines 00005 * Corporation and others. All Rights Reserved. 00006 * 00007 ******************************************************************************* 00008 * file name: utf.h 00009 * encoding: US-ASCII 00010 * tab size: 8 (not used) 00011 * indentation:4 00012 * 00013 * created on: 1999sep09 00014 * created by: Markus W. Scherer 00015 */ 00016 00098 #ifndef __UTF_H__ 00099 #define __UTF_H__ 00100 00101 #include "unicode/utypes.h" 00102 /* include the utfXX.h after the following definitions */ 00103 00104 /* single-code point definitions -------------------------------------------- */ 00105 00124 #define U_SENTINEL (-1) 00125 00132 #define U_IS_UNICODE_NONCHAR(c) \ 00133 ((c)>=0xfdd0 && \ 00134 ((uint32_t)(c)<=0xfdef || ((c)&0xfffe)==0xfffe) && \ 00135 (uint32_t)(c)<=0x10ffff) 00136 00154 #define U_IS_UNICODE_CHAR(c) \ 00155 ((uint32_t)(c)<0xd800 || \ 00156 ((uint32_t)(c)>0xdfff && \ 00157 (uint32_t)(c)<=0x10ffff && \ 00158 !U_IS_UNICODE_NONCHAR(c))) 00159 00160 #ifndef U_HIDE_DRAFT_API 00161 00168 #define U_IS_BMP(c) ((uint32_t)(c)<=0xffff) 00169 00176 #define U_IS_SUPPLEMENTARY(c) ((uint32_t)((c)-0x10000)<=0xfffff) 00177 00178 #endif /*U_HIDE_DRAFT_API*/ 00179 00186 #define U_IS_LEAD(c) (((c)&0xfffffc00)==0xd800) 00187 00194 #define U_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00) 00195 00202 #define U_IS_SURROGATE(c) (((c)&0xfffff800)==0xd800) 00203 00211 #define U_IS_SURROGATE_LEAD(c) (((c)&0x400)==0) 00212 00213 /* include the utfXX.h ------------------------------------------------------ */ 00214 00215 #include "unicode/utf8.h" 00216 #include "unicode/utf16.h" 00217 00218 /* utf_old.h contains deprecated, pre-ICU 2.4 definitions */ 00219 #include "unicode/utf_old.h" 00220 00221 #endif

Generated on Fri Jun 18 12:36:03 2004 for ICU by doxygen 1.3.7