Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5ef74fe

Browse files
committed
Correct fix for indenting.
1 parent6b0be33 commit5ef74fe

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

‎src/tools/pgindent/pgindent

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
#!/bin/sh
22

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+
39
trap"rm -f /tmp/$$ /tmp/$$a" 0 1 2 3 15
410
entab</dev/null>/dev/null
511
if ["$?"-ne 0 ]
@@ -38,14 +44,14 @@ do
3844
awk'BEGIN{line1 = ""; line2 = ""}
3945
{
4046
line2 = $0;
47+
if (NR >= 2)
48+
print line1;
4149
if (NR >= 2 &&
4250
line2 ~ "^{[ ]*$" &&
4351
line1 !~ "^struct" &&
4452
line1 !~ "^enum" &&
4553
line1 !~ "^typedef")
46-
printf "intpgindent_func_no_var_fix;";
47-
if (NR >= 2)
48-
print line1;
54+
print "intpgindent_func_no_var_fix;";
4955
line1 = line2;
5056
}
5157
END {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp