diff options
author | Bruce Momjian <bruce@momjian.us> | 2005-11-15 14:45:14 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2005-11-15 14:45:14 +0000 |
commit | b064cf0b7cb7c8128e330bbe5d250e76f0d959e0 (patch) | |
tree | 958193d411634b1484112f6a80711a20c1b6d3e2 /src | |
parent | b2625c13e0155ad0f56c5ba1e092907fb6f5125e (diff) | |
download | postgresql-b064cf0b7cb7c8128e330bbe5d250e76f0d959e0.tar.gz postgresql-b064cf0b7cb7c8128e330bbe5d250e76f0d959e0.zip |
Prevent certain symbols that are used for both typedefs and variable
names from being added to pgindent's typedef list. The existance of
them caused weird formatting in the date/type files, and in keywords.c.
Backpatch to 8.1.X.
Diffstat (limited to 'src')
-rwxr-xr-x | src/tools/find_typedef | 25 | ||||
-rwxr-xr-x | src/tools/pgindent/pgindent | 4 |
2 files changed, 16 insertions, 13 deletions
diff --git a/src/tools/find_typedef b/src/tools/find_typedef index 5971a515838..ff575fefa55 100755 --- a/src/tools/find_typedef +++ b/src/tools/find_typedef @@ -12,16 +12,23 @@ # Remember, debugging symbols are your friends. # -if [ "$#" -ne 1 -o ! -d "$1" ] -then echo "Usage: $0 postgres_binary_directory" 1>&2 +if [ "$#" -eq 0 -o ! -d "$1" ] +then echo "Usage: $0 postgres_binary_directory [...]" 1>&2 exit 1 fi -objdump --stabs "$1"/* | -grep "LSYM" | -awk '{print $7}' | -grep ':t' | -sed 's/^\([^:]*\).*$/\1/' | -grep -v ' ' | # some typedefs have spaces, remove them +for DIR +do + objdump --stabs "$DIR"/* | + grep "LSYM" | + awk '{print $7}' | + grep ':t' | + sed 's/^\([^:]*\).*$/\1/' | + grep -v ' ' # some typedefs have spaces, remove them +done | sort | -uniq +uniq | +# these are used both for typedefs and variable names +# so do not include them +egrep -v '^(date|interval|timestamp|ANY)$' | +sed 's/\(.*\)/-T\1 \\/' diff --git a/src/tools/pgindent/pgindent b/src/tools/pgindent/pgindent index c9e02c3600a..887189ead68 100755 --- a/src/tools/pgindent/pgindent +++ b/src/tools/pgindent/pgindent @@ -109,7 +109,6 @@ do -TAES_KEY \ -TAMT \ -TAMTS \ --TANY \ -TASN1_BIT_STRING \ -TASN1_BMPSTRING \ -TASN1_BOOLEAN \ @@ -1548,7 +1547,6 @@ do -Tcontain_var_reference_context \ -Tcv_flags_t \ -Tdaddr_t \ --Tdate \ -Tdatetkn \ -Tdecimal \ -Tdeparse_context \ @@ -1620,7 +1618,6 @@ do -Tint8 \ -Tint8_t \ -Tint8m_t \ --Tinterval \ -Tintf \ -TitemIdSort \ -TitemIdSortData \ @@ -1737,7 +1734,6 @@ do -TteReqs \ -Ttext \ -Ttime_t \ --Ttimestamp \ -Ttlist_vinfo \ -Tts_db_fctx \ -TuInt \ |