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

Commitc853ca0

Browse files
committed
Update pgpatch for GNU.
1 parentc8bc4a4 commitc853ca0

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

‎src/tools/pgindent.dir/pgindent

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,21 @@
55
#
66
# On 09/06/1997, from the top directory, I ran:
77
#
8-
# find . -name '*.[ch]' -type f -print | grep -v '++' | xargs -n100PGINDENT
8+
# find . -name '*.[ch]' -type f -print | grep -v '++' | xargs -n100pgindent
99
#
1010
# The stock BSD indent has two bugs. First, a comment after the word 'else'
1111
# causes the rest of the file to be ignored. Second, it silently ignores
12-
# typedesf after getting the first 100.
12+
# typedefs after getting the first 100.
13+
#
1314
# Both problems are worked-around in this script.
15+
# We also include a patch for the second bug in:
16+
#/src/tools/pgindent/indent.bsd.patch
17+
# Even with the workaround, installation of the patch produces better output.
18+
#
19+
# GNU indent has many bugs, and it not recommended. See the description
20+
# below.
21+
#
22+
# We get the list of typedef's from /src/tools/find_typedef
1423
#
1524

1625
trap"rm -f /tmp/$$ /tmp/$$a" 0 1 2 3 15
@@ -27,7 +36,7 @@ thenecho "You do not appear to have 'indent' installed on your system." >&2
2736
exit 1
2837
fi
2938
indent -version -npro</dev/null>/dev/null2>&1
30-
if ["$?"-ne 0 ]
39+
if ["$?"-eq 0 ]
3140
thenecho"You appear to have GNU indent rather than BSD indent.">&2
3241
echo"Be warned, it has some small bugs, GNU indent version 1.9.1.">&2
3342
echo"These bugs become pretty major when you are doing >200k lines of code.">&2
@@ -48,6 +57,8 @@ do
4857
\2;g'|# workaround for indent bug
4958
detab -t4 -qc|
5059
sed's;^DATA(.*$;/*&*/;'>/tmp/$$a# protect backslashes in DATA()
60+
61+
# We get the list of typedef's from /src/tools/find_typedef
5162
indent -bad -bap -bc -bl -d0 -cdb -nce -nfc1 -di12 -i4 -l75 \
5263
-lp -nip -npro$EXTRA_OPTS \
5364
-TA_Const \

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp