Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbc1686f

Browse files
committed
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 HoriguchiDiscussion:https://www.postgresql.org/message-id/20170130.153738.139030994.horiguchi.kyotaro@lab.ntt.co.jp
1 parent8a815e3 commitbc1686f

File tree

6 files changed

+19
-19
lines changed

6 files changed

+19
-19
lines changed

‎src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
ucs=>$ucs,
7070
code=>$code,
7171
direction=>'both'
72-
}
72+
};
7373
}
7474
close($in);
7575

‎src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ sub sjis2jis
218218
$pos =$pos - ((31 * 0x5e) + 12);
219219

220220
# after 85-ku 82-ten needs to be moved 2 codepoints
221-
$pos =$pos - 2if ($pos >= 84 * 0x5c + 82)
221+
$pos =$pos - 2if ($pos >= 84 * 0x5c + 82);
222222
}
223223

224224
my$hi2 =$pos / 0x5e;

‎src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
code=> ($i->{code} + 0x8ea10000),
5656
rest=>$i->{rest},
5757
direction=>'to_unicode'
58-
}
58+
};
5959
}
6060
}
6161

‎src/backend/utils/mb/Unicode/UCS_to_GB18030.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
ucs=>$ucs,
3838
code=>$code,
3939
direction=>'both'
40-
}
40+
};
4141
}
4242
}
4343
close($in);

‎src/backend/utils/mb/Unicode/UCS_to_UHC.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
ucs=>$ucs,
4141
code=>$code,
4242
direction=>'both'
43-
}
43+
};
4444
}
4545
}
4646
close($in);

‎src/backend/utils/mb/Unicode/convutils.pm

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -168,20 +168,20 @@ sub print_from_utf8_map
168168
"static const pg_utf_to_local ULmap${charset}[%d ] = {",
169169
scalar(@$table));
170170
my$first = 1;
171-
foreachmy$i (sort {$$a{utf8}<=>$$b{utf8}}@$table)
171+
foreachmy$i (sort {$a->{utf8}<=>$b->{utf8}}@$table)
172172
{
173173
print($out",")if (!$first);
174174
$first = 0;
175175
print($out"\t/*$last_comment */")if ($verbose);
176176

177-
printf($out"\n {0x%04x, 0x%04x}",$$i{utf8},$$i{code});
177+
printf($out"\n {0x%04x, 0x%04x}",$i->{utf8},$i->{code});
178178
if ($verbose >= 2)
179179
{
180-
$last_comment ="$$i{f}:$$i{l}$$i{comment}";
180+
$last_comment ="$i->{f}:$i->{l}$i->{comment}";
181181
}
182182
else
183183
{
184-
$last_comment =$$i{comment};
184+
$last_comment =$i->{comment};
185185
}
186186
}
187187
print($out"\t/*$last_comment */")if ($verbose);
@@ -202,14 +202,14 @@ sub print_from_utf8_combined_map
202202
"static const pg_utf_to_local_combined ULmap${charset}_combined[%d ] = {",
203203
scalar(@$table));
204204
my$first = 1;
205-
foreachmy$i (sort {$$a{utf8}<=>$$b{utf8}}@$table)
205+
foreachmy$i (sort {$a->{utf8}<=>$b->{utf8}}@$table)
206206
{
207207
print($out",")if (!$first);
208208
$first = 0;
209209
print($out"\t/*$last_comment */")if ($verbose);
210210

211-
printf($out"\n {0x%08x, 0x%08x, 0x%04x}",$$i{utf8},$$i{utf8_second},$$i{code});
212-
$last_comment ="$$i{comment}";
211+
printf($out"\n {0x%08x, 0x%08x, 0x%04x}",$i->{utf8},$i->{utf8_second},$i->{code});
212+
$last_comment ="$i->{comment}";
213213
}
214214
print($out"\t/*$last_comment */")if ($verbose);
215215
print$out"\n};\n";
@@ -230,20 +230,20 @@ sub print_to_utf8_map
230230
"static const pg_local_to_utf LUmap${charset}[%d ] = {",
231231
scalar(@$table));
232232
my$first = 1;
233-
foreachmy$i (sort {$$a{code}<=>$$b{code}}@$table)
233+
foreachmy$i (sort {$a->{code}<=>$b->{code}}@$table)
234234
{
235235
print($out",")if (!$first);
236236
$first = 0;
237237
print($out"\t/*$last_comment */")if ($verbose);
238238

239-
printf($out"\n {0x%04x, 0x%x}",$$i{code},$$i{utf8});
239+
printf($out"\n {0x%04x, 0x%x}",$i->{code},$i->{utf8});
240240
if ($verbose >= 2)
241241
{
242-
$last_comment ="$$i{f}:$$i{l}$$i{comment}";
242+
$last_comment ="$i->{f}:$i->{l}$i->{comment}";
243243
}
244244
else
245245
{
246-
$last_comment =$$i{comment};
246+
$last_comment =$i->{comment};
247247
}
248248
}
249249
print($out"\t/*$last_comment */")if ($verbose);
@@ -265,14 +265,14 @@ sub print_to_utf8_combined_map
265265
"static const pg_local_to_utf_combined LUmap${charset}_combined[%d ] = {",
266266
scalar(@$table));
267267
my$first = 1;
268-
foreachmy$i (sort {$$a{code}<=>$$b{code}}@$table)
268+
foreachmy$i (sort {$a->{code}<=>$b->{code}}@$table)
269269
{
270270
print($out",")if (!$first);
271271
$first = 0;
272272
print($out"\t/*$last_comment */")if ($verbose);
273273

274-
printf($out"\n {0x%04x, 0x%08x, 0x%08x}",$$i{code},$$i{utf8},$$i{utf8_second});
275-
$last_comment ="$$i{comment}";
274+
printf($out"\n {0x%04x, 0x%08x, 0x%08x}",$i->{code},$i->{utf8},$i->{utf8_second});
275+
$last_comment ="$i->{comment}";
276276
}
277277
print($out"\t/*$last_comment */")if ($verbose);
278278
print$out"\n};\n";

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp