summaryrefslogtreecommitdiff
path: root/src/tools/pgindent
diff options
context:
space:
mode:
authorBruce Momjian2001-10-28 06:26:15 +0000
committerBruce Momjian2001-10-28 06:26:15 +0000
commit6783b2372ef13c141649840a836ff0a954ea1d4d (patch)
tree81c727b2b08930bcf3ab7107c84ef59f1f68a78d /src/tools/pgindent
parentc29797deeb5dfca61b8959344b682b4c32fe53a1 (diff)
Another pgindent run. Fixes enum indenting, and improves #endif
spacing. Also adds space for one-line comments.
Diffstat (limited to 'src/tools/pgindent')
-rwxr-xr-xsrc/tools/pgindent/pgindent7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/tools/pgindent/pgindent b/src/tools/pgindent/pgindent
index 5321876d8a4..e675b1715f1 100755
--- a/src/tools/pgindent/pgindent
+++ b/src/tools/pgindent/pgindent
@@ -1446,7 +1446,8 @@ do
-Twchar_t \
/tmp/$$a >/tmp/$$ 2>&1
if [ "$?" -ne 0 -o -s /tmp/$$ ]
- then echo "$FILE"
+ then echo
+ echo "$FILE"
cat /tmp/$$
fi
cat /tmp/$$a |
@@ -1458,8 +1459,6 @@ do
sed 's;^}[ ][ ]*/\*;} /*;' |
# pull in #endif comments
sed 's;^#endif[ ][ ]*/\*;#endif /*;' |
-# add space after comments that start on tab stops
- sed 's:\([^ ]\)\(/\*.*\*/\)$:\1 \2:' |
# work around #else indenting next line if #ifdef defines variables at top
# work around misindenting of function with no variables defined
awk '
@@ -1474,6 +1473,8 @@ do
# 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
sed 's;^\([A-Za-z_][^ ]*\)[ ][ ]*\*$;\1 *;' |
# remove un-needed braces around single statements