]> granicus.if.org Git - postgresql/commitdiff
Added pgindent/README file.
authorBruce Momjian <bruce@momjian.us>
Sat, 13 Sep 1997 11:55:12 +0000 (11:55 +0000)
committerBruce Momjian <bruce@momjian.us>
Sat, 13 Sep 1997 11:55:12 +0000 (11:55 +0000)
src/tools/pgindent.dir/README [new file with mode: 0644]
src/tools/pgindent.dir/pgindent

diff --git a/src/tools/pgindent.dir/README b/src/tools/pgindent.dir/README
new file mode 100644 (file)
index 0000000..6bf0700
--- /dev/null
@@ -0,0 +1,29 @@
+This can format all PostgreSQL *.c and *.h files, excluding libpq++,
+*.y, and *.l files.
+
+On 09/06/1997, from the top directory, I ran:
+
+  find . -name '*.[ch]' -type f -print | grep -v '++' | 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.
+
+GNU indent, version 1.9.1, has several bugs, and is not recommended.
+These bugs become pretty major when you are doing >200k 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.
+
+We get the list of typedef's included in pgindent by running:
+
+       /src/tools/find_typedef
+
index 95b6aa3d770985796dd8592f4c25b3171f8a0eda..edf13cbcc5e9d363fe41ccbc4a3b1b35200df9c9 100644 (file)
@@ -1,26 +1,4 @@
 #!/bin/sh
-#
-# This can format all PostgreSQL *.c and *.h files,
-# excluding libpq++, *.y, and *.l files.
-#
-# On 09/06/1997, from the top directory, I ran:
-#
-#   find . -name '*.[ch]' -type f -print | grep -v '++' | 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.
-#
-# GNU indent has many bugs, and it not recommended.  See the description
-# below. 
-#
-# We get the list of typedef's from /src/tools/find_typedef
-#
 
 trap "rm -f /tmp/$$ /tmp/$$a" 0 1 2 3 15
 entab </dev/null >/dev/null
@@ -38,12 +16,7 @@ fi
 indent -version -npro </dev/null >/dev/null 2>&1
 if [ "$?" -eq 0 ]
 then   echo "You appear to have GNU indent rather than BSD indent." >&2
-       echo "Be warned, it has some small bugs, GNU indent version 1.9.1." >&2
-       echo "These bugs become pretty major when you are doing >200k lines of code." >&2
-       echo "If you don't believe me, take a directory and make a copy." >&2
-       echo "Run pgindent on the copy using GNU indent, and do a diff -r." >&2
-       echo "You will see what I mean."
-       echo "GNU indent does some things better, but mangles too." >&2
+       echo "See the pgindent/README file for a description of its problems." >&2
        EXTRA_OPTS="-ncdb -bli0 -npcs -cli4"
 else   echo "Hope you installed /src/tools/pgindent/indent.bsd.patch." >&2
        EXTRA_OPTS="-bbb -cli1"