mirror of
https://github.com/postgres/postgres.git
synced 2025-05-06 19:59:18 +03:00
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.
This commit is contained in:
parent
87d5c22925
commit
7004434a46
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# $PostgreSQL: pgsql/src/tools/pgindent/pgindent,v 1.101 2009/06/11 22:21:44 momjian Exp $
|
# $PostgreSQL: pgsql/src/tools/pgindent/pgindent,v 1.102 2010/04/05 03:09:09 adunstan Exp $
|
||||||
|
|
||||||
# Known bugs:
|
# Known bugs:
|
||||||
#
|
#
|
||||||
@ -39,7 +39,7 @@ if [ "$?" -eq 0 ]
|
|||||||
then echo "You appear to have GNU indent rather than BSD indent." >&2
|
then echo "You appear to have GNU indent rather than BSD indent." >&2
|
||||||
echo "See the pgindent/README file for a description of its problems." >&2
|
echo "See the pgindent/README file for a description of its problems." >&2
|
||||||
EXTRA_OPTS="-cdb -bli0 -npcs -cli4 -sc"
|
EXTRA_OPTS="-cdb -bli0 -npcs -cli4 -sc"
|
||||||
else echo "Hope you installed /src/tools/pgindent/indent.bsd.patch." >&2
|
else
|
||||||
EXTRA_OPTS="-cli1"
|
EXTRA_OPTS="-cli1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -138,7 +138,7 @@ do
|
|||||||
# We get the list of typedef's from /src/tools/find_typedef
|
# We get the list of typedef's from /src/tools/find_typedef
|
||||||
indent -bad -bap -bc -bl -d0 -cdb -nce -nfc1 -di12 -i4 -l79 \
|
indent -bad -bap -bc -bl -d0 -cdb -nce -nfc1 -di12 -i4 -l79 \
|
||||||
-lp -nip -npro -bbb $EXTRA_OPTS \
|
-lp -nip -npro -bbb $EXTRA_OPTS \
|
||||||
`cat "$TYPEDEFS" | sed -e '/^$/d' -e 's/.*/-T& /'` \
|
`egrep -v '^(FD_SET|date|interval|timestamp|ANY)$' "$TYPEDEFS" | sed -e '/^$/d' -e 's/.*/-T& /'` \
|
||||||
/tmp/$$a >/tmp/$$ 2>&1
|
/tmp/$$a >/tmp/$$ 2>&1
|
||||||
|
|
||||||
if [ "$?" -ne 0 -o -s /tmp/$$ ]
|
if [ "$?" -ne 0 -o -s /tmp/$$ ]
|
||||||
@ -226,7 +226,7 @@ do
|
|||||||
skips--;
|
skips--;
|
||||||
if (line1 ~ / *{$/ &&
|
if (line1 ~ / *{$/ &&
|
||||||
line2 ~ /^$/ &&
|
line2 ~ /^$/ &&
|
||||||
line3 ~ / *\/\*$/)
|
line3 ~ / *\/[*]$/)
|
||||||
{
|
{
|
||||||
print line1;
|
print line1;
|
||||||
print line3;
|
print line3;
|
||||||
@ -252,7 +252,7 @@ do
|
|||||||
{
|
{
|
||||||
if (NR != 1)
|
if (NR != 1)
|
||||||
{
|
{
|
||||||
if ($0 ~ "/\* _PGMV")
|
if ($0 ~ "/[*] _PGMV")
|
||||||
{
|
{
|
||||||
# remove tag
|
# remove tag
|
||||||
sub(" _PGMV", "", $0);
|
sub(" _PGMV", "", $0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user