Commit bd8c5cee authored by Tom Lane's avatar Tom Lane

Improve placement of "display name" comment in win32_tzmap[] entries.

Sticking this comment at the end of the last line was a bad idea: it's
not particularly readable, and it tempts pgindent to mess with line
breaks within the comment, which in turn reveals that win32tzlist.pl's
clean_displayname() does the wrong thing to clean up such line breaks.
While that's not hard to fix, there's basically no excuse for this
arrangement to begin with, especially since it makes the table layout
needlessly vary across back branches with different pgindent rules.
Let's just put the comment inside the braces, instead.

This commit just moves and reformats the comments, and updates
win32tzlist.pl to match; there's no actual data change.

Per odd-looking results from Juan José Santamaría Flecha.
Back-patch, since the point is to make win32_tzmap[] look the
same in all supported branches again.

Discussion: https://postgr.es/m/5752.1587740484@sss.pgh.pa.us
parent f8d3e2ab
This diff is collapsed.
......@@ -75,14 +75,14 @@ $pgtz = $1;
# Extract each individual record from the struct
while ($pgtz =~
m/{\s+"([^"]+)",\s+"([^"]+)",\s+"([^"]+)",?\s+},\s+\/\*(.+?)\*\//gs)
m/{\s+\/\*(.+?)\*\/\s+"([^"]+)",\s+"([^"]+)",\s+"([^"]+)",?\s+},/gs)
{
push @file_zones,
{
'std' => $1,
'dlt' => $2,
'match' => $3,
'display' => clean_displayname($4),
'display' => clean_displayname($1),
'std' => $2,
'dlt' => $3,
'match' => $4,
};
}
......@@ -132,8 +132,8 @@ sub clean_displayname
{
my $dn = shift;
$dn =~ s/\s+/ /gs;
$dn =~ s/\*//gs;
$dn =~ s/\s+/ /gs;
$dn =~ s/^\s+//gs;
$dn =~ s/\s+$//gs;
return $dn;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment