Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
729de083
Commit
729de083
authored
Oct 21, 2011
by
Aric Stewart
Committed by
Alexandre Julliard
Oct 24, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Correct itemizing multiple spaces at the beginning of a run.
parent
9159cfe0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
usp10.c
dlls/usp10/tests/usp10.c
+8
-0
usp10.c
dlls/usp10/usp10.c
+2
-2
No files found.
dlls/usp10/tests/usp10.c
View file @
729de083
...
...
@@ -146,6 +146,10 @@ static void test_ScriptItemize( void )
static
const
itemTest
t1b1
[
2
]
=
{{{
0
,
0
,
0
,
0
,
0
},
0
,
0
,
0
,
0
,
0
},{{
0
,
0
,
0
,
0
,
0
},
4
,
0
,
0
,
0
,
-
1
}};
static
const
itemTest
t1b2
[
2
]
=
{{{
0
,
0
,
0
,
0
,
0
},
0
,
1
,
1
,
1
,
0
},{{
0
,
0
,
0
,
0
,
0
},
4
,
0
,
0
,
0
,
-
1
}};
static
const
WCHAR
test1c
[]
=
{
' '
,
' '
,
' '
,
'1'
,
'2'
,
' '
,
0
};
static
const
itemTest
t1c1
[
2
]
=
{{{
0
,
0
,
0
,
0
,
0
},
0
,
0
,
0
,
0
,
0
},{{
0
,
0
,
0
,
0
,
0
},
6
,
0
,
0
,
0
,
-
1
}};
static
const
itemTest
t1c2
[
4
]
=
{{{
0
,
0
,
0
,
0
,
0
},
0
,
1
,
1
,
1
,
0
},{{
0
,
0
,
1
,
0
,
0
},
3
,
0
,
1
,
2
,
0
},{{
0
,
0
,
0
,
0
,
0
},
5
,
1
,
1
,
1
,
0
},{{
0
,
0
,
0
,
0
,
0
},
6
,
0
,
0
,
0
,
-
1
}};
/* Arabic, English*/
static
const
WCHAR
test2
[]
=
{
'1'
,
'2'
,
'3'
,
'-'
,
'5'
,
'2'
,
0x064a
,
0x064f
,
0x0633
,
0x0627
,
0x0648
,
0x0650
,
0x064a
,
'7'
,
'1'
,
'.'
,
0
};
static
const
itemTest
t21
[
7
]
=
{{{
0
,
0
,
0
,
0
,
0
},
0
,
0
,
0
,
0
,
0
},{{
0
,
0
,
0
,
0
,
0
},
3
,
0
,
0
,
0
,
0
},{{
0
,
0
,
0
,
0
,
0
},
4
,
0
,
0
,
0
,
0
},{{
0
,
0
,
0
,
0
,
0
},
6
,
1
,
1
,
1
,
arab_tag
},{{
0
,
0
,
0
,
0
,
0
},
13
,
0
,
0
,
0
,
0
},{{
0
,
0
,
0
,
0
,
0
},
15
,
0
,
0
,
0
,
0
},{{
0
,
0
,
0
,
0
,
0
},
16
,
0
,
0
,
0
,
-
1
}};
...
...
@@ -291,6 +295,7 @@ static void test_ScriptItemize( void )
test_items_ok
(
test1
,
4
,
NULL
,
NULL
,
1
,
t11
,
FALSE
,
0
);
test_items_ok
(
test1b
,
4
,
NULL
,
NULL
,
1
,
t1b1
,
FALSE
,
0
);
test_items_ok
(
test1c
,
6
,
NULL
,
NULL
,
1
,
t1c1
,
FALSE
,
0
);
test_items_ok
(
test2
,
16
,
NULL
,
NULL
,
6
,
t21
,
FALSE
,
0
);
test_items_ok
(
test2b
,
11
,
NULL
,
NULL
,
4
,
t2b1
,
FALSE
,
0
);
test_items_ok
(
test2c
,
11
,
NULL
,
NULL
,
4
,
t2c1
,
FALSE
,
0
);
...
...
@@ -316,6 +321,7 @@ static void test_ScriptItemize( void )
State
.
uBidiLevel
=
0
;
test_items_ok
(
test1
,
4
,
&
Control
,
&
State
,
1
,
t11
,
FALSE
,
0
);
test_items_ok
(
test1b
,
4
,
&
Control
,
&
State
,
1
,
t1b1
,
FALSE
,
0
);
test_items_ok
(
test1c
,
6
,
&
Control
,
&
State
,
1
,
t1c1
,
FALSE
,
0
);
test_items_ok
(
test2
,
16
,
&
Control
,
&
State
,
4
,
t22
,
FALSE
,
0
);
test_items_ok
(
test2b
,
11
,
&
Control
,
&
State
,
4
,
t2b1
,
FALSE
,
0
);
test_items_ok
(
test2c
,
11
,
&
Control
,
&
State
,
5
,
t2c2
,
FALSE
,
0
);
...
...
@@ -341,6 +347,7 @@ static void test_ScriptItemize( void )
State
.
uBidiLevel
=
1
;
test_items_ok
(
test1
,
4
,
&
Control
,
&
State
,
1
,
t12
,
FALSE
,
0
);
test_items_ok
(
test1b
,
4
,
&
Control
,
&
State
,
1
,
t1b2
,
FALSE
,
0
);
test_items_ok
(
test1c
,
6
,
&
Control
,
&
State
,
3
,
t1c2
,
FALSE
,
0
);
test_items_ok
(
test2
,
16
,
&
Control
,
&
State
,
4
,
t23
,
FALSE
,
0
);
test_items_ok
(
test2b
,
11
,
&
Control
,
&
State
,
4
,
t2b2
,
FALSE
,
0
);
test_items_ok
(
test2c
,
11
,
&
Control
,
&
State
,
4
,
t2c3
,
FALSE
,
0
);
...
...
@@ -367,6 +374,7 @@ static void test_ScriptItemize( void )
Control
.
fMergeNeutralItems
=
TRUE
;
test_items_ok
(
test1
,
4
,
&
Control
,
&
State
,
1
,
t12
,
FALSE
,
0
);
test_items_ok
(
test1b
,
4
,
&
Control
,
&
State
,
1
,
t1b2
,
FALSE
,
0
);
test_items_ok
(
test1c
,
6
,
&
Control
,
&
State
,
3
,
t1c2
,
FALSE
,
0
);
test_items_ok
(
test2
,
16
,
&
Control
,
&
State
,
4
,
t23
,
FALSE
,
0
);
test_items_ok
(
test2b
,
11
,
&
Control
,
&
State
,
2
,
t2b3
,
FALSE
,
4
);
test_items_ok
(
test2c
,
11
,
&
Control
,
&
State
,
2
,
t2c4
,
FALSE
,
4
);
...
...
dlls/usp10/usp10.c
View file @
729de083
...
...
@@ -772,7 +772,7 @@ HRESULT WINAPI ScriptItemizeOpenType(const WCHAR *pwcInChars, int cInChars, int
#define ZWJ 0x200D
int
cnt
=
0
,
index
=
0
,
str
=
0
;
int
New_Script
=
SCRIPT_UNDEFINED
;
int
New_Script
=
-
1
;
WORD
*
levels
=
NULL
;
WORD
*
strength
=
NULL
;
WORD
baselevel
=
0
;
...
...
@@ -859,7 +859,7 @@ HRESULT WINAPI ScriptItemizeOpenType(const WCHAR *pwcInChars, int cInChars, int
New_Script
=
get_char_script
(
pwcInChars
[
cnt
+
j
]);
}
if
((
levels
&&
(
levels
[
cnt
]
!=
pItems
[
index
].
a
.
s
.
uBidiLevel
||
(
strength
&&
(
strength
[
cnt
]
!=
str
))))
||
New_Script
!=
pItems
[
index
].
a
.
eScript
||
New_Script
==
Script_Control
)
if
((
levels
&&
(
levels
[
cnt
]
!=
pItems
[
index
].
a
.
s
.
uBidiLevel
||
(
strength
&&
(
strength
[
cnt
]
!=
str
))))
||
(
New_Script
!=
-
1
&&
New_Script
!=
pItems
[
index
].
a
.
eScript
)
||
New_Script
==
Script_Control
)
{
TRACE
(
"New_Level = %i, New_Strength = %i, New_Script=%d, eScript=%d
\n
"
,
levels
?
levels
[
cnt
]
:-
1
,
strength
?
strength
[
cnt
]
:
str
,
New_Script
,
pItems
[
index
].
a
.
eScript
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment