/
usr
/
include
/
unicode
/
/usr/include/unicode
mkdir
upload
Name
Size
Mode
Actions
basictz.h
8913
0644
edit
dl
rm
bms.h
8664
0644
edit
dl
rm
bmsearch.h
7316
0644
edit
dl
rm
brkiter.h
23001
0644
edit
dl
rm
bytestream.h
8531
0644
edit
dl
rm
calendar.h
90659
0644
edit
dl
rm
caniter.h
7288
0644
edit
dl
rm
chariter.h
24186
0644
edit
dl
rm
choicfmt.h
29528
0644
edit
dl
rm
coleitr.h
12990
0644
edit
dl
rm
coll.h
48468
0644
edit
dl
rm
colldata.h
11957
0644
edit
dl
rm
curramt.h
3659
0644
edit
dl
rm
currpinf.h
7061
0644
edit
dl
rm
currunit.h
3057
0644
edit
dl
rm
datefmt.h
27946
0644
edit
dl
rm
dbbi.h
966
0644
edit
dl
rm
dcfmtsym.h
14040
0644
edit
dl
rm
decimfmt.h
88612
0644
edit
dl
rm
docmain.h
6003
0644
edit
dl
rm
dtfmtsym.h
26145
0644
edit
dl
rm
dtintrv.h
3734
0644
edit
dl
rm
dtitvfmt.h
39700
0644
edit
dl
rm
dtitvinf.h
18704
0644
edit
dl
rm
dtptngen.h
17303
0644
edit
dl
rm
dtrule.h
8718
0644
edit
dl
rm
errorcode.h
4361
0644
edit
dl
rm
fieldpos.h
8713
0644
edit
dl
rm
fmtable.h
18794
0644
edit
dl
rm
format.h
12083
0644
edit
dl
rm
gregocal.h
33797
0644
edit
dl
rm
locid.h
30241
0644
edit
dl
rm
measfmt.h
1897
0644
edit
dl
rm
measunit.h
1635
0644
edit
dl
rm
measure.h
3321
0644
edit
dl
rm
msgfmt.h
39435
0644
edit
dl
rm
normlzr.h
30337
0644
edit
dl
rm
numfmt.h
33987
0644
edit
dl
rm
numsys.h
5004
0644
edit
dl
rm
parseerr.h
3044
0644
edit
dl
rm
parsepos.h
5468
0644
edit
dl
rm
platform.h
9961
0644
edit
dl
rm
plurfmt.h
23079
0644
edit
dl
rm
plurrule.h
9901
0644
edit
dl
rm
ppalmos.h
6992
0644
edit
dl
rm
putil.h
6686
0644
edit
dl
rm
pwin32.h
8668
0644
edit
dl
rm
rbbi.h
26993
0644
edit
dl
rm
rbnf.h
45681
0644
edit
dl
rm
rbtz.h
15695
0644
edit
dl
rm
regex.h
52316
0644
edit
dl
rm
rep.h
9559
0644
edit
dl
rm
resbund.h
18130
0644
edit
dl
rm
schriter.h
6293
0644
edit
dl
rm
search.h
22357
0644
edit
dl
rm
simpletz.h
46179
0644
edit
dl
rm
smpdtfmt.h
48325
0644
edit
dl
rm
sortkey.h
11111
0644
edit
dl
rm
std_string.h
1769
0644
edit
dl
rm
strenum.h
9888
0644
edit
dl
rm
stringpiece.h
5484
0644
edit
dl
rm
stsearch.h
22287
0644
edit
dl
rm
symtable.h
4199
0644
edit
dl
rm
tblcoll.h
38199
0644
edit
dl
rm
timezone.h
34584
0644
edit
dl
rm
tmunit.h
3454
0644
edit
dl
rm
tmutamt.h
4787
0644
edit
dl
rm
tmutfmt.h
8669
0644
edit
dl
rm
translit.h
54780
0644
edit
dl
rm
tzrule.h
36057
0644
edit
dl
rm
tztrans.h
6101
0644
edit
dl
rm
ubidi.h
83092
0644
edit
dl
rm
ubrk.h
17688
0644
edit
dl
rm
ucal.h
40177
0644
edit
dl
rm
ucasemap.h
16420
0644
edit
dl
rm
ucat.h
5371
0644
edit
dl
rm
uchar.h
111062
0644
edit
dl
rm
uchriter.h
13132
0644
edit
dl
rm
uclean.h
11855
0644
edit
dl
rm
ucnv.h
83111
0644
edit
dl
rm
ucnvsel.h
5630
0644
edit
dl
rm
ucnv_cb.h
6635
0644
edit
dl
rm
ucnv_err.h
21375
0644
edit
dl
rm
ucol.h
48826
0644
edit
dl
rm
ucoleitr.h
12356
0644
edit
dl
rm
uconfig.h
6035
0644
edit
dl
rm
ucsdet.h
12464
0644
edit
dl
rm
ucurr.h
11572
0644
edit
dl
rm
udat.h
34496
0644
edit
dl
rm
udata.h
14265
0644
edit
dl
rm
udatpg.h
18715
0644
edit
dl
rm
udeprctd.h
2284
0644
edit
dl
rm
udraft.h
7600
0644
edit
dl
rm
uenum.h
5796
0644
edit
dl
rm
uidna.h
15918
0644
edit
dl
rm
uintrnal.h
15752
0644
edit
dl
rm
uiter.h
23234
0644
edit
dl
rm
uloc.h
44548
0644
edit
dl
rm
ulocdata.h
9739
0644
edit
dl
rm
umachine.h
11360
0644
edit
dl
rm
umisc.h
1255
0644
edit
dl
rm
umsg.h
26076
0644
edit
dl
rm
unifilt.h
3770
0644
edit
dl
rm
unifunct.h
3966
0644
edit
dl
rm
unimatch.h
6071
0644
edit
dl
rm
unirepl.h
3290
0644
edit
dl
rm
uniset.h
61771
0644
edit
dl
rm
unistr.h
161321
0644
edit
dl
rm
unorm.h
23621
0644
edit
dl
rm
unum.h
32145
0644
edit
dl
rm
uobject.h
11393
0644
edit
dl
rm
uobslete.h
852
0644
edit
dl
rm
uregex.h
43948
0644
edit
dl
rm
urename.h
92538
0644
edit
dl
rm
urep.h
5394
0644
edit
dl
rm
ures.h
36348
0644
edit
dl
rm
uscript.h
11360
0644
edit
dl
rm
usearch.h
34223
0644
edit
dl
rm
uset.h
39868
0644
edit
dl
rm
usetiter.h
9606
0644
edit
dl
rm
ushape.h
17907
0644
edit
dl
rm
uspoof.h
38752
0644
edit
dl
rm
usprep.h
7750
0644
edit
dl
rm
ustdio.h
35333
0644
edit
dl
rm
ustream.h
1891
0644
edit
dl
rm
ustring.h
69383
0644
edit
dl
rm
usystem.h
1925
0644
edit
dl
rm
utext.h
58394
0644
edit
dl
rm
utf.h
8273
0644
edit
dl
rm
utf8.h
20512
0644
edit
dl
rm
utf16.h
18776
0644
edit
dl
rm
utf32.h
653
0644
edit
dl
rm
utf_old.h
43646
0644
edit
dl
rm
utmscale.h
13689
0644
edit
dl
rm
utrace.h
13355
0644
edit
dl
rm
utrans.h
23129
0644
edit
dl
rm
utypes.h
34513
0644
edit
dl
rm
uversion.h
10902
0644
edit
dl
rm
vtzone.h
20048
0644
edit
dl
rm
Edit:
/usr/include/unicode/utf.h
(8273B)
/* ******************************************************************************* * * Copyright (C) 1999-2008, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* * file name: utf.h * encoding: US-ASCII * tab size: 8 (not used) * indentation:4 * * created on: 1999sep09 * created by: Markus W. Scherer */ /** * \file * \brief C API: Code point macros * * This file defines macros for checking whether a code point is * a surrogate or a non-character etc. * * The UChar and UChar32 data types for Unicode code units and code points * are defined in umachines.h because they can be machine-dependent. * * utf.h is included by utypes.h and itself includes utf8.h and utf16.h after some * common definitions. Those files define macros for efficiently getting code points * in and out of UTF-8/16 strings. * utf16.h macros have "U16_" prefixes. * utf8.h defines similar macros with "U8_" prefixes for UTF-8 string handling. * * ICU processes 16-bit Unicode strings. * Most of the time, such strings are well-formed UTF-16. * Single, unpaired surrogates must be handled as well, and are treated in ICU * like regular code points where possible. * (Pairs of surrogate code points are indistinguishable from supplementary * code points encoded as pairs of supplementary code units.) * * In fact, almost all Unicode code points in normal text (>99%) * are on the BMP (<=U+ffff) and even <=U+d7ff. * ICU functions handle supplementary code points (U+10000..U+10ffff) * but are optimized for the much more frequently occurring BMP code points. * * utf.h defines UChar to be an unsigned 16-bit integer. If this matches wchar_t, then * UChar is defined to be exactly wchar_t, otherwise uint16_t. * * UChar32 is defined to be a signed 32-bit integer (int32_t), large enough for a 21-bit * Unicode code point (Unicode scalar value, 0..0x10ffff). * Before ICU 2.4, the definition of UChar32 was similarly platform-dependent as * the definition of UChar. For details see the documentation for UChar32 itself. * * utf.h also defines a small number of C macros for single Unicode code points. * These are simple checks for surrogates and non-characters. * For actual Unicode character properties see uchar.h. * * By default, string operations must be done with error checking in case * a string is not well-formed UTF-16. * The macros will detect if a surrogate code unit is unpaired * (lead unit without trail unit or vice versa) and just return the unit itself * as the code point. * (It is an accidental property of Unicode and UTF-16 that all * malformed sequences can be expressed unambiguously with a distinct subrange * of Unicode code points.) * * The regular "safe" macros require that the initial, passed-in string index * is within bounds. They only check the index when they read more than one * code unit. This is usually done with code similar to the following loop: * <pre>while(i<length) { * U16_NEXT(s, i, length, c); * // use c * }</pre> * * When it is safe to assume that text is well-formed UTF-16 * (does not contain single, unpaired surrogates), then one can use * U16_..._UNSAFE macros. * These do not check for proper code unit sequences or truncated text and may * yield wrong results or even cause a crash if they are used with "malformed" * text. * In practice, U16_..._UNSAFE macros will produce slightly less code but * should not be faster because the processing is only different when a * surrogate code unit is detected, which will be rare. * * Similarly for UTF-8, there are "safe" macros without a suffix, * and U8_..._UNSAFE versions. * The performance differences are much larger here because UTF-8 provides so * many opportunities for malformed sequences. * The unsafe UTF-8 macros are entirely implemented inside the macro definitions * and are fast, while the safe UTF-8 macros call functions for all but the * trivial (ASCII) cases. * (ICU 3.6 optimizes U8_NEXT() and U8_APPEND() to handle most other common * characters inline as well.) * * Unlike with UTF-16, malformed sequences cannot be expressed with distinct * code point values (0..U+10ffff). They are indicated with negative values instead. * * For more information see the ICU User Guide Strings chapter * (http://icu-project.org/userguide/strings.html). * * <em>Usage:</em> * ICU coding guidelines for if() statements should be followed when using these macros. * Compound statements (curly braces {}) must be used for if-else-while... * bodies and all macro statements should be terminated with semicolon. * * @stable ICU 2.4 */ #ifndef __UTF_H__ #define __UTF_H__ #include "unicode/utypes.h" /* include the utfXX.h after the following definitions */ /* single-code point definitions -------------------------------------------- */ /** * This value is intended for sentinel values for APIs that * (take or) return single code points (UChar32). * It is outside of the Unicode code point range 0..0x10ffff. * * For example, a "done" or "error" value in a new API * could be indicated with U_SENTINEL. * * ICU APIs designed before ICU 2.4 usually define service-specific "done" * values, mostly 0xffff. * Those may need to be distinguished from * actual U+ffff text contents by calling functions like * CharacterIterator::hasNext() or UnicodeString::length(). * * @return -1 * @see UChar32 * @stable ICU 2.4 */ #define U_SENTINEL (-1) /** * Is this code point a Unicode noncharacter? * @param c 32-bit code point * @return TRUE or FALSE * @stable ICU 2.4 */ #define U_IS_UNICODE_NONCHAR(c) \ ((c)>=0xfdd0 && \ ((uint32_t)(c)<=0xfdef || ((c)&0xfffe)==0xfffe) && \ (uint32_t)(c)<=0x10ffff) /** * Is c a Unicode code point value (0..U+10ffff) * that can be assigned a character? * * Code points that are not characters include: * - single surrogate code points (U+d800..U+dfff, 2048 code points) * - the last two code points on each plane (U+__fffe and U+__ffff, 34 code points) * - U+fdd0..U+fdef (new with Unicode 3.1, 32 code points) * - the highest Unicode code point value is U+10ffff * * This means that all code points below U+d800 are character code points, * and that boundary is tested first for performance. * * @param c 32-bit code point * @return TRUE or FALSE * @stable ICU 2.4 */ #define U_IS_UNICODE_CHAR(c) \ ((uint32_t)(c)<0xd800 || \ ((uint32_t)(c)>0xdfff && \ (uint32_t)(c)<=0x10ffff && \ !U_IS_UNICODE_NONCHAR(c))) /** * Is this code point a BMP code point (U+0000..U+ffff)? * @param c 32-bit code point * @return TRUE or FALSE * @stable ICU 2.8 */ #define U_IS_BMP(c) ((uint32_t)(c)<=0xffff) /** * Is this code point a supplementary code point (U+10000..U+10ffff)? * @param c 32-bit code point * @return TRUE or FALSE * @stable ICU 2.8 */ #define U_IS_SUPPLEMENTARY(c) ((uint32_t)((c)-0x10000)<=0xfffff) /** * Is this code point a lead surrogate (U+d800..U+dbff)? * @param c 32-bit code point * @return TRUE or FALSE * @stable ICU 2.4 */ #define U_IS_LEAD(c) (((c)&0xfffffc00)==0xd800) /** * Is this code point a trail surrogate (U+dc00..U+dfff)? * @param c 32-bit code point * @return TRUE or FALSE * @stable ICU 2.4 */ #define U_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00) /** * Is this code point a surrogate (U+d800..U+dfff)? * @param c 32-bit code point * @return TRUE or FALSE * @stable ICU 2.4 */ #define U_IS_SURROGATE(c) (((c)&0xfffff800)==0xd800) /** * Assuming c is a surrogate code point (U_IS_SURROGATE(c)), * is it a lead surrogate? * @param c 32-bit code point * @return TRUE or FALSE * @stable ICU 2.4 */ #define U_IS_SURROGATE_LEAD(c) (((c)&0x400)==0) /** * Assuming c is a surrogate code point (U_IS_SURROGATE(c)), * is it a trail surrogate? * @param c 32-bit code point * @return TRUE or FALSE * @draft ICU 4.2 */ #define U_IS_SURROGATE_TRAIL(c) (((c)&0x400)!=0) /* include the utfXX.h ------------------------------------------------------ */ #include "unicode/utf8.h" #include "unicode/utf16.h" /* utf_old.h contains deprecated, pre-ICU 2.4 definitions */ #include "unicode/utf_old.h" #endif
Save
cmd:
run