Fix pgindent to not have blank line before #else in variable definition
section of a function.
This commit is contained in:
parent
7690b41328
commit
5d0a43c585
@ -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 = "";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user