Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 5d0a43c

Browse files
committed
Fix pgindent to not have blank line before #else in variable definition
section of a function.
1 parent 7690b41 commit 5d0a43c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/tools/pgindent/pgindent

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1648,14 +1648,15 @@ do
16481648
print line1;
16491649
}
16501650
}' |
1651-
# remove blank line before #endif
1651+
# remove blank line before #else and #endif
16521652
awk ' BEGIN {line1 = ""; line2 = ""; skips = 0}
16531653
{
16541654
line2 = $0;
16551655
if (skips > 0)
16561656
skips--;
16571657
if (line1 ~ /^$/ &&
1658-
line2 ~ /^#endif/)
1658+
(line2 ~ /^#else/ ||
1659+
line2 ~ /^#endif/))
16591660
{
16601661
print line2;
16611662
line2 = "";

0 commit comments

Comments
 (0)