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

Commit7004434

Browse files
committed
Exclude unwanted typedef symbols in pgindent, including FD_SET which is found on some Windows platforms. Also, silence unnecessary messages and make awk happier about literal '*' on some platforms.
1 parent87d5c22 commit7004434

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎src/tools/pgindent/pgindent

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

3-
# $PostgreSQL: pgsql/src/tools/pgindent/pgindent,v 1.101 2009/06/11 22:21:44 momjian Exp $
3+
# $PostgreSQL: pgsql/src/tools/pgindent/pgindent,v 1.102 2010/04/05 03:09:09 adunstan Exp $
44

55
# Known bugs:
66
#
@@ -39,7 +39,7 @@ if [ "$?" -eq 0 ]
3939
thenecho"You appear to have GNU indent rather than BSD indent.">&2
4040
echo"See the pgindent/README file for a description of its problems.">&2
4141
EXTRA_OPTS="-cdb -bli0 -npcs -cli4 -sc"
42-
elseecho"Hope you installed /src/tools/pgindent/indent.bsd.patch.">&2
42+
else
4343
EXTRA_OPTS="-cli1"
4444
fi
4545

@@ -138,7 +138,7 @@ do
138138
# We get the list of typedef's from /src/tools/find_typedef
139139
indent -bad -bap -bc -bl -d0 -cdb -nce -nfc1 -di12 -i4 -l79 \
140140
-lp -nip -npro -bbb$EXTRA_OPTS \
141-
`cat"$TYPEDEFS"| sed -e'/^$/d' -e's/.*/-T& /'` \
141+
`egrep -v'^(FD_SET|date|interval|timestamp|ANY)$'"$TYPEDEFS"| sed -e'/^$/d' -e's/.*/-T& /'` \
142142
/tmp/$$a>/tmp/$$2>&1
143143

144144
if ["$?"-ne 0-o-s /tmp/$$ ]
@@ -226,7 +226,7 @@ do
226226
skips--;
227227
if (line1 ~ /*{$/ &&
228228
line2 ~ /^$/ &&
229-
line3 ~ /*\/\*$/)
229+
line3 ~ /*\/[*]$/)
230230
{
231231
print line1;
232232
print line3;
@@ -252,7 +252,7 @@ do
252252
{
253253
if (NR != 1)
254254
{
255-
if ($0 ~ "/\* _PGMV")
255+
if ($0 ~ "/[*] _PGMV")
256256
{
257257
# remove tag
258258
sub(" _PGMV", "", $0);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp