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
494c42d0
Commit
494c42d0
authored
Feb 05, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libwine: Hardcode the data for the US-ascii codepage instead of loading a unicode.org file.
parent
d6d6ce29
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
52 deletions
+59
-52
c_20127.c
libs/wine/c_20127.c
+42
-43
cpmap.pl
libs/wine/cpmap.pl
+17
-9
No files found.
libs/wine/c_20127.c
View file @
494c42d0
This diff is collapsed.
Click to expand it.
libs/wine/cpmap.pl
View file @
494c42d0
...
...
@@ -80,7 +80,7 @@ $DEF_CHAR = ord '?';
[
10029
,
"VENDORS/MICSFT/MAC/LATIN2.TXT"
,
"Mac Latin 2"
],
[
10079
,
"VENDORS/MICSFT/MAC/ICELAND.TXT"
,
"Mac Icelandic"
],
[
10081
,
"VENDORS/MICSFT/MAC/TURKISH.TXT"
,
"Mac Turkish"
],
[
20127
,
"VENDORS/MISC/US-ASCII-QUOTES.TXT"
,
"US-ASCII (7bit)"
],
[
20127
,
undef
,
"US-ASCII (7bit)"
],
[
20866
,
"VENDORS/MISC/KOI8-R.TXT"
,
"Russian KOI8"
],
[
20932
,
"OBSOLETE/EASTASIA/JIS/JIS0208.TXT"
,
"EUC-JP"
],
[
21866
,
"VENDORS/MISC/KOI8-U.TXT"
,
"Ukrainian KOI8"
],
...
...
@@ -370,9 +370,6 @@ sub READ_FILE
{
my
$name
=
shift
;
open
INPUT
,
$name
or
die
"Cannot open $name"
;
@cp2uni
=
();
@lead_bytes
=
();
@uni2cp
=
();
while
(
<
INPUT
>
)
{
...
...
@@ -402,15 +399,21 @@ sub READ_FILE
################################################################
# fill input data for the 20127 (us-ascii) codepage
sub
fill_20127_codepage
()
{
for
(
my
$i
=
0
;
$i
<
128
;
$i
++
)
{
$cp2uni
[
$i
]
=
$uni2cp
[
$i
]
=
$i
;
}
for
(
my
$i
=
128
;
$i
<
256
;
$i
++
)
{
$cp2uni
[
$i
]
=
$i
&
0x7f
;
}
}
################################################################
# build EUC-JP table from the JIS 0208 file
# FIXME: for proper EUC-JP we should probably read JIS 0212 too
# but this would require 3-byte DBCS characters
sub
READ_JIS0208_FILE
{
my
$name
=
shift
;
@cp2uni
=
();
@lead_bytes
=
();
@uni2cp
=
();
# ASCII chars
for
(
$i
=
0x00
;
$i
<=
0x7f
;
$i
++
)
...
...
@@ -1145,8 +1148,13 @@ sub HANDLE_FILE
{
my
(
$codepage
,
$filename
,
$comment
)
=
@_
;
@cp2uni
=
();
@lead_bytes
=
();
@uni2cp
=
();
# symbol codepage file is special
if
(
$codepage
==
20932
)
{
READ_JIS0208_FILE
(
$MAPPREFIX
.
$filename
);
}
elsif
(
$codepage
==
20127
)
{
fill_20127_codepage
();
}
else
{
READ_FILE
(
$MAPPREFIX
.
$filename
);
}
# hack: 0x00a5 must map to backslash in Shift-JIS
...
...
@@ -1157,12 +1165,12 @@ sub HANDLE_FILE
my
$output
=
sprintf
"c_%03d.c"
,
$codepage
;
open
OUTPUT
,
">$output.new"
or
die
"Cannot create $output"
;
printf
"Building %s from %s (%s)\n"
,
$output
,
$filename
,
$comment
;
printf
"Building %s from %s (%s)\n"
,
$output
,
$filename
||
"hardcoded data"
,
$comment
;
# dump all tables
printf
OUTPUT
"/* code page %03d (%s) */\n"
,
$codepage
,
$comment
;
printf
OUTPUT
"/* generated from %s */\n"
,
$MAPPREFIX
.
$filename
;
printf
OUTPUT
"/* generated from %s */\n"
,
$MAPPREFIX
.
$filename
if
$filename
;
printf
OUTPUT
"/* DO NOT EDIT!! */\n\n"
;
printf
OUTPUT
"#include \"wine/unicode.h\"\n\n"
;
...
...
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