summaryrefslogtreecommitdiff
path: root/src/interfaces/libpgtcl
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@hub.org>1996-11-11 12:14:45 +0000
committerMarc G. Fournier <scrappy@hub.org>1996-11-11 12:14:45 +0000
commit2bdded3540a9723c240152a37627846433e61234 (patch)
treee12a14df0e0deaa7f2d86d51bf424c8e819a0625 /src/interfaces/libpgtcl
parent6913c8b4a49873139750a708178920bb74aeb9d5 (diff)
downloadpostgresql-2bdded3540a9723c240152a37627846433e61234.tar.gz
Various cleanups from D'Arcy
Diffstat (limited to 'src/interfaces/libpgtcl')
-rw-r--r--src/interfaces/libpgtcl/pgtcl.c10
-rw-r--r--src/interfaces/libpgtcl/pgtclCmds.c13
-rw-r--r--src/interfaces/libpgtcl/pgtclId.c5
3 files changed, 17 insertions, 11 deletions
diff --git a/src/interfaces/libpgtcl/pgtcl.c b/src/interfaces/libpgtcl/pgtcl.c
index ad9b68b41d..2cbec47395 100644
--- a/src/interfaces/libpgtcl/pgtcl.c
+++ b/src/interfaces/libpgtcl/pgtcl.c
@@ -9,14 +9,18 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtcl.c,v 1.4 1996/11/09 10:39:40 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtcl.c,v 1.5 1996/11/11 12:14:38 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
+#include <stdlib.h>
+
+#include "postgres.h"
#include "tcl.h"
#include "libpgtcl.h"
#include "pgtclCmds.h"
+#include "pgtclId.h"
/*
* Pgtcl_Init
@@ -27,7 +31,7 @@
/*
* Tidy up forgotten postgres connection at Tcl_Exit
*/
-void
+static void
Pgtcl_AtExit (ClientData cData)
{
Pg_clientData *cd = (Pg_clientData *)cData;
@@ -52,7 +56,7 @@ Pgtcl_AtExit (ClientData cData)
/*
* Tidy up forgotten postgres connections on Interpreter deletion
*/
-void
+static void
Pgtcl_Shutdown (ClientData cData, Tcl_Interp *interp)
{
Pgtcl_AtExit(cData);
diff --git a/src/interfaces/libpgtcl/pgtclCmds.c b/src/interfaces/libpgtcl/pgtclCmds.c
index 397bcd15f7..980055e378 100644
--- a/src/interfaces/libpgtcl/pgtclCmds.c
+++ b/src/interfaces/libpgtcl/pgtclCmds.c
@@ -7,16 +7,17 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclCmds.c,v 1.6 1996/11/09 10:39:41 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclCmds.c,v 1.7 1996/11/11 12:14:42 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-
#include <stdio.h>
#include <stdlib.h>
-#include <tcl.h>
#include <string.h>
+#include <tcl.h>
+
+#include "postgres.h"
#include "libpq/pqcomm.h"
#include "libpq-fe.h"
#include "libpq/libpq-fs.h"
@@ -224,7 +225,7 @@ tcl_value (char *value)
**********************************/
int
-Pg_conndefaults(ClientData cData, Tcl_Interp *interp, int argc, char* argv[])
+Pg_conndefaults(ClientData cData, Tcl_Interp *interp, int argc, char **argv)
{
PQconninfoOption *option;
char buf[8192];
@@ -581,7 +582,7 @@ Pg_result(ClientData cData, Tcl_Interp *interp, int argc, char* argv[])
Tcl_ResetResult(interp);
for (i = 0; i < PQnfields(result); i++) {
sprintf(buf, "{%s} %ld %d", PQfname(result, i),
- PQftype(result, i),
+ (long) PQftype(result, i),
PQfsize(result, i));
Tcl_AppendElement(interp, buf);
}
@@ -1125,7 +1126,7 @@ Pg_select(ClientData cData, Tcl_Interp *interp, int argc, char **argv)
Pg_clientData *cd = (Pg_clientData *)cData;
PGconn *conn;
PGresult *result;
- int ch_flag, r;
+ int r;
size_t tupno, column, ncols;
Tcl_DString headers;
struct {
diff --git a/src/interfaces/libpgtcl/pgtclId.c b/src/interfaces/libpgtcl/pgtclId.c
index 53654b6da7..f39342c002 100644
--- a/src/interfaces/libpgtcl/pgtclId.c
+++ b/src/interfaces/libpgtcl/pgtclId.c
@@ -12,15 +12,16 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclId.c,v 1.2 1996/10/30 06:18:41 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclId.c,v 1.3 1996/11/11 12:14:45 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include <stdlib.h>
#include <string.h>
-#include "tcl.h"
+#include <tcl.h>
+#include "postgres.h"
#include "pgtclCmds.h"
#include "pgtclId.h"