mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Run newly-configured perltidy script on Perl files.
Run on HEAD and 9.2.
This commit is contained in:
@ -2,12 +2,12 @@
|
||||
$integer = '[+-]?[0-9]+';
|
||||
$real = '[+-]?[0-9]+\.[0-9]+';
|
||||
|
||||
$RANGE = '(\.\.)(\.)?';
|
||||
$PLUMIN = q(\'\+\-\');
|
||||
$FLOAT = "(($integer)|($real))([eE]($integer))?";
|
||||
$RANGE = '(\.\.)(\.)?';
|
||||
$PLUMIN = q(\'\+\-\');
|
||||
$FLOAT = "(($integer)|($real))([eE]($integer))?";
|
||||
$EXTENSION = '<|>|~';
|
||||
|
||||
$boundary = "($EXTENSION)?$FLOAT";
|
||||
$boundary = "($EXTENSION)?$FLOAT";
|
||||
$deviation = $FLOAT;
|
||||
|
||||
$rule_1 = $boundary . $PLUMIN . $deviation;
|
||||
@ -18,25 +18,33 @@ $rule_5 = $boundary;
|
||||
|
||||
|
||||
print "$rule_5\n";
|
||||
while (<>) {
|
||||
# s/ +//g;
|
||||
if ( /^($rule_1)$/ ) {
|
||||
print;
|
||||
}
|
||||
elsif ( /^($rule_2)$/ ) {
|
||||
print;
|
||||
}
|
||||
elsif ( /^($rule_3)$/ ) {
|
||||
print;
|
||||
}
|
||||
elsif ( /^($rule_4)$/ ) {
|
||||
print;
|
||||
}
|
||||
elsif ( /^($rule_5)$/ ) {
|
||||
print;
|
||||
}
|
||||
else {
|
||||
print STDERR "error in $_\n";
|
||||
}
|
||||
while (<>)
|
||||
{
|
||||
|
||||
# s/ +//g;
|
||||
if (/^($rule_1)$/)
|
||||
{
|
||||
print;
|
||||
}
|
||||
elsif (/^($rule_2)$/)
|
||||
{
|
||||
print;
|
||||
}
|
||||
elsif (/^($rule_3)$/)
|
||||
{
|
||||
print;
|
||||
}
|
||||
elsif (/^($rule_4)$/)
|
||||
{
|
||||
print;
|
||||
}
|
||||
elsif (/^($rule_5)$/)
|
||||
{
|
||||
print;
|
||||
}
|
||||
else
|
||||
{
|
||||
print STDERR "error in $_\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,19 +2,22 @@
|
||||
|
||||
# this script will sort any table with the segment data type in its last column
|
||||
|
||||
while (<>) {
|
||||
chomp;
|
||||
push @rows, $_;
|
||||
while (<>)
|
||||
{
|
||||
chomp;
|
||||
push @rows, $_;
|
||||
}
|
||||
|
||||
foreach ( sort {
|
||||
@ar = split("\t", $a);
|
||||
$valA = pop @ar;
|
||||
$valA =~ s/[~<> ]+//g;
|
||||
@ar = split("\t", $b);
|
||||
$valB = pop @ar;
|
||||
$valB =~ s/[~<> ]+//g;
|
||||
$valA <=> $valB
|
||||
} @rows ) {
|
||||
print "$_\n";;
|
||||
foreach (
|
||||
sort {
|
||||
@ar = split("\t", $a);
|
||||
$valA = pop @ar;
|
||||
$valA =~ s/[~<> ]+//g;
|
||||
@ar = split("\t", $b);
|
||||
$valB = pop @ar;
|
||||
$valB =~ s/[~<> ]+//g;
|
||||
$valA <=> $valB
|
||||
} @rows)
|
||||
{
|
||||
print "$_\n";
|
||||
}
|
||||
|
Reference in New Issue
Block a user