From 5d0a43c585b739c329efe26c0193a5c5ff980c0e Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Wed, 13 Jul 2005 04:44:42 +0000 Subject: [PATCH] Fix pgindent to not have blank line before #else in variable definition section of a function. --- src/tools/pgindent/pgindent | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tools/pgindent/pgindent b/src/tools/pgindent/pgindent index e0d3969f1a..e84b23cb71 100755 --- a/src/tools/pgindent/pgindent +++ b/src/tools/pgindent/pgindent @@ -1648,14 +1648,15 @@ do print line1; } }' | -# remove blank line before #endif +# remove blank line before #else and #endif awk ' BEGIN {line1 = ""; line2 = ""; skips = 0} { line2 = $0; if (skips > 0) skips--; if (line1 ~ /^$/ && - line2 ~ /^#endif/) + (line2 ~ /^#else/ || + line2 ~ /^#endif/)) { print line2; line2 = ""; -- 2.11.0