OSDN Git Service

Fix pgindent of libpq-fe.h by hacking pgindent script.
authorBruce Momjian <bruce@momjian.us>
Wed, 23 Nov 2005 04:23:30 +0000 (04:23 +0000)
committerBruce Momjian <bruce@momjian.us>
Wed, 23 Nov 2005 04:23:30 +0000 (04:23 +0000)
Remove pgbench comment that was causing problems.

contrib/pgbench/pgbench.c
src/interfaces/libpq/libpq-fe.h
src/tools/pgindent/pgindent

index cac391e..70081be 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.46 2005/11/22 18:17:04 momjian Exp $
+ * $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.47 2005/11/23 04:23:28 momjian Exp $
  *
  * pgbench: a simple benchmark program for PostgreSQL
  * written by Tatsuo Ishii
@@ -1110,8 +1110,7 @@ main(int argc, char **argv)
                                        fprintf(stderr, "Use limit/ulimt to increase the limit before using pgbench.\n");
                                        exit(1);
                                }
-#endif   /* #if !(defined(__CYGWIN__) ||
-                                                                * defined(__MINGW32__)) */
+#endif
                                break;
                        case 'C':
                                is_connect = 1;
index 7f1d1e9..f0f0ced 100644 (file)
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/interfaces/libpq/libpq-fe.h,v 1.121 2005/11/22 18:17:33 momjian Exp $
+ * $PostgreSQL: pgsql/src/interfaces/libpq/libpq-fe.h,v 1.122 2005/11/23 04:23:28 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -35,7 +35,7 @@ extern                "C"
 
 /* Application-visible enum types */
 
-                       typedef enum
+typedef enum
 {
        /*
         * Although it is okay to add to this list, values which become unused
index 887189e..530c6d2 100755 (executable)
@@ -1993,6 +1993,14 @@ do
                }
                else    print $0;
        }' |
+# fix indenting of typedef caused by __cplusplus in libpq-fe.h
+       (
+               if echo "$FILE" | grep -q 'libpq-fe.h$'
+               then    sed 's/^[       ]*typedef enum/typedef enum/'
+               else    cat
+               fi
+       ) |
+# end
        cat >/tmp/$$ && cat /tmp/$$ >"$FILE"
 done