Lines Matching defs:trie
29 * This performs data swapping for a folded trie (see utrie.c for details).
37 UTrieHeader trie;
56 trie.signature=ds->readUInt32(inTrie->signature);
57 trie.options=ds->readUInt32(inTrie->options);
58 trie.indexLength=udata_readInt32(ds, inTrie->indexLength);
59 trie.dataLength=udata_readInt32(ds, inTrie->dataLength);
61 if( trie.signature!=0x54726965 ||
62 (trie.options&UTRIE_OPTIONS_SHIFT_MASK)!=UTRIE_SHIFT ||
63 ((trie.options>>UTRIE_OPTIONS_INDEX_SHIFT)&UTRIE_OPTIONS_SHIFT_MASK)!=UTRIE_INDEX_SHIFT ||
64 trie.indexLength<UTRIE_BMP_INDEX_LENGTH ||
65 (trie.indexLength&(UTRIE_SURROGATE_BLOCK_COUNT-1))!=0 ||
66 trie.dataLength<UTRIE_DATA_BLOCK_LENGTH ||
67 (trie.dataLength&(UTRIE_DATA_GRANULARITY-1))!=0 ||
68 ((trie.options&UTRIE_OPTIONS_LATIN1_IS_LINEAR)!=0 && trie.dataLength<(UTRIE_DATA_BLOCK_LENGTH+0x100))
74 dataIs32=(UBool)((trie.options&UTRIE_OPTIONS_DATA_IS_32_BIT)!=0);
75 size=sizeof(UTrieHeader)+trie.indexLength*2+trie.dataLength*(dataIs32?4:2);
92 ds->swapArray16(ds, inTrie+1, trie.indexLength*2, outTrie+1, pErrorCode);
93 ds->swapArray32(ds, (const uint16_t *)(inTrie+1)+trie.indexLength, trie.dataLength*4,
94 (uint16_t *)(outTrie+1)+trie.indexLength, pErrorCode);
96 ds->swapArray16(ds, inTrie+1, (trie.indexLength+trie.dataLength)*2, outTrie+1, pErrorCode);
257 /* no contractions: expansions bounded by the main trie */
275 /* swap the main trie */