Lines Matching refs:bd
674 bracketInit(UBiDi *pBiDi, BracketData *bd) { in bracketInit() argument
675 bd->pBiDi=pBiDi; in bracketInit()
676 bd->isoRunLast=0; in bracketInit()
677 bd->isoRuns[0].start=0; in bracketInit()
678 bd->isoRuns[0].limit=0; in bracketInit()
679 bd->isoRuns[0].level=GET_PARALEVEL(pBiDi, 0); in bracketInit()
680 …bd->isoRuns[0].lastStrong=bd->isoRuns[0].lastBase=bd->isoRuns[0].contextDir=GET_PARALEVEL(pBiDi, 0… in bracketInit()
681 bd->isoRuns[0].contextPos=0; in bracketInit()
683 bd->openings=pBiDi->openingsMemory; in bracketInit()
684 bd->openingsCount=pBiDi->openingsSize / sizeof(Opening); in bracketInit()
686 bd->openings=bd->simpleOpenings; in bracketInit()
687 bd->openingsCount=SIMPLE_OPENINGS_COUNT; in bracketInit()
689 bd->isNumbersSpecial=bd->pBiDi->reorderingMode==UBIDI_REORDER_NUMBERS_SPECIAL || in bracketInit()
690 bd->pBiDi->reorderingMode==UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL; in bracketInit()
695 bracketProcessB(BracketData *bd, UBiDiLevel level) { in bracketProcessB() argument
696 bd->isoRunLast=0; in bracketProcessB()
697 bd->isoRuns[0].limit=0; in bracketProcessB()
698 bd->isoRuns[0].level=level; in bracketProcessB()
699 bd->isoRuns[0].lastStrong=bd->isoRuns[0].lastBase=bd->isoRuns[0].contextDir=level&1; in bracketProcessB()
700 bd->isoRuns[0].contextPos=0; in bracketProcessB()
705 bracketProcessBoundary(BracketData *bd, int32_t lastCcPos, in bracketProcessBoundary() argument
707 IsoRun *pLastIsoRun=&bd->isoRuns[bd->isoRunLast]; in bracketProcessBoundary()
708 DirProp *dirProps=bd->pBiDi->dirProps; in bracketProcessBoundary()
721 bracketProcessLRI_RLI(BracketData *bd, UBiDiLevel level) { in bracketProcessLRI_RLI() argument
722 IsoRun *pLastIsoRun=&bd->isoRuns[bd->isoRunLast]; in bracketProcessLRI_RLI()
726 bd->isoRunLast++; in bracketProcessLRI_RLI()
736 bracketProcessPDI(BracketData *bd) { in bracketProcessPDI() argument
738 bd->isoRunLast--; in bracketProcessPDI()
739 pLastIsoRun=&bd->isoRuns[bd->isoRunLast]; in bracketProcessPDI()
745 bracketAddOpening(BracketData *bd, UChar match, int32_t position) { in bracketAddOpening() argument
746 IsoRun *pLastIsoRun=&bd->isoRuns[bd->isoRunLast]; in bracketAddOpening()
748 if(pLastIsoRun->limit>=bd->openingsCount) { /* no available new entry */ in bracketAddOpening()
749 UBiDi *pBiDi=bd->pBiDi; in bracketAddOpening()
752 if(bd->openings==bd->simpleOpenings) in bracketAddOpening()
753 uprv_memcpy(pBiDi->openingsMemory, bd->simpleOpenings, in bracketAddOpening()
755 bd->openings=pBiDi->openingsMemory; /* may have changed */ in bracketAddOpening()
756 bd->openingsCount=pBiDi->openingsSize / sizeof(Opening); in bracketAddOpening()
758 pOpening=&bd->openings[pLastIsoRun->limit]; in bracketAddOpening()
770 fixN0c(BracketData *bd, int32_t openingIndex, int32_t newPropPosition, DirProp newProp) { in fixN0c() argument
772 IsoRun *pLastIsoRun=&bd->isoRuns[bd->isoRunLast]; in fixN0c()
774 DirProp *dirProps=bd->pBiDi->dirProps; in fixN0c()
776 for(k=openingIndex+1, qOpening=&bd->openings[k]; k<pLastIsoRun->limit; k++, qOpening++) { in fixN0c()
790 fixN0c(bd, k, openingPosition, newProp); in fixN0c()
791 fixN0c(bd, k, closingPosition, newProp); in fixN0c()
797 bracketProcessClosing(BracketData *bd, int32_t openIdx, int32_t position) { in bracketProcessClosing() argument
798 IsoRun *pLastIsoRun=&bd->isoRuns[bd->isoRunLast]; in bracketProcessClosing()
803 pOpening=&bd->openings[openIdx]; in bracketProcessClosing()
842 bd->pBiDi->dirProps[pOpening->position]=newProp; in bracketProcessClosing()
843 bd->pBiDi->dirProps[position]=newProp; in bracketProcessClosing()
845 fixN0c(bd, openIdx, pOpening->position, newProp); in bracketProcessClosing()
850 bd->openings[pLastIsoRun->limit-1].position==pOpening->position) in bracketProcessClosing()
858 bd->openings[k].position==pOpening->position) in bracketProcessClosing()
859 bd->openings[k--].match=0; in bracketProcessClosing()
863 qOpening=&bd->openings[k]; in bracketProcessClosing()
875 bracketProcessChar(BracketData *bd, int32_t position) { in bracketProcessChar() argument
876 IsoRun *pLastIsoRun=&bd->isoRuns[bd->isoRunLast]; in bracketProcessChar()
879 dirProps=bd->pBiDi->dirProps; in bracketProcessChar()
886 c=bd->pBiDi->text[position]; in bracketProcessChar()
888 if(bd->openings[idx].match!=c) in bracketProcessChar()
891 newProp=bracketProcessClosing(bd, idx, position); in bracketProcessChar()
899 level=bd->pBiDi->levels[position]; in bracketProcessChar()
907 bd->openings[i].flags|=flag; in bracketProcessChar()
909 bd->pBiDi->levels[position]&=~UBIDI_LEVEL_OVERRIDE; in bracketProcessChar()
912 bd->pBiDi->levels[bd->openings[idx].position]&=~UBIDI_LEVEL_OVERRIDE; in bracketProcessChar()
923 ubidi_getPairedBracketType(bd->pBiDi->bdp, c)==U_BPT_OPEN) { /* opening bracket */ in bracketProcessChar()
927 if(!bracketAddOpening(bd, 0x3009, position)) in bracketProcessChar()
931 if(!bracketAddOpening(bd, 0x232A, position)) in bracketProcessChar()
934 if(!bracketAddOpening(bd, match, position)) in bracketProcessChar()
938 level=bd->pBiDi->levels[position]; in bracketProcessChar()
959 if(!bd->isNumbersSpecial) in bracketProcessChar()
996 if(position>bd->openings[i].position) in bracketProcessChar()
997 bd->openings[i].flags|=flag; in bracketProcessChar()