mirror of
https://github.com/postgres/postgres.git
synced 2025-11-28 11:44:57 +03:00
Finish pgindent run for 9.6: Perl files.
This commit is contained in:
@@ -7,7 +7,7 @@ use warnings;
|
||||
use strict;
|
||||
|
||||
my $lastlockidx = -1;
|
||||
my $continue = "\n";
|
||||
my $continue = "\n";
|
||||
|
||||
open my $lwlocknames, $ARGV[0] or die;
|
||||
|
||||
@@ -18,7 +18,7 @@ open H, '>', $htmp or die "Could not open $htmp: $!";
|
||||
open C, '>', $ctmp or die "Could not open $ctmp: $!";
|
||||
|
||||
my $autogen =
|
||||
"/* autogenerated from src/backend/storage/lmgr/lwlocknames.txt, do not edit */\n";
|
||||
"/* autogenerated from src/backend/storage/lmgr/lwlocknames.txt, do not edit */\n";
|
||||
print H $autogen;
|
||||
print H "/* there is deliberately not an #ifndef LWLOCKNAMES_H here */\n\n";
|
||||
print C $autogen, "\n";
|
||||
@@ -38,7 +38,7 @@ while (<$lwlocknames>)
|
||||
|
||||
(my $lockname, my $lockidx) = ($1, $2);
|
||||
|
||||
die "lwlocknames.txt not in order" if $lockidx < $lastlockidx;
|
||||
die "lwlocknames.txt not in order" if $lockidx < $lastlockidx;
|
||||
die "lwlocknames.txt has duplicates" if $lockidx == $lastlockidx;
|
||||
|
||||
while ($lastlockidx < $lockidx - 1)
|
||||
@@ -49,7 +49,7 @@ while (<$lwlocknames>)
|
||||
}
|
||||
printf C "%s \"%s\"", $continue, $lockname;
|
||||
$lastlockidx = $lockidx;
|
||||
$continue = ",\n";
|
||||
$continue = ",\n";
|
||||
|
||||
print H "#define $lockname (&MainLWLockArray[$lockidx].lock)\n";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user