Home | History | Annotate | Download | only in i18n

Lines Matching refs:lh

257 inline int32_t ucol_inv_getPrevious(UColTokenParser *src, UColTokListHeader *lh, uint32_t strength) {
259 uint32_t CE = lh->baseCE;
260 uint32_t SecondCE = lh->baseContCE;
282 lh->previousCE = previousCE;
283 lh->previousContCE = previousContCE;
289 inline int32_t ucol_inv_getNext(UColTokenParser *src, UColTokListHeader *lh, uint32_t strength) {
290 uint32_t CE = lh->baseCE;
291 uint32_t SecondCE = lh->baseContCE;
316 lh->nextCE = nextCE;
317 lh->nextContCE = nextContCE;
322 static void ucol_inv_getGapPositions(UColTokenParser *src, UColTokListHeader *lh, UErrorCode *status) {
330 UColToken *tok = lh->first;
334 lh->gapsHi[3*i] = 0;
335 lh->gapsHi[3*i+1] = 0;
336 lh->gapsHi[3*i+2] = 0;
337 lh->gapsLo[3*i] = 0;
338 lh->gapsLo[3*i+1] = 0;
339 lh->gapsLo[3*i+2] = 0;
340 lh->numStr[i] = 0;
341 lh->fStrToken[i] = NULL;
342 lh->lStrToken[i] = NULL;
343 lh->pos[i] = -1;
348 if((lh->baseCE & 0xFF000000)>= (consts->UCA_PRIMARY_IMPLICIT_MIN<<24) && (lh->baseCE & 0xFF000000) <= (consts->UCA_PRIMARY_IMPLICIT_MAX<<24) ) { /* implicits - */
349 //if(lh->baseCE >= PRIMARY_IMPLICIT_MIN && lh->baseCE < PRIMARY_IMPLICIT_MAX ) { /* implicits - */
350 lh->pos[0] = 0;
351 t1 = lh->baseCE;
352 t2 = lh->baseContCE & UCOL_REMOVE_CONTINUATION;
353 lh->gapsLo[0] = (t1 & UCOL_PRIMARYMASK) | (t2 & UCOL_PRIMARYMASK) >> 16;
354 lh->gapsLo[1] = (t1 & UCOL_SECONDARYMASK) << 16 | (t2 & UCOL_SECONDARYMASK) << 8;
355 lh->gapsLo[2] = (UCOL_TERTIARYORDER(t1)) << 24 | (UCOL_TERTIARYORDER(t2)) << 16;
362 lh->gapsHi[0] = (t1 & UCOL_PRIMARYMASK) | (t2 & UCOL_PRIMARYMASK) >> 16;
363 lh->gapsHi[1] = (t1 & UCOL_SECONDARYMASK) << 16 | (t2 & UCOL_SECONDARYMASK) << 8;
364 lh->gapsHi[2] = (UCOL_TERTIARYORDER(t1)) << 24 | (UCOL_TERTIARYORDER(t2)) << 16;
365 } else if(lh->indirect == TRUE && lh->nextCE != 0) {
366 //} else if(lh->baseCE == UCOL_RESET_TOP_VALUE && lh->baseContCE == 0) {
367 lh->pos[0] = 0;
368 t1 = lh->baseCE;
369 t2 = lh->baseContCE&UCOL_REMOVE_CONTINUATION;
370 lh->gapsLo[0] = (t1 & UCOL_PRIMARYMASK) | (t2 & UCOL_PRIMARYMASK) >> 16;
371 lh->gapsLo[1] = (t1 & UCOL_SECONDARYMASK) << 16 | (t2 & UCOL_SECONDARYMASK) << 8;
372 lh->gapsLo[2] = (UCOL_TERTIARYORDER(t1)) << 24 | (UCOL_TERTIARYORDER(t2)) << 16;
373 t1 = lh->nextCE;
374 t2 = lh->nextContCE&UCOL_REMOVE_CONTINUATION;
375 lh->gapsHi[0] = (t1 & UCOL_PRIMARYMASK) | (t2 & UCOL_PRIMARYMASK) >> 16;
376 lh->gapsHi[1] = (t1 & UCOL_SECONDARYMASK) << 16 | (t2 & UCOL_SECONDARYMASK) << 8;
377 lh->gapsHi[2] = (UCOL_TERTIARYORDER(t1)) << 24 | (UCOL_TERTIARYORDER(t2)) << 16;
381 if((lh->pos[tokStrength] = ucol_inv_getNext(src, lh, tokStrength)) >= 0) {
382 lh->fStrToken[tokStrength] = tok;
391 lh->lStrToken[tokStrength] = tok;
397 if(lh->pos[tokStrength] == lh->pos[tokStrength+1]) {
398 lh->fStrToken[tokStrength] = lh->fStrToken[tokStrength+1];
399 lh->fStrToken[tokStrength+1] = NULL;
400 lh->lStrToken[tokStrength+1] = NULL;
401 lh->pos[tokStrength+1] = -1;
411 if((pos = lh->pos[st]) >= 0) {
414 lh->gapsHi[3*st] = (t1 & UCOL_PRIMARYMASK) | (t2 & UCOL_PRIMARYMASK) >> 16;
415 lh->gapsHi[3*st+1] = (t1 & UCOL_SECONDARYMASK) << 16 | (t2 & UCOL_SECONDARYMASK) << 8;
416 //lh->gapsHi[3*st+2] = (UCOL_TERTIARYORDER(t1)) << 24 | (UCOL_TERTIARYORDER(t2)) << 16;
417 lh->gapsHi[3*st+2] = (t1&0x3f) << 24 | (t2&0x3f) << 16;
421 t1 = lh->baseCE;
422 t2 = lh->baseContCE;
423 lh->gapsLo[3*st] = (t1 & UCOL_PRIMARYMASK) | (t2 & UCOL_PRIMARYMASK) >> 16;
424 lh->gapsLo[3*st+1] = (t1 & UCOL_SECONDARYMASK) << 16 | (t2 & UCOL_SECONDARYMASK) << 8;
425 lh->gapsLo[3*st+2] = (t1&0x3f) << 24 | (t2&0x3f) << 16;
739 U_CFUNC void ucol_initBuffers(UColTokenParser *src, UColTokListHeader *lh, UErrorCode *status) {
743 UColToken *tok = lh->last;
770 ucol_inv_getGapPositions(src, lh, status);
773 fprintf(stderr, "BaseCE: %08X %08X\n", lh->baseCE, lh->baseContCE);
776 fprintf(stderr, "gapsLo[%i] [%08X %08X %08X]\n", j, lh->gapsLo[j*3], lh->gapsLo[j*3+1], lh->gapsLo[j*3+2]);
777 fprintf(stderr, "gapsHi[%i] [%08X %08X %08X]\n", j, lh->gapsHi[j*3], lh->gapsHi[j*3+1], lh->gapsHi[j*3+2]);
779 tok=&lh->first[UCOL_TOK_POLARITY_POSITIVE];
787 tok=&lh->first[UCOL_TOK_POLARITY_POSITIVE];
795 tok = lh->first;
800 CEparts[UCOL_PRIMARY] = (lh->baseCE & UCOL_PRIMARYMASK) | (lh->baseContCE & UCOL_PRIMARYMASK) >> 16;
801 CEparts[UCOL_SECONDARY] = (lh->baseCE & UCOL_SECONDARYMASK) << 16 | (lh->baseContCE & UCOL_SECONDARYMASK) << 8;
802 CEparts[UCOL_TERTIARY] = (UCOL_TERTIARYORDER(lh->baseCE)) << 24 | (UCOL_TERTIARYORDER(lh->baseContCE)) << 16;
808 if(lh->pos[fStrength] == -1) {
809 while(lh->pos[fStrength] == -1 && fStrength > 0) {
812 if(lh->pos[fStrength] == -1) {
818 CEparts[UCOL_PRIMARY] = lh->gapsLo[fStrength*3];
819 CEparts[UCOL_SECONDARY] = lh->gapsLo[fStrength*3+1];
820 /*CEparts[UCOL_TERTIARY] = ucol_getCEGenerator(&Gens[2], lh->gapsLo[fStrength*3+2], lh->gapsHi[fStrength*3+2], tok, UCOL_TERTIARY); */
821 CEparts[UCOL_TERTIARY] = ucol_getCEGenerator(&Gens[UCOL_TERTIARY], lh->gapsLo, lh->gapsHi, tok, fStrength, status);
823 CEparts[UCOL_PRIMARY] = lh->gapsLo[fStrength*3];
824 /*CEparts[1] = ucol_getCEGenerator(&Gens[1], lh->gapsLo[fStrength*3+1], lh->gapsHi[fStrength*3+1], tok, 1);*/
825 CEparts[UCOL_SECONDARY] = ucol_getCEGenerator(&Gens[UCOL_SECONDARY], lh->gapsLo, lh->gapsHi, tok, fStrength, status);
828 /*CEparts[UCOL_PRIMARY] = ucol_getCEGenerator(&Gens[0], lh->gapsLo[0], lh->gapsHi[0], tok, UCOL_PRIMARY);*/
829 CEparts[UCOL_PRIMARY] = ucol_getCEGenerator(&Gens[UCOL_PRIMARY], lh->gapsLo, lh->gapsHi, tok, fStrength, status);
850 U_CFUNC void ucol_createElements(UColTokenParser *src, tempUCATable *t, UColTokListHeader *lh, UErrorCode *status) {
852 UColToken *tok = lh->first;
1138 if(src->lh[i].first) { // if there are any elements
1142 ucol_initBuffers(src, &src->lh[i], status);
1184 ucol_createElements(src, t, &src->lh[i], status);