From 8a28f50f8a3a5b014730b88cf5e965db2bb71b52 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Thu, 7 Oct 2004 13:45:51 +0000 Subject: Improve pgindent processing of comment after 'else'. Improve comment of pg_dump Win32 link workaround. --- src/tools/pgindent/pgindent | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/tools') diff --git a/src/tools/pgindent/pgindent b/src/tools/pgindent/pgindent index eb0ce1590b5..e85a6723b72 100755 --- a/src/tools/pgindent/pgindent +++ b/src/tools/pgindent/pgindent @@ -38,8 +38,10 @@ do # mark some comments for special treatment later sed 's;/\* *---;/*---X_X;g' | # workaround for indent bug with 'else' handling - sed 's;\([} ]\)else\([ ]*\)\(/\*.*\)$;\1else\ -\2\3;g' | + sed 's;\([ ]*\)else[ ]*\(/\*.*\)$;\1else\ +\1\2;g' | + sed 's;\([ ]*\)\(}[ ]\)else[ ]*\(/\*.*\)$;\1\2else\ +\1\3;g' | detab -t4 -qc | # work around bug where function that defines no local variables misindents # switch() case lines and line after #else. Do not do for struct/enum. -- cgit v1.2.3