We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b0be33 commit 5ef74feCopy full SHA for 5ef74fe
src/tools/pgindent/pgindent
@@ -1,5 +1,11 @@
1
#!/bin/sh
2
3
+# Known bugs:
4
+#
5
+# Blank line is added after, seen as a function definition, no space
6
+# after *:
7
+# y = (int) x *y;
8
+
9
trap "rm -f /tmp/$$ /tmp/$$a" 0 1 2 3 15
10
entab </dev/null >/dev/null
11
if [ "$?" -ne 0 ]
@@ -38,14 +44,14 @@ do
38
44
awk ' BEGIN {line1 = ""; line2 = ""}
39
45
{
40
46
line2 = $0;
47
+ if (NR >= 2)
48
+ print line1;
41
49
if (NR >= 2 &&
42
50
line2 ~ "^{[ ]*$" &&
43
51
line1 !~ "^struct" &&
52
line1 !~ "^enum" &&
53
line1 !~ "^typedef")
- printf "int pgindent_func_no_var_fix;";
- if (NR >= 2)
- print line1;
54
+ print "int pgindent_func_no_var_fix;";
55
line1 = line2;
56
}
57
END {
0 commit comments