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
d5672fee
Commit
d5672fee
authored
Apr 29, 2010
by
Aric Stewart
Committed by
Alexandre Julliard
Apr 29, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Update ScriptItemize to use the baselevel of a unified run.
parent
35a2566e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
5 deletions
+19
-5
usp10.c
dlls/usp10/tests/usp10.c
+4
-4
usp10.c
dlls/usp10/usp10.c
+15
-1
No files found.
dlls/usp10/tests/usp10.c
View file @
d5672fee
...
...
@@ -82,7 +82,7 @@ static void test_ScriptItemize( void )
{
static
const
WCHAR
test1
[]
=
{
't'
,
'e'
,
's'
,
't'
,
0
};
static
const
itemTest
t11
[
2
]
=
{{{
0
,
0
,
0
,
0
},
0
,
0
,
0
,
0
},{{
0
,
0
,
0
,
0
},
4
,
0
,
0
,
0
}};
static
const
itemTest
t12
[
2
]
=
{{{
0
,
0
,
0
,
1
},
0
,
0
,
0
,
2
},{{
0
,
0
,
0
,
0
},
4
,
0
,
0
,
0
}};
static
const
itemTest
t12
[
2
]
=
{{{
0
,
0
,
0
,
0
},
0
,
0
,
0
,
2
},{{
0
,
0
,
0
,
0
},
4
,
0
,
0
,
0
}};
/* Arabic, English*/
static
const
WCHAR
test2
[]
=
{
'1'
,
'2'
,
'3'
,
'-'
,
'5'
,
'2'
,
0x064a
,
0x064f
,
0x0633
,
0x0627
,
0x0648
,
0x0650
,
0x064a
,
'7'
,
'1'
,
'.'
,
0
};
...
...
@@ -98,7 +98,7 @@ static void test_ScriptItemize( void )
0x0e2d
,
0x0e22
,
0x0e39
,
0x0e48
,
0x0e17
,
0x0e35
,
0x0e48
,
0x0e19
,
0x0e31
,
0x0e48
,
0x0e19
,
0
};
static
const
itemTest
t31
[
2
]
=
{{{
0
,
0
,
0
,
0
},
0
,
0
,
0
,
0
},{{
0
,
0
,
0
,
0
},
41
,
0
,
0
,
0
}};
static
const
itemTest
t32
[
2
]
=
{{{
0
,
0
,
0
,
1
},
0
,
0
,
0
,
2
},{{
0
,
0
,
0
,
0
},
41
,
0
,
0
,
0
}};
static
const
itemTest
t32
[
2
]
=
{{{
0
,
0
,
0
,
0
},
0
,
0
,
0
,
2
},{{
0
,
0
,
0
,
0
},
41
,
0
,
0
,
0
}};
static
const
WCHAR
test4
[]
=
{
'1'
,
'2'
,
'3'
,
'-'
,
'5'
,
'2'
,
' '
,
'i'
,
's'
,
' '
,
'7'
,
'1'
,
'.'
,
0
};
...
...
@@ -116,7 +116,7 @@ static void test_ScriptItemize( void )
/* Hebrew */
static
const
WCHAR
test6
[]
=
{
0x05e9
,
0x05dc
,
0x05d5
,
0x05dd
,
'.'
,
0
};
static
const
itemTest
t61
[
3
]
=
{{{
0
,
0
,
0
,
0
},
0
,
1
,
1
,
1
},{{
0
,
0
,
0
,
0
},
4
,
0
,
0
,
0
},{{
0
,
0
,
0
,
0
},
5
,
0
,
0
,
0
}};
static
const
itemTest
t62
[
3
]
=
{{{
0
,
0
,
0
,
0
},
0
,
1
,
1
,
1
},{{
0
,
1
,
1
,
1
},
4
,
1
,
1
,
1
},{{
0
,
0
,
0
,
0
},
5
,
0
,
0
,
0
}};
static
const
itemTest
t62
[
3
]
=
{{{
0
,
0
,
0
,
0
},
0
,
1
,
1
,
1
},{{
0
,
0
,
0
,
0
},
4
,
1
,
1
,
1
},{{
0
,
0
,
0
,
0
},
5
,
0
,
0
,
0
}};
static
const
WCHAR
test7
[]
=
{
'p'
,
'a'
,
'r'
,
't'
,
' '
,
'o'
,
'n'
,
'e'
,
' '
,
0x05d7
,
0x05dc
,
0x05e7
,
' '
,
0x05e9
,
0x05ea
,
0x05d9
,
0x05d9
,
0x05dd
,
' '
,
'p'
,
'a'
,
'r'
,
't'
,
' '
,
't'
,
'h'
,
'r'
,
'e'
,
'e'
,
0
};
static
const
itemTest
t71
[
4
]
=
{{{
0
,
0
,
0
,
0
},
0
,
0
,
0
,
0
},{{
0
,
0
,
0
,
0
},
9
,
1
,
1
,
1
},{{
0
,
0
,
0
,
0
},
19
,
0
,
0
,
0
},{{
0
,
0
,
0
,
0
},
29
,
0
,
0
,
0
}};
static
const
itemTest
t72
[
4
]
=
{{{
0
,
0
,
0
,
0
},
0
,
0
,
0
,
0
},{{
0
,
0
,
0
,
0
},
9
,
1
,
1
,
1
},{{
0
,
0
,
0
,
0
},
18
,
0
,
0
,
0
},{{
0
,
0
,
0
,
0
},
29
,
0
,
0
,
0
}};
...
...
@@ -127,7 +127,7 @@ static void test_ScriptItemize( void )
/* Syriac (Like Arabic )*/
static
const
WCHAR
test9
[]
=
{
0x0710
,
0x0712
,
0x0712
,
0x0714
,
'.'
,
0
};
static
const
itemTest
t91
[
3
]
=
{{{
0
,
0
,
0
,
0
},
0
,
1
,
1
,
1
},{{
0
,
0
,
0
,
0
},
4
,
0
,
0
,
0
},{{
0
,
0
,
0
,
0
},
5
,
0
,
0
,
0
}};
static
const
itemTest
t92
[
3
]
=
{{{
0
,
0
,
0
,
0
},
0
,
1
,
1
,
1
},{{
0
,
1
,
1
,
1
},
4
,
1
,
1
,
1
},{{
0
,
0
,
0
,
0
},
5
,
0
,
0
,
0
}};
static
const
itemTest
t92
[
3
]
=
{{{
0
,
0
,
0
,
0
},
0
,
1
,
1
,
1
},{{
0
,
0
,
0
,
0
},
4
,
1
,
1
,
1
},{{
0
,
0
,
0
,
0
},
5
,
0
,
0
,
0
}};
static
const
WCHAR
test10
[]
=
{
0x0717
,
0x0718
,
0x071a
,
0x071b
,
0
};
static
const
itemTest
t101
[
2
]
=
{{{
0
,
0
,
0
,
0
},
0
,
1
,
1
,
1
},{{
0
,
0
,
0
,
0
},
4
,
0
,
0
,
0
}};
...
...
dlls/usp10/usp10.c
View file @
d5672fee
...
...
@@ -534,6 +534,7 @@ HRESULT WINAPI ScriptItemize(const WCHAR *pwcInChars, int cInChars, int cMaxItem
int
cnt
=
0
,
index
=
0
;
int
New_Script
=
SCRIPT_UNDEFINED
;
WORD
*
levels
=
NULL
;
WORD
baselevel
=
0
;
TRACE
(
"%s,%d,%d,%p,%p,%p,%p
\n
"
,
debugstr_wn
(
pwcInChars
,
cInChars
),
cInChars
,
cMaxItems
,
psControl
,
psState
,
pItems
,
pcItems
);
...
...
@@ -549,6 +550,7 @@ HRESULT WINAPI ScriptItemize(const WCHAR *pwcInChars, int cInChars, int cMaxItem
return
E_OUTOFMEMORY
;
BIDI_DetermineLevels
(
pwcInChars
,
cInChars
,
psState
,
psControl
,
levels
);
baselevel
=
levels
[
0
];
for
(
i
=
0
;
i
<
cInChars
;
i
++
)
if
(
levels
[
i
]
!=
levels
[
0
])
break
;
...
...
@@ -597,7 +599,12 @@ HRESULT WINAPI ScriptItemize(const WCHAR *pwcInChars, int cInChars, int cMaxItem
pItems
[
index
].
a
.
fRTL
=
1
;
pItems
[
index
].
a
.
fLayoutRTL
=
1
;
}
else
{
pItems
[
index
].
a
.
s
.
uBidiLevel
=
baselevel
;
pItems
[
index
].
a
.
fLayoutRTL
=
odd
(
baselevel
);
pItems
[
index
].
a
.
fRTL
=
odd
(
baselevel
);
}
TRACE
(
"New_Level=%i New_Script=%d, eScript=%d index=%d cnt=%d iCharPos=%d
\n
"
,
levels
?
levels
[
cnt
]
:-
1
,
New_Script
,
pItems
[
index
].
a
.
eScript
,
index
,
cnt
,
...
...
@@ -660,6 +667,13 @@ HRESULT WINAPI ScriptItemize(const WCHAR *pwcInChars, int cInChars, int cMaxItem
pItems
[
index
].
a
.
fRTL
=
1
;
pItems
[
index
].
a
.
fLayoutRTL
=
1
;
}
else
{
pItems
[
index
].
a
.
s
.
uBidiLevel
=
baselevel
;
pItems
[
index
].
a
.
fLayoutRTL
=
odd
(
baselevel
);
pItems
[
index
].
a
.
fRTL
=
odd
(
baselevel
);
}
pItems
[
index
].
a
.
eScript
=
New_Script
;
TRACE
(
"index=%d cnt=%d iCharPos=%d
\n
"
,
index
,
cnt
,
pItems
[
index
].
iCharPos
);
...
...
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