ICU 49.1.1
49.1.1
|
00001 /* 00002 ******************************************************************************* 00003 * 00004 * Copyright (C) 1999-2011, 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 00111 #ifndef __UTF_H__ 00112 #define __UTF_H__ 00113 00114 #include "unicode/umachine.h" 00115 /* include the utfXX.h after the following definitions */ 00116 00117 /* single-code point definitions -------------------------------------------- */ 00118 00125 #define U_IS_UNICODE_NONCHAR(c) \ 00126 ((c)>=0xfdd0 && \ 00127 ((uint32_t)(c)<=0xfdef || ((c)&0xfffe)==0xfffe) && \ 00128 (uint32_t)(c)<=0x10ffff) 00129 00147 #define U_IS_UNICODE_CHAR(c) \ 00148 ((uint32_t)(c)<0xd800 || \ 00149 ((uint32_t)(c)>0xdfff && \ 00150 (uint32_t)(c)<=0x10ffff && \ 00151 !U_IS_UNICODE_NONCHAR(c))) 00152 00159 #define U_IS_BMP(c) ((uint32_t)(c)<=0xffff) 00160 00167 #define U_IS_SUPPLEMENTARY(c) ((uint32_t)((c)-0x10000)<=0xfffff) 00168 00175 #define U_IS_LEAD(c) (((c)&0xfffffc00)==0xd800) 00176 00183 #define U_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00) 00184 00191 #define U_IS_SURROGATE(c) (((c)&0xfffff800)==0xd800) 00192 00200 #define U_IS_SURROGATE_LEAD(c) (((c)&0x400)==0) 00201 00209 #define U_IS_SURROGATE_TRAIL(c) (((c)&0x400)!=0) 00210 00211 /* include the utfXX.h ------------------------------------------------------ */ 00212 00213 #if !U_NO_DEFAULT_INCLUDE_UTF_HEADERS 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 /* !U_NO_DEFAULT_INCLUDE_UTF_HEADERS */ 00222 00223 #endif /* __UTF_H__ */