I have accumulated a few patches to improve the output of the scripts in
src/backend/utils/mb/Unicode/ to be less non-standard-looking and fix a
few other minor things in that area.
v1-0001-Make-Unicode-makefile-more-parallel-safe.patch
The makefile rule that calls UCS_to_most.pl was written incorrectly for
parallel make. The script writes all output files in one go, but the
rule as written would call the command once for each output file in
parallel.
v1-0002-Make-UCS_to_most.pl-process-encodings-in-sorted-o.patch
This mainly just helps eyeball the output while debugging the previous
patch.
v1-0003-Remove-some-whitespace-in-generated-C-output.patch
Improve a small formatting issue in the output.
v1-0004-Simplify-code-generation-code.patch
This simplifies the code a bit, which helps with the next patch.
v1-0005-Fix-indentation-in-generated-output.patch
This changes the indentation in the output from two spaces to a tab.
I haven't included the actual output changes in the last patch, because
they would be huge, but the idea should be clear.
All together, these make the output look closer to how pgindent would
make it.
From 3dce99c8e57aec91db85965b6cef947484c00a5e Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <pe...@eisentraut.org>
Date: Tue, 22 Jun 2021 09:06:28 +0200
Subject: [PATCH v1 1/5] Make Unicode makefile more parallel-safe
---
src/backend/utils/mb/Unicode/Makefile | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/backend/utils/mb/Unicode/Makefile
b/src/backend/utils/mb/Unicode/Makefile
index ed6fc07e08..4969b8c385 100644
--- a/src/backend/utils/mb/Unicode/Makefile
+++ b/src/backend/utils/mb/Unicode/Makefile
@@ -72,7 +72,9 @@ GENERICTEXTS = $(ISO8859TEXTS) $(WINTEXTS) \
all: $(MAPS)
-$(GENERICMAPS): UCS_to_most.pl $(GENERICTEXTS)
+$(wordlist 2, $(words $(GENERICMAPS)), $(GENERICMAPS)): $(firstword
$(GENERICMAPS)) ;
+
+$(firstword $(GENERICMAPS)): UCS_to_most.pl $(GENERICTEXTS)
$(PERL) -I $(srcdir) $<
johab_to_utf8.map utf8_to_johab.map: UCS_to_JOHAB.pl JOHAB.TXT
--
2.32.0
From 291f0acfd5331ab2f29710b156c40b0dad703ca2 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <pe...@eisentraut.org>
Date: Tue, 22 Jun 2021 09:06:28 +0200
Subject: [PATCH v1 2/5] Make UCS_to_most.pl process encodings in sorted order
This just makes the progress output easier to follow.
---
src/backend/utils/mb/Unicode/UCS_to_most.pl | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/backend/utils/mb/Unicode/UCS_to_most.pl
b/src/backend/utils/mb/Unicode/UCS_to_most.pl
index 4f974388d7..6b699b376d 100755
--- a/src/backend/utils/mb/Unicode/UCS_to_most.pl
+++ b/src/backend/utils/mb/Unicode/UCS_to_most.pl
@@ -54,7 +54,8 @@
# make maps for all encodings if not specified
my @charsets = (scalar(@ARGV) > 0) ? @ARGV : sort keys(%filename);
-foreach my $charset (@charsets)
+# the sort is just so that the output is easier to eyeball
+foreach my $charset (sort @charsets)
{
my $mapping = &read_source($filename{$charset});
--
2.32.0
From 242440c79a10aab92e1293e1441dc963fd26e2ce Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <pe...@eisentraut.org>
Date: Tue, 22 Jun 2021 09:06:28 +0200
Subject: [PATCH v1 3/5] Remove some whitespace in generated C output
It doesn't match the normal coding style.
---
src/backend/utils/mb/Unicode/convutils.pm | 4 ++--
src/backend/utils/mb/Unicode/euc_jis_2004_to_utf8.map | 2 +-
src/backend/utils/mb/Unicode/shift_jis_2004_to_utf8.map | 2 +-
src/backend/utils/mb/Unicode/utf8_to_euc_jis_2004.map | 2 +-
src/backend/utils/mb/Unicode/utf8_to_shift_jis_2004.map | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/backend/utils/mb/Unicode/convutils.pm
b/src/backend/utils/mb/Unicode/convutils.pm
index 5ad38514be..8369e91b2d 100644
--- a/src/backend/utils/mb/Unicode/convutils.pm
+++ b/src/backend/utils/mb/Unicode/convutils.pm
@@ -173,7 +173,7 @@ sub print_from_utf8_combined_map
printf $out "\n/* Combined character map */\n";
printf $out
- "static const pg_utf_to_local_combined ULmap${charset}_combined[ %d ]
= {",
+ "static const pg_utf_to_local_combined ULmap${charset}_combined[%d] =
{\n",
scalar(@$table);
my $first = 1;
foreach my $i (sort { $a->{utf8} <=> $b->{utf8} } @$table)
@@ -208,7 +208,7 @@ sub print_to_utf8_combined_map
printf $out "\n/* Combined character map */\n";
printf $out
- "static const pg_local_to_utf_combined LUmap${charset}_combined[ %d ]
= {",
+ "static const pg_local_to_utf_combined LUmap${charset}_combined[%d] =
{\n",
scalar(@$table);
my $first = 1;
diff --git a/src/backend/utils/mb/Unicode/euc_jis_2004_to_utf8.map
b/src/backend/utils/mb/Unicode/euc_jis_2004_to_utf8.map
index d2da4a383b..3a8fc9d26f 100644
--- a/src/backend/utils/mb/Unicode/euc_jis_2004_to_utf8.map
+++ b/src/backend/utils/mb/Unicode/euc_jis_2004_to_utf8.map
@@ -3414,7 +3414,7 @@ static const uint32
euc_jis_2004_to_unicode_tree_table[11727] =
};
/* Combined character map */
-static const pg_local_to_utf_combined LUmapEUC_JIS_2004_combined[ 25 ] = {
+static const pg_local_to_utf_combined LUmapEUC_JIS_2004_combined[25] = {
{0xa4f7, 0x00e3818b, 0x00e3829a}, /* U+304B+309A [2000] */
{0xa4f8, 0x00e3818d, 0x00e3829a}, /* U+304D+309A [2000] */
{0xa4f9, 0x00e3818f, 0x00e3829a}, /* U+304F+309A [2000] */
diff --git a/src/backend/utils/mb/Unicode/shift_jis_2004_to_utf8.map
b/src/backend/utils/mb/Unicode/shift_jis_2004_to_utf8.map
index e591a1135b..3c107cbb7b 100644
--- a/src/backend/utils/mb/Unicode/shift_jis_2004_to_utf8.map
+++ b/src/backend/utils/mb/Unicode/shift_jis_2004_to_utf8.map
@@ -3205,7 +3205,7 @@ static const uint32
shift_jis_2004_to_unicode_tree_table[11716] =
};
/* Combined character map */
-static const pg_local_to_utf_combined LUmapSHIFT_JIS_2004_combined[ 25 ] = {
+static const pg_local_to_utf_combined LUmapSHIFT_JIS_2004_combined[25] = {
{0x82f5, 0x00e3818b, 0x00e3829a}, /* U+304B+309A [2000] */
{0x82f6, 0x00e3818d, 0x00e3829a}, /* U+304D+309A [2000] */
{0x82f7, 0x00e3818f, 0x00e3829a}, /* U+304F+309A [2000] */
diff --git a/src/backend/utils/mb/Unicode/utf8_to_euc_jis_2004.map
b/src/backend/utils/mb/Unicode/utf8_to_euc_jis_2004.map
index fa90f3958f..0d47463805 100644
--- a/src/backend/utils/mb/Unicode/utf8_to_euc_jis_2004.map
+++ b/src/backend/utils/mb/Unicode/utf8_to_euc_jis_2004.map
@@ -12538,7 +12538,7 @@ static const uint32
euc_jis_2004_from_unicode_tree_table[39163] =
};
/* Combined character map */
-static const pg_utf_to_local_combined ULmapEUC_JIS_2004_combined[ 25 ] = {
+static const pg_utf_to_local_combined ULmapEUC_JIS_2004_combined[25] = {
{0x0000c3a6, 0x0000cc80, 0xabc4}, /* U+00E6+0300 [2000] */
{0x0000c994, 0x0000cc80, 0xabc8}, /* U+0254+0300 [2000] */
{0x0000c994, 0x0000cc81, 0xabc9}, /* U+0254+0301 [2000] */
diff --git a/src/backend/utils/mb/Unicode/utf8_to_shift_jis_2004.map
b/src/backend/utils/mb/Unicode/utf8_to_shift_jis_2004.map
index b756b5f157..202ebb25c1 100644
--- a/src/backend/utils/mb/Unicode/utf8_to_shift_jis_2004.map
+++ b/src/backend/utils/mb/Unicode/utf8_to_shift_jis_2004.map
@@ -7656,7 +7656,7 @@ static const uint16
shift_jis_2004_from_unicode_tree_table[39196] =
};
/* Combined character map */
-static const pg_utf_to_local_combined ULmapSHIFT_JIS_2004_combined[ 25 ] = {
+static const pg_utf_to_local_combined ULmapSHIFT_JIS_2004_combined[25] = {
{0x0000c3a6, 0x0000cc80, 0x8663}, /* U+00E6+0300 [2000] */
{0x0000c994, 0x0000cc80, 0x8667}, /* U+0254+0300 [2000] */
{0x0000c994, 0x0000cc81, 0x8668}, /* U+0254+0301 [2000] */
--
2.32.0
From 9dd3a3be9cb08fd05db26acbbe4800f4bf82e5ab Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <pe...@eisentraut.org>
Date: Tue, 22 Jun 2021 09:06:28 +0200
Subject: [PATCH v1 4/5] Simplify code generation code
convutils.pm spent a fair amount of effort to avoid printing out a
trailing comma in an array initializer, which isn't actually
necessary. We can simplify that code. This also makes the generated
code look better indented.
---
src/backend/utils/mb/Unicode/convutils.pm | 37 +++++++------------
.../utils/mb/Unicode/euc_jis_2004_to_utf8.map | 2 +-
.../mb/Unicode/shift_jis_2004_to_utf8.map | 2 +-
.../utils/mb/Unicode/utf8_to_euc_jis_2004.map | 2 +-
.../mb/Unicode/utf8_to_shift_jis_2004.map | 2 +-
5 files changed, 18 insertions(+), 27 deletions(-)
diff --git a/src/backend/utils/mb/Unicode/convutils.pm
b/src/backend/utils/mb/Unicode/convutils.pm
index 8369e91b2d..9a230e6dfe 100644
--- a/src/backend/utils/mb/Unicode/convutils.pm
+++ b/src/backend/utils/mb/Unicode/convutils.pm
@@ -169,34 +169,29 @@ sub print_from_utf8_combined_map
{
my ($out, $charset, $table, $verbose) = @_;
- my $last_comment = "";
-
printf $out "\n/* Combined character map */\n";
printf $out
"static const pg_utf_to_local_combined ULmap${charset}_combined[%d] =
{\n",
scalar(@$table);
- my $first = 1;
foreach my $i (sort { $a->{utf8} <=> $b->{utf8} } @$table)
{
- print($out ",") if (!$first);
- $first = 0;
- print $out "\t/* $last_comment */"
- if ($verbose && $last_comment ne "");
+ my $comment;
- printf $out "\n {0x%08x, 0x%08x, 0x%04x}",
+ printf $out " {0x%08x, 0x%08x, 0x%04x},",
$i->{utf8}, $i->{utf8_second}, $i->{code};
if ($verbose >= 2)
{
- $last_comment =
+ $comment =
sprintf("%s:%d %s", $i->{f}, $i->{l}, $i->{comment});
}
elsif ($verbose >= 1)
{
- $last_comment = $i->{comment};
+ $comment = $i->{comment};
}
+ print $out "\t/* $comment */" if $comment;
+ print $out "\n";
}
- print $out "\t/* $last_comment */" if ($verbose && $last_comment ne "");
- print $out "\n};\n";
+ print $out "};\n";
return;
}
@@ -204,8 +199,6 @@ sub print_to_utf8_combined_map
{
my ($out, $charset, $table, $verbose) = @_;
- my $last_comment = "";
-
printf $out "\n/* Combined character map */\n";
printf $out
"static const pg_local_to_utf_combined LUmap${charset}_combined[%d] =
{\n",
@@ -214,26 +207,24 @@ sub print_to_utf8_combined_map
my $first = 1;
foreach my $i (sort { $a->{code} <=> $b->{code} } @$table)
{
- print($out ",") if (!$first);
- $first = 0;
- print $out "\t/* $last_comment */"
- if ($verbose && $last_comment ne "");
+ my $comment;
- printf $out "\n {0x%04x, 0x%08x, 0x%08x}",
+ printf $out " {0x%04x, 0x%08x, 0x%08x},",
$i->{code}, $i->{utf8}, $i->{utf8_second};
if ($verbose >= 2)
{
- $last_comment =
+ $comment =
sprintf("%s:%d %s", $i->{f}, $i->{l}, $i->{comment});
}
elsif ($verbose >= 1)
{
- $last_comment = $i->{comment};
+ $comment = $i->{comment};
}
+ print $out "\t/* $comment */" if $comment;
+ print $out "\n";
}
- print $out "\t/* $last_comment */" if ($verbose && $last_comment ne "");
- print $out "\n};\n";
+ print $out "};\n";
return;
}
diff --git a/src/backend/utils/mb/Unicode/euc_jis_2004_to_utf8.map
b/src/backend/utils/mb/Unicode/euc_jis_2004_to_utf8.map
index 3a8fc9d26f..7096fbb263 100644
--- a/src/backend/utils/mb/Unicode/euc_jis_2004_to_utf8.map
+++ b/src/backend/utils/mb/Unicode/euc_jis_2004_to_utf8.map
@@ -3439,5 +3439,5 @@ static const pg_local_to_utf_combined
LUmapEUC_JIS_2004_combined[25] = {
{0xabce, 0x0000c99a, 0x0000cc80}, /* U+025A+0300 [2000] */
{0xabcf, 0x0000c99a, 0x0000cc81}, /* U+025A+0301 [2000] */
{0xabe5, 0x0000cba9, 0x0000cba5}, /* U+02E9+02E5 [2000] */
- {0xabe6, 0x0000cba5, 0x0000cba9} /* U+02E5+02E9 [2000] */
+ {0xabe6, 0x0000cba5, 0x0000cba9}, /* U+02E5+02E9 [2000] */
};
diff --git a/src/backend/utils/mb/Unicode/shift_jis_2004_to_utf8.map
b/src/backend/utils/mb/Unicode/shift_jis_2004_to_utf8.map
index 3c107cbb7b..cd0bd7a452 100644
--- a/src/backend/utils/mb/Unicode/shift_jis_2004_to_utf8.map
+++ b/src/backend/utils/mb/Unicode/shift_jis_2004_to_utf8.map
@@ -3230,5 +3230,5 @@ static const pg_local_to_utf_combined
LUmapSHIFT_JIS_2004_combined[25] = {
{0x866d, 0x0000c99a, 0x0000cc80}, /* U+025A+0300 [2000] */
{0x866e, 0x0000c99a, 0x0000cc81}, /* U+025A+0301 [2000] */
{0x8685, 0x0000cba9, 0x0000cba5}, /* U+02E9+02E5 [2000] */
- {0x8686, 0x0000cba5, 0x0000cba9} /* U+02E5+02E9 [2000] */
+ {0x8686, 0x0000cba5, 0x0000cba9}, /* U+02E5+02E9 [2000] */
};
diff --git a/src/backend/utils/mb/Unicode/utf8_to_euc_jis_2004.map
b/src/backend/utils/mb/Unicode/utf8_to_euc_jis_2004.map
index 0d47463805..3de9d6360d 100644
--- a/src/backend/utils/mb/Unicode/utf8_to_euc_jis_2004.map
+++ b/src/backend/utils/mb/Unicode/utf8_to_euc_jis_2004.map
@@ -12563,5 +12563,5 @@ static const pg_utf_to_local_combined
ULmapEUC_JIS_2004_combined[25] = {
{0x00e382bb, 0x00e3829a, 0xa5fc}, /* U+30BB+309A [2000] */
{0x00e38384, 0x00e3829a, 0xa5fd}, /* U+30C4+309A [2000] */
{0x00e38388, 0x00e3829a, 0xa5fe}, /* U+30C8+309A [2000] */
- {0x00e387b7, 0x00e3829a, 0xa6f8} /* U+31F7+309A [2000] */
+ {0x00e387b7, 0x00e3829a, 0xa6f8}, /* U+31F7+309A [2000] */
};
diff --git a/src/backend/utils/mb/Unicode/utf8_to_shift_jis_2004.map
b/src/backend/utils/mb/Unicode/utf8_to_shift_jis_2004.map
index 202ebb25c1..924ccc114e 100644
--- a/src/backend/utils/mb/Unicode/utf8_to_shift_jis_2004.map
+++ b/src/backend/utils/mb/Unicode/utf8_to_shift_jis_2004.map
@@ -7681,5 +7681,5 @@ static const pg_utf_to_local_combined
ULmapSHIFT_JIS_2004_combined[25] = {
{0x00e382bb, 0x00e3829a, 0x839c}, /* U+30BB+309A [2000] */
{0x00e38384, 0x00e3829a, 0x839d}, /* U+30C4+309A [2000] */
{0x00e38388, 0x00e3829a, 0x839e}, /* U+30C8+309A [2000] */
- {0x00e387b7, 0x00e3829a, 0x83f6} /* U+31F7+309A [2000] */
+ {0x00e387b7, 0x00e3829a, 0x83f6}, /* U+31F7+309A [2000] */
};
--
2.32.0
From 9ed1c960fe9ea5ac37fc88b4e6088bc3f2387cb4 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <pe...@eisentraut.org>
Date: Tue, 22 Jun 2021 09:06:28 +0200
Subject: [PATCH v1 5/5] Fix indentation in generated output
---
src/backend/utils/mb/Unicode/convutils.pm | 66 +++++++++++------------
1 file changed, 33 insertions(+), 33 deletions(-)
diff --git a/src/backend/utils/mb/Unicode/convutils.pm
b/src/backend/utils/mb/Unicode/convutils.pm
index 9a230e6dfe..4182910f94 100644
--- a/src/backend/utils/mb/Unicode/convutils.pm
+++ b/src/backend/utils/mb/Unicode/convutils.pm
@@ -177,7 +177,7 @@ sub print_from_utf8_combined_map
{
my $comment;
- printf $out " {0x%08x, 0x%08x, 0x%04x},",
+ printf $out "\t{0x%08x, 0x%08x, 0x%04x},",
$i->{utf8}, $i->{utf8_second}, $i->{code};
if ($verbose >= 2)
{
@@ -209,7 +209,7 @@ sub print_to_utf8_combined_map
{
my $comment;
- printf $out " {0x%04x, 0x%08x, 0x%08x},",
+ printf $out "\t{0x%04x, 0x%08x, 0x%08x},",
$i->{code}, $i->{utf8}, $i->{utf8_second};
if ($verbose >= 2)
@@ -540,46 +540,46 @@ sub print_radix_table
printf $out "{\n";
if ($datatype eq "uint16")
{
- print $out " ${tblname}_table,\n";
- print $out " NULL, /* 32-bit table not used */\n";
+ print $out "\t${tblname}_table,\n";
+ print $out "\tNULL, /* 32-bit table not used */\n";
}
if ($datatype eq "uint32")
{
- print $out " NULL, /* 16-bit table not used */\n";
- print $out " ${tblname}_table,\n";
+ print $out "\tNULL, /* 16-bit table not used */\n";
+ print $out "\t${tblname}_table,\n";
}
printf $out "\n";
- printf $out " 0x%04x, /* offset of table for 1-byte inputs */\n",
+ printf $out "\t0x%04x, /* offset of table for 1-byte inputs */\n",
$b1root;
- printf $out " 0x%02x, /* b1_lower */\n", $b1_lower;
- printf $out " 0x%02x, /* b1_upper */\n", $b1_upper;
+ printf $out "\t0x%02x, /* b1_lower */\n", $b1_lower;
+ printf $out "\t0x%02x, /* b1_upper */\n", $b1_upper;
printf $out "\n";
- printf $out " 0x%04x, /* offset of table for 2-byte inputs */\n",
+ printf $out "\t0x%04x, /* offset of table for 2-byte inputs */\n",
$b2root;
- printf $out " 0x%02x, /* b2_1_lower */\n", $b2_1_lower;
- printf $out " 0x%02x, /* b2_1_upper */\n", $b2_1_upper;
- printf $out " 0x%02x, /* b2_2_lower */\n", $b2_2_lower;
- printf $out " 0x%02x, /* b2_2_upper */\n", $b2_2_upper;
+ printf $out "\t0x%02x, /* b2_1_lower */\n", $b2_1_lower;
+ printf $out "\t0x%02x, /* b2_1_upper */\n", $b2_1_upper;
+ printf $out "\t0x%02x, /* b2_2_lower */\n", $b2_2_lower;
+ printf $out "\t0x%02x, /* b2_2_upper */\n", $b2_2_upper;
printf $out "\n";
- printf $out " 0x%04x, /* offset of table for 3-byte inputs */\n",
+ printf $out "\t0x%04x, /* offset of table for 3-byte inputs */\n",
$b3root;
- printf $out " 0x%02x, /* b3_1_lower */\n", $b3_1_lower;
- printf $out " 0x%02x, /* b3_1_upper */\n", $b3_1_upper;
- printf $out " 0x%02x, /* b3_2_lower */\n", $b3_2_lower;
- printf $out " 0x%02x, /* b3_2_upper */\n", $b3_2_upper;
- printf $out " 0x%02x, /* b3_3_lower */\n", $b3_3_lower;
- printf $out " 0x%02x, /* b3_3_upper */\n", $b3_3_upper;
+ printf $out "\t0x%02x, /* b3_1_lower */\n", $b3_1_lower;
+ printf $out "\t0x%02x, /* b3_1_upper */\n", $b3_1_upper;
+ printf $out "\t0x%02x, /* b3_2_lower */\n", $b3_2_lower;
+ printf $out "\t0x%02x, /* b3_2_upper */\n", $b3_2_upper;
+ printf $out "\t0x%02x, /* b3_3_lower */\n", $b3_3_lower;
+ printf $out "\t0x%02x, /* b3_3_upper */\n", $b3_3_upper;
printf $out "\n";
- printf $out " 0x%04x, /* offset of table for 3-byte inputs */\n",
+ printf $out "\t0x%04x, /* offset of table for 3-byte inputs */\n",
$b4root;
- printf $out " 0x%02x, /* b4_1_lower */\n", $b4_1_lower;
- printf $out " 0x%02x, /* b4_1_upper */\n", $b4_1_upper;
- printf $out " 0x%02x, /* b4_2_lower */\n", $b4_2_lower;
- printf $out " 0x%02x, /* b4_2_upper */\n", $b4_2_upper;
- printf $out " 0x%02x, /* b4_3_lower */\n", $b4_3_lower;
- printf $out " 0x%02x, /* b4_3_upper */\n", $b4_3_upper;
- printf $out " 0x%02x, /* b4_4_lower */\n", $b4_4_lower;
- printf $out " 0x%02x /* b4_4_upper */\n", $b4_4_upper;
+ printf $out "\t0x%02x, /* b4_1_lower */\n", $b4_1_lower;
+ printf $out "\t0x%02x, /* b4_1_upper */\n", $b4_1_upper;
+ printf $out "\t0x%02x, /* b4_2_lower */\n", $b4_2_lower;
+ printf $out "\t0x%02x, /* b4_2_upper */\n", $b4_2_upper;
+ printf $out "\t0x%02x, /* b4_3_lower */\n", $b4_3_lower;
+ printf $out "\t0x%02x, /* b4_3_upper */\n", $b4_3_upper;
+ printf $out "\t0x%02x, /* b4_4_lower */\n", $b4_4_lower;
+ printf $out "\t0x%02x /* b4_4_upper */\n", $b4_4_upper;
print $out "};\n";
print $out "\n";
print $out "static const $datatype ${tblname}_table[$tblsize] =\n";
@@ -589,7 +589,7 @@ sub print_radix_table
foreach my $seg (@segments)
{
printf $out "\n";
- printf $out " /*** %s - offset 0x%05x ***/\n", $seg->{header},
$off;
+ printf $out "\t/*** %s - offset 0x%05x ***/\n", $seg->{header},
$off;
printf $out "\n";
for (my $i = $seg->{min_idx}; $i <= $seg->{max_idx};)
@@ -597,7 +597,7 @@ sub print_radix_table
# Print the next line's worth of values.
# XXX pad to begin at a nice boundary
- printf $out " /* %02x */ ", $i;
+ printf $out "\t/* %02x */", $i;
for (my $j = 0;
$j < $vals_per_line && $i <= $seg->{max_idx};
$j++)
{
@@ -617,7 +617,7 @@ sub print_radix_table
if ($seg->{overlaid_trail_zeros})
{
printf $out
- " /* $seg->{overlaid_trail_zeros} trailing zero
values shared with next segment */\n";
+ "\t/* $seg->{overlaid_trail_zeros} trailing zero
values shared with next segment */\n";
}
}
--
2.32.0