1 --- icu/source/common/ubidi.c.orig 2014-08-09 20:54:39.338833533 +0100
2 +++ icu/source/common/ubidi.c 2014-08-09 20:55:48.625469055 +0100
4 bd->isoRuns[0].contextPos=0;
5 if(pBiDi->openingsMemory) {
6 bd->openings=pBiDi->openingsMemory;
7 - bd->openingsSize=pBiDi->openingsSize;
8 + bd->openingsCount=pBiDi->openingsSize / sizeof(Opening);
10 bd->openings=bd->simpleOpenings;
11 - bd->openingsSize=SIMPLE_OPENINGS_SIZE;
12 + bd->openingsCount=SIMPLE_OPENINGS_SIZE;
14 bd->isNumbersSpecial=bd->pBiDi->reorderingMode==UBIDI_REORDER_NUMBERS_SPECIAL ||
15 bd->pBiDi->reorderingMode==UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL;
17 bracketAddOpening(BracketData *bd, UChar match, int32_t position) {
18 IsoRun *pLastIsoRun=&bd->isoRuns[bd->isoRunLast];
20 - if(pLastIsoRun->limit>=bd->openingsSize) { /* no available new entry */
21 + if(pLastIsoRun->limit>=bd->openingsCount) { /* no available new entry */
22 UBiDi *pBiDi=bd->pBiDi;
23 if(!getInitialOpeningsMemory(pBiDi, pLastIsoRun->limit * 2))
26 uprv_memcpy(pBiDi->openingsMemory, bd->simpleOpenings,
27 SIMPLE_OPENINGS_SIZE * sizeof(Opening));
28 bd->openings=pBiDi->openingsMemory; /* may have changed */
29 - bd->openingsSize=pBiDi->openingsSize;
30 + bd->openingsCount=pBiDi->openingsSize / sizeof(Opening);
32 pOpening=&bd->openings[pLastIsoRun->limit];
33 pOpening->position=position;
34 --- icu/source/common/ubidiimp.h.orig 2014-08-09 20:55:15.053161192 +0100
35 +++ icu/source/common/ubidiimp.h 2014-08-09 20:56:07.028637725 +0100
37 /* array of opening entries which should be enough in most cases; no malloc() */
38 Opening simpleOpenings[SIMPLE_OPENINGS_SIZE];
39 Opening *openings; /* pointer to current array of entries */
40 - int32_t openingsSize; /* number of allocated entries */
41 + int32_t openingsCount; /* number of allocated entries */
42 int32_t isoRunLast; /* index of last used entry */
43 /* array of nested isolated sequence entries; can never excess UBIDI_MAX_EXPLICIT_LEVEL
44 + 1 for index 0, + 1 for before the first isolated sequence */