Home | History | Annotate | Download | only in common

Lines Matching refs:block

85     /* preallocate and reset the first data block (block index 0) */
89 /* preallocate and reset the first block (number 0) and Latin-1 (U+0000..U+00ff) after that */
95 /* do this at least for trie->index[0] even if that block is only partly used for Latin-1 */
192 * @return -1 if no new data block available (out of memory in data array)
205 /* allocate a new data block */
213 /* copy-on-write for a block from a setRange() */
223 int32_t block;
230 block=utrie_getDataBlock(trie, c);
231 if(block<0) {
235 trie->data[block+(c&UTRIE_MASK)]=value;
241 int32_t block;
251 block=trie->index[c>>UTRIE_SHIFT];
253 *pInBlockZero= (UBool)(block==0);
256 return trie->data[ABS(block)+(c&UTRIE_MASK)];
263 utrie_fillBlock(uint32_t *block, UChar32 start, UChar32 limit,
267 pLimit=block+limit;
268 block+=start;
270 while(block<pLimit) {
271 *block++=value;
274 while(block<pLimit) {
275 if(*block==initialValue) {
276 *block=value;
278 ++block;
291 int32_t block, rest, repeatBlock;
307 /* set partial block at [start..following block boundary[ */
308 block=utrie_getDataBlock(trie, start);
309 if(block<0) {
315 utrie_fillBlock(trie->data+block, start&UTRIE_MASK, UTRIE_DATA_BLOCK_LENGTH,
319 utrie_fillBlock(trie->data+block, start&UTRIE_MASK, limit&UTRIE_MASK,
325 /* number of positions in the last, partial block */
328 /* round down limit to a block boundary */
339 block=trie->index[start>>UTRIE_SHIFT];
340 if(block>0) {
342 utrie_fillBlock(trie->data+block, 0, UTRIE_DATA_BLOCK_LENGTH, value, initialValue, overwrite);
343 } else if(trie->data[-block]!=value && (block==0 || overwrite)) {
344 /* set the repeatBlock instead of the current block 0 or range block */
354 /* set the negative block number to indicate that it is a repeat block */
364 /* set partial block at [last block boundary..limit[ */
365 block=utrie_getDataBlock(trie, start);
366 if(block<0) {
370 utrie_fillBlock(trie->data+block, 0, rest, value, initialValue, overwrite);
379 int32_t block, i;
381 for(block=UTRIE_BMP_INDEX_LENGTH; block<indexLength; block+=UTRIE_SURROGATE_BLOCK_COUNT) {
383 if(idx[block+i]!=idx[otherBlock+i]) {
388 return block;
410 int32_t indexLength, block;
431 block=0; /* leadUnitValue==initialValue, use all-initial-value block */
434 block=utrie_allocDataBlock(trie);
435 if(block<0) {
440 utrie_fillBlock(trie->data+block, 0, UTRIE_DATA_BLOCK_LENGTH, trie->leadUnitValue, trie->data[0], TRUE);
441 block=-block; /* negative block number to indicate that it is a repeat block */
444 trie->index[c]=block;
450 * its index block must be used first (in which case the folding is a no-op).
459 /* there is data, treat the full block for a lead surrogate */
467 /* is there an identical index block? */
468 block=_findSameIndexBlock(idx, indexLength, c>>UTRIE_SHIFT);
475 value=getFoldedValue(trie, c, block+UTRIE_SURROGATE_BLOCK_COUNT);
483 /* if we did not find an identical index block... */
484 if(block==indexLength) {
510 * the additional block of duplicated values for lead surrogates.
518 * make space for the lead surrogate index block and
538 * Set a value in the trie index map to indicate which data block
552 /* mark each block that _is_ used with 0 */
557 /* never move the all-initial-value block 0 */
564 int32_t block;
569 for(block=0; block<=dataLength; block+=step) {
570 if(equal_uint32(data+block, data+otherBlock, UTRIE_DATA_BLOCK_LENGTH)) {
571 return block;
608 /* initialize the index map with "block is used/unused" flags */
621 * start: index of first entry of current block
622 * newStart: index where the current block is to be moved
628 /* advance start to the next block */
631 /* leave newStart with the previous block! */
635 /* search for an identical block */
641 /* found an identical block, set the other block's index value for the current block */
644 /* advance start to the next block */
647 /* leave newStart with the previous block! */
651 /* see if the beginning of this block can be overlapped with the end of the previous block */
653 /* look for maximum overlap (modulo granularity) with the previous, adjacent block */
939 uint16_t block;
947 /* max(Latin-1, block 0) */
977 /* indexes to block 0 */
978 block=(uint16_t)(trie->indexLength>>UTRIE_INDEX_SHIFT);
981 p16[i]=block;
985 /* indexes for lead surrogate code units to the block after Latin-1 */
986 block+=(uint16_t)(latin1Length>>UTRIE_INDEX_SHIFT);
990 p16[i]=block;
1012 /* indexes to block 0 */
1016 /* indexes for lead surrogate code units to the block after Latin-1 */
1017 block=(uint16_t)(latin1Length>>UTRIE_INDEX_SHIFT);
1021 p16[i]=block;
1066 int32_t l, i, j, block, prevBlock, nullBlock, offset;
1103 block=idx[i]<<UTRIE_INDEX_SHIFT;
1104 if(block==prevBlock) {
1105 /* the block is the same as the previous one, and filled with value */
1107 } else if(block==nullBlock) {
1108 /* this is the all-initial-value block */
1121 prevBlock=block;
1123 value=enumValue(context, data32!=NULL ? data32[block+j] : idx[block+j]);
1131 /* the block is not filled with all the same value */
1147 /* no entries for a whole block of lead surrogates */
1189 block=idx[i]<<UTRIE_INDEX_SHIFT;
1190 if(block==prevBlock) {
1191 /* the block is the same as the previous one, and filled with value */
1193 } else if(block==nullBlock) {
1194 /* this is the all-initial-value block */
1207 prevBlock=block;
1209 value=enumValue(context, data32!=NULL ? data32[block+j] : idx[block+j]);
1217 /* the block is not filled with all the same value */