File tree Expand file tree Collapse file tree 1 file changed +31
-1
lines changed Expand file tree Collapse file tree 1 file changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ then echo "You appear to have GNU indent rather than BSD indent." >&2
19
19
echo " See the pgindent/README file for a description of its problems." >&2
20
20
EXTRA_OPTS=" -ncdb -bli0 -npcs -cli4"
21
21
else echo " Hope you installed /src/tools/pgindent/indent.bsd.patch." >&2
22
- EXTRA_OPTS=" -cli1"
22
+ EXTRA_OPTS=" -bbb - cli1"
23
23
fi
24
24
25
25
for FILE
@@ -1343,6 +1343,36 @@ do
1343
1343
if (skips <= 2)
1344
1344
print line2;
1345
1345
}' |
1346
+ # remove blank line between opening brace and block comment
1347
+ awk '
1348
+ {
1349
+ line3 = $0;
1350
+ if (skips > 0)
1351
+ skips--;
1352
+ if (line1 ~ " *{$" &&
1353
+ line2 ~ "^$" &&
1354
+ line3 ~ " */\\*$")
1355
+ {
1356
+ print line1;
1357
+ print line3;
1358
+ line1 = "";
1359
+ line2 = "";
1360
+ line3 = "";
1361
+ skips = 3;
1362
+ }
1363
+ else
1364
+ if (skips == 0 && NR >= 3)
1365
+ print line1;
1366
+ line1 = line2;
1367
+ line2 = line3;
1368
+ line3 = "";
1369
+ }
1370
+ END {
1371
+ if (skips <= 1)
1372
+ print line1;
1373
+ if (skips <= 2)
1374
+ print line2;
1375
+ }' |
1346
1376
# Move prototype names to the same line as return type. Useful for ctags.
1347
1377
# Indent should do this, but it does not. It formats prototypes just
1348
1378
# like real functions.
You can’t perform that action at this time.
0 commit comments