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
2c5c2b55
Commit
2c5c2b55
authored
Jul 22, 2013
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Update the line breaking algorithm to Unicode 6.2.0.
parent
4be0f88e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
7 deletions
+32
-7
breaking.c
dlls/usp10/breaking.c
+32
-7
No files found.
dlls/usp10/breaking.c
View file @
2c5c2b55
...
...
@@ -38,7 +38,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(uniscribe);
extern
const
unsigned
short
wine_linebreak_table
[];
enum
breaking_types
{
b_BK
=
1
,
b_CR
,
b_LF
,
b_CM
,
b_SG
,
b_GL
,
b_CB
,
b_SP
,
b_ZW
,
b_NL
,
b_WJ
,
b_JL
,
b_JV
,
b_JT
,
b_H2
,
b_H3
,
b_XX
,
b_OP
,
b_CL
,
b_CP
,
b_QU
,
b_NS
,
b_EX
,
b_SY
,
b_IS
,
b_PR
,
b_PO
,
b_NU
,
b_AL
,
b_ID
,
b_IN
,
b_HY
,
b_BB
,
b_BA
,
b_SA
,
b_AI
,
b_B2
};
enum
breaking_types
{
b_BK
=
1
,
b_CR
,
b_LF
,
b_CM
,
b_SG
,
b_GL
,
b_CB
,
b_SP
,
b_ZW
,
b_NL
,
b_WJ
,
b_JL
,
b_JV
,
b_JT
,
b_H2
,
b_H3
,
b_XX
,
b_OP
,
b_CL
,
b_CP
,
b_QU
,
b_NS
,
b_EX
,
b_SY
,
b_IS
,
b_PR
,
b_PO
,
b_NU
,
b_AL
,
b_ID
,
b_IN
,
b_HY
,
b_BB
,
b_BA
,
b_SA
,
b_AI
,
b_B2
,
b_HL
,
b_CJ
,
b_RI
};
enum
breaking_class
{
b_r
=
1
,
b_s
,
b_x
};
...
...
@@ -111,6 +111,8 @@ void BREAK_line(const WCHAR *chars, int count, const SCRIPT_ANALYSIS *sa, SCRIPT
case
b_SG
:
case
b_XX
:
break_class
[
i
]
=
b_AL
;
case
b_CJ
:
break_class
[
i
]
=
b_NS
;
}
}
...
...
@@ -283,6 +285,16 @@ void BREAK_line(const WCHAR *chars, int count, const SCRIPT_ANALYSIS *sa, SCRIPT
if
(
i
<
count
-
1
)
else_break
(
&
break_before
[
i
+
1
],
b_x
);
break
;
/* LB21a */
case
b_HL
:
if
(
i
<
count
-
2
)
switch
(
break_class
[
i
+
1
])
{
case
b_HY
:
case
b_BA
:
else_break
(
&
break_before
[
i
+
2
],
b_x
);
}
break
;
/* LB22 */
case
b_IN
:
if
(
i
>
0
)
...
...
@@ -290,6 +302,7 @@ void BREAK_line(const WCHAR *chars, int count, const SCRIPT_ANALYSIS *sa, SCRIPT
switch
(
break_class
[
i
-
1
])
{
case
b_AL
:
case
b_HL
:
case
b_ID
:
case
b_IN
:
case
b_NU
:
...
...
@@ -304,12 +317,16 @@ void BREAK_line(const WCHAR *chars, int count, const SCRIPT_ANALYSIS *sa, SCRIPT
/* LB23 */
if
((
break_class
[
i
]
==
b_ID
&&
break_class
[
i
+
1
]
==
b_PO
)
||
(
break_class
[
i
]
==
b_AL
&&
break_class
[
i
+
1
]
==
b_NU
)
||
(
break_class
[
i
]
==
b_NU
&&
break_class
[
i
+
1
]
==
b_AL
))
(
break_class
[
i
]
==
b_HL
&&
break_class
[
i
+
1
]
==
b_NU
)
||
(
break_class
[
i
]
==
b_NU
&&
break_class
[
i
+
1
]
==
b_AL
)
||
(
break_class
[
i
]
==
b_NU
&&
break_class
[
i
+
1
]
==
b_HL
))
else_break
(
&
break_before
[
i
+
1
],
b_x
);
/* LB24 */
if
((
break_class
[
i
]
==
b_PR
&&
break_class
[
i
+
1
]
==
b_ID
)
||
(
break_class
[
i
]
==
b_PR
&&
break_class
[
i
+
1
]
==
b_AL
)
||
(
break_class
[
i
]
==
b_PO
&&
break_class
[
i
+
1
]
==
b_AL
))
(
break_class
[
i
]
==
b_PR
&&
break_class
[
i
+
1
]
==
b_HL
)
||
(
break_class
[
i
]
==
b_PO
&&
break_class
[
i
+
1
]
==
b_AL
)
||
(
break_class
[
i
]
==
b_PO
&&
break_class
[
i
+
1
]
==
b_HL
))
else_break
(
&
break_before
[
i
+
1
],
b_x
);
/* LB25 */
...
...
@@ -373,19 +390,27 @@ void BREAK_line(const WCHAR *chars, int count, const SCRIPT_ANALYSIS *sa, SCRIPT
}
/* LB28 */
if
(
break_class
[
i
]
==
b_AL
&&
break_class
[
i
+
1
]
==
b_AL
)
if
((
break_class
[
i
]
==
b_AL
&&
break_class
[
i
+
1
]
==
b_AL
)
||
(
break_class
[
i
]
==
b_AL
&&
break_class
[
i
+
1
]
==
b_HL
)
||
(
break_class
[
i
]
==
b_HL
&&
break_class
[
i
+
1
]
==
b_AL
)
||
(
break_class
[
i
]
==
b_HL
&&
break_class
[
i
+
1
]
==
b_HL
))
else_break
(
&
break_before
[
i
+
1
],
b_x
);
/* LB29 */
if
(
break_class
[
i
]
==
b_IS
&&
break_class
[
i
+
1
]
==
b_AL
)
if
((
break_class
[
i
]
==
b_IS
&&
break_class
[
i
+
1
]
==
b_AL
)
||
(
break_class
[
i
]
==
b_IS
&&
break_class
[
i
+
1
]
==
b_HL
))
else_break
(
&
break_before
[
i
+
1
],
b_x
);
/* LB30 */
if
((
break_class
[
i
]
==
b_AL
||
break_class
[
i
]
==
b_NU
)
&&
if
((
break_class
[
i
]
==
b_AL
||
break_class
[
i
]
==
b_
HL
||
break_class
[
i
]
==
b_
NU
)
&&
break_class
[
i
+
1
]
==
b_OP
)
else_break
(
&
break_before
[
i
+
1
],
b_x
);
if
(
break_class
[
i
]
==
b_CP
&&
(
break_class
[
i
+
1
]
==
b_AL
||
break_class
[
i
]
==
b_NU
))
(
break_class
[
i
+
1
]
==
b_AL
||
break_class
[
i
]
==
b_HL
||
break_class
[
i
]
==
b_NU
))
else_break
(
&
break_before
[
i
+
1
],
b_x
);
/* LB30a */
if
(
break_class
[
i
]
==
b_RI
&&
break_class
[
i
+
1
]
==
b_RI
)
else_break
(
&
break_before
[
i
+
1
],
b_x
);
}
}
...
...
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