From d447dbf392c4e51de9a8c44ea496423fb863242e Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Mon, 5 Nov 2001 05:47:50 +0000 Subject: [PATCH] Handle tabs after closing brace in first column with less indenting. --- src/tools/pgindent/pgindent | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tools/pgindent/pgindent b/src/tools/pgindent/pgindent index f4a47811cd..0d89eafc38 100755 --- a/src/tools/pgindent/pgindent +++ b/src/tools/pgindent/pgindent @@ -1454,12 +1454,15 @@ do cat /tmp/$$ fi cat /tmp/$$a | +# remove tabs and retab with four spaces + detab -t8 -qc | + entab -t4 -qc | sed 's;^/\*\(DATA(.*\)\*/$;\1;' | sed 's;^/\*\(CATALOG(.*\)\*/$;\1;' | sed 's;/\*---X_X;/* ---;g' | # workaround indent bug sed 's;^static[ ][ ]*;static ;g' | - sed 's;^}[ ][ ]*;} ;' | + sed 's;^} *;} ;' | # pull in #endif comments sed 's;^#endif[ ][ ]*/\*;#endif /*;' | # work around #else indenting next line if #ifdef defines variables at top @@ -1473,9 +1476,6 @@ do } else print $0; }' | -# remove tabs and retab with four spaces - detab -t8 -qc | - entab -t4 -qc | # add space after comments that start on tab stops sed 's;\([^ ]\)\(/\*.*\*/\)$;\1 \2;' | # move trailing * in function return type