Lines Matching refs:lh

255 inline int32_t ucol_inv_getPrevious(UColTokenParser *src, UColTokListHeader *lh, uint32_t strength) {
257 uint32_t CE = lh->baseCE;
258 uint32_t SecondCE = lh->baseContCE;
280 lh->previousCE = previousCE;
281 lh->previousContCE = previousContCE;
287 inline int32_t ucol_inv_getNext(UColTokenParser *src, UColTokListHeader *lh, uint32_t strength) {
288 uint32_t CE = lh->baseCE;
289 uint32_t SecondCE = lh->baseContCE;
314 lh->nextCE = nextCE;
315 lh->nextContCE = nextContCE;
320 static void ucol_inv_getGapPositions(UColTokenParser *src, UColTokListHeader *lh, UErrorCode *status) {
328 UColToken *tok = lh->first;
332 lh->gapsHi[3*i] = 0;
333 lh->gapsHi[3*i+1] = 0;
334 lh->gapsHi[3*i+2] = 0;
335 lh->gapsLo[3*i] = 0;
336 lh->gapsLo[3*i+1] = 0;
337 lh->gapsLo[3*i+2] = 0;
338 lh->numStr[i] = 0;
339 lh->fStrToken[i] = NULL;
340 lh->lStrToken[i] = NULL;
341 lh->pos[i] = -1;
346 if((lh->baseCE & 0xFF000000)>= (consts->UCA_PRIMARY_IMPLICIT_MIN<<24) && (lh->baseCE & 0xFF000000) <= (consts->UCA_PRIMARY_IMPLICIT_MAX<<24) ) { /* implicits - */
347 //if(lh->baseCE >= PRIMARY_IMPLICIT_MIN && lh->baseCE < PRIMARY_IMPLICIT_MAX ) { /* implicits - */
348 lh->pos[0] = 0;
349 t1 = lh->baseCE;
350 t2 = lh->baseContCE & UCOL_REMOVE_CONTINUATION;
351 lh->gapsLo[0] = (t1 & UCOL_PRIMARYMASK) | (t2 & UCOL_PRIMARYMASK) >> 16;
352 lh->gapsLo[1] = (t1 & UCOL_SECONDARYMASK) << 16 | (t2 & UCOL_SECONDARYMASK) << 8;
353 lh->gapsLo[2] = (UCOL_TERTIARYORDER(t1)) << 24 | (UCOL_TERTIARYORDER(t2)) << 16;
360 lh->gapsHi[0] = (t1 & UCOL_PRIMARYMASK) | (t2 & UCOL_PRIMARYMASK) >> 16;
361 lh->gapsHi[1] = (t1 & UCOL_SECONDARYMASK) << 16 | (t2 & UCOL_SECONDARYMASK) << 8;
362 lh->gapsHi[2] = (UCOL_TERTIARYORDER(t1)) << 24 | (UCOL_TERTIARYORDER(t2)) << 16;
363 } else if(lh->indirect == TRUE && lh->nextCE != 0) {
364 //} else if(lh->baseCE == UCOL_RESET_TOP_VALUE && lh->baseContCE == 0) {
365 lh->pos[0] = 0;
366 t1 = lh->baseCE;
367 t2 = lh->baseContCE&UCOL_REMOVE_CONTINUATION;
368 lh->gapsLo[0] = (t1 & UCOL_PRIMARYMASK) | (t2 & UCOL_PRIMARYMASK) >> 16;
369 lh->gapsLo[1] = (t1 & UCOL_SECONDARYMASK) << 16 | (t2 & UCOL_SECONDARYMASK) << 8;
370 lh->gapsLo[2] = (UCOL_TERTIARYORDER(t1)) << 24 | (UCOL_TERTIARYORDER(t2)) << 16;
371 t1 = lh->nextCE;
372 t2 = lh->nextContCE&UCOL_REMOVE_CONTINUATION;
373 lh->gapsHi[0] = (t1 & UCOL_PRIMARYMASK) | (t2 & UCOL_PRIMARYMASK) >> 16;
374 lh->gapsHi[1] = (t1 & UCOL_SECONDARYMASK) << 16 | (t2 & UCOL_SECONDARYMASK) << 8;
375 lh->gapsHi[2] = (UCOL_TERTIARYORDER(t1)) << 24 | (UCOL_TERTIARYORDER(t2)) << 16;
379 if((lh->pos[tokStrength] = ucol_inv_getNext(src, lh, tokStrength)) >= 0) {
380 lh->fStrToken[tokStrength] = tok;
389 lh->lStrToken[tokStrength] = tok;
395 if(lh->pos[tokStrength] == lh->pos[tokStrength+1]) {
396 lh->fStrToken[tokStrength] = lh->fStrToken[tokStrength+1];
397 lh->fStrToken[tokStrength+1] = NULL;
398 lh->lStrToken[tokStrength+1] = NULL;
399 lh->pos[tokStrength+1] = -1;
409 if((pos = lh->pos[st]) >= 0) {
412 lh->gapsHi[3*st] = (t1 & UCOL_PRIMARYMASK) | (t2 & UCOL_PRIMARYMASK) >> 16;
413 lh->gapsHi[3*st+1] = (t1 & UCOL_SECONDARYMASK) << 16 | (t2 & UCOL_SECONDARYMASK) << 8;
414 //lh->gapsHi[3*st+2] = (UCOL_TERTIARYORDER(t1)) << 24 | (UCOL_TERTIARYORDER(t2)) << 16;
415 lh->gapsHi[3*st+2] = (t1&0x3f) << 24 | (t2&0x3f) << 16;
419 t1 = lh->baseCE;
420 t2 = lh->baseContCE;
421 lh->gapsLo[3*st] = (t1 & UCOL_PRIMARYMASK) | (t2 & UCOL_PRIMARYMASK) >> 16;
422 lh->gapsLo[3*st+1] = (t1 & UCOL_SECONDARYMASK) << 16 | (t2 & UCOL_SECONDARYMASK) << 8;
423 lh->gapsLo[3*st+2] = (t1&0x3f) << 24 | (t2&0x3f) << 16;
737 U_CFUNC void ucol_initBuffers(UColTokenParser *src, UColTokListHeader *lh, UErrorCode *status) {
741 UColToken *tok = lh->last;
768 ucol_inv_getGapPositions(src, lh, status);
771 fprintf(stderr, "BaseCE: %08X %08X\n", lh->baseCE, lh->baseContCE);
774 fprintf(stderr, "gapsLo[%i] [%08X %08X %08X]\n", j, lh->gapsLo[j*3], lh->gapsLo[j*3+1], lh->gapsLo[j*3+2]);
775 fprintf(stderr, "gapsHi[%i] [%08X %08X %08X]\n", j, lh->gapsHi[j*3], lh->gapsHi[j*3+1], lh->gapsHi[j*3+2]);
777 tok=&lh->first[UCOL_TOK_POLARITY_POSITIVE];
785 tok=&lh->first[UCOL_TOK_POLARITY_POSITIVE];
793 tok = lh->first;
798 CEparts[UCOL_PRIMARY] = (lh->baseCE & UCOL_PRIMARYMASK) | (lh->baseContCE & UCOL_PRIMARYMASK) >> 16;
799 CEparts[UCOL_SECONDARY] = (lh->baseCE & UCOL_SECONDARYMASK) << 16 | (lh->baseContCE & UCOL_SECONDARYMASK) << 8;
800 CEparts[UCOL_TERTIARY] = (UCOL_TERTIARYORDER(lh->baseCE)) << 24 | (UCOL_TERTIARYORDER(lh->baseContCE)) << 16;
806 if(lh->pos[fStrength] == -1) {
807 while(lh->pos[fStrength] == -1 && fStrength > 0) {
810 if(lh->pos[fStrength] == -1) {
816 CEparts[UCOL_PRIMARY] = lh->gapsLo[fStrength*3];
817 CEparts[UCOL_SECONDARY] = lh->gapsLo[fStrength*3+1];
818 /*CEparts[UCOL_TERTIARY] = ucol_getCEGenerator(&Gens[2], lh->gapsLo[fStrength*3+2], lh->gapsHi[fStrength*3+2], tok, UCOL_TERTIARY); */
819 CEparts[UCOL_TERTIARY] = ucol_getCEGenerator(&Gens[UCOL_TERTIARY], lh->gapsLo, lh->gapsHi, tok, fStrength, status);
821 CEparts[UCOL_PRIMARY] = lh->gapsLo[fStrength*3];
822 /*CEparts[1] = ucol_getCEGenerator(&Gens[1], lh->gapsLo[fStrength*3+1], lh->gapsHi[fStrength*3+1], tok, 1);*/
823 CEparts[UCOL_SECONDARY] = ucol_getCEGenerator(&Gens[UCOL_SECONDARY], lh->gapsLo, lh->gapsHi, tok, fStrength, status);
826 /*CEparts[UCOL_PRIMARY] = ucol_getCEGenerator(&Gens[0], lh->gapsLo[0], lh->gapsHi[0], tok, UCOL_PRIMARY);*/
827 CEparts[UCOL_PRIMARY] = ucol_getCEGenerator(&Gens[UCOL_PRIMARY], lh->gapsLo, lh->gapsHi, tok, fStrength, status);
848 U_CFUNC void ucol_createElements(UColTokenParser *src, tempUCATable *t, UColTokListHeader *lh, UErrorCode *status) {
850 UColToken *tok = lh->first;
1136 if(src->lh[i].first) { // if there are any elements
1140 ucol_initBuffers(src, &src->lh[i], status);
1182 ucol_createElements(src, t, &src->lh[i], status);