1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-10 17:42:29 +03:00

Pre-beta mechanical code beautification.

Run pgindent, pgperltidy, and reformat-dat-files.

This set of diffs is a bit larger than typical.  We've updated to
pg_bsd_indent 2.1.2, which properly indents variable declarations that
have multi-line initialization expressions (the continuation lines are
now indented one tab stop).  We've also updated to perltidy version
20230309 and changed some of its settings, which reduces its desire to
add whitespace to lines to make assignments etc. line up.  Going
forward, that should make for fewer random-seeming changes to existing
code.

Discussion: https://postgr.es/m/20230428092545.qfb3y5wcu4cm75ur@alvherre.pgsql
This commit is contained in:
Tom Lane
2023-05-19 17:24:48 -04:00
parent df6b19fbbc
commit 0245f8db36
402 changed files with 4756 additions and 4427 deletions

View File

@@ -40,7 +40,7 @@ my $cp950txt = &read_source("CP950.TXT");
foreach my $i (@$cp950txt)
{
my $code = $i->{code};
my $ucs = $i->{ucs};
my $ucs = $i->{ucs};
# Pick only the ETEN extended characters in the range 0xf9d6 - 0xf9dc
# from CP950.TXT
@@ -51,12 +51,12 @@ foreach my $i (@$cp950txt)
{
push @$all,
{
code => $code,
ucs => $ucs,
comment => $i->{comment},
code => $code,
ucs => $ucs,
comment => $i->{comment},
direction => BOTH,
f => $i->{f},
l => $i->{l}
f => $i->{f},
l => $i->{l}
};
}
}
@@ -64,7 +64,7 @@ foreach my $i (@$cp950txt)
foreach my $i (@$all)
{
my $code = $i->{code};
my $ucs = $i->{ucs};
my $ucs = $i->{ucs};
# BIG5.TXT maps several BIG5 characters to U+FFFD. The UTF-8 to BIG5 mapping can
# contain only one of them. XXX: Doesn't really make sense to include any of them,

View File

@@ -33,7 +33,7 @@ while (<$in>)
next if (!m/<a u="([0-9A-F]+)" b="([0-9A-F ]+)"/);
my ($u, $c) = ($1, $2);
$c =~ s/ //g;
my $ucs = hex($u);
my $ucs = hex($u);
my $code = hex($c);
# The GB-18030 character set, which we use as the source, contains
@@ -73,11 +73,11 @@ while (<$in>)
push @mapping,
{
ucs => $ucs,
code => $code,
ucs => $ucs,
code => $code,
direction => BOTH,
f => $in_file,
l => $.
f => $in_file,
l => $.
};
}
close($in);

View File

@@ -37,13 +37,13 @@ while (my $line = <$in>)
push @all,
{
direction => BOTH,
ucs => $ucs1,
direction => BOTH,
ucs => $ucs1,
ucs_second => $ucs2,
code => $code,
comment => $rest,
f => $in_file,
l => $.
code => $code,
comment => $rest,
f => $in_file,
l => $.
};
}
elsif ($line =~ /^0x(\w+)\s*U\+(\w+)\s*#\s*(\S.*)?\s*$/)
@@ -51,7 +51,7 @@ while (my $line = <$in>)
# non-combined characters
my ($c, $u, $rest) = ($1, $2, "U+" . $2 . $3);
my $ucs = hex($u);
my $ucs = hex($u);
my $code = hex($c);
next if ($code < 0x80 && $ucs < 0x80);
@@ -59,11 +59,11 @@ while (my $line = <$in>)
push @all,
{
direction => BOTH,
ucs => $ucs,
code => $code,
comment => $rest,
f => $in_file,
l => $.
ucs => $ucs,
code => $code,
comment => $rest,
f => $in_file,
l => $.
};
}
}

View File

