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
2781ac1e
Commit
2781ac1e
authored
Nov 08, 2011
by
Aric Stewart
Committed by
Alexandre Julliard
Nov 09, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Better handle the absorption of whitespace in bidi runs.
parent
adf7c330
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
usp10.c
dlls/usp10/tests/usp10.c
+3
-3
usp10.c
dlls/usp10/usp10.c
+3
-3
No files found.
dlls/usp10/tests/usp10.c
View file @
2781ac1e
...
...
@@ -164,7 +164,7 @@ static void test_ScriptItemize( void )
/* leading space */
static
const
WCHAR
test2c
[]
=
{
' '
,
0x0621
,
0x0623
,
0x0624
,
'A'
,
'B'
,
'C'
,
'-'
,
'D'
,
'E'
,
'F'
,
0
};
static
const
itemTest
t2c1
[
5
]
=
{{{
0
,
0
,
0
,
0
,
0
},
0
,
1
,
1
,
1
,
arab_tag
},{{
0
,
0
,
0
,
0
,
0
},
4
,
0
,
0
,
0
,
latn_tag
},{{
0
,
0
,
0
,
0
,
0
},
7
,
0
,
0
,
0
,
0
},{{
0
,
0
,
0
,
0
,
0
},
8
,
0
,
0
,
0
,
latn_tag
},{{
0
,
0
,
0
,
0
,
0
},
11
,
0
,
0
,
0
,
-
1
}};
static
const
itemTest
t2c2
[
6
]
=
{{{
0
,
0
,
0
,
0
,
1
},
0
,
0
,
0
,
0
,
0
},{{
0
,
0
,
0
,
0
,
0
},
1
,
1
,
1
,
1
,
arab_tag
},{{
0
,
0
,
0
,
0
,
0
},
4
,
0
,
0
,
0
,
latn_tag
},{{
0
,
0
,
0
,
0
,
0
},
7
,
0
,
0
,
0
,
0
},{{
0
,
0
,
0
,
0
,
0
},
8
,
0
,
0
,
0
,
latn_tag
},{{
0
,
0
,
0
,
0
,
0
},
11
,
0
,
0
,
0
,
-
1
}};
static
const
itemTest
t2c2
[
6
]
=
{{{
0
,
0
,
0
,
0
,
0
},
0
,
0
,
0
,
0
,
0
},{{
0
,
0
,
0
,
0
,
0
},
1
,
1
,
1
,
1
,
arab_tag
},{{
0
,
0
,
0
,
0
,
0
},
4
,
0
,
0
,
0
,
latn_tag
},{{
0
,
0
,
0
,
0
,
0
},
7
,
0
,
0
,
0
,
0
},{{
0
,
0
,
0
,
0
,
0
},
8
,
0
,
0
,
0
,
latn_tag
},{{
0
,
0
,
0
,
0
,
0
},
11
,
0
,
0
,
0
,
-
1
}};
static
const
itemTest
t2c3
[
5
]
=
{{{
0
,
0
,
0
,
0
,
0
},
0
,
1
,
1
,
1
,
arab_tag
},{{
0
,
0
,
0
,
0
,
0
},
4
,
0
,
0
,
2
,
latn_tag
},{{
0
,
0
,
0
,
0
,
0
},
7
,
0
,
0
,
2
,
0
},{{
0
,
0
,
0
,
0
,
0
},
8
,
0
,
0
,
2
,
latn_tag
},{{
0
,
0
,
0
,
0
,
0
},
11
,
0
,
0
,
0
,
-
1
}};
static
const
itemTest
t2c4
[
3
]
=
{{{
0
,
0
,
0
,
0
,
0
},
0
,
1
,
1
,
1
,
arab_tag
},{{
0
,
0
,
0
,
0
,
0
},
4
,
0
,
0
,
2
,
latn_tag
},{{
0
,
0
,
0
,
0
,
0
},
11
,
0
,
0
,
0
,
-
1
}};
...
...
@@ -188,8 +188,8 @@ static void test_ScriptItemize( void )
static
const
WCHAR
test4
[]
=
{
'1'
,
'2'
,
'3'
,
'-'
,
'5'
,
'2'
,
' '
,
'i'
,
's'
,
' '
,
'7'
,
'1'
,
'.'
,
0
};
static
const
itemTest
t41
[
6
]
=
{{{
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
},
7
,
0
,
0
,
0
,
latn_tag
},{{
0
,
0
,
0
,
0
,
0
},
10
,
0
,
0
,
0
,
0
},{{
0
,
0
,
0
,
0
,
0
},
12
,
0
,
0
,
0
,
-
1
}};
static
const
itemTest
t42
[
5
]
=
{{{
0
,
0
,
1
,
0
,
0
},
0
,
0
,
1
,
2
,
0
},{{
0
,
0
,
0
,
0
,
1
},
6
,
1
,
1
,
1
,
0
},{{
0
,
0
,
0
,
0
,
0
},
7
,
0
,
0
,
2
,
latn_tag
},{{
0
,
0
,
0
,
0
,
0
},
10
,
0
,
0
,
2
,
0
},{{
0
,
0
,
0
,
0
,
0
},
12
,
0
,
0
,
0
,
-
1
}};
static
const
itemTest
t43
[
4
]
=
{{{
0
,
0
,
1
,
0
,
0
},
0
,
0
,
1
,
2
,
0
},{{
0
,
0
,
0
,
0
,
1
},
6
,
1
,
1
,
1
,
0
},{{
0
,
0
,
0
,
0
,
0
},
7
,
0
,
0
,
2
,
latn_tag
},{{
0
,
0
,
0
,
0
,
0
},
12
,
0
,
0
,
0
,
-
1
}};
static
const
itemTest
t42
[
5
]
=
{{{
0
,
0
,
1
,
0
,
0
},
0
,
0
,
1
,
2
,
0
},{{
0
,
0
,
0
,
0
,
0
},
6
,
1
,
1
,
1
,
0
},{{
0
,
0
,
0
,
0
,
0
},
7
,
0
,
0
,
2
,
latn_tag
},{{
0
,
0
,
0
,
0
,
0
},
10
,
0
,
0
,
2
,
0
},{{
0
,
0
,
0
,
0
,
0
},
12
,
0
,
0
,
0
,
-
1
}};
static
const
itemTest
t43
[
4
]
=
{{{
0
,
0
,
1
,
0
,
0
},
0
,
0
,
1
,
2
,
0
},{{
0
,
0
,
0
,
0
,
0
},
6
,
1
,
1
,
1
,
0
},{{
0
,
0
,
0
,
0
,
0
},
7
,
0
,
0
,
2
,
latn_tag
},{{
0
,
0
,
0
,
0
,
0
},
12
,
0
,
0
,
0
,
-
1
}};
/* Arabic */
static
const
WCHAR
test5
[]
=
...
...
dlls/usp10/usp10.c
View file @
2781ac1e
...
...
@@ -814,7 +814,7 @@ HRESULT WINAPI ScriptItemizeOpenType(const WCHAR *pwcInChars, int cInChars, int
}
}
while
((
pwcInChars
[
cnt
]
==
Numeric_space
||
pwcInChars
[
cnt
]
==
ZWJ
||
pwcInChars
[
cnt
]
==
ZWNJ
)
&&
cnt
<
cInChars
)
while
((
!
levels
||
(
levels
&&
levels
[
cnt
+
1
]
==
levels
[
0
]))
&&
(
pwcInChars
[
cnt
]
==
Numeric_space
||
pwcInChars
[
cnt
]
==
ZWJ
||
pwcInChars
[
cnt
]
==
ZWNJ
)
&&
cnt
<
cInChars
)
cnt
++
;
if
(
cnt
==
cInChars
)
/* All Spaces */
...
...
@@ -858,9 +858,9 @@ HRESULT WINAPI ScriptItemizeOpenType(const WCHAR *pwcInChars, int cInChars, int
else
if
(
levels
)
{
int
j
=
1
;
while
(
cnt
+
j
<
cInChars
-
1
&&
(
pwcInChars
[
cnt
+
j
]
==
Numeric_space
||
pwcInChars
[
cnt
+
j
]
==
ZWJ
||
pwcInChars
[
cnt
+
j
]
==
ZWNJ
))
while
(
cnt
+
j
<
cInChars
-
1
&&
(
pwcInChars
[
cnt
+
j
]
==
Numeric_space
||
pwcInChars
[
cnt
+
j
]
==
ZWJ
||
pwcInChars
[
cnt
+
j
]
==
ZWNJ
)
&&
levels
[
cnt
]
==
levels
[
cnt
+
j
]
)
j
++
;
if
(
cnt
+
j
<
cInChars
)
if
(
cnt
+
j
<
cInChars
&&
levels
[
cnt
]
==
levels
[
cnt
+
j
]
)
New_Script
=
get_char_script
(
pwcInChars
[
cnt
+
j
]);
else
New_Script
=
get_char_script
(
pwcInChars
[
cnt
]);
...
...
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