postgresql/src/tools/pgindent
Bruce Momjian 7accb29478 Clean up pgindent handling of comments after 'else' by only moving
multi-line comments to the next line.
2006-12-27 23:03:52 +00:00
..
indent.bsd.patch Add CVS tag lines to files that were lacking them. 2006-03-11 04:38:42 +00:00
pgcppindent Add CVS tag lines to files that were lacking them. 2006-03-11 04:38:42 +00:00
pgindent Clean up pgindent handling of comments after 'else' by only moving 2006-12-27 23:03:52 +00:00
pgjindent Add CVS tag lines to files that were lacking them. 2006-03-11 04:38:42 +00:00
README Exclude pgindent from affecting the ecpg regression directory. 2006-10-04 20:42:19 +00:00

This can format all PostgreSQL *.c and *.h files, but excludes *.y, and *.l
files.

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

and update the list in pgindent.  This requires the binaries have debug 
symbols.

From the top directory, run:

	find . -name '*.[ch]' -type f -print |
	egrep -v '/s_lock.h|src/interfaces/ecpg/test/expected/' |
	xargs -n100 pgindent

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 >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.