Improve pgindent processing of comment after 'else'.
authorBruce Momjian <bruce@momjian.us>
Thu, 7 Oct 2004 13:45:51 +0000 (13:45 +0000)
committerBruce Momjian <bruce@momjian.us>
Thu, 7 Oct 2004 13:45:51 +0000 (13:45 +0000)
Improve comment of pg_dump Win32 link workaround.

src/bin/pg_dump/Makefile
src/tools/pgindent/pgindent

index fe260ca1fcc8487982d6e16d29a60b6de49f72d4..6fe3af18dc6274f3d4961e39c7686d281fd61284 100644 (file)
@@ -5,7 +5,7 @@
 # Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
 # Portions Copyright (c) 1994, Regents of the University of California
 #
-# $PostgreSQL: pgsql/src/bin/pg_dump/Makefile,v 1.56 2004/10/05 19:30:23 momjian Exp $
+# $PostgreSQL: pgsql/src/bin/pg_dump/Makefile,v 1.57 2004/10/07 13:45:48 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -22,7 +22,8 @@ OBJS= pg_backup_archiver.o pg_backup_db.o pg_backup_custom.o \
 
 EXTRA_OBJS = $(top_builddir)/src/backend/parser/keywords.o
 
-# not sure why MinGW needs this but it prevents a link failure
+# Not sure why MinGW needs this but it prevents a link failure
+# of duplicate definitions for pg_tolower().  2004-10-06
 ifeq ($(PORTNAME), win32)
 EXTRA_OBJS += $(top_builddir)/src/port/exec.o
 endif
index eb0ce1590b59557ed6981f3bb019455f6800de8b..e85a6723b7291696474ce8d69501583084ac145c 100755 (executable)
@@ -38,8 +38,10 @@ do
 # mark some comments for special treatment later
    sed 's;/\*  *---;/*---X_X;g' |
 # workaround for indent bug with 'else' handling
-   sed 's;\([}     ]\)else\([  ]*\)\(/\*.*\)$;\1else\
-\2\3;g' |
+   sed 's;\([  ]*\)else[   ]*\(/\*.*\)$;\1else\
+\1\2;g' |
+   sed 's;\([  ]*\)\(}[    ]\)else[    ]*\(/\*.*\)$;\1\2else\
+\1\3;g' |
    detab -t4 -qc |
 # work around bug where function that defines no local variables misindents
 # switch() case lines and line after #else.  Do not do for struct/enum.