mirror of
https://github.com/postgres/postgres.git
synced 2025-08-25 20:23:07 +03:00
Fix pgindent to not have blank line before #else in variable definition
section of a function.
This commit is contained in:
@@ -1648,14 +1648,15 @@ do
|
|||||||
print line1;
|
print line1;
|
||||||
}
|
}
|
||||||
}' |
|
}' |
|
||||||
# remove blank line before #endif
|
# remove blank line before #else and #endif
|
||||||
awk ' BEGIN {line1 = ""; line2 = ""; skips = 0}
|
awk ' BEGIN {line1 = ""; line2 = ""; skips = 0}
|
||||||
{
|
{
|
||||||
line2 = $0;
|
line2 = $0;
|
||||||
if (skips > 0)
|
if (skips > 0)
|
||||||
skips--;
|
skips--;
|
||||||
if (line1 ~ /^$/ &&
|
if (line1 ~ /^$/ &&
|
||||||
line2 ~ /^#endif/)
|
(line2 ~ /^#else/ ||
|
||||||
|
line2 ~ /^#endif/))
|
||||||
{
|
{
|
||||||
print line2;
|
print line2;
|
||||||
line2 = "";
|
line2 = "";
|
||||||
|
Reference in New Issue
Block a user