diff options
author | H. Peter Anvin <hpa@zytor.com> | 2009-01-25 17:23:32 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-01-25 17:23:32 -0800 |
commit | 582645e269ee82d544ab8b8b913c8364f3178484 (patch) | |
tree | 52f2627071926f3c2162643a0f57c1387627e36e /codepage | |
parent | 4b533a0066a26b82c36d58af05c3bbeabf7e3b95 (diff) | |
download | syslinux-582645e269ee82d544ab8b8b913c8364f3178484.tar.gz |
Reorganize the codepage handling to allow ucs2 -> codepage conversion
Reorganize the codepage handling to make it easier to do ucs2 ->
codepage conversion, this will be used for a future directory lister.
Diffstat (limited to 'codepage')
-rwxr-xr-x | codepage/cptable.pl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/codepage/cptable.pl b/codepage/cptable.pl index c7e20023..05cfc3eb 100755 --- a/codepage/cptable.pl +++ b/codepage/cptable.pl @@ -118,6 +118,7 @@ for ($i = 0; $i < 256; $i++) { # Unicode (longname) matching table. # This only depends on the console codepage. # +$pp0 = ''; $pp1 = ''; for ($i = 0; $i < 256; $i++) { if (!defined($ytab[$i])) { $p0 = $p1 = 0xffff; @@ -136,8 +137,10 @@ for ($i = 0; $i < 256; $i++) { # Only the BMP is supported... $p0 = 0xffff if ($p0 > 0xffff); $p1 = 0xffff if ($p1 > 0xffff); - print CPOUT pack("vv", $p0, $p1); + $pp0 .= pack("v", $p0); + $pp1 .= pack("v", $p1); } +print CPOUT $pp0, $pp1; close (CPOUT); |