@@ -120,521 +120,521 @@ foreach my $i (grep defined $_->{sjis}, @mapping)
push @mapping, (
{
direction => BOTH,
ucs => 0x4efc,
code => 0x8ff4af,
comment => '# CJK(4EFC)'
ucs => 0x4efc,
code => 0x8ff4af,
comment => '# CJK(4EFC)'
},
{
direction => BOTH,
ucs => 0x50f4,
code => 0x8ff4b0,
comment => '# CJK(50F4)'
ucs => 0x50f4,
code => 0x8ff4b0,
comment => '# CJK(50F4)'
},
{
direction => BOTH,
ucs => 0x51EC,
code => 0x8ff4b1,
comment => '# CJK(51EC)'
ucs => 0x51EC,
code => 0x8ff4b1,
comment => '# CJK(51EC)'
},
{
direction => BOTH,
ucs => 0x5307,
code => 0x8ff4b2,
comment => '# CJK(5307)'
ucs => 0x5307,
code => 0x8ff4b2,
comment => '# CJK(5307)'
},
{
direction => BOTH,
ucs => 0x5324,
code => 0x8ff4b3,
comment => '# CJK(5324)'
ucs => 0x5324,
code => 0x8ff4b3,
comment => '# CJK(5324)'
},
{
direction => BOTH,
ucs => 0x548A,
code => 0x8ff4b5,
comment => '# CJK(548A)'
ucs => 0x548A,
code => 0x8ff4b5,
comment => '# CJK(548A)'
},
{
direction => BOTH,
ucs => 0x5759,
code => 0x8ff4b6,
comment => '# CJK(5759)'
ucs => 0x5759,
code => 0x8ff4b6,
comment => '# CJK(5759)'
},
{
direction => BOTH,
ucs => 0x589E,
code => 0x8ff4b9,
comment => '# CJK(589E)'
ucs => 0x589E,
code => 0x8ff4b9,
comment => '# CJK(589E)'
},
{
direction => BOTH,
ucs => 0x5BEC,
code => 0x8ff4ba,
comment => '# CJK(5BEC)'
ucs => 0x5BEC,
code => 0x8ff4ba,
comment => '# CJK(5BEC)'
},
{
direction => BOTH,
ucs => 0x5CF5,
code => 0x8ff4bb,
comment => '# CJK(5CF5)'
ucs => 0x5CF5,
code => 0x8ff4bb,
comment => '# CJK(5CF5)'
},
{
direction => BOTH,
ucs => 0x5D53,
code => 0x8ff4bc,
comment => '# CJK(5D53)'
ucs => 0x5D53,
code => 0x8ff4bc,
comment => '# CJK(5D53)'
},
{
direction => BOTH,
ucs => 0x5FB7,
code => 0x8ff4be,
comment => '# CJK(5FB7)'
ucs => 0x5FB7,
code => 0x8ff4be,
comment => '# CJK(5FB7)'
},
{
direction => BOTH,
ucs => 0x6085,
code => 0x8ff4bf,
comment => '# CJK(6085)'
ucs => 0x6085,
code => 0x8ff4bf,
comment => '# CJK(6085)'
},
{
direction => BOTH,
ucs => 0x6120,
code => 0x8ff4c0,
comment => '# CJK(6120)'
ucs => 0x6120,
code => 0x8ff4c0,
comment => '# CJK(6120)'
},
{
direction => BOTH,
ucs => 0x654E,
code => 0x8ff4c1,
comment => '# CJK(654E)'
ucs => 0x654E,
code => 0x8ff4c1,
comment => '# CJK(654E)'
},
{
direction => BOTH,
ucs => 0x663B,
code => 0x8ff4c2,
comment => '# CJK(663B)'
ucs => 0x663B,
code => 0x8ff4c2,
comment => '# CJK(663B)'
},
{
direction => BOTH,
ucs => 0x6665,
code => 0x8ff4c3,
comment => '# CJK(6665)'
ucs => 0x6665,
code => 0x8ff4c3,
comment => '# CJK(6665)'
},
{
direction => BOTH,
ucs => 0x6801,
code => 0x8ff4c6,
comment => '# CJK(6801)'
ucs => 0x6801,
code => 0x8ff4c6,
comment => '# CJK(6801)'
},
{
direction => BOTH,
ucs => 0x6A6B,
code => 0x8ff4c9,
comment => '# CJK(6A6B)'
ucs => 0x6A6B,
code => 0x8ff4c9,
comment => '# CJK(6A6B)'
},
{
direction => BOTH,
ucs => 0x6AE2,
code => 0x8ff4ca,
comment => '# CJK(6AE2)'
ucs => 0x6AE2,
code => 0x8ff4ca,
comment => '# CJK(6AE2)'
},
{
direction => BOTH,
ucs => 0x6DF2,
code => 0x8ff4cc,
comment => '# CJK(6DF2)'
ucs => 0x6DF2,
code => 0x8ff4cc,
comment => '# CJK(6DF2)'
},
{
direction => BOTH,
ucs => 0x6DF8,
code => 0x8ff4cb,
comment => '# CJK(6DF8)'
ucs => 0x6DF8,
code => 0x8ff4cb,
comment => '# CJK(6DF8)'
},
{
direction => BOTH,
ucs => 0x7028,
code => 0x8ff4cd,
comment => '# CJK(7028)'
ucs => 0x7028,
code => 0x8ff4cd,
comment => '# CJK(7028)'
},
{
direction => BOTH,
ucs => 0x70BB,
code => 0x8ff4ae,
comment => '# CJK(70BB)'
ucs => 0x70BB,
code => 0x8ff4ae,
comment => '# CJK(70BB)'
},
{
direction => BOTH,
ucs => 0x7501,
code => 0x8ff4d0,
comment => '# CJK(7501)'
ucs => 0x7501,
code => 0x8ff4d0,
comment => '# CJK(7501)'
},
{
direction => BOTH,
ucs => 0x7682,
code => 0x8ff4d1,
comment => '# CJK(7682)'
ucs => 0x7682,
code => 0x8ff4d1,
comment => '# CJK(7682)'
},
{
direction => BOTH,
ucs => 0x769E,
code => 0x8ff4d2,
comment => '# CJK(769E)'
ucs => 0x769E,
code => 0x8ff4d2,
comment => '# CJK(769E)'
},
{
direction => BOTH,
ucs => 0x7930,
code => 0x8ff4d4,
comment => '# CJK(7930)'
ucs => 0x7930,
code => 0x8ff4d4,
comment => '# CJK(7930)'
},
{
direction => BOTH,
ucs => 0x7AE7,
code => 0x8ff4d9,
comment => '# CJK(7AE7)'
ucs => 0x7AE7,
code => 0x8ff4d9,
comment => '# CJK(7AE7)'
},
{
direction => BOTH,
ucs => 0x7DA0,
code => 0x8ff4dc,
comment => '# CJK(7DA0)'
ucs => 0x7DA0,
code => 0x8ff4dc,
comment => '# CJK(7DA0)'
},
{
direction => BOTH,
ucs => 0x7DD6,
code => 0x8ff4dd,
comment => '# CJK(7DD6)'
ucs => 0x7DD6,
code => 0x8ff4dd,
comment => '# CJK(7DD6)'
},
{
direction => BOTH,
ucs => 0x8362,
code => 0x8ff4df,
comment => '# CJK(8362)'
ucs => 0x8362,
code => 0x8ff4df,
comment => '# CJK(8362)'
},
{
direction => BOTH,
ucs => 0x85B0,
code => 0x8ff4e1,
comment => '# CJK(85B0)'
ucs => 0x85B0,
code => 0x8ff4e1,
comment => '# CJK(85B0)'
},
{
direction => BOTH,
ucs => 0x8807,
code => 0x8ff4e4,
comment => '# CJK(8807)'
ucs => 0x8807,
code => 0x8ff4e4,
comment => '# CJK(8807)'
},
{
direction => BOTH,
ucs => 0x8B7F,
code => 0x8ff4e6,
comment => '# CJK(8B7F)'
ucs => 0x8B7F,
code => 0x8ff4e6,
comment => '# CJK(8B7F)'
},
{
direction => BOTH,
ucs => 0x8CF4,
code => 0x8ff4e7,
comment => '# CJK(8CF4)'
ucs => 0x8CF4,
code => 0x8ff4e7,
comment => '# CJK(8CF4)'
},
{
direction => BOTH,
ucs => 0x8D76,
code => 0x8ff4e8,
comment => '# CJK(8D76)'
ucs => 0x8D76,
code => 0x8ff4e8,
comment => '# CJK(8D76)'
},
{
direction => BOTH,
ucs => 0x90DE,
code => 0x8ff4ec,
comment => '# CJK(90DE)'
ucs => 0x90DE,
code => 0x8ff4ec,
comment => '# CJK(90DE)'
},
{
direction => BOTH,
ucs => 0x9115,
code => 0x8ff4ee,
comment => '# CJK(9115)'
ucs => 0x9115,
code => 0x8ff4ee,
comment => '# CJK(9115)'
},
{
direction => BOTH,
ucs => 0x9592,
code => 0x8ff4f1,
comment => '# CJK(9592)'
ucs => 0x9592,
code => 0x8ff4f1,
comment => '# CJK(9592)'
},
{
direction => BOTH,
ucs => 0x973B,
code => 0x8ff4f4,
comment => '# CJK(973B)'
ucs => 0x973B,
code => 0x8ff4f4,
comment => '# CJK(973B)'
},
{
direction => BOTH,
ucs => 0x974D,
code => 0x8ff4f5,
comment => '# CJK(974D)'
ucs => 0x974D,
code => 0x8ff4f5,
comment => '# CJK(974D)'
},
{
direction => BOTH,
ucs => 0x9751,
code => 0x8ff4f6,
comment => '# CJK(9751)'
ucs => 0x9751,
code => 0x8ff4f6,
comment => '# CJK(9751)'
},
{
direction => BOTH,
ucs => 0x999E,
code => 0x8ff4fa,
comment => '# CJK(999E)'
ucs => 0x999E,
code => 0x8ff4fa,
comment => '# CJK(999E)'
},
{
direction => BOTH,
ucs => 0x9AD9,
code => 0x8ff4fb,
comment => '# CJK(9AD9)'
ucs => 0x9AD9,
code => 0x8ff4fb,
comment => '# CJK(9AD9)'
},
{
direction => BOTH,
ucs => 0x9B72,
code => 0x8ff4fc,
comment => '# CJK(9B72)'
ucs => 0x9B72,
code => 0x8ff4fc,
comment => '# CJK(9B72)'
},
{
direction => BOTH,
ucs => 0x9ED1,
code => 0x8ff4fe,
comment => '# CJK(9ED1)'
ucs => 0x9ED1,
code => 0x8ff4fe,
comment => '# CJK(9ED1)'
},
{
direction => BOTH,
ucs => 0xF929,
code => 0x8ff4c5,
comment => '# CJK COMPATIBILITY IDEOGRAPH-F929'
ucs => 0xF929,
code => 0x8ff4c5,
comment => '# CJK COMPATIBILITY IDEOGRAPH-F929'
},
{
direction => BOTH,
ucs => 0xF9DC,
code => 0x8ff4f2,
comment => '# CJK COMPATIBILITY IDEOGRAPH-F9DC'
ucs => 0xF9DC,
code => 0x8ff4f2,
comment => '# CJK COMPATIBILITY IDEOGRAPH-F9DC'
},
{
direction => BOTH,
ucs => 0xFA0E,
code => 0x8ff4b4,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA0E'
ucs => 0xFA0E,
code => 0x8ff4b4,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA0E'
},
{
direction => BOTH,
ucs => 0xFA0F,
code => 0x8ff4b7,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA0F'
ucs => 0xFA0F,
code => 0x8ff4b7,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA0F'
},
{
direction => BOTH,
ucs => 0xFA10,
code => 0x8ff4b8,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA10'
ucs => 0xFA10,
code => 0x8ff4b8,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA10'
},
{
direction => BOTH,
ucs => 0xFA11,
code => 0x8ff4bd,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA11'
ucs => 0xFA11,
code => 0x8ff4bd,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA11'
},
{
direction => BOTH,
ucs => 0xFA12,
code => 0x8ff4c4,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA12'
ucs => 0xFA12,
code => 0x8ff4c4,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA12'
},
{
direction => BOTH,
ucs => 0xFA13,
code => 0x8ff4c7,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA13'
ucs => 0xFA13,
code => 0x8ff4c7,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA13'
},
{
direction => BOTH,
ucs => 0xFA14,
code => 0x8ff4c8,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA14'
ucs => 0xFA14,
code => 0x8ff4c8,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA14'
},
{
direction => BOTH,
ucs => 0xFA15,
code => 0x8ff4ce,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA15'
ucs => 0xFA15,
code => 0x8ff4ce,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA15'
},
{
direction => BOTH,
ucs => 0xFA16,
code => 0x8ff4cf,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA16'
ucs => 0xFA16,
code => 0x8ff4cf,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA16'
},
{
direction => BOTH,
ucs => 0xFA17,
code => 0x8ff4d3,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA17'
ucs => 0xFA17,
code => 0x8ff4d3,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA17'
},
{
direction => BOTH,
ucs => 0xFA18,
code => 0x8ff4d5,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA18'
ucs => 0xFA18,
code => 0x8ff4d5,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA18'
},
{
direction => BOTH,
ucs => 0xFA19,
code => 0x8ff4d6,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA19'
ucs => 0xFA19,
code => 0x8ff4d6,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA19'
},
{
direction => BOTH,
ucs => 0xFA1A,
code => 0x8ff4d7,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA1A'
ucs => 0xFA1A,
code => 0x8ff4d7,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA1A'
},
{
direction => BOTH,
ucs => 0xFA1B,
code => 0x8ff4d8,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA1B'
ucs => 0xFA1B,
code => 0x8ff4d8,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA1B'
},
{
direction => BOTH,
ucs => 0xFA1C,
code => 0x8ff4da,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA1C'
ucs => 0xFA1C,
code => 0x8ff4da,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA1C'
},
{
direction => BOTH,
ucs => 0xFA1D,
code => 0x8ff4db,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA1D'
ucs => 0xFA1D,
code => 0x8ff4db,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA1D'
},
{
direction => BOTH,
ucs => 0xFA1E,
code => 0x8ff4de,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA1E'
ucs => 0xFA1E,
code => 0x8ff4de,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA1E'
},
{
direction => BOTH,
ucs => 0xFA1F,
code => 0x8ff4e0,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA1F'
ucs => 0xFA1F,
code => 0x8ff4e0,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA1F'
},
{
direction => BOTH,
ucs => 0xFA20,
code => 0x8ff4e2,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA20'
ucs => 0xFA20,
code => 0x8ff4e2,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA20'
},
{
direction => BOTH,
ucs => 0xFA21,
code => 0x8ff4e3,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA21'
ucs => 0xFA21,
code => 0x8ff4e3,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA21'
},
{
direction => BOTH,
ucs => 0xFA22,
code => 0x8ff4e5,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA22'
ucs => 0xFA22,
code => 0x8ff4e5,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA22'
},
{
direction => BOTH,
ucs => 0xFA23,
code => 0x8ff4e9,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA23'
ucs => 0xFA23,
code => 0x8ff4e9,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA23'
},
{
direction => BOTH,
ucs => 0xFA24,
code => 0x8ff4ea,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA24'
ucs => 0xFA24,
code => 0x8ff4ea,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA24'
},
{
direction => BOTH,
ucs => 0xFA25,
code => 0x8ff4eb,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA25'
ucs => 0xFA25,
code => 0x8ff4eb,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA25'
},
{
direction => BOTH,
ucs => 0xFA26,
code => 0x8ff4ed,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA26'
ucs => 0xFA26,
code => 0x8ff4ed,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA26'
},
{
direction => BOTH,
ucs => 0xFA27,
code => 0x8ff4ef,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA27'
ucs => 0xFA27,
code => 0x8ff4ef,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA27'
},
{
direction => BOTH,
ucs => 0xFA28,
code => 0x8ff4f0,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA28'
ucs => 0xFA28,
code => 0x8ff4f0,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA28'
},
{
direction => BOTH,
ucs => 0xFA29,
code => 0x8ff4f3,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA29'
ucs => 0xFA29,
code => 0x8ff4f3,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA29'
},
{
direction => BOTH,
ucs => 0xFA2A,
code => 0x8ff4f7,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA2A'
ucs => 0xFA2A,
code => 0x8ff4f7,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA2A'
},
{
direction => BOTH,
ucs => 0xFA2B,
code => 0x8ff4f8,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA2B'
ucs => 0xFA2B,
code => 0x8ff4f8,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA2B'
},
{
direction => BOTH,
ucs => 0xFA2C,
code => 0x8ff4f9,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA2C'
ucs => 0xFA2C,
code => 0x8ff4f9,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA2C'
},
{
direction => BOTH,
ucs => 0xFA2D,
code => 0x8ff4fd,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA2D'
ucs => 0xFA2D,
code => 0x8ff4fd,
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA2D'
},
{
direction => BOTH,
ucs => 0xFF07,
code => 0x8ff4a9,
comment => '# FULLWIDTH APOSTROPHE'
ucs => 0xFF07,
code => 0x8ff4a9,
comment => '# FULLWIDTH APOSTROPHE'
},
{
direction => BOTH,
ucs => 0xFFE4,
code => 0x8fa2c3,
comment => '# FULLWIDTH BROKEN BAR'
ucs => 0xFFE4,
code => 0x8fa2c3,
comment => '# FULLWIDTH BROKEN BAR'
},
# additional conversions for EUC_JP -> UTF-8 conversion
{
direction => TO_UNICODE,
ucs => 0x2116,
code => 0x8ff4ac,
comment => '# NUMERO SIGN'
ucs => 0x2116,
code => 0x8ff4ac,
comment => '# NUMERO SIGN'
},
{
direction => TO_UNICODE,
ucs => 0x2121,
code => 0x8ff4ad,
comment => '# TELEPHONE SIGN'
ucs => 0x2121,
code => 0x8ff4ad,
comment => '# TELEPHONE SIGN'
},
{
direction => TO_UNICODE,
ucs => 0x3231,
code => 0x8ff4ab,
comment => '# PARENTHESIZED IDEOGRAPH STOCK'
ucs => 0x3231,
code => 0x8ff4ab,
comment => '# PARENTHESIZED IDEOGRAPH STOCK'
});
print_conversion_tables($this_script, "EUC_JP", \@mapping);

View File

@@ -36,27 +36,27 @@ foreach my $i (@$mapping)
push @$mapping,
( {
direction => BOTH,
ucs => 0x20AC,
code => 0xa2e6,
comment => '# EURO SIGN',
f => $this_script,
l => __LINE__
ucs => 0x20AC,
code => 0xa2e6,
comment => '# EURO SIGN',
f => $this_script,
l => __LINE__
},
{
direction => BOTH,
ucs => 0x00AE,
code => 0xa2e7,
comment => '# REGISTERED SIGN',
f => $this_script,
l => __LINE__
ucs => 0x00AE,
code => 0xa2e7,
comment => '# REGISTERED SIGN',
f => $this_script,
l => __LINE__
},
{
direction => BOTH,
ucs => 0x327E,
code => 0xa2e8,
comment => '# CIRCLED HANGUL IEUNG U',
f => $this_script,
l => __LINE__
ucs => 0x327E,
code => 0xa2e8,
comment => '# CIRCLED HANGUL IEUNG U',
f => $this_script,
l => __LINE__
});
print_conversion_tables($this_script, "EUC_KR", $mapping);

View File

@@ -30,8 +30,8 @@ my @extras;
foreach my $i (@$mapping)
{
my $ucs = $i->{ucs};
my $code = $i->{code};
my $ucs = $i->{ucs};
my $code = $i->{code};
my $origcode = $i->{code};
my $plane = ($code & 0x1f0000) >> 16;
@@ -56,12 +56,12 @@ foreach my $i (@$mapping)
{
push @extras,
{
ucs => $i->{ucs},
code => ($i->{code} + 0x8ea10000),
rest => $i->{rest},
ucs => $i->{ucs},
code => ($i->{code} + 0x8ea10000),
rest => $i->{rest},
direction => TO_UNICODE,
f => $i->{f},
l => $i->{l}
f => $i->{f},
l => $i->{l}
};
}
}

View File

@@ -33,17 +33,17 @@ while (<$in>)
next if (!m/<a u="([0-9A-F]+)" b="([0-9A-F ]+)"/);
my ($u, $c) = ($1, $2);
$c =~ s/ //g;
my $ucs = hex($u);
my $ucs = hex($u);
my $code = hex($c);
if ($code >= 0x80 && $ucs >= 0x0080)
{
push @mapping,
{
ucs => $ucs,
code => $code,
ucs => $ucs,
code => $code,
direction => BOTH,
f => $in_file,
l => $.
f => $in_file,
l => $.
};
}
}

View File

@@ -30,27 +30,27 @@ my $mapping = &read_source("JOHAB.TXT");
push @$mapping,
( {
direction => BOTH,
ucs => 0x20AC,
code => 0xd9e6,
comment => '# EURO SIGN',
f => $this_script,
l => __LINE__
ucs => 0x20AC,
code => 0xd9e6,
comment => '# EURO SIGN',
f => $this_script,
l => __LINE__
},
{
direction => BOTH,
ucs => 0x00AE,
code => 0xd9e7,
comment => '# REGISTERED SIGN',
f => $this_script,
l => __LINE__
ucs => 0x00AE,
code => 0xd9e7,
comment => '# REGISTERED SIGN',
f => $this_script,
l => __LINE__
},
{
direction => BOTH,
ucs => 0x327E,
code => 0xd9e8,
comment => '# CIRCLED HANGUL IEUNG U',
f => $this_script,
l => __LINE__
ucs => 0x327E,
code => 0xd9e8,
comment => '# CIRCLED HANGUL IEUNG U',
f => $this_script,
l => __LINE__
});
print_conversion_tables($this_script, "JOHAB", $mapping);

View File

@@ -37,13 +37,13 @@ while (my $line = <$in>)
push @mapping,
{
code => $code,
ucs => $ucs1,
code => $code,
ucs => $ucs1,
ucs_second => $ucs2,
comment => $rest,
direction => BOTH,
f => $in_file,
l => $.
comment => $rest,
direction => BOTH,
f => $in_file,
l => $.
};
}
elsif ($line =~ /^0x(\w+)\s*U\+(\w+)\s*#\s*(\S.*)?\s*$/)
@@ -51,7 +51,7 @@ while (my $line = <$in>)
# non-combined characters
my ($c, $u, $rest) = ($1, $2, "U+" . $2 . $3);
my $ucs = hex($u);
my $ucs = hex($u);
my $code = hex($c);
my $direction;
@@ -74,12 +74,12 @@ while (my $line = <$in>)
push @mapping,
{
code => $code,
ucs => $ucs,
comment => $rest,
code => $code,
ucs => $ucs,
comment => $rest,
direction => $direction,
f => $in_file,
l => $.
f => $in_file,
l => $.
};
}
}

View File

@@ -22,13 +22,13 @@ my $mapping = read_source("CP932.TXT");
# Drop these SJIS codes from the source for UTF8=>SJIS conversion
my @reject_sjis = (
0xed40 .. 0xeefc, 0x8754 .. 0x875d, 0x878a, 0x8782,
0x8784, 0xfa5b, 0xfa54, 0x8790 .. 0x8792,
0x8784, 0xfa5b, 0xfa54, 0x8790 .. 0x8792,
0x8795 .. 0x8797, 0x879a .. 0x879c);
foreach my $i (@$mapping)
{
my $code = $i->{code};
my $ucs = $i->{ucs};
my $ucs = $i->{ucs};
if (grep { $code == $_ } @reject_sjis)
{
@@ -40,67 +40,67 @@ foreach my $i (@$mapping)
push @$mapping,
( {
direction => FROM_UNICODE,
ucs => 0x00a2,
code => 0x8191,
comment => '# CENT SIGN',
f => $this_script,
l => __LINE__
ucs => 0x00a2,
code => 0x8191,
comment => '# CENT SIGN',
f => $this_script,
l => __LINE__
},
{
direction => FROM_UNICODE,
ucs => 0x00a3,
code => 0x8192,
comment => '# POUND SIGN',
f => $this_script,
l => __LINE__
ucs => 0x00a3,
code => 0x8192,
comment => '# POUND SIGN',
f => $this_script,
l => __LINE__
},
{
direction => FROM_UNICODE,
ucs => 0x00a5,
code => 0x5c,
comment => '# YEN SIGN',
f => $this_script,
l => __LINE__
ucs => 0x00a5,
code => 0x5c,
comment => '# YEN SIGN',
f => $this_script,
l => __LINE__
},
{
direction => FROM_UNICODE,
ucs => 0x00ac,
code => 0x81ca,
comment => '# NOT SIGN',
f => $this_script,
l => __LINE__
ucs => 0x00ac,
code => 0x81ca,
comment => '# NOT SIGN',
f => $this_script,
l => __LINE__
},
{
direction => FROM_UNICODE,
ucs => 0x2016,
code => 0x8161,
comment => '# DOUBLE VERTICAL LINE',
f => $this_script,
l => __LINE__
ucs => 0x2016,
code => 0x8161,
comment => '# DOUBLE VERTICAL LINE',
f => $this_script,
l => __LINE__
},
{
direction => FROM_UNICODE,
ucs => 0x203e,
code => 0x7e,
comment => '# OVERLINE',
f => $this_script,
l => __LINE__
ucs => 0x203e,
code => 0x7e,
comment => '# OVERLINE',
f => $this_script,
l => __LINE__
},
{
direction => FROM_UNICODE,
ucs => 0x2212,
code => 0x817c,
comment => '# MINUS SIGN',
f => $this_script,
l => __LINE__
ucs => 0x2212,
code => 0x817c,
comment => '# MINUS SIGN',
f => $this_script,
l => __LINE__
},
{
direction => FROM_UNICODE,
ucs => 0x301c,
code => 0x8160,
comment => '# WAVE DASH',
f => $this_script,
l => __LINE__
ucs => 0x301c,
code => 0x8160,
comment => '# WAVE DASH',
f => $this_script,
l => __LINE__
});
print_conversion_tables($this_script, "SJIS", $mapping);

View File

@@ -33,7 +33,7 @@ while (<$in>)
next if (!m/<a u="([0-9A-F]+)" b="([0-9A-F ]+)"/);
my ($u, $c) = ($1, $2);
$c =~ s/ //g;
my $ucs = hex($u);
my $ucs = hex($u);
my $code = hex($c);
next if ($code == 0x0080 || $code == 0x00FF);
@@ -42,11 +42,11 @@ while (<$in>)
{
push @mapping,
{
ucs => $ucs,
code => $code,
ucs => $ucs,
code => $code,
direction => BOTH,
f => $in_file,
l => $.
f => $in_file,
l => $.
};
}
}
@@ -56,11 +56,11 @@ close($in);
push @mapping,
{
direction => BOTH,
code => 0xa2e8,
ucs => 0x327e,
comment => 'CIRCLED HANGUL IEUNG U',
f => $this_script,
l => __LINE__
code => 0xa2e8,
ucs => 0x327e,
comment => 'CIRCLED HANGUL IEUNG U',
f => $this_script,
l => __LINE__
};
print_conversion_tables($this_script, "UHC", \@mapping);

View File

@@ -23,33 +23,33 @@ use convutils;
my $this_script = 'src/backend/utils/mb/Unicode/UCS_to_most.pl';
my %filename = (
'WIN866' => 'CP866.TXT',
'WIN874' => 'CP874.TXT',
'WIN1250' => 'CP1250.TXT',
'WIN1251' => 'CP1251.TXT',
'WIN1252' => 'CP1252.TXT',
'WIN1253' => 'CP1253.TXT',
'WIN1254' => 'CP1254.TXT',
'WIN1255' => 'CP1255.TXT',
'WIN1256' => 'CP1256.TXT',
'WIN1257' => 'CP1257.TXT',
'WIN1258' => 'CP1258.TXT',
'ISO8859_2' => '8859-2.TXT',
'ISO8859_3' => '8859-3.TXT',
'ISO8859_4' => '8859-4.TXT',
'ISO8859_5' => '8859-5.TXT',
'ISO8859_6' => '8859-6.TXT',
'ISO8859_7' => '8859-7.TXT',
'ISO8859_8' => '8859-8.TXT',
'ISO8859_9' => '8859-9.TXT',
'WIN866' => 'CP866.TXT',
'WIN874' => 'CP874.TXT',
'WIN1250' => 'CP1250.TXT',
'WIN1251' => 'CP1251.TXT',
'WIN1252' => 'CP1252.TXT',
'WIN1253' => 'CP1253.TXT',
'WIN1254' => 'CP1254.TXT',
'WIN1255' => 'CP1255.TXT',
'WIN1256' => 'CP1256.TXT',
'WIN1257' => 'CP1257.TXT',
'WIN1258' => 'CP1258.TXT',
'ISO8859_2' => '8859-2.TXT',
'ISO8859_3' => '8859-3.TXT',
'ISO8859_4' => '8859-4.TXT',
'ISO8859_5' => '8859-5.TXT',
'ISO8859_6' => '8859-6.TXT',
'ISO8859_7' => '8859-7.TXT',
'ISO8859_8' => '8859-8.TXT',
'ISO8859_9' => '8859-9.TXT',
'ISO8859_10' => '8859-10.TXT',
'ISO8859_13' => '8859-13.TXT',
'ISO8859_14' => '8859-14.TXT',
'ISO8859_15' => '8859-15.TXT',
'ISO8859_16' => '8859-16.TXT',
'KOI8R' => 'KOI8-R.TXT',
'KOI8U' => 'KOI8-U.TXT',
'GBK' => 'CP936.TXT');
'KOI8R' => 'KOI8-R.TXT',
'KOI8U' => 'KOI8-U.TXT',
'GBK' => 'CP936.TXT');
# make maps for all encodings if not specified
my @charsets = (scalar(@ARGV) > 0) ? @ARGV : sort keys(%filename);

View File

@@ -16,10 +16,10 @@ our @EXPORT =
# Constants used in the 'direction' field of the character maps
use constant {
NONE => 0,
TO_UNICODE => 1,
NONE => 0,
TO_UNICODE => 1,
FROM_UNICODE => 2,
BOTH => 3
BOTH => 3
};
#######################################################################
@@ -53,12 +53,12 @@ sub read_source
exit;
}
my $out = {
code => hex($1),
ucs => hex($2),
comment => $4,
code => hex($1),
ucs => hex($2),
comment => $4,
direction => BOTH,
f => $fname,
l => $.
f => $fname,
l => $.
};
# Ignore pure ASCII mappings. PostgreSQL character conversion code
@@ -124,14 +124,14 @@ sub print_conversion_tables_direction
my $tblname;
if ($direction == TO_UNICODE)
{
$fname = lc("${csname}_to_utf8.map");
$fname = lc("${csname}_to_utf8.map");
$tblname = lc("${csname}_to_unicode_tree");
print "- Writing ${csname}=>UTF8 conversion table: $fname\n";
}
else
{
$fname = lc("utf8_to_${csname}.map");
$fname = lc("utf8_to_${csname}.map");
$tblname = lc("${csname}_from_unicode_tree");
print "- Writing UTF8=>${csname} conversion table: $fname\n";
@@ -378,10 +378,10 @@ sub print_radix_table
unshift @segments,
{
header => "Dummy map, for invalid values",
header => "Dummy map, for invalid values",
min_idx => 0,
max_idx => $widest_range,
label => "dummy map"
label => "dummy map"
};
###
@@ -397,7 +397,7 @@ sub print_radix_table
###
for (my $j = 0; $j < $#segments - 1; $j++)
{
my $seg = $segments[$j];
my $seg = $segments[$j];
my $nextseg = $segments[ $j + 1 ];
# Count the number of zero values at the end of this segment.
@@ -527,17 +527,17 @@ sub print_radix_table
if ($max_val <= 0xffff)
{
$vals_per_line = 8;
$colwidth = 4;
$colwidth = 4;
}
elsif ($max_val <= 0xffffff)
{
$vals_per_line = 4;
$colwidth = 6;
$colwidth = 6;
}
else
{
$vals_per_line = 4;
$colwidth = 8;
$colwidth = 8;
}
###
@@ -607,8 +607,10 @@ sub print_radix_table
# Print the next line's worth of values.
# XXX pad to begin at a nice boundary
printf $out " /* %02x */ ", $i;
for (my $j = 0;
$j < $vals_per_line && $i <= $seg->{max_idx}; $j++)
for (
my $j = 0;
$j < $vals_per_line && $i <= $seg->{max_idx};
$j++)
{
# missing values represent zero.
my $val = $seg->{values}->{$i} || 0;
@@ -671,10 +673,10 @@ sub build_segments_recurse
push @segments,
{
header => $header . ", leaf: ${path}xx",
label => $label,
level => $level,
depth => $depth,
path => $path,
label => $label,
level => $level,
depth => $depth,
path => $path,
values => $map
};
}
@@ -696,10 +698,10 @@ sub build_segments_recurse
push @segments,
{
header => $header . ", byte #$level: ${path}xx",
label => $label,
level => $level,
depth => $depth,
path => $path,
label => $label,
level => $level,
depth => $depth,
path => $path,
values => \%children
};
}
@@ -789,12 +791,12 @@ sub make_charmap_combined
if (defined $c->{ucs_second})
{
my $entry = {
utf8 => ucs2utf($c->{ucs}),
utf8 => ucs2utf($c->{ucs}),
utf8_second => ucs2utf($c->{ucs_second}),
code => $c->{code},
comment => $c->{comment},
f => $c->{f},
l => $c->{l}
code => $c->{code},
comment => $c->{comment},
f => $c->{f},
l => $c->{l}
};
push @combined, $entry;
}