diff options
author | Jonathan Kew <jfkthame@googlemail.com> | 2007-11-21 12:29:46 +0000 |
---|---|---|
committer | Jonathan Kew <jfkthame@googlemail.com> | 2007-11-21 12:29:46 +0000 |
commit | 952d69f85d43b087ce9fa79d3fc6f1c076000bc7 (patch) | |
tree | dd6937a6486e80e1638618308481075efab000ae /Build/source/libs/icu-xetex/common/utrie.h | |
parent | 888236cb9df7b7d7b5a3e2d784037a9a59511c53 (diff) |
updated icu-xetex library for XeTeX 0.997
git-svn-id: svn://tug.org/texlive/trunk@5536 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/icu-xetex/common/utrie.h')
-rw-r--r-- | Build/source/libs/icu-xetex/common/utrie.h | 53 |
1 files changed, 52 insertions, 1 deletions
diff --git a/Build/source/libs/icu-xetex/common/utrie.h b/Build/source/libs/icu-xetex/common/utrie.h index a23d11a8e43..d8d77ac4cbb 100644 --- a/Build/source/libs/icu-xetex/common/utrie.h +++ b/Build/source/libs/icu-xetex/common/utrie.h @@ -1,7 +1,7 @@ /* ****************************************************************************** * -* Copyright (C) 2001-2005, International Business Machines +* Copyright (C) 2001-2006, International Business Machines * Corporation and others. All Rights Reserved. * ****************************************************************************** @@ -736,6 +736,57 @@ utrie_swap(const UDataSwapper *ds, const void *inData, int32_t length, void *outData, UErrorCode *pErrorCode); +/* serialization ------------------------------------------------------------ */ + +/** + * Trie data structure in serialized form: + * + * UTrieHeader header; + * uint16_t index[header.indexLength]; + * uint16_t data[header.dataLength]; + * @internal + */ +typedef struct UTrieHeader { + /** "Trie" in big-endian US-ASCII (0x54726965) */ + uint32_t signature; + + /** + * options bit field: + * 9 1=Latin-1 data is stored linearly at data+UTRIE_DATA_BLOCK_LENGTH + * 8 0=16-bit data, 1=32-bit data + * 7..4 UTRIE_INDEX_SHIFT // 0..UTRIE_SHIFT + * 3..0 UTRIE_SHIFT // 1..9 + */ + uint32_t options; + + /** indexLength is a multiple of UTRIE_SURROGATE_BLOCK_COUNT */ + int32_t indexLength; + + /** dataLength>=UTRIE_DATA_BLOCK_LENGTH */ + int32_t dataLength; +} UTrieHeader; + +/** + * Constants for use with UTrieHeader.options. + * @internal + */ +enum { + /** Mask to get the UTRIE_SHIFT value from options. */ + UTRIE_OPTIONS_SHIFT_MASK=0xf, + + /** Shift options right this much to get the UTRIE_INDEX_SHIFT value. */ + UTRIE_OPTIONS_INDEX_SHIFT=4, + + /** If set, then the data (stage 2) array is 32 bits wide. */ + UTRIE_OPTIONS_DATA_IS_32_BIT=0x100, + + /** + * If set, then Latin-1 data (for U+0000..U+00ff) is stored in the data (stage 2) array + * as a simple, linear array at data+UTRIE_DATA_BLOCK_LENGTH. + */ + UTRIE_OPTIONS_LATIN1_IS_LINEAR=0x200 +}; + U_CDECL_END #endif |