Commit 9ccfebd6 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

usp10: Implement resolveResolved (L1) for Unicode 6.3.

parent de5dc96f
...@@ -793,6 +793,37 @@ static void resolveImplicit(const WORD * pcls, WORD *plevel, int sos, int eos) ...@@ -793,6 +793,37 @@ static void resolveImplicit(const WORD * pcls, WORD *plevel, int sos, int eos)
} }
} }
static void resolveResolved(unsigned baselevel, const WORD * pcls, WORD *plevel, int sos, int eos)
{
int i;
/* L1 */
for (i = sos; i <= eos; i++)
{
if (pcls[i] == B || pcls[i] == S)
{
int j = i -1;
while (i > sos && j >= sos &&
(pcls[j] == WS || pcls[j] == FSI || pcls[j] == LRI || pcls[j] == RLI ||
pcls[j] == PDI || pcls[j] == LRE || pcls[j] == RLE || pcls[j] == LRO ||
pcls[j] == RLO || pcls[j] == PDF || pcls[j] == BN))
plevel[j--] = baselevel;
plevel[i] = baselevel;
}
if (i == eos &&
(pcls[i] == WS || pcls[i] == FSI || pcls[i] == LRI || pcls[i] == RLI ||
pcls[i] == PDI || pcls[i] == LRE || pcls[i] == RLE || pcls[i] == LRO ||
pcls[i] == RLO || pcls[i] == PDF || pcls[i] == BN ))
{
int j = i;
while (j >= sos && (pcls[j] == WS || pcls[j] == FSI || pcls[j] == LRI || pcls[j] == RLI ||
pcls[j] == PDI || pcls[j] == LRE || pcls[j] == RLE || pcls[j] == LRO ||
pcls[j] == RLO || pcls[j] == PDF || pcls[j] == BN))
plevel[j--] = baselevel;
}
}
}
static void computeIsolatingRunsSet(unsigned baselevel, WORD *pcls, WORD *pLevel, int uCount, struct list *set) static void computeIsolatingRunsSet(unsigned baselevel, WORD *pcls, WORD *pLevel, int uCount, struct list *set)
{ {
int run_start, run_end, i; int run_start, run_end, i;
...@@ -972,6 +1003,10 @@ BOOL BIDI_DetermineLevels( ...@@ -972,6 +1003,10 @@ BOOL BIDI_DetermineLevels(
/* resolveImplicit */ /* resolveImplicit */
resolveImplicit(chartype, lpOutLevels, 0, uCount-1); resolveImplicit(chartype, lpOutLevels, 0, uCount-1);
/* resolveResolvedLevels*/
classify(lpString, chartype, uCount, c);
resolveResolved(baselevel, chartype, lpOutLevels, 0, uCount-1);
HeapFree(GetProcessHeap(), 0, chartype); HeapFree(GetProcessHeap(), 0, chartype);
return TRUE; return TRUE;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment