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
94397d96
Commit
94397d96
authored
Mar 18, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unicode: Add compression flags to the sortkey table.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b780e5f5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
12 deletions
+21
-12
sortdefault.nls
nls/sortdefault.nls
+0
-0
make_unicode
tools/make_unicode
+21
-12
No files found.
nls/sortdefault.nls
View file @
94397d96
No preview for this file type
tools/make_unicode
View file @
94397d96
...
@@ -2371,13 +2371,13 @@ sub dump_sortkey_table($$)
...
@@ -2371,13 +2371,13 @@ sub dump_sortkey_table($$)
my
(
$filename
,
$download
)
=
@_
;
my
(
$filename
,
$download
)
=
@_
;
my
@keys
;
my
@keys
;
my
(
$part
,
$section
,
$subsection
,
$guid
,
$version
);
my
(
$part
,
$section
,
$subsection
,
$guid
,
$version
,
$ling_flag
);
my
@multiple_weights
;
my
@multiple_weights
;
my
@expansions
;
my
@expansions
;
my
@compressions
;
my
@compressions
;
my
@exceptions
;
my
%
exceptions
;
my
@except_guid
;
my
%
guids
;
my
%
guids
;
my
%
compr_flags
;
my
%
locales
;
my
%
locales
;
my
$default_guid
=
"00000001-57ee-1e5c-00b4-d0000bb1e11e"
;
my
$default_guid
=
"00000001-57ee-1e5c-00b4-d0000bb1e11e"
;
my
$jamostr
=
""
;
my
$jamostr
=
""
;
...
@@ -2488,6 +2488,8 @@ sub dump_sortkey_table($$)
...
@@ -2488,6 +2488,8 @@ sub dump_sortkey_table($$)
$guids
{
$guid
}
=
{
}
unless
defined
$guids
{
$guid
};
$guids
{
$guid
}
=
{
}
unless
defined
$guids
{
$guid
};
$guids
{
$guid
}
->
{
flags
}
|=
$flags
{
$2
}
if
$2
;
$guids
{
$guid
}
->
{
flags
}
|=
$flags
{
$2
}
if
$2
;
$guids
{
$guid
}
->
{
compr
}
=
@compressions
;
$guids
{
$guid
}
->
{
compr
}
=
@compressions
;
$exceptions
{
"$guid-"
}
=
[
]
unless
defined
$exceptions
{
"$guid-"
};
$compr_flags
{
$guid
}
=
[
]
unless
defined
$compr_flags
{
$guid
};
push
@compressions
,
[
];
push
@compressions
,
[
];
}
}
else
# merge with current one
else
# merge with current one
...
@@ -2495,6 +2497,7 @@ sub dump_sortkey_table($$)
...
@@ -2495,6 +2497,7 @@ sub dump_sortkey_table($$)
$guids
{
lc
$1
}
=
{
}
unless
defined
$guids
{
lc
$1
};
$guids
{
lc
$1
}
=
{
}
unless
defined
$guids
{
lc
$1
};
$guids
{
lc
$1
}
->
{
flags
}
|=
$flags
{
$2
}
if
$2
;
$guids
{
lc
$1
}
->
{
flags
}
|=
$flags
{
$2
}
if
$2
;
$guids
{
lc
$1
}
->
{
compr
}
=
$guids
{
$guid
}
->
{
compr
};
$guids
{
lc
$1
}
->
{
compr
}
=
$guids
{
$guid
}
->
{
compr
};
$compr_flags
{
lc
$1
}
=
$compr_flags
{
$guid
};
}
}
next
;
next
;
}
}
...
@@ -2510,7 +2513,10 @@ sub dump_sortkey_table($$)
...
@@ -2510,7 +2513,10 @@ sub dump_sortkey_table($$)
}
}
if
(
$subsection
&&
/^\s*(($re_hex\s+){2,8})$re_key/
)
if
(
$subsection
&&
/^\s*(($re_hex\s+){2,8})$re_key/
)
{
{
push
@
{
$compressions
[
$#compressions
]},
[
split
(
/\s+/
,
$3
),
map
{
hex
$_
;
}
split
(
/\s+/
,
$1
)
];
my
@comp
=
map
{
hex
$_
;
}
split
(
/\s+/
,
$1
);
push
@
{
$compressions
[
$#compressions
]},
[
split
(
/\s+/
,
$3
),
@comp
];
# add compression flags
$compr_flags
{
$guid
}
->
[
$comp
[
0
]]
|=
@comp
>=
6
?
0xc0
:
@comp
>=
4
?
0x80
:
0x40
;
next
;
next
;
}
}
}
}
...
@@ -2520,8 +2526,8 @@ sub dump_sortkey_table($$)
...
@@ -2520,8 +2526,8 @@ sub dump_sortkey_table($$)
{
{
$guid
=
lc
$1
;
$guid
=
lc
$1
;
$guids
{
$guid
}
=
{
}
unless
defined
$guids
{
lc
$1
};
$guids
{
$guid
}
=
{
}
unless
defined
$guids
{
lc
$1
};
push
@except_guid
,
(
$2
?
"+"
:
"-"
)
.
$guid
;
$ling_flag
=
(
$2
?
"+"
:
"-"
)
;
push
@exceptions
,
[
]
;
$exceptions
{
"$guid$ling_flag"
}
=
[
]
unless
defined
$exceptions
{
"$guid$ling_flag"
}
;
next
;
next
;
}
}
if
(
/^\s*LOCALENAME\s+([A-Za-z0-9-_]+)/
)
if
(
/^\s*LOCALENAME\s+([A-Za-z0-9-_]+)/
)
...
@@ -2531,7 +2537,7 @@ sub dump_sortkey_table($$)
...
@@ -2531,7 +2537,7 @@ sub dump_sortkey_table($$)
}
}
if
(
/^\s*($re_hex)\s+$re_key/
)
if
(
/^\s*($re_hex)\s+$re_key/
)
{
{
$
{
$exceptions
[
$#exceptions
]}
[
hex
$1
]
=
[
split
(
/\s+/
,
$2
)
];
$
exceptions
{
"$guid$ling_flag"
}
->
[
hex
$1
]
=
[
split
(
/\s+/
,
$2
)
];
next
;
next
;
}
}
}
}
...
@@ -2556,17 +2562,19 @@ sub dump_sortkey_table($$)
...
@@ -2556,17 +2562,19 @@ sub dump_sortkey_table($$)
$table
.=
pack
"C4"
,
$k
[
1
],
$k
[
0
],
$k
[
2
],
$k
[
3
];
$table
.=
pack
"C4"
,
$k
[
1
],
$k
[
0
],
$k
[
2
],
$k
[
3
];
}
}
for
(
my
$i
=
0
;
$i
<
@exceptions
;
$i
++
)
for
each
my
$id
(
sort
keys
%
exceptions
)
{
{
my
$pos
=
length
(
$table
)
/
4
;
my
$pos
=
length
(
$table
)
/
4
;
my
@exc
=
@
{
$exceptions
[
$i
]
};
my
@exc
=
@
{
$exceptions
{
$id
}
};
my
@filled
;
my
@filled
;
my
$key
=
(
substr
(
$except_guid
[
$i
],
0
,
1
)
eq
"+"
?
"ling_except"
:
"except"
);
my
$key
=
(
substr
(
$id
,
-
1
)
eq
"+"
?
"ling_except"
:
"except"
);
$guids
{
substr
(
$except_guid
[
$i
],
1
)}
->
{
$key
}
=
$pos
;
my
$guid
=
substr
(
$id
,
0
,
-
1
);
$guids
{
$guid
}
->
{
$key
}
=
$pos
;
$pos
+=
0x100
;
$pos
+=
0x100
;
my
@flags
=
@
{
$compr_flags
{
$guid
}}
if
defined
$compr_flags
{
$guid
};
for
(
my
$j
=
0
;
$j
<
0x10000
;
$j
++
)
for
(
my
$j
=
0
;
$j
<
0x10000
;
$j
++
)
{
{
next
unless
defined
$exc
[
$j
];
next
unless
defined
$exc
[
$j
]
||
defined
$flags
[
$j
]
;
$filled
[
$j
>>
8
]
=
1
;
$filled
[
$j
>>
8
]
=
1
;
$j
|=
0xff
;
$j
|=
0xff
;
}
}
...
@@ -2579,6 +2587,7 @@ sub dump_sortkey_table($$)
...
@@ -2579,6 +2587,7 @@ sub dump_sortkey_table($$)
{
{
next
unless
$filled
[
$j
>>
8
];
next
unless
$filled
[
$j
>>
8
];
my
@k
=
defined
$exc
[
$j
]
?
@
{
$exc
[
$j
]}
:
defined
$keys
[
$j
]
?
@
{
$keys
[
$j
]}
:
(
0
)
x
4
;
my
@k
=
defined
$exc
[
$j
]
?
@
{
$exc
[
$j
]}
:
defined
$keys
[
$j
]
?
@
{
$keys
[
$j
]}
:
(
0
)
x
4
;
$k
[
3
]
|=
$flags
[
$j
]
||
0
;
$table
.=
pack
"C4"
,
$k
[
1
],
$k
[
0
],
$k
[
2
],
$k
[
3
];
$table
.=
pack
"C4"
,
$k
[
1
],
$k
[
0
],
$k
[
2
],
$k
[
3
];
}
}
}
}
...
...
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