diff options
Diffstat (limited to 'src/tools/pgindent/README')
-rw-r--r-- | src/tools/pgindent/README | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/src/tools/pgindent/README b/src/tools/pgindent/README index a4cd2fc2fcf..3a6a52ace43 100644 --- a/src/tools/pgindent/README +++ b/src/tools/pgindent/README @@ -1,10 +1,10 @@ This can format all PostgreSQL *.c and *.h files, but excludes *.y, and *.l files. -Get the list of typedef's included in pgindent by running this on the -pgsql/bin and pgsql/lib directories: +To use it, first get the list of typedef's to be included in pgindent by +running this on the pgsql/bin and pgsql/lib directories: - /src/tools/find_typedef /usr/local/pgsql/bin /usr/local/pgsql/lib + src/tools/find_typedef /usr/local/pgsql/bin /usr/local/pgsql/lib and update the list in pgindent. This requires the binaries have debug symbols. @@ -13,20 +13,12 @@ From the top directory, run: find . -name '*.[ch]' -type f -print | grep -v 's_lock.h' | xargs -n100 pgindent -The stock BSD indent has two bugs. First, a comment after the word 'else' -causes the rest of the file to be ignored. Second, it silently ignores -typedefs after getting the first 100. - -Both problems are worked-around in this script. We also include a patch -for the second bug in: - - /src/tools/pgindent/indent.bsd.patch - -Even with the workaround, installation of the patch produces better -output. You can get a patched BSD indent from ftp://ftp.postgresql.org/pub/dev. +We have standardized on NetBSD's indent. We have fixed a few bugs which +requre the NetBSD source to be patched with indent.bsd.patch patch. A +fully patched version is available at ftp://ftp.postgresql.org/pub/dev. GNU indent, version 2.2.6, has several problems, and is not recommended. -These bugs become pretty major when you are doing >400k lines of code. +These bugs become pretty major when you are doing >500k lines of code. If you don't believe me, take a directory and make a copy. Run pgindent on the copy using GNU indent, and do a diff -r. You will see what I mean. GNU indent does some things better, but mangles too. |