aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2017-02-01 11:23:53 +0200
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2017-02-01 11:23:53 +0200
commitbc1686f3f653d30847736f2b71d694b98ba5c31d (patch)
treedc1c1919f9f2bf76c87531a4289603fcc7149a60 /src
parent8a815e3fc318b441a5e8a37e4129660d81e1e012 (diff)
downloadpostgresql-bc1686f3f653d30847736f2b71d694b98ba5c31d.tar.gz
postgresql-bc1686f3f653d30847736f2b71d694b98ba5c31d.zip
Small fixes to the Perl scripts to create unicode conversion tables.
Add missing semicolons in UCS_to_* perl scripts. For consistency, use "$hashref->{key}" style everywhere. Kyotaro Horiguchi Discussion: https://www.postgresql.org/message-id/20170130.153738.139030994.horiguchi.kyotaro@lab.ntt.co.jp
Diffstat (limited to 'src')
-rwxr-xr-xsrc/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl2
-rwxr-xr-xsrc/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl2
-rwxr-xr-xsrc/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl2
-rwxr-xr-xsrc/backend/utils/mb/Unicode/UCS_to_GB18030.pl2
-rwxr-xr-xsrc/backend/utils/mb/Unicode/UCS_to_UHC.pl2
-rw-r--r--src/backend/utils/mb/Unicode/convutils.pm28
6 files changed, 19 insertions, 19 deletions
diff --git a/src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl b/src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl
index 7566104f337..4f4375eb8f1 100755
--- a/src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl
+++ b/src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl
@@ -69,7 +69,7 @@ while (<$in>)
ucs => $ucs,
code => $code,
direction => 'both'
- }
+ };
}
close($in);
diff --git a/src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl b/src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl
index b70f7144c76..926d2d8b30d 100755
--- a/src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl
+++ b/src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl
@@ -218,7 +218,7 @@ sub sjis2jis
$pos = $pos - ((31 * 0x5e) + 12);
# after 85-ku 82-ten needs to be moved 2 codepoints
- $pos = $pos - 2 if ($pos >= 84 * 0x5c + 82)
+ $pos = $pos - 2 if ($pos >= 84 * 0x5c + 82);
}
my $hi2 = $pos / 0x5e;
diff --git a/src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl b/src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl
index 91699f6d20e..296ed2bc1ec 100755
--- a/src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl
+++ b/src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl
@@ -55,7 +55,7 @@ foreach my $i (@$mapping)
code => ($i->{code} + 0x8ea10000),
rest => $i->{rest},
direction => 'to_unicode'
- }
+ };
}
}
diff --git a/src/backend/utils/mb/Unicode/UCS_to_GB18030.pl b/src/backend/utils/mb/Unicode/UCS_to_GB18030.pl
index 701c35cfa72..f754611ce80 100755
--- a/src/backend/utils/mb/Unicode/UCS_to_GB18030.pl
+++ b/src/backend/utils/mb/Unicode/UCS_to_GB18030.pl
@@ -37,7 +37,7 @@ while (<$in>)
ucs => $ucs,
code => $code,
direction => 'both'
- }
+ };
}
}
close($in);
diff --git a/src/backend/utils/mb/Unicode/UCS_to_UHC.pl b/src/backend/utils/mb/Unicode/UCS_to_UHC.pl
index 45c6db538ce..a65c537820f 100755
--- a/src/backend/utils/mb/Unicode/UCS_to_UHC.pl
+++ b/src/backend/utils/mb/Unicode/UCS_to_UHC.pl
@@ -40,7 +40,7 @@ while (<$in>)
ucs => $ucs,
code => $code,
direction => 'both'
- }
+ };
}
}
close($in);
diff --git a/src/backend/utils/mb/Unicode/convutils.pm b/src/backend/utils/mb/Unicode/convutils.pm
index 7adcee48570..0ae79a2f331 100644
--- a/src/backend/utils/mb/Unicode/convutils.pm
+++ b/src/backend/utils/mb/Unicode/convutils.pm
@@ -168,20 +168,20 @@ sub print_from_utf8_map
"static const pg_utf_to_local ULmap${charset}[ %d ] = {",
scalar(@$table));
my $first = 1;
- foreach my $i (sort {$$a{utf8} <=> $$b{utf8}} @$table)
+ foreach my $i (sort {$a->{utf8} <=> $b->{utf8}} @$table)
{
print($out ",") if (!$first);
$first = 0;
print($out "\t/* $last_comment */") if ($verbose);
- printf($out "\n {0x%04x, 0x%04x}", $$i{utf8}, $$i{code});
+ printf($out "\n {0x%04x, 0x%04x}", $i->{utf8}, $i->{code});
if ($verbose >= 2)
{
- $last_comment = "$$i{f}:$$i{l} $$i{comment}";
+ $last_comment = "$i->{f}:$i->{l} $i->{comment}";
}
else
{
- $last_comment = $$i{comment};
+ $last_comment = $i->{comment};
}
}
print($out "\t/* $last_comment */") if ($verbose);
@@ -202,14 +202,14 @@ sub print_from_utf8_combined_map
"static const pg_utf_to_local_combined ULmap${charset}_combined[ %d ] = {",
scalar(@$table));
my $first = 1;
- foreach my $i (sort {$$a{utf8} <=> $$b{utf8}} @$table)
+ foreach my $i (sort {$a->{utf8} <=> $b->{utf8}} @$table)
{
print($out ",") if (!$first);
$first = 0;
print($out "\t/* $last_comment */") if ($verbose);
- printf($out "\n {0x%08x, 0x%08x, 0x%04x}", $$i{utf8}, $$i{utf8_second}, $$i{code});
- $last_comment = "$$i{comment}";
+ printf($out "\n {0x%08x, 0x%08x, 0x%04x}", $i->{utf8}, $i->{utf8_second}, $i->{code});
+ $last_comment = "$i->{comment}";
}
print($out "\t/* $last_comment */") if ($verbose);
print $out "\n};\n";
@@ -230,20 +230,20 @@ sub print_to_utf8_map
"static const pg_local_to_utf LUmap${charset}[ %d ] = {",
scalar(@$table));
my $first = 1;
- foreach my $i (sort {$$a{code} <=> $$b{code}} @$table)
+ foreach my $i (sort {$a->{code} <=> $b->{code}} @$table)
{
print($out ",") if (!$first);
$first = 0;
print($out "\t/* $last_comment */") if ($verbose);
- printf($out "\n {0x%04x, 0x%x}", $$i{code}, $$i{utf8});
+ printf($out "\n {0x%04x, 0x%x}", $i->{code}, $i->{utf8});
if ($verbose >= 2)
{
- $last_comment = "$$i{f}:$$i{l} $$i{comment}";
+ $last_comment = "$i->{f}:$i->{l} $i->{comment}";
}
else
{
- $last_comment = $$i{comment};
+ $last_comment = $i->{comment};
}
}
print($out "\t/* $last_comment */") if ($verbose);
@@ -265,14 +265,14 @@ sub print_to_utf8_combined_map
"static const pg_local_to_utf_combined LUmap${charset}_combined[ %d ] = {",
scalar(@$table));
my $first = 1;
- foreach my $i (sort {$$a{code} <=> $$b{code}} @$table)
+ foreach my $i (sort {$a->{code} <=> $b->{code}} @$table)
{
print($out ",") if (!$first);
$first = 0;
print($out "\t/* $last_comment */") if ($verbose);
- printf($out "\n {0x%04x, 0x%08x, 0x%08x}", $$i{code}, $$i{utf8}, $$i{utf8_second});
- $last_comment = "$$i{comment}";
+ printf($out "\n {0x%04x, 0x%08x, 0x%08x}", $i->{code}, $i->{utf8}, $i->{utf8_second});
+ $last_comment = "$i->{comment}";
}
print($out "\t/* $last_comment */") if ($verbose);
print $out "\n};\n";