File tree 1 file changed +29
-0
lines changed
1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -1742,6 +1742,35 @@ do
1742
1742
sed ' s;\([^ ]\)\(/\*.*\*/\)$;\1 \2;' |
1743
1743
# move trailing * in function return type
1744
1744
sed ' s;^\([A-Za-z_][^ ]*\)[ ][ ]*\*$;\1 *;' |
1745
+ # remove un-needed braces around single statements
1746
+ # Do not use because it uglifies PG_TRY/PG_CATCH blocks and probably
1747
+ # isn't needed for general use.
1748
+ # awk '
1749
+ # {
1750
+ # line3 = $0;
1751
+ # if (skips > 0)
1752
+ # skips--;
1753
+ # if (line1 ~ " *{$" &&
1754
+ # line2 ~ " *[^;{}]*;$" &&
1755
+ # line3 ~ " *}$")
1756
+ # {
1757
+ # print line2;
1758
+ # line2 = "";
1759
+ # line3 = "";
1760
+ # skips = 3;
1761
+ # }
1762
+ # else
1763
+ # if (skips == 0 && NR >= 3)
1764
+ # print line1;
1765
+ # line1 = line2;
1766
+ # line2 = line3;
1767
+ # }
1768
+ # END {
1769
+ # if (NR >= 2 && skips <= 1)
1770
+ # print line1;
1771
+ # if (NR >= 1 && skips <= 2)
1772
+ # print line2;
1773
+ # }' |
1745
1774
# remove blank line between opening brace and block comment
1746
1775
awk '
1747
1776
{
You can’t perform that action at this time.
0 commit comments