From 6a334be372146ecb709f4b18671d82fd9dbc3d7f Mon Sep 17 00:00:00 2001 From: James Tabor Date: Thu, 20 Mar 2014 02:07:55 +0000 Subject: [PATCH] [Usp10] - Sync to Wine 1.7.14. svn path=/trunk/; revision=62535 --- reactos/dll/win32/usp10/bidi.c | 1126 ++++++++++++++--------- reactos/dll/win32/usp10/indicsyllable.c | 4 +- reactos/dll/win32/usp10/linebreak.c | 168 ++-- reactos/dll/win32/usp10/shaping.c | 70 +- reactos/dll/win32/usp10/usp10.c | 2 +- reactos/media/doc/README.WINE | 2 +- 6 files changed, 802 insertions(+), 570 deletions(-) diff --git a/reactos/dll/win32/usp10/bidi.c b/reactos/dll/win32/usp10/bidi.c index 6afcf70ef35..5ac37802b3e 100644 --- a/reactos/dll/win32/usp10/bidi.c +++ b/reactos/dll/win32/usp10/bidi.c @@ -41,12 +41,16 @@ * has been modified. */ +#include + +#include + #include "usp10_internal.h" WINE_DEFAULT_DEBUG_CHANNEL(bidi); #define ASSERT(x) do { if (!(x)) FIXME("assert failed: %s\n", #x); } while(0) -#define MAX_LEVEL 61 +#define MAX_DEPTH 125 /* HELPER FUNCTIONS AND DECLARATIONS */ @@ -64,7 +68,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(bidi); enum directions { /* input types */ - /* ON MUST be zero, code relies on ON = N = 0 */ + /* ON MUST be zero, code relies on ON = NI = 0 */ ON = 0, /* Other Neutral */ L, /* Left Letter */ R, /* Right Letter */ @@ -91,12 +95,53 @@ enum directions LRE, PDF, + LRI, /* Isolate formatting characters new with 6.3 */ + RLI, + FSI, + PDI, + /* resolved types, also resolved directions */ - N = ON, /* alias, where ON, WS and S are treated the same */ + NI = ON, /* alias, where ON, WS, S and Isolates are treated the same */ +}; + +static const char debug_type[][4] = +{ + "ON", /* Other Neutral */ + "L", /* Left Letter */ + "R", /* Right Letter */ + "AN", /* Arabic Number */ + "EN", /* European Number */ + "AL", /* Arabic Letter (Right-to-left) */ + "NSM", /* Non-spacing Mark */ + "CS", /* Common Separator */ + "ES", /* European Separator */ + "ET", /* European Terminator (post/prefix e.g. $ and %) */ + "BN", /* Boundary neutral (type of RLE etc after explicit levels) */ + "S", /* Segment Separator (TAB) // used only in L1 */ + "WS", /* White space // used only in L1 */ + "B", /* Paragraph Separator (aka as PS) */ + "RLO", /* these are used only in X1-X9 */ + "RLE", + "LRO", + "LRE", + "PDF", + "LRI", /* Isolate formatting characters new with 6.3 */ + "RLI", + "FSI", + "PDI", }; /* HELPER FUNCTIONS */ +static inline void dump_types(const char* header, WORD *types, int start, int end) +{ + int i; + TRACE("%s:",header); + for (i = start; i< end; i++) + TRACE(" %s",debug_type[types[i]]); + TRACE("\n"); +} + /* Convert the libwine information to the direction enum */ static void classify(LPCWSTR lpString, WORD *chartype, DWORD uCount, const SCRIPT_CONTROL *c) { @@ -132,7 +177,7 @@ static void classify(LPCWSTR lpString, WORD *chartype, DWORD uCount, const SCRIP switch (lpString[i]) { case '-': - case '+': chartype[i] = N; break; + case '+': chartype[i] = NI; break; case '/': chartype[i] = CS; break; } break; @@ -144,23 +189,16 @@ static void classify(LPCWSTR lpString, WORD *chartype, DWORD uCount, const SCRIP case 0x202C: chartype[i] = PDF; break; case 0x202D: chartype[i] = LRO; break; case 0x202E: chartype[i] = RLO; break; + case 0x2066: chartype[i] = LRI; break; + case 0x2067: chartype[i] = RLI; break; + case 0x2068: chartype[i] = FSI; break; + case 0x2069: chartype[i] = PDI; break; } break; } } } -/* Set a run of cval values at locations all prior to, but not including */ -/* iStart, to the new value nval. */ -static void SetDeferredRun(WORD *pval, int cval, int iStart, int nval) -{ - int i = iStart - 1; - for (; i >= iStart - cval; i--) - { - pval[i] = nval; - } -} - /* RESOLVE EXPLICIT */ static WORD GreaterEven(int i) @@ -197,233 +235,269 @@ static WORD EmbeddingDirection(int level) the outermost call. The nesting counter counts the recursion depth and not the embedding level. ------------------------------------------------------------------------*/ +typedef struct tagStackItem { + int level; + int override; + BOOL isolate; +} StackItem; -static int resolveExplicit(int level, int dir, WORD *pcls, WORD *plevel, int cch, int nNest) +#define push_stack(l,o,i) \ + do { stack_top--; \ + stack[stack_top].level = l; \ + stack[stack_top].override = o; \ + stack[stack_top].isolate = i;} while(0) + +#define pop_stack() do { stack_top++; } while(0) + +#define valid_level(x) (x <= MAX_DEPTH && overflow_isolate_count == 0 && overflow_embedding_count == 0) + +static void resolveExplicit(int level, WORD *pclass, WORD *poutLevel, int count) { - /* always called with a valid nesting level - nesting levels are != embedding levels */ - int nLastValid = nNest; - int ich = 0; + /* X1 */ + int overflow_isolate_count = 0; + int overflow_embedding_count = 0; + int valid_isolate_count = 0; + int i; - /* check input values */ - ASSERT(nNest >= 0 && level >= 0 && level <= MAX_LEVEL); + StackItem stack[MAX_DEPTH+2]; + int stack_top = MAX_DEPTH+1; - /* process the text */ - for (; ich < cch; ich++) + stack[stack_top].level = level; + stack[stack_top].override = NI; + stack[stack_top].isolate = FALSE; + + for (i = 0; i < count; i++) { - WORD cls = pcls[ich]; - switch (cls) + /* X2 */ + if (pclass[i] == RLE) { - case LRO: - case LRE: - nNest++; - if (GreaterEven(level) <= MAX_LEVEL - (cls == LRO ? 2 : 0)) + int least_odd = GreaterOdd(stack[stack_top].level); + poutLevel[i] = stack[stack_top].level; + if (valid_level(least_odd)) + push_stack(least_odd, NI, FALSE); + else if (overflow_isolate_count == 0) + overflow_embedding_count++; + } + /* X3 */ + else if (pclass[i] == LRE) + { + int least_even = GreaterEven(stack[stack_top].level); + poutLevel[i] = stack[stack_top].level; + if (valid_level(least_even)) + push_stack(least_even, NI, FALSE); + else if (overflow_isolate_count == 0) + overflow_embedding_count++; + } + /* X4 */ + else if (pclass[i] == RLO) + { + int least_odd = GreaterOdd(stack[stack_top].level); + poutLevel[i] = stack[stack_top].level; + if (valid_level(least_odd)) + push_stack(least_odd, R, FALSE); + else if (overflow_isolate_count == 0) + overflow_embedding_count++; + } + /* X5 */ + else if (pclass[i] == LRO) + { + int least_even = GreaterEven(stack[stack_top].level); + poutLevel[i] = stack[stack_top].level; + if (valid_level(least_even)) + push_stack(least_even, L, FALSE); + else if (overflow_isolate_count == 0) + overflow_embedding_count++; + } + /* X5a */ + else if (pclass[i] == RLI) + { + int least_odd = GreaterOdd(stack[stack_top].level); + poutLevel[i] = stack[stack_top].level; + if (valid_level(least_odd)) { - plevel[ich] = GreaterEven(level); - pcls[ich] = BN; - ich += resolveExplicit(plevel[ich], (cls == LRE ? N : L), - &pcls[ich+1], &plevel[ich+1], - cch - (ich+1), nNest); - nNest--; - continue; + valid_isolate_count++; + push_stack(least_odd, NI, TRUE); } - cls = pcls[ich] = BN; - break; - - case RLO: - case RLE: - nNest++; - if (GreaterOdd(level) <= MAX_LEVEL - (cls == RLO ? 2 : 0)) + else + overflow_isolate_count++; + } + /* X5b */ + else if (pclass[i] == LRI) + { + int least_even = GreaterEven(stack[stack_top].level); + poutLevel[i] = stack[stack_top].level; + if (valid_level(least_even)) { - plevel[ich] = GreaterOdd(level); - pcls[ich] = BN; - ich += resolveExplicit(plevel[ich], (cls == RLE ? N : R), - &pcls[ich+1], &plevel[ich+1], - cch - (ich+1), nNest); - nNest--; - continue; + valid_isolate_count++; + push_stack(least_even, NI, TRUE); } - cls = pcls[ich] = BN; - break; - - case PDF: - cls = pcls[ich] = BN; - if (nNest) + else + overflow_isolate_count++; + } + /* X5c */ + else if (pclass[i] == FSI) + { + int j; + int new_level = 0; + int skipping = 0; + poutLevel[i] = stack[stack_top].level; + for (j = i+1; j < count; j++) { - if (nLastValid < nNest) + if (pclass[j] == LRI || pclass[j] == RLI || pclass[j] == FSI) { - nNest--; + skipping++; + continue; + } + else if (pclass[j] == PDI) + { + if (skipping) + skipping --; + else + break; + continue; + } + + if (skipping) continue; + + if (pclass[j] == L) + { + new_level = 0; + break; + } + else if (pclass[j] == R || pclass[j] == AL) + { + new_level = 1; + break; + } + } + if (odd(new_level)) + { + int least_odd = GreaterOdd(stack[stack_top].level); + if (valid_level(least_odd)) + { + valid_isolate_count++; + push_stack(least_odd, NI, TRUE); } else + overflow_isolate_count++; + } + else + { + int least_even = GreaterEven(stack[stack_top].level); + if (valid_level(least_even)) { - cch = ich; /* break the loop, but complete body */ + valid_isolate_count++; + push_stack(least_even, NI, TRUE); } + else + overflow_isolate_count++; } } - - /* Apply the override */ - if (dir != N) + /* X6 */ + else if (pclass[i] != B && pclass[i] != BN && pclass[i] != PDI && pclass[i] != PDF) { - cls = dir; + poutLevel[i] = stack[stack_top].level; + if (stack[stack_top].override != NI) + pclass[i] = stack[stack_top].override; } - plevel[ich] = level; - if (pcls[ich] != BN) - pcls[ich] = cls; + /* X6a */ + else if (pclass[i] == PDI) + { + if (overflow_isolate_count) overflow_isolate_count--; + else if (!valid_isolate_count) {/* do nothing */} + else + { + overflow_embedding_count = 0; + while (!stack[stack_top].isolate) pop_stack(); + pop_stack(); + valid_isolate_count --; + } + poutLevel[i] = stack[stack_top].level; + } + /* X7 */ + else if (pclass[i] == PDF) + { + poutLevel[i] = stack[stack_top].level; + if (overflow_isolate_count) {/* do nothing */} + else if (overflow_embedding_count) overflow_embedding_count--; + else if (!stack[stack_top].isolate && stack_top < (MAX_DEPTH+1)) + pop_stack(); + } + /* X8: Nothing */ } - - return ich; + /* X9: Based on 5.2 Retaining Explicit Formatting Characters */ + for (i = 0; i < count ; i++) + if (pclass[i] == RLE || pclass[i] == LRE || pclass[i] == RLO || pclass[i] == LRO || pclass[i] == PDF) + pclass[i] = BN; } -/* RESOLVE WEAK TYPES */ - -enum states /* possible states */ +static inline int previousValidChar(const WORD *pcls, int index, int back_fence) { - xa, /* Arabic letter */ - xr, /* right letter */ - xl, /* left letter */ - - ao, /* Arabic lett. foll by ON */ - ro, /* right lett. foll by ON */ - lo, /* left lett. foll by ON */ - - rt, /* ET following R */ - lt, /* ET following L */ - - cn, /* EN, AN following AL */ - ra, /* Arabic number foll R */ - re, /* European number foll R */ - la, /* Arabic number foll L */ - le, /* European number foll L */ - - ac, /* CS following cn */ - rc, /* CS following ra */ - rs, /* CS,ES following re */ - lc, /* CS following la */ - ls, /* CS,ES following le */ - - ret, /* ET following re */ - let, /* ET following le */ -} ; - -static const int stateWeak[][10] = -{ - /* N, L, R, AN, EN, AL,NSM, CS, ES, ET */ -/*xa*/ { ao, xl, xr, cn, cn, xa, xa, ao, ao, ao }, /* Arabic letter */ -/*xr*/ { ro, xl, xr, ra, re, xa, xr, ro, ro, rt }, /* right letter */ -/*xl*/ { lo, xl, xr, la, le, xa, xl, lo, lo, lt }, /* left letter */ - -/*ao*/ { ao, xl, xr, cn, cn, xa, ao, ao, ao, ao }, /* Arabic lett. foll by ON*/ -/*ro*/ { ro, xl, xr, ra, re, xa, ro, ro, ro, rt }, /* right lett. foll by ON */ -/*lo*/ { lo, xl, xr, la, le, xa, lo, lo, lo, lt }, /* left lett. foll by ON */ - -/*rt*/ { ro, xl, xr, ra, re, xa, rt, ro, ro, rt }, /* ET following R */ -/*lt*/ { lo, xl, xr, la, le, xa, lt, lo, lo, lt }, /* ET following L */ - -/*cn*/ { ao, xl, xr, cn, cn, xa, cn, ac, ao, ao }, /* EN, AN following AL */ -/*ra*/ { ro, xl, xr, ra, re, xa, ra, rc, ro, rt }, /* Arabic number foll R */ -/*re*/ { ro, xl, xr, ra, re, xa, re, rs, rs,ret }, /* European number foll R */ -/*la*/ { lo, xl, xr, la, le, xa, la, lc, lo, lt }, /* Arabic number foll L */ -/*le*/ { lo, xl, xr, la, le, xa, le, ls, ls,let }, /* European number foll L */ - -/*ac*/ { ao, xl, xr, cn, cn, xa, ao, ao, ao, ao }, /* CS following cn */ -/*rc*/ { ro, xl, xr, ra, re, xa, ro, ro, ro, rt }, /* CS following ra */ -/*rs*/ { ro, xl, xr, ra, re, xa, ro, ro, ro, rt }, /* CS,ES following re */ -/*lc*/ { lo, xl, xr, la, le, xa, lo, lo, lo, lt }, /* CS following la */ -/*ls*/ { lo, xl, xr, la, le, xa, lo, lo, lo, lt }, /* CS,ES following le */ - -/*ret*/{ ro, xl, xr, ra, re, xa,ret, ro, ro,ret }, /* ET following re */ -/*let*/{ lo, xl, xr, la, le, xa,let, lo, lo,let }, /* ET following le */ -}; - -enum actions /* possible actions */ -{ - /* primitives */ - IX = 0x100, /* increment */ - XX = 0xF, /* no-op */ - - /* actions */ - xxx = (XX << 4) + XX, /* no-op */ - xIx = IX + xxx, /* increment run */ - xxN = (XX << 4) + ON, /* set current to N */ - xxE = (XX << 4) + EN, /* set current to EN */ - xxA = (XX << 4) + AN, /* set current to AN */ - xxR = (XX << 4) + R, /* set current to R */ - xxL = (XX << 4) + L, /* set current to L */ - Nxx = (ON << 4) + 0xF, /* set run to neutral */ - Axx = (AN << 4) + 0xF, /* set run to AN */ - ExE = (EN << 4) + EN, /* set run to EN, set current to EN */ - NIx = (ON << 4) + 0xF + IX, /* set run to N, increment */ - NxN = (ON << 4) + ON, /* set run to N, set current to N */ - NxR = (ON << 4) + R, /* set run to N, set current to R */ - NxE = (ON << 4) + EN, /* set run to N, set current to EN */ - - AxA = (AN << 4) + AN, /* set run to AN, set current to AN */ - NxL = (ON << 4) + L, /* set run to N, set current to L */ - LxL = (L << 4) + L, /* set run to L, set current to L */ -} ; - -static const int actionWeak[][10] = -{ - /* N, L, R, AN, EN, AL, NSM, CS, ES, ET */ -/*xa*/ { xxx, xxx, xxx, xxx, xxA, xxR, xxR, xxN, xxN, xxN }, /* Arabic letter */ -/*xr*/ { xxx, xxx, xxx, xxx, xxE, xxR, xxR, xxN, xxN, xIx }, /* right letter */ -/*xl*/ { xxx, xxx, xxx, xxx, xxL, xxR, xxL, xxN, xxN, xIx }, /* left letter */ - -/*ao*/ { xxx, xxx, xxx, xxx, xxA, xxR, xxN, xxN, xxN, xxN }, /* Arabic lett. foll by ON */ -/*ro*/ { xxx, xxx, xxx, xxx, xxE, xxR, xxN, xxN, xxN, xIx }, /* right lett. foll by ON */ -/*lo*/ { xxx, xxx, xxx, xxx, xxL, xxR, xxN, xxN, xxN, xIx }, /* left lett. foll by ON */ - -/*rt*/ { Nxx, Nxx, Nxx, Nxx, ExE, NxR, xIx, NxN, NxN, xIx }, /* ET following R */ -/*lt*/ { Nxx, Nxx, Nxx, Nxx, LxL, NxR, xIx, NxN, NxN, xIx }, /* ET following L */ - -/*cn*/ { xxx, xxx, xxx, xxx, xxA, xxR, xxA, xIx, xxN, xxN }, /* EN, AN following AL */ -/*ra*/ { xxx, xxx, xxx, xxx, xxE, xxR, xxA, xIx, xxN, xIx }, /* Arabic number foll R */ -/*re*/ { xxx, xxx, xxx, xxx, xxE, xxR, xxE, xIx, xIx, xxE }, /* European number foll R */ -/*la*/ { xxx, xxx, xxx, xxx, xxL, xxR, xxA, xIx, xxN, xIx }, /* Arabic number foll L */ -/*le*/ { xxx, xxx, xxx, xxx, xxL, xxR, xxL, xIx, xIx, xxL }, /* European number foll L */ - -/*ac*/ { Nxx, Nxx, Nxx, Axx, AxA, NxR, NxN, NxN, NxN, NxN }, /* CS following cn */ -/*rc*/ { Nxx, Nxx, Nxx, Axx, NxE, NxR, NxN, NxN, NxN, NIx }, /* CS following ra */ -/*rs*/ { Nxx, Nxx, Nxx, Nxx, ExE, NxR, NxN, NxN, NxN, NIx }, /* CS,ES following re */ -/*lc*/ { Nxx, Nxx, Nxx, Axx, NxL, NxR, NxN, NxN, NxN, NIx }, /* CS following la */ -/*ls*/ { Nxx, Nxx, Nxx, Nxx, LxL, NxR, NxN, NxN, NxN, NIx }, /* CS,ES following le */ - -/*ret*/{ xxx, xxx, xxx, xxx, xxE, xxR, xxE, xxN, xxN, xxE }, /* ET following re */ -/*let*/{ xxx, xxx, xxx, xxx, xxL, xxR, xxL, xxN, xxN, xxL }, /* ET following le */ -}; - -static int GetDeferredType(int action) -{ - return (action >> 4) & 0xF; + if (index == -1 || index == back_fence) return index; + index --; + while (index > back_fence && pcls[index] == BN) index --; + return index; } -static int GetResolvedType(int action) +static inline int nextValidChar(const WORD *pcls, int index, int front_fence) { - return action & 0xF; + if (index == front_fence) return index; + index ++; + while (index < front_fence && pcls[index] == BN) index ++; + return index; } -/* Note on action table: +typedef struct tagRun +{ + int start; + int end; + WORD e; +} Run; - States can be of two kinds: - - Immediate Resolution State, where each input token - is resolved as soon as it is seen. These states have - only single action codes (xxN) or the no-op (xxx) - for static input tokens. - - Deferred Resolution State, where input tokens either - either extend the run (xIx) or resolve its Type (e.g. Nxx). +typedef struct tagIsolatedRun +{ + struct list entry; + int length; + WORD sos; + WORD eos; + WORD e; - Input classes are of three kinds - - Static Input Token, where the class of the token remains - unchanged on output (AN, L, N, R) - - Replaced Input Token, where the class of the token is - always replaced on output (AL, BN, NSM, CS, ES, ET) - - Conditional Input Token, where the class of the token is - changed on output in some, but not all, cases (EN) + WORD *ppcls[1]; +} IsolatedRun; - Where tokens are subject to change, a double action - (e.g. NxA, or NxN) is _required_ after deferred states, - resolving both the deferred state and changing the current token. -*/ +static inline int iso_nextValidChar(IsolatedRun *iso_run, int index) +{ + if (index >= (iso_run->length-1)) return -1; + index ++; + while (index < iso_run->length && *iso_run->ppcls[index] == BN) index++; + if (index == iso_run->length) return -1; + return index; +} + +static inline int iso_previousValidChar(IsolatedRun *iso_run, int index) +{ + + if (index <= 0) return -1; + index --; + while (index > -1 && *iso_run->ppcls[index] == BN) index--; + return index; +} + +static inline int iso_previousChar(IsolatedRun *iso_run, int index) +{ + if (index <= 0) return -1; + return index --; +} + +static inline void iso_dump_types(const char* header, IsolatedRun *iso_run) +{ + int i; + TRACE("%s:",header); + TRACE("[ "); + for (i = 0; i < iso_run->length; i++) + TRACE(" %s",debug_type[*iso_run->ppcls[i]]); + TRACE(" ]\n"); +} /*------------------------------------------------------------------------ Function: resolveWeak @@ -440,178 +514,142 @@ static int GetResolvedType(int action) Note: On input only these directional classes are expected AL, HL, R, L, ON, BN, NSM, AN, EN, ES, ET, CS, ------------------------------------------------------------------------*/ -static void resolveWeak(int baselevel, WORD *pcls, WORD *plevel, int cch) + +static void resolveWeak(IsolatedRun * iso_run) { - int state = odd(baselevel) ? xr : xl; - int cls; + int i; - int level = baselevel; - int action, clsRun, clsNew; - int cchRun = 0; - int ich = 0; - - for (; ich < cch; ich++) + /* W1 */ + for (i=0; i < iso_run->length; i++) { - /* ignore boundary neutrals */ - if (pcls[ich] == BN) + if (*iso_run->ppcls[i] == NSM) { - /* must flatten levels unless at a level change; */ - plevel[ich] = level; - - /* lookahead for level changes */ - if (ich + 1 == cch && level != baselevel) - { - /* have to fixup last BN before end of the loop, since - * its fix-upped value will be needed below the assert */ - pcls[ich] = EmbeddingDirection(level); - } - else if (ich + 1 < cch && level != plevel[ich+1] && pcls[ich+1] != BN) - { - /* fixup LAST BN in front / after a level run to make - * it act like the SOR/EOR in rule X10 */ - int newlevel = plevel[ich+1]; - if (level > newlevel) { - newlevel = level; - } - plevel[ich] = newlevel; - - /* must match assigned level */ - pcls[ich] = EmbeddingDirection(newlevel); - level = plevel[ich+1]; - } + int j = iso_previousValidChar(iso_run, i); + if (j == -1) + *iso_run->ppcls[i] = iso_run->sos; + else if (*iso_run->ppcls[j] >= LRI) + *iso_run->ppcls[i] = ON; else - { - /* don't interrupt runs */ - if (cchRun) - { - cchRun++; - } - continue; - } + *iso_run->ppcls[i] = *iso_run->ppcls[j]; } - - ASSERT(pcls[ich] <= BN); - cls = pcls[ich]; - - action = actionWeak[state][cls]; - - /* resolve the directionality for deferred runs */ - clsRun = GetDeferredType(action); - if (clsRun != XX) - { - SetDeferredRun(pcls, cchRun, ich, clsRun); - cchRun = 0; - } - - /* resolve the directionality class at the current location */ - clsNew = GetResolvedType(action); - if (clsNew != XX) - pcls[ich] = clsNew; - - /* increment a deferred run */ - if (IX & action) - cchRun++; - - state = stateWeak[state][cls]; } - /* resolve any deferred runs - * use the direction of the current level to emulate PDF */ - cls = EmbeddingDirection(level); + /* W2 */ + for (i = 0; i < iso_run->length; i++) + { + if (*iso_run->ppcls[i] == EN) + { + int j = iso_previousValidChar(iso_run, i); + while (j > -1) + { + if (*iso_run->ppcls[j] == R || *iso_run->ppcls[j] == L || *iso_run->ppcls[j] == AL) + { + if (*iso_run->ppcls[j] == AL) + *iso_run->ppcls[i] = AN; + break; + } + j = iso_previousValidChar(iso_run, j); + } + } + } - /* resolve the directionality for deferred runs */ - clsRun = GetDeferredType(actionWeak[state][cls]); - if (clsRun != XX) - SetDeferredRun(pcls, cchRun, ich, clsRun); + /* W3 */ + for (i = 0; i < iso_run->length; i++) + { + if (*iso_run->ppcls[i] == AL) + *iso_run->ppcls[i] = R; + } + + /* W4 */ + for (i = 0; i < iso_run->length; i++) + { + if (*iso_run->ppcls[i] == ES) + { + int b = iso_previousValidChar(iso_run, i); + int f = iso_nextValidChar(iso_run, i); + + if (b > -1 && f > -1 && *iso_run->ppcls[b] == EN && *iso_run->ppcls[f] == EN) + *iso_run->ppcls[i] = EN; + } + else if (*iso_run->ppcls[i] == CS) + { + int b = iso_previousValidChar(iso_run, i); + int f = iso_nextValidChar(iso_run, i); + + if (b > -1 && f > -1 && *iso_run->ppcls[b] == EN && *iso_run->ppcls[f] == EN) + *iso_run->ppcls[i] = EN; + else if (b > -1 && f > -1 && *iso_run->ppcls[b] == AN && *iso_run->ppcls[f] == AN) + *iso_run->ppcls[i] = AN; + } + } + + /* W5 */ + for (i = 0; i < iso_run->length; i++) + { + if (*iso_run->ppcls[i] == ET) + { + int j; + for (j = i-1 ; j > -1; j--) + { + if (*iso_run->ppcls[j] == BN) continue; + if (*iso_run->ppcls[j] == ET) continue; + else if (*iso_run->ppcls[j] == EN) *iso_run->ppcls[i] = EN; + else break; + } + if (*iso_run->ppcls[i] == ET) + { + for (j = i+1; j < iso_run->length; j++) + { + if (*iso_run->ppcls[j] == BN) continue; + if (*iso_run->ppcls[j] == ET) continue; + else if (*iso_run->ppcls[j] == EN) *iso_run->ppcls[i] = EN; + else break; + } + } + } + } + + /* W6 */ + for (i = 0; i < iso_run->length; i++) + { + if (*iso_run->ppcls[i] == ET || *iso_run->ppcls[i] == ES || *iso_run->ppcls[i] == CS || *iso_run->ppcls[i] == ON) + { + int b = i-1; + int f = i+1; + if (b > -1 && *iso_run->ppcls[b] == BN) + *iso_run->ppcls[b] = ON; + if (f < iso_run->length && *iso_run->ppcls[f] == BN) + *iso_run->ppcls[f] = ON; + + *iso_run->ppcls[i] = ON; + } + } + + /* W7 */ + for (i = 0; i < iso_run->length; i++) + { + if (*iso_run->ppcls[i] == EN) + { + int j; + for (j = iso_previousValidChar(iso_run, i); j > -1; j = iso_previousValidChar(iso_run, j)) + if (*iso_run->ppcls[j] == R || *iso_run->ppcls[j] == L) + { + if (*iso_run->ppcls[j] == L) + *iso_run->ppcls[i] = L; + break; + } + if (iso_run->sos == L && j == -1) + *iso_run->ppcls[i] = L; + } + } } -/* RESOLVE NEUTRAL TYPES */ - -/* action values */ -enum neutralactions -{ - /* action to resolve previous input */ - nL = L, /* resolve EN to L */ - En = 3 << 4, /* resolve neutrals run to embedding level direction */ - Rn = R << 4, /* resolve neutrals run to strong right */ - Ln = L << 4, /* resolved neutrals run to strong left */ - In = (1<<8), /* increment count of deferred neutrals */ - LnL = (1<<4)+L, /* set run and EN to L */ -}; - -static int GetDeferredNeutrals(int action, int level) -{ - action = (action >> 4) & 0xF; - if (action == (En >> 4)) - return EmbeddingDirection(level); - else - return action; -} - -static int GetResolvedNeutrals(int action) -{ - action = action & 0xF; - if (action == In) - return 0; - else - return action; -} - -/* state values */ -enum resolvestates -{ - /* new temporary class */ - r, /* R and characters resolved to R */ - l, /* L and characters resolved to L */ - rn, /* N preceded by right */ - ln, /* N preceded by left */ - a, /* AN preceded by left (the abbreviation 'la' is used up above) */ - na, /* N preceded by a */ -} ; - - -/*------------------------------------------------------------------------ - Notes: - - By rule W7, whenever a EN is 'dominated' by an L (including start of - run with embedding direction = L) it is resolved to, and further treated - as L. - - This leads to the need for 'a' and 'na' states. -------------------------------------------------------------------------*/ - -static const int actionNeutrals[][5] = -{ -/* N, L, R, AN, EN = cls */ - { In, 0, 0, 0, 0 }, /* r right */ - { In, 0, 0, 0, L }, /* l left */ - - { In, En, Rn, Rn, Rn }, /* rn N preceded by right */ - { In, Ln, En, En, LnL}, /* ln N preceded by left */ - - { In, 0, 0, 0, L }, /* a AN preceded by left */ - { In, En, Rn, Rn, En }, /* na N preceded by a */ -} ; - -static const int stateNeutrals[][5] = -{ -/* N, L, R, AN, EN */ - { rn, l, r, r, r }, /* r right */ - { ln, l, r, a, l }, /* l left */ - - { rn, l, r, r, r }, /* rn N preceded by right */ - { ln, l, r, a, l }, /* ln N preceded by left */ - - { na, l, r, a, l }, /* a AN preceded by left */ - { na, l, r, a, l }, /* na N preceded by la */ -} ; - /*------------------------------------------------------------------------ Function: resolveNeutrals Resolves the directionality of neutral character types. - Implements rules W7, N1 and N2 of the Unicode Bidi Algorithm. + Implements rules N1 and N2 of the Unicode Bidi Algorithm. Input: Array of embedding levels Character count @@ -620,70 +658,95 @@ static const int stateNeutrals[][5] = In/Out: Array of directional classes Note: On input only these directional classes are expected - R, L, N, AN, EN and BN + R, L, NI, AN, EN and BN W8 resolves a number of ENs to L ------------------------------------------------------------------------*/ -static void resolveNeutrals(int baselevel, WORD *pcls, const WORD *plevel, int cch) +static void resolveNeutrals(IsolatedRun *iso_run) { - /* the state at the start of text depends on the base level */ - int state = odd(baselevel) ? r : l; - int cls; + int i; - int cchRun = 0; - int level = baselevel; - - int action, clsRun, clsNew; - int ich = 0; - for (; ich < cch; ich++) + /* Translate isolates into NI */ + for (i = 0; i < iso_run->length; i++) { - /* ignore boundary neutrals */ - if (pcls[ich] == BN) - { - /* include in the count for a deferred run */ - if (cchRun) - cchRun++; + if (*iso_run->ppcls[i] >= LRI) + *iso_run->ppcls[i] = NI; - /* skip any further processing */ - continue; + switch(*iso_run->ppcls[i]) + { + case B: + case S: + case WS: *iso_run->ppcls[i] = NI; } - ASSERT(pcls[ich] < 5); /* "Only N, L, R, AN, EN are allowed" */ - cls = pcls[ich]; - - action = actionNeutrals[state][cls]; - - /* resolve the directionality for deferred runs */ - clsRun = GetDeferredNeutrals(action, level); - if (clsRun != N) - { - SetDeferredRun(pcls, cchRun, ich, clsRun); - cchRun = 0; - } - - /* resolve the directionality class at the current location */ - clsNew = GetResolvedNeutrals(action); - if (clsNew != N) - pcls[ich] = clsNew; - - if (In & action) - cchRun++; - - state = stateNeutrals[state][cls]; - level = plevel[ich]; + ASSERT(*iso_run->ppcls[i] < 5 || *iso_run->ppcls[i] == BN); /* "Only NI, L, R, AN, EN and BN are allowed" */ } - /* resolve any deferred runs */ - cls = EmbeddingDirection(level); /* eor has type of current level */ + /* N0: Skipping bracketed pairs for now */ - /* resolve the directionality for deferred runs */ - clsRun = GetDeferredNeutrals(actionNeutrals[state][cls], level); - if (clsRun != N) - SetDeferredRun(pcls, cchRun, ich, clsRun); + /* N1 */ + for (i = 0; i < iso_run->length; i++) + { + WORD l,r; + + if (*iso_run->ppcls[i] == NI) + { + int j; + int b = iso_previousValidChar(iso_run, i); + + if (b == -1) + { + l = iso_run->sos; + b = 0; + } + else + { + if (*iso_run->ppcls[b] == R || *iso_run->ppcls[b] == AN || *iso_run->ppcls[b] == EN) + l = R; + else if (*iso_run->ppcls[b] == L) + l = L; + else /* No string type */ + continue; + } + j = iso_nextValidChar(iso_run, i); + while (j > -1 && *iso_run->ppcls[j] == NI) j = iso_nextValidChar(iso_run, j); + + if (j == -1) + { + r = iso_run->eos; + j = iso_run->length; + } + else if (*iso_run->ppcls[j] == R || *iso_run->ppcls[j] == AN || *iso_run->ppcls[j] == EN) + r = R; + else if (*iso_run->ppcls[j] == L) + r = L; + else /* No string type */ + continue; + + if (r == l) + { + for (b = i; b < j && b < iso_run->length; b++) + *iso_run->ppcls[b] = r; + } + } + } + + /* N2 */ + for (i = 0; i < iso_run->length; i++) + { + if (*iso_run->ppcls[i] == NI) + { + int b = i-1; + int f = i+1; + *iso_run->ppcls[i] = EmbeddingDirection(iso_run->e); + if (b > -1 && *iso_run->ppcls[b] == BN) + *iso_run->ppcls[b] = EmbeddingDirection(iso_run->e); + if (f < iso_run->length && *iso_run->ppcls[f] == BN) + *iso_run->ppcls[f] = EmbeddingDirection(iso_run->e); + } + } } -/* RESOLVE IMPLICIT */ - /*------------------------------------------------------------------------ Function: resolveImplicit @@ -700,29 +763,178 @@ static void resolveNeutrals(int baselevel, WORD *pcls, const WORD *plevel, int c Accepted subset of direction classes R, L, AN, EN ------------------------------------------------------------------------*/ -static const WORD addLevel[][4] = +static void resolveImplicit(const WORD * pcls, WORD *plevel, int sos, int eos) { - /* L, R, AN, EN */ -/* even */ { 0, 1, 2, 2, }, -/* odd */ { 1, 0, 1, 1, } + int i; -}; - -static void resolveImplicit(const WORD * pcls, WORD *plevel, int cch) -{ - int ich = 0; - for (; ich < cch; ich++) + /* I1/2 */ + for (i = sos; i <= eos; i++) { - /* cannot resolve bn here, since some bn were resolved to strong - * types in resolveWeak. To remove these we need the original - * types, which are available again in resolveWhiteSpace */ - if (pcls[ich] == BN) - { + if (pcls[i] == BN) continue; + + ASSERT(pcls[i] > 0); /* "No Neutrals allowed to survive here." */ + ASSERT(pcls[i] < 5); /* "Out of range." */ + + if (odd(plevel[i]) && (pcls[i] == L || pcls[i] == EN || pcls [i] == AN)) + plevel[i]++; + else if (!odd(plevel[i]) && pcls[i] == R) + plevel[i]++; + else if (!odd(plevel[i]) && (pcls[i] == EN || pcls [i] == AN)) + plevel[i]+=2; + } +} + +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; } - ASSERT(pcls[ich] > 0); /* "No Neutrals allowed to survive here." */ - ASSERT(pcls[ich] < 5); /* "Out of range." */ - plevel[ich] += addLevel[odd(plevel[ich])][pcls[ich] - 1]; + 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) +{ + int run_start, run_end, i; + Run runs[uCount]; + int run_count = 0; + IsolatedRun *current_isolated; + + list_init(set); + + /* Build Runs */ + run_start = 0; + while (run_start < uCount) + { + run_end = nextValidChar(pcls, run_start, uCount); + while (run_end < uCount && pLevel[run_end] == pLevel[run_start]) run_end = nextValidChar(pcls, run_end, uCount); + run_end --; + runs[run_count].start = run_start; + runs[run_count].end = run_end; + runs[run_count].e = pLevel[run_start]; + run_start = nextValidChar(pcls, run_end, uCount); + run_count++; + } + + /* Build Isolating Runs */ + i = 0; + while (i < run_count) + { + int k = i; + if (runs[k].start >= 0) + { + int type_fence, real_end; + int j; + current_isolated = HeapAlloc(GetProcessHeap(), 0, sizeof(IsolatedRun) + sizeof(WORD*)*uCount); + + run_start = runs[k].start; + current_isolated->e = runs[k].e; + current_isolated->length = (runs[k].end - runs[k].start)+1; + + for (j = 0; j < current_isolated->length; j++) + current_isolated->ppcls[j] = &pcls[runs[k].start+j]; + + run_end = runs[k].end; + + TRACE("{ [%i -- %i]",run_start, run_end); + + if (pcls[run_end] == BN) + run_end = previousValidChar(pcls, run_end, runs[k].start); + + while (run_end < uCount && (pcls[run_end] == RLI || pcls[run_end] == LRI || pcls[run_end] == FSI)) + { + j = k+1; +search: + while (j < run_count && pcls[runs[j].start] != PDI) j++; + if (j < run_count && runs[i].e != runs[j].e) + { + j++; + goto search; + } + + if (j != run_count) + { + int m; + int l = current_isolated->length; + + current_isolated->length += (runs[j].end - runs[j].start)+1; + for (m = 0; l < current_isolated->length; l++, m++) + current_isolated->ppcls[l] = &pcls[runs[j].start+m]; + + TRACE("[%i -- %i]",runs[j].start, runs[j].end); + + run_end = runs[j].end; + if (pcls[run_end] == BN) + run_end = previousValidChar(pcls, run_end, runs[i].start); + runs[j].start = -1; + k = j; + } + else + { + run_end = uCount; + break; + } + } + + type_fence = previousValidChar(pcls, run_start, -1); + + if (type_fence == -1) + current_isolated->sos = (baselevel > pLevel[run_start])?baselevel:pLevel[run_start]; + else + current_isolated->sos = (pLevel[type_fence] > pLevel[run_start])?pLevel[type_fence]:pLevel[run_start]; + + current_isolated->sos = EmbeddingDirection(current_isolated->sos); + + if (run_end == uCount) + current_isolated->eos = current_isolated->sos; + else + { + /* eos could be an BN */ + if ( pcls[run_end] == BN ) + { + real_end = previousValidChar(pcls, run_end, run_start-1); + if (real_end < run_start) + real_end = run_start; + } + else + real_end = run_end; + + type_fence = nextValidChar(pcls, run_end, uCount); + if (type_fence == uCount) + current_isolated->eos = (baselevel > pLevel[real_end])?baselevel:pLevel[real_end]; + else + current_isolated->eos = (pLevel[type_fence] > pLevel[real_end])?pLevel[type_fence]:pLevel[real_end]; + + current_isolated->eos = EmbeddingDirection(current_isolated->eos); + } + + list_add_tail(set, ¤t_isolated->entry); + TRACE(" } level %i {%s <--> %s}\n",current_isolated->e, debug_type[current_isolated->sos], debug_type[current_isolated->eos]); + } + i++; } } @@ -739,7 +951,9 @@ BOOL BIDI_DetermineLevels( { WORD *chartype; unsigned baselevel = 0; - INT j; + struct list IsolatingRuns; + IsolatedRun *iso_run, *next; + TRACE("%s, %d\n", debugstr_wn(lpString, uCount), uCount); chartype = HeapAlloc(GetProcessHeap(), 0, uCount * sizeof(WORD)); @@ -752,28 +966,38 @@ BOOL BIDI_DetermineLevels( baselevel = s->uBidiLevel; classify(lpString, chartype, uCount, c); - - for (j = 0; j < uCount; ++j) - switch(chartype[j]) - { - case B: - case S: - case WS: - case ON: chartype[j] = N; - default: continue; - } + if (TRACE_ON(bidi)) dump_types("Start ", chartype, 0, uCount); /* resolve explicit */ - resolveExplicit(baselevel, N, chartype, lpOutLevels, uCount, 0); + resolveExplicit(baselevel, chartype, lpOutLevels, uCount); + if (TRACE_ON(bidi)) dump_types("After Explicit", chartype, 0, uCount); - /* resolve weak */ - resolveWeak(baselevel, chartype, lpOutLevels, uCount); + /* X10/BD13: Computer Isolating runs */ + computeIsolatingRunsSet(baselevel, chartype, lpOutLevels, uCount, &IsolatingRuns); - /* resolve neutrals */ - resolveNeutrals(baselevel, chartype, lpOutLevels, uCount); + LIST_FOR_EACH_ENTRY_SAFE(iso_run, next, &IsolatingRuns, IsolatedRun, entry) + { + if (TRACE_ON(bidi)) iso_dump_types("Run", iso_run); + /* resolve weak */ + resolveWeak(iso_run); + if (TRACE_ON(bidi)) iso_dump_types("After Weak", iso_run); + + /* resolve neutrals */ + resolveNeutrals(iso_run); + if (TRACE_ON(bidi)) iso_dump_types("After Neutrals", iso_run); + + list_remove(&iso_run->entry); + HeapFree(GetProcessHeap(),0,iso_run); + } + + if (TRACE_ON(bidi)) dump_types("Before Implicit", chartype, 0, uCount); /* resolveImplicit */ - resolveImplicit(chartype, lpOutLevels, uCount); + resolveImplicit(chartype, lpOutLevels, 0, uCount-1); + + /* resolveResolvedLevels*/ + classify(lpString, chartype, uCount, c); + resolveResolved(baselevel, chartype, lpOutLevels, 0, uCount-1); HeapFree(GetProcessHeap(), 0, chartype); return TRUE; diff --git a/reactos/dll/win32/usp10/indicsyllable.c b/reactos/dll/win32/usp10/indicsyllable.c index 79ee0f6976e..c6beeb90436 100644 --- a/reactos/dll/win32/usp10/indicsyllable.c +++ b/reactos/dll/win32/usp10/indicsyllable.c @@ -1,6 +1,6 @@ /* Unicode Indic Syllabic Category */ -/* generated from http://www.unicode.org/Public/6.2.0/ucd/IndicSyllabicCategory.txt */ -/* and from http://www.unicode.org/Public/6.2.0/ucd/IndicMatraCategory.txt */ +/* generated from http://www.unicode.org/Public/6.3.0/ucd/IndicSyllabicCategory.txt */ +/* and from http://www.unicode.org/Public/6.3.0/ucd/IndicMatraCategory.txt */ /* DO NOT EDIT!! */ //#include "wine/unicode.h" diff --git a/reactos/dll/win32/usp10/linebreak.c b/reactos/dll/win32/usp10/linebreak.c index a7b4aee71f2..3a0bc1c0ca8 100644 --- a/reactos/dll/win32/usp10/linebreak.c +++ b/reactos/dll/win32/usp10/linebreak.c @@ -1,10 +1,10 @@ /* Unicode Line Break Properties */ -/* generated from http://www.unicode.org/Public/6.2.0/ucd/LineBreak.txt */ +/* generated from http://www.unicode.org/Public/6.3.0/ucd/LineBreak.txt */ /* DO NOT EDIT!! */ //#include "wine/unicode.h" -const unsigned short wine_linebreak_table[7056] = +const unsigned short wine_linebreak_table[7072] = { /* level 1 offsets */ 0x0100, 0x0110, 0x0120, 0x0130, 0x0140, 0x0150, 0x0160, 0x0170, @@ -101,87 +101,87 @@ const unsigned short wine_linebreak_table[7056] = 0x05b0, 0x10d0, 0x05b0, 0x05b0, 0x10d0, 0x10e0, 0x05b0, 0x10f0, 0x05b0, 0x05b0, 0x05b0, 0x1100, 0x1100, 0x1110, 0x05b0, 0x1120, 0x1130, 0x1140, 0x1150, 0x1160, 0x1170, 0x1180, 0x1190, 0x11a0, - 0x11b0, 0x0ce0, 0x11c0, 0x11d0, 0x0870, 0x0580, 0x0580, 0x11e0, - 0x11f0, 0x1200, 0x1210, 0x05b0, 0x05b0, 0x1220, 0x1230, 0x1240, - 0x1250, 0x1240, 0x05b0, 0x05b0, 0x05b0, 0x1260, 0x05b0, 0x05b0, - 0x1270, 0x1280, 0x1290, 0x12a0, 0x12b0, 0x12c0, 0x12d0, 0x05b0, - 0x12e0, 0x12f0, 0x1300, 0x1310, 0x05b0, 0x05b0, 0x05b0, 0x05b0, - 0x05b0, 0x1320, 0x1330, 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x05b0, - 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x1340, - 0x05b0, 0x05b0, 0x1350, 0x0870, 0x1360, 0x0870, 0x1370, 0x1370, - 0x1370, 0x1370, 0x1370, 0x1370, 0x1370, 0x1370, 0x1370, 0x1380, - 0x1370, 0x1370, 0x1370, 0x1370, 0x1230, 0x1370, 0x1370, 0x1390, - 0x1370, 0x13a0, 0x13b0, 0x13c0, 0x13d0, 0x13e0, 0x13f0, 0x05b0, - 0x1400, 0x1410, 0x05b0, 0x1420, 0x1430, 0x05b0, 0x1440, 0x1450, - 0x05b0, 0x1460, 0x05b0, 0x1470, 0x1480, 0x1490, 0x14a0, 0x14b0, - 0x14c0, 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x14d0, 0x14e0, 0x14f0, - 0x1370, 0x1500, 0x05b0, 0x05b0, 0x1510, 0x05b0, 0x1520, 0x05b0, + 0x11b0, 0x0ce0, 0x11c0, 0x11d0, 0x11e0, 0x0580, 0x0580, 0x11f0, + 0x1200, 0x1210, 0x1220, 0x05b0, 0x05b0, 0x1230, 0x1240, 0x1250, + 0x1260, 0x1250, 0x05b0, 0x05b0, 0x05b0, 0x1270, 0x05b0, 0x05b0, + 0x1280, 0x1290, 0x12a0, 0x12b0, 0x12c0, 0x12d0, 0x12e0, 0x05b0, + 0x12f0, 0x1300, 0x1310, 0x1320, 0x05b0, 0x05b0, 0x05b0, 0x05b0, + 0x05b0, 0x1330, 0x1340, 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x05b0, + 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x1350, + 0x05b0, 0x05b0, 0x1360, 0x0870, 0x1370, 0x0870, 0x1380, 0x1380, + 0x1380, 0x1380, 0x1380, 0x1380, 0x1380, 0x1380, 0x1380, 0x1390, + 0x1380, 0x1380, 0x1380, 0x1380, 0x1240, 0x1380, 0x1380, 0x13a0, + 0x1380, 0x13b0, 0x13c0, 0x13d0, 0x13e0, 0x13f0, 0x1400, 0x05b0, + 0x1410, 0x1420, 0x05b0, 0x1430, 0x1440, 0x05b0, 0x1450, 0x1460, + 0x05b0, 0x1470, 0x05b0, 0x1480, 0x1490, 0x14a0, 0x14b0, 0x14c0, + 0x14d0, 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x14e0, 0x14f0, 0x1500, + 0x1380, 0x1510, 0x05b0, 0x05b0, 0x1520, 0x05b0, 0x1530, 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x05b0, - 0x1530, 0x1540, 0x05b0, 0x05b0, 0x05b0, 0x1550, 0x05b0, 0x1560, - 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x0ce0, 0x1570, 0x0870, 0x0870, + 0x1540, 0x1550, 0x05b0, 0x05b0, 0x05b0, 0x1560, 0x05b0, 0x1570, + 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x0ce0, 0x1580, 0x0870, 0x0870, 0x0870, 0x0870, 0x0870, 0x0870, 0x0870, 0x0870, 0x0870, 0x0870, 0x05b0, 0x05b0, 0x0850, 0x05b0, 0x05b0, 0x0850, 0x05b0, 0x05b0, - 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x1580, 0x1590, - 0x05b0, 0x05b0, 0x0d70, 0x05b0, 0x05b0, 0x05b0, 0x15a0, 0x15b0, - 0x05b0, 0x1350, 0x15c0, 0x15c0, 0x15c0, 0x15c0, 0x0580, 0x0580, - 0x15d0, 0x15e0, 0x15f0, 0x1600, 0x0870, 0x0870, 0x0870, 0x0870, - 0x1610, 0x1620, 0x1610, 0x1610, 0x1610, 0x1610, 0x1610, 0x1340, - 0x1610, 0x1610, 0x1610, 0x1610, 0x1610, 0x1610, 0x1610, 0x1610, - 0x1610, 0x1610, 0x1610, 0x1610, 0x1610, 0x1630, 0x0870, 0x1640, - 0x1650, 0x1660, 0x1670, 0x1680, 0x1690, 0x1610, 0x16a0, 0x1610, - 0x16b0, 0x16c0, 0x16d0, 0x1610, 0x16a0, 0x1610, 0x16b0, 0x16e0, - 0x16f0, 0x1610, 0x1700, 0x1710, 0x1610, 0x1610, 0x1610, 0x1610, - 0x1720, 0x1610, 0x1610, 0x1730, 0x1610, 0x1610, 0x1340, 0x1740, - 0x1610, 0x1720, 0x1610, 0x1610, 0x1750, 0x1610, 0x1610, 0x1610, - 0x1610, 0x1610, 0x1610, 0x1610, 0x1610, 0x1610, 0x1610, 0x1720, - 0x1610, 0x1610, 0x1610, 0x1610, 0x1610, 0x1610, 0x1610, 0x1610, - 0x1610, 0x1610, 0x1610, 0x1610, 0x1610, 0x1610, 0x1610, 0x1610, - 0x1610, 0x1610, 0x1610, 0x1610, 0x1610, 0x1610, 0x1610, 0x1610, - 0x1610, 0x1610, 0x1610, 0x1610, 0x05b0, 0x05b0, 0x05b0, 0x05b0, - 0x1610, 0x1760, 0x1610, 0x1610, 0x1610, 0x1610, 0x1610, 0x1610, - 0x1610, 0x1610, 0x1610, 0x1610, 0x1610, 0x1610, 0x1610, 0x1610, - 0x1610, 0x1610, 0x1610, 0x1610, 0x1610, 0x1610, 0x1610, 0x1610, - 0x1770, 0x1610, 0x1610, 0x1610, 0x1780, 0x05b0, 0x05b0, 0x1070, - 0x1790, 0x05b0, 0x17a0, 0x0870, 0x05b0, 0x05b0, 0x1580, 0x17b0, - 0x05b0, 0x17c0, 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x17d0, + 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x1590, 0x15a0, + 0x05b0, 0x05b0, 0x0d70, 0x05b0, 0x05b0, 0x05b0, 0x15b0, 0x15c0, + 0x05b0, 0x1360, 0x15d0, 0x15d0, 0x15d0, 0x15d0, 0x0580, 0x0580, + 0x15e0, 0x15f0, 0x1600, 0x1610, 0x0870, 0x0870, 0x0870, 0x0870, + 0x1620, 0x1630, 0x1620, 0x1620, 0x1620, 0x1620, 0x1620, 0x1350, + 0x1620, 0x1620, 0x1620, 0x1620, 0x1620, 0x1620, 0x1620, 0x1620, + 0x1620, 0x1620, 0x1620, 0x1620, 0x1620, 0x1640, 0x0870, 0x1650, + 0x1660, 0x1670, 0x1680, 0x1690, 0x16a0, 0x1620, 0x16b0, 0x1620, + 0x16c0, 0x16d0, 0x16e0, 0x1620, 0x16b0, 0x1620, 0x16c0, 0x16f0, + 0x1700, 0x1620, 0x1710, 0x1720, 0x1620, 0x1620, 0x1620, 0x1620, + 0x1730, 0x1620, 0x1620, 0x1740, 0x1620, 0x1620, 0x1350, 0x1750, + 0x1620, 0x1730, 0x1620, 0x1620, 0x1760, 0x1620, 0x1620, 0x1620, + 0x1620, 0x1620, 0x1620, 0x1620, 0x1620, 0x1620, 0x1620, 0x1730, + 0x1620, 0x1620, 0x1620, 0x1620, 0x1620, 0x1620, 0x1620, 0x1620, + 0x1620, 0x1620, 0x1620, 0x1620, 0x1620, 0x1620, 0x1620, 0x1620, + 0x1620, 0x1620, 0x1620, 0x1620, 0x1620, 0x1620, 0x1620, 0x1620, + 0x1620, 0x1620, 0x1620, 0x1620, 0x05b0, 0x05b0, 0x05b0, 0x05b0, + 0x1620, 0x1770, 0x1620, 0x1620, 0x1620, 0x1620, 0x1620, 0x1620, + 0x1620, 0x1620, 0x1620, 0x1620, 0x1620, 0x1620, 0x1620, 0x1620, + 0x1620, 0x1620, 0x1620, 0x1620, 0x1620, 0x1620, 0x1620, 0x1620, + 0x1780, 0x1620, 0x1620, 0x1620, 0x1790, 0x05b0, 0x05b0, 0x1070, + 0x17a0, 0x05b0, 0x17b0, 0x0870, 0x05b0, 0x05b0, 0x1590, 0x17c0, + 0x05b0, 0x17d0, 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x17e0, 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x05b0, - 0x0850, 0x17e0, 0x1360, 0x0870, 0x0870, 0x0870, 0x0870, 0x0b10, - 0x17f0, 0x05b0, 0x1800, 0x1810, 0x05b0, 0x05b0, 0x05b0, 0x1820, - 0x1830, 0x05b0, 0x05b0, 0x0fd0, 0x1840, 0x0ee0, 0x0580, 0x1850, - 0x07c0, 0x05b0, 0x1860, 0x05b0, 0x1870, 0x1880, 0x0d80, 0x1890, - 0x08b0, 0x05b0, 0x05b0, 0x18a0, 0x18b0, 0x18c0, 0x0870, 0x0870, - 0x05b0, 0x05b0, 0x18d0, 0x10b0, 0x18e0, 0x18f0, 0x0c10, 0x0f60, - 0x0c10, 0x0c10, 0x0c10, 0x0c10, 0x1900, 0x1910, 0x0770, 0x1920, - 0x1930, 0x1940, 0x15c0, 0x0870, 0x0870, 0x0870, 0x0870, 0x0870, - 0x0870, 0x0870, 0x0870, 0x0870, 0x05b0, 0x05b0, 0x1950, 0x0ee0, - 0x1960, 0x1970, 0x1980, 0x1990, 0x1980, 0x19a0, 0x1980, 0x1960, - 0x1970, 0x1980, 0x1990, 0x1980, 0x19a0, 0x1980, 0x1960, 0x1970, - 0x1980, 0x1990, 0x1980, 0x19a0, 0x1980, 0x1960, 0x1970, 0x1980, - 0x1990, 0x1980, 0x19a0, 0x1980, 0x1960, 0x1970, 0x1980, 0x1990, - 0x1980, 0x19a0, 0x1980, 0x1960, 0x1970, 0x1980, 0x1990, 0x1980, - 0x19a0, 0x1980, 0x1960, 0x1970, 0x1980, 0x1990, 0x1980, 0x19a0, - 0x1980, 0x1960, 0x1970, 0x1980, 0x1990, 0x1980, 0x19a0, 0x1980, - 0x1960, 0x1970, 0x1980, 0x1990, 0x1980, 0x19a0, 0x1980, 0x1960, - 0x1970, 0x1980, 0x1990, 0x1980, 0x19a0, 0x1980, 0x1960, 0x1970, - 0x1980, 0x1990, 0x1980, 0x19a0, 0x1980, 0x1960, 0x1970, 0x1980, - 0x1990, 0x1980, 0x19a0, 0x1980, 0x1960, 0x1970, 0x1980, 0x1990, - 0x1980, 0x19a0, 0x1980, 0x1960, 0x1970, 0x1980, 0x1990, 0x1980, - 0x19a0, 0x1980, 0x1960, 0x1970, 0x1980, 0x1990, 0x1980, 0x19a0, - 0x1980, 0x1960, 0x1970, 0x1980, 0x1990, 0x1980, 0x19a0, 0x1980, - 0x1980, 0x1990, 0x1980, 0x19a0, 0x1980, 0x1960, 0x1970, 0x1980, - 0x1990, 0x1980, 0x19b0, 0x0d90, 0x19c0, 0x0db0, 0x0db0, 0x19d0, - 0x19e0, 0x19e0, 0x19e0, 0x19e0, 0x19e0, 0x19e0, 0x19e0, 0x19e0, - 0x19e0, 0x19e0, 0x19e0, 0x19e0, 0x19e0, 0x19e0, 0x19e0, 0x19e0, + 0x0850, 0x17f0, 0x1370, 0x0870, 0x0870, 0x0870, 0x0870, 0x0b10, + 0x1800, 0x05b0, 0x1810, 0x1820, 0x05b0, 0x05b0, 0x05b0, 0x1830, + 0x1840, 0x05b0, 0x05b0, 0x0fd0, 0x1850, 0x0ee0, 0x0580, 0x1860, + 0x07c0, 0x05b0, 0x1870, 0x05b0, 0x1880, 0x1890, 0x0d80, 0x18a0, + 0x08b0, 0x05b0, 0x05b0, 0x18b0, 0x18c0, 0x18d0, 0x0870, 0x0870, + 0x05b0, 0x05b0, 0x18e0, 0x10b0, 0x18f0, 0x1900, 0x0c10, 0x0f60, + 0x0c10, 0x0c10, 0x0c10, 0x0c10, 0x1910, 0x1920, 0x0770, 0x1930, + 0x1940, 0x1950, 0x15d0, 0x0870, 0x0870, 0x0870, 0x0870, 0x0870, + 0x0870, 0x0870, 0x0870, 0x0870, 0x05b0, 0x05b0, 0x1960, 0x0ee0, + 0x1970, 0x1980, 0x1990, 0x19a0, 0x1990, 0x19b0, 0x1990, 0x1970, + 0x1980, 0x1990, 0x19a0, 0x1990, 0x19b0, 0x1990, 0x1970, 0x1980, + 0x1990, 0x19a0, 0x1990, 0x19b0, 0x1990, 0x1970, 0x1980, 0x1990, + 0x19a0, 0x1990, 0x19b0, 0x1990, 0x1970, 0x1980, 0x1990, 0x19a0, + 0x1990, 0x19b0, 0x1990, 0x1970, 0x1980, 0x1990, 0x19a0, 0x1990, + 0x19b0, 0x1990, 0x1970, 0x1980, 0x1990, 0x19a0, 0x1990, 0x19b0, + 0x1990, 0x1970, 0x1980, 0x1990, 0x19a0, 0x1990, 0x19b0, 0x1990, + 0x1970, 0x1980, 0x1990, 0x19a0, 0x1990, 0x19b0, 0x1990, 0x1970, + 0x1980, 0x1990, 0x19a0, 0x1990, 0x19b0, 0x1990, 0x1970, 0x1980, + 0x1990, 0x19a0, 0x1990, 0x19b0, 0x1990, 0x1970, 0x1980, 0x1990, + 0x19a0, 0x1990, 0x19b0, 0x1990, 0x1970, 0x1980, 0x1990, 0x19a0, + 0x1990, 0x19b0, 0x1990, 0x1970, 0x1980, 0x1990, 0x19a0, 0x1990, + 0x19b0, 0x1990, 0x1970, 0x1980, 0x1990, 0x19a0, 0x1990, 0x19b0, + 0x1990, 0x1970, 0x1980, 0x1990, 0x19a0, 0x1990, 0x19b0, 0x1990, + 0x1990, 0x19a0, 0x1990, 0x19b0, 0x1990, 0x1970, 0x1980, 0x1990, + 0x19a0, 0x1990, 0x19c0, 0x0d90, 0x19d0, 0x0db0, 0x0db0, 0x19e0, + 0x19f0, 0x19f0, 0x19f0, 0x19f0, 0x19f0, 0x19f0, 0x19f0, 0x19f0, + 0x19f0, 0x19f0, 0x19f0, 0x19f0, 0x19f0, 0x19f0, 0x19f0, 0x19f0, 0x0870, 0x0870, 0x0870, 0x0870, 0x0870, 0x0870, 0x0870, 0x0870, 0x0870, 0x0870, 0x0870, 0x0870, 0x0870, 0x0870, 0x0870, 0x0870, - 0x1350, 0x19f0, 0x1a00, 0x1a10, 0x1a20, 0x05b0, 0x05b0, 0x05b0, - 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x1a30, 0x1a40, 0x05b0, 0x05b0, - 0x05b0, 0x05b0, 0x05b0, 0x1a50, 0x0870, 0x05b0, 0x05b0, 0x05b0, - 0x05b0, 0x1a60, 0x05b0, 0x05b0, 0x06b0, 0x0870, 0x0870, 0x1a70, - 0x0580, 0x1a80, 0x10b0, 0x1a90, 0x1aa0, 0x1ab0, 0x1ac0, 0x1100, - 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x1ad0, - 0x1ae0, 0x1af0, 0x1610, 0x1b00, 0x1610, 0x1b10, 0x1b20, 0x1b30, - 0x05b0, 0x1b40, 0x05b0, 0x0850, 0x1b50, 0x1b60, 0x1b70, 0x1b80, + 0x1360, 0x1a00, 0x1a10, 0x1a20, 0x1a30, 0x05b0, 0x05b0, 0x05b0, + 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x1a40, 0x1a50, 0x05b0, 0x05b0, + 0x05b0, 0x05b0, 0x05b0, 0x1a60, 0x0870, 0x05b0, 0x05b0, 0x05b0, + 0x05b0, 0x1a70, 0x05b0, 0x05b0, 0x06b0, 0x0870, 0x0870, 0x1a80, + 0x0580, 0x1a90, 0x10b0, 0x1aa0, 0x1ab0, 0x1ac0, 0x1ad0, 0x1100, + 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x05b0, 0x1ae0, + 0x1af0, 0x1b00, 0x1620, 0x1b10, 0x1620, 0x1b20, 0x1b30, 0x1b40, + 0x05b0, 0x1b50, 0x05b0, 0x0850, 0x1b60, 0x1b70, 0x1b80, 0x1b90, /* values */ 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0022, 0x0003, 0x0001, 0x0001, 0x0002, 0x0004, 0x0004, @@ -246,7 +246,7 @@ const unsigned short wine_linebreak_table[7056] = 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x0011, 0x001d, 0x001d, 0x001d, 0x001b, 0x001b, 0x001b, 0x0019, 0x0019, 0x001d, 0x001d, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, - 0x0004, 0x0004, 0x0004, 0x0017, 0x0011, 0x0011, 0x0017, 0x0017, + 0x0004, 0x0004, 0x0004, 0x0017, 0x0004, 0x0011, 0x0017, 0x0017, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x001c, 0x001c, 0x001c, 0x001c, 0x001c, 0x001c, 0x001c, 0x001c, @@ -571,8 +571,8 @@ const unsigned short wine_linebreak_table[7056] = 0x0016, 0x0016, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x0022, 0x001d, 0x0022, 0x0022, 0x0022, 0x0022, 0x001d, 0x0022, 0x0022, 0x0022, - 0x000b, 0x001d, 0x001d, 0x001d, 0x001d, 0x0011, 0x0011, 0x0011, - 0x0011, 0x0011, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, + 0x000b, 0x001d, 0x001d, 0x001d, 0x001d, 0x0011, 0x0004, 0x0004, + 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x001d, 0x001d, 0x0011, 0x0011, 0x0024, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x0012, 0x0013, 0x0024, 0x001d, 0x0024, 0x0024, 0x0024, 0x0024, 0x001d, 0x001d, 0x001d, @@ -580,7 +580,9 @@ const unsigned short wine_linebreak_table[7056] = 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001b, 0x001a, - 0x001a, 0x001a, 0x001a, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, + 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, + 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, + 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x0004, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x001d, 0x001d, 0x001d, 0x001b, 0x001d, 0x0024, 0x001d, 0x001d, @@ -723,13 +725,13 @@ const unsigned short wine_linebreak_table[7056] = 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x0011, 0x0011, 0x0011, 0x0011, - 0x001e, 0x0013, 0x0013, 0x001e, 0x001e, 0x0016, 0x001e, 0x001e, + 0x0022, 0x0013, 0x0013, 0x001e, 0x001e, 0x0016, 0x001e, 0x001e, 0x0012, 0x0013, 0x0012, 0x0013, 0x0012, 0x0013, 0x0012, 0x0013, 0x0012, 0x0013, 0x001e, 0x001e, 0x0012, 0x0013, 0x0012, 0x0013, 0x0012, 0x0013, 0x0012, 0x0013, 0x0016, 0x0012, 0x0013, 0x0013, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, - 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, + 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x0004, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x0016, 0x0016, 0x001e, 0x001e, 0x001e, 0x0011, 0x0027, 0x001e, 0x0027, 0x001e, 0x0027, 0x001e, 0x0027, 0x001e, 0x0027, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, diff --git a/reactos/dll/win32/usp10/shaping.c b/reactos/dll/win32/usp10/shaping.c index be416e5a2f2..4494943bfa7 100644 --- a/reactos/dll/win32/usp10/shaping.c +++ b/reactos/dll/win32/usp10/shaping.c @@ -1,10 +1,10 @@ /* Unicode Arabic shaping */ -/* generated from http://www.unicode.org/Public/6.2.0/ucd/ArabicShaping.txt */ +/* generated from http://www.unicode.org/Public/6.3.0/ucd/ArabicShaping.txt */ /* DO NOT EDIT!! */ //#include "wine/unicode.h" -const unsigned short wine_shaping_table[2752] = +const unsigned short wine_shaping_table[2800] = { /* level 1 offsets */ 0x0100, 0x0110, 0x0110, 0x0120, 0x0130, 0x0140, 0x0150, 0x0160, @@ -76,42 +76,42 @@ const unsigned short wine_shaping_table[2752] = 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0820, 0x0340, 0x0820, 0x0340, 0x0610, 0x0340, 0x0610, 0x0340, 0x0340, 0x0340, 0x0830, 0x0840, 0x0850, 0x0340, 0x0340, - 0x0860, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, - 0x0340, 0x0340, 0x0870, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, - 0x0340, 0x0340, 0x0880, 0x0890, 0x0340, 0x0340, 0x0340, 0x0340, + 0x0860, 0x0340, 0x0530, 0x0530, 0x0530, 0x0530, 0x0530, 0x0870, + 0x0880, 0x0530, 0x0890, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, + 0x0340, 0x0340, 0x08a0, 0x08b0, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, - 0x0340, 0x08a0, 0x0340, 0x0340, 0x0340, 0x08b0, 0x08c0, 0x08d0, + 0x0340, 0x08c0, 0x0340, 0x0340, 0x0340, 0x08d0, 0x08e0, 0x08f0, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, - 0x08e0, 0x0340, 0x0340, 0x08f0, 0x06b0, 0x0340, 0x0900, 0x08e0, - 0x0910, 0x0340, 0x0920, 0x0340, 0x0340, 0x0340, 0x0930, 0x0910, - 0x0340, 0x0340, 0x0940, 0x0950, 0x0340, 0x0340, 0x0340, 0x0340, - 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0960, 0x0970, 0x0980, + 0x0900, 0x0340, 0x0340, 0x0910, 0x06b0, 0x0340, 0x0920, 0x0900, + 0x0930, 0x0340, 0x0940, 0x0340, 0x0340, 0x0340, 0x0950, 0x0930, + 0x0340, 0x0340, 0x0960, 0x0970, 0x0340, 0x0340, 0x0340, 0x0340, + 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0980, 0x0990, 0x09a0, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, - 0x0340, 0x0340, 0x0340, 0x0340, 0x0360, 0x0360, 0x0990, 0x0940, - 0x09a0, 0x0340, 0x09b0, 0x0340, 0x0340, 0x0340, 0x09c0, 0x0340, + 0x0340, 0x0340, 0x0340, 0x0340, 0x0360, 0x0360, 0x09b0, 0x0960, + 0x09c0, 0x0340, 0x09d0, 0x0340, 0x0340, 0x0340, 0x09e0, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0360, 0x0360, 0x0510, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, - 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0490, 0x0910, + 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0490, 0x0930, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0490, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0360, 0x0360, - 0x0340, 0x0340, 0x09d0, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, - 0x0340, 0x09e0, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, - 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0490, 0x09f0, - 0x0340, 0x0490, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0910, - 0x0a00, 0x0340, 0x06f0, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, - 0x0340, 0x0340, 0x0340, 0x0340, 0x0980, 0x0340, 0x0360, 0x0910, - 0x0340, 0x0340, 0x0a10, 0x0340, 0x0a20, 0x0910, 0x0340, 0x0340, - 0x05d0, 0x0340, 0x0340, 0x0a30, 0x0340, 0x0340, 0x0340, 0x0340, - 0x0340, 0x0340, 0x0a40, 0x0a50, 0x0a60, 0x0340, 0x0340, 0x0340, - 0x0340, 0x0340, 0x0340, 0x0a70, 0x0620, 0x0340, 0x0a80, 0x06a0, + 0x0340, 0x0340, 0x09f0, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, + 0x0340, 0x0a00, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, + 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0490, 0x0a10, + 0x0340, 0x0490, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0930, + 0x0a20, 0x0340, 0x06f0, 0x0340, 0x0530, 0x0530, 0x0530, 0x0a30, + 0x0340, 0x0340, 0x0340, 0x0340, 0x09a0, 0x0340, 0x0360, 0x0930, + 0x0340, 0x0340, 0x0a40, 0x0340, 0x0a50, 0x0930, 0x0340, 0x0340, + 0x05d0, 0x0340, 0x0340, 0x0a60, 0x0340, 0x0340, 0x0340, 0x0340, + 0x0340, 0x0340, 0x0a70, 0x0a80, 0x0a90, 0x0340, 0x0340, 0x0340, + 0x0340, 0x0340, 0x0340, 0x0aa0, 0x0620, 0x0340, 0x0ab0, 0x06a0, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, - 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0a90, 0x0340, - 0x0340, 0x0aa0, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, + 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0ac0, 0x0340, + 0x0340, 0x0ad0, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, - 0x0360, 0x0340, 0x0990, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, + 0x0360, 0x0340, 0x09b0, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0490, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, - 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0ab0, + 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0ae0, /* values */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, @@ -128,7 +128,7 @@ const unsigned short wine_shaping_table[2752] = 0x0000, 0x0001, 0x0001, 0x0000, 0x0001, 0x0001, 0x0000, 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0001, 0x0001, 0x0001, 0x0000, 0x0001, 0x0000, 0x0000, 0x0000, 0x0104, 0x0000, 0x0202, 0x0202, 0x0302, 0x0202, 0x0104, 0x0202, 0x0404, 0x0502, 0x0404, 0x0404, 0x0604, 0x0604, 0x0604, 0x0702, 0x0702, 0x0802, 0x0802, 0x0904, 0x0904, 0x0a04, 0x0a04, 0x0b04, @@ -277,16 +277,20 @@ const unsigned short wine_shaping_table[2752] = 0x0000, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0004, + 0x0000, 0x0000, 0x0005, 0x0001, 0x0001, 0x0001, 0x0000, 0x0000, + 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0001, 0x0001, 0x0001, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0004, + 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, + 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, + 0x0004, 0x0001, 0x0004, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0001, 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0001, 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, - 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0001, 0x0000, 0x0000, 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0000, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0000, 0x0001, 0x0001, 0x0001, @@ -331,6 +335,8 @@ const unsigned short wine_shaping_table[2752] = 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0000, 0x0000, 0x0000, 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0004, 0x0004, 0x0003, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, diff --git a/reactos/dll/win32/usp10/usp10.c b/reactos/dll/win32/usp10/usp10.c index 56a74910d16..406ad1c0ee5 100644 --- a/reactos/dll/win32/usp10/usp10.c +++ b/reactos/dll/win32/usp10/usp10.c @@ -1381,7 +1381,7 @@ static HRESULT _ItemizeInternal(const WCHAR *pwcInChars, int cInChars, else { BOOL inNumber = FALSE; - static WCHAR math_punc[] = {'#','$','%','+',',','-','.','/',':',0x2212, 0x2044, 0x00a0,0}; + static const WCHAR math_punc[] = {'#','$','%','+',',','-','.','/',':',0x2212, 0x2044, 0x00a0,0}; strength = heap_alloc_zero(cInChars * sizeof(WORD)); if (!strength) diff --git a/reactos/media/doc/README.WINE b/reactos/media/doc/README.WINE index f6940fb9be1..4c67a396d54 100644 --- a/reactos/media/doc/README.WINE +++ b/reactos/media/doc/README.WINE @@ -195,7 +195,7 @@ reactos/dll/win32/unicows # Synced to Wine-1.3.32 (Win9x only, why do w reactos/dll/win32/updspapi # Synced to Wine-1.7.1 reactos/dll/win32/url # Synced to Wine-1.7.1 reactos/dll/win32/urlmon # Synced to Wine-1.7.1 -reactos/dll/win32/usp10 # Synced to Wine-1.7.1 +reactos/dll/win32/usp10 # Synced to Wine-1.7.14 reactos/dll/win32/uxtheme # Forked reactos/dll/win32/vbscript # Synced to Wine-1.7.1 reactos/dll/win32/version # Synced to Wine-1.7.1