summaryrefslogtreecommitdiff
path: root/src/test/examples
diff options
context:
space:
mode:
authorBruce Momjian1998-02-26 04:46:47 +0000
committerBruce Momjian1998-02-26 04:46:47 +0000
commita32450a5855eed4bfd756ef292ee45d3c754665b (patch)
tree26735c3406d9f46d0f39accbe6ff1fb5cc5beedc /src/test/examples
parent757bf69a2e259c76baed94fa06e792664ab5ed67 (diff)
pgindent run before 6.3 release, with Thomas' requested changes.
Diffstat (limited to 'src/test/examples')
-rw-r--r--src/test/examples/testlibpq2.c9
-rw-r--r--src/test/examples/testlibpq3.c11
-rw-r--r--src/test/examples/testlibpq4.c20
3 files changed, 22 insertions, 18 deletions
diff --git a/src/test/examples/testlibpq2.c b/src/test/examples/testlibpq2.c
index 214a3cbc15..540ed91cbf 100644
--- a/src/test/examples/testlibpq2.c
+++ b/src/test/examples/testlibpq2.c
@@ -37,9 +37,9 @@ main()
*pgoptions,
*pgtty;
char *dbName;
- /* int nFields;
- * int i,
- * j;
+
+ /*
+ * int nFields; int i, j;
*/
PGconn *conn;
@@ -106,5 +106,6 @@ main()
/* close the connection to the database and cleanup */
PQfinish(conn);
- return 0; /* Though PQfinish(conn1) has called exit(1) */
+ return 0; /* Though PQfinish(conn1) has called
+ * exit(1) */
}
diff --git a/src/test/examples/testlibpq3.c b/src/test/examples/testlibpq3.c
index 8051da58cf..cb5d35bacf 100644
--- a/src/test/examples/testlibpq3.c
+++ b/src/test/examples/testlibpq3.c
@@ -28,7 +28,7 @@ tuple 1: got
*/
#include <stdio.h>
#include <string.h>
-#include "postgres.h" /* -> "c.h" -> int16, in access/attnum.h */
+#include "postgres.h" /* -> "c.h" -> int16, in access/attnum.h */
#include "libpq-fe.h"
#include "utils/geo_decls.h" /* for the POLYGON type */
@@ -47,9 +47,9 @@ main()
*pgoptions,
*pgtty;
char *dbName;
- /* int nFields;
- * int i,
- * j;
+
+ /*
+ * int nFields; int i, j;
*/
int i;
int i_fnum,
@@ -180,5 +180,6 @@ main()
/* close the connection to the database and cleanup */
PQfinish(conn);
- return 0; /* Though PQfinish(conn1) has called exit(1) */
+ return 0; /* Though PQfinish(conn1) has called
+ * exit(1) */
}
diff --git a/src/test/examples/testlibpq4.c b/src/test/examples/testlibpq4.c
index 7f211dbe54..2cbe622f9b 100644
--- a/src/test/examples/testlibpq4.c
+++ b/src/test/examples/testlibpq4.c
@@ -19,7 +19,7 @@ exit_nicely(PGconn *conn1, PGconn *conn2)
}
static void
-check_conn(PGconn *conn, const char* dbName)
+check_conn(PGconn *conn, const char *dbName)
{
/* check to see that the backend connection was successfully made */
if (PQstatus(conn) == CONNECTION_BAD)
@@ -31,23 +31,24 @@ check_conn(PGconn *conn, const char* dbName)
}
int
-main(int argc, char** argv)
+main(int argc, char **argv)
{
char *pghost,
*pgport,
*pgoptions,
*pgtty;
char *dbName1,
- *dbName2;
+ *dbName2;
char *tblName;
int nFields;
int i,
j;
PGconn *conn1,
- *conn2;
- /* PGresult *res1,
- * *res2;
+ *conn2;
+
+ /*
+ * PGresult *res1, *res2;
*/
PGresult *res1;
@@ -105,7 +106,7 @@ main(int argc, char** argv)
{
fprintf(stderr, "DECLARE CURSOR command failed\n");
PQclear(res1);
- exit_nicely(conn1,(PGconn*)NULL);
+ exit_nicely(conn1, (PGconn *) NULL);
}
PQclear(res1);
@@ -114,7 +115,7 @@ main(int argc, char** argv)
{
fprintf(stderr, "FETCH ALL command didn't return tuples properly\n");
PQclear(res1);
- exit_nicely(conn1,(PGconn*)NULL);
+ exit_nicely(conn1, (PGconn *) NULL);
}
/* first, print out the attribute names */
@@ -149,5 +150,6 @@ main(int argc, char** argv)
PQfinish(conn1);
/* fclose(debug); */
- return 0; /* Though PQfinish(conn1) has called exit(1) */
+ return 0; /* Though PQfinish(conn1) has called
+ * exit(1) */
}