Fix a few more generator scripts to produce pgindent-clean output.
This completes the project of making all our derived files be pgindent-clean (or else explicitly excluded from indentation), so that no surprises result when running pgindent in a built-out development tree. Discussion: https://postgr.es/m/79ed5348-be7a-b647-dd40-742207186a22@2ndquadrant.com
This commit is contained in:
parent
9436041ed8
commit
f859c2ffa0
|
@ -115,7 +115,8 @@ swapfunc(SortTuple *a, SortTuple *b, size_t n)
|
||||||
{
|
{
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
SortTuple t = *a;
|
SortTuple t = *a;
|
||||||
|
|
||||||
*a++ = *b;
|
*a++ = *b;
|
||||||
*b++ = t;
|
*b++ = t;
|
||||||
} while (--n > 0);
|
} while (--n > 0);
|
||||||
|
@ -143,9 +144,9 @@ med3_$SUFFIX(SortTuple *a, SortTuple *b, SortTuple *c$EXTRAARGS)
|
||||||
{
|
{
|
||||||
return cmp_$SUFFIX(a, b$CMPPARAMS) < 0 ?
|
return cmp_$SUFFIX(a, b$CMPPARAMS) < 0 ?
|
||||||
(cmp_$SUFFIX(b, c$CMPPARAMS) < 0 ? b :
|
(cmp_$SUFFIX(b, c$CMPPARAMS) < 0 ? b :
|
||||||
(cmp_$SUFFIX(a, c$CMPPARAMS) < 0 ? c : a))
|
(cmp_$SUFFIX(a, c$CMPPARAMS) < 0 ? c : a))
|
||||||
: (cmp_$SUFFIX(b, c$CMPPARAMS) > 0 ? b :
|
: (cmp_$SUFFIX(b, c$CMPPARAMS) > 0 ? b :
|
||||||
(cmp_$SUFFIX(a, c$CMPPARAMS) < 0 ? a : c));
|
(cmp_$SUFFIX(a, c$CMPPARAMS) < 0 ? a : c));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -34,7 +34,7 @@ while (<$errcodes>)
|
||||||
# Skip lines without PL/pgSQL condition names
|
# Skip lines without PL/pgSQL condition names
|
||||||
next unless defined($condition_name);
|
next unless defined($condition_name);
|
||||||
|
|
||||||
print "{\n\t\"$condition_name\", $errcode_macro\n},\n\n";
|
print "\n{\n\t\"$condition_name\", $errcode_macro\n},\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
close $errcodes;
|
close $errcodes;
|
||||||
|
|
|
@ -37,8 +37,8 @@ while (<$errcodes>)
|
||||||
# Change some_error_condition to SomeErrorCondition
|
# Change some_error_condition to SomeErrorCondition
|
||||||
$condition_name =~ s/([a-z])([^_]*)(?:_|$)/\u$1$2/g;
|
$condition_name =~ s/([a-z])([^_]*)(?:_|$)/\u$1$2/g;
|
||||||
|
|
||||||
print "{ \"spiexceptions.$condition_name\", "
|
print "\n{\n\t\"spiexceptions.$condition_name\", "
|
||||||
. "\"$condition_name\", $errcode_macro },\n";
|
. "\"$condition_name\", $errcode_macro\n},\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
close $errcodes;
|
close $errcodes;
|
||||||
|
|
|
@ -34,7 +34,7 @@ while (<$errcodes>)
|
||||||
# Skip lines without PL/pgSQL condition names
|
# Skip lines without PL/pgSQL condition names
|
||||||
next unless defined($condition_name);
|
next unless defined($condition_name);
|
||||||
|
|
||||||
print "{\n\t\"$condition_name\", $errcode_macro\n},\n\n";
|
print "\n{\n\t\"$condition_name\", $errcode_macro\n},\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
close $errcodes;
|
close $errcodes;
|
||||||
|
|
Loading…
Reference in New Issue