diff options
author | Bruce Momjian | 2001-10-25 05:50:21 +0000 |
---|---|---|
committer | Bruce Momjian | 2001-10-25 05:50:21 +0000 |
commit | b81844b1738c584d92330a5ccd0fbd8b603d2886 (patch) | |
tree | 4fae0d4cd26048177fc5cd1a2dd91abc99ba0f99 /src/interfaces/libpgtcl | |
parent | 59da2105d8e6d95345b3b942a2e2aba8cead4838 (diff) |
pgindent run on all C files. Java run to follow. initdb/regression
tests pass.
Diffstat (limited to 'src/interfaces/libpgtcl')
-rw-r--r-- | src/interfaces/libpgtcl/libpgtcl.h | 3 | ||||
-rw-r--r-- | src/interfaces/libpgtcl/pgtcl.c | 9 | ||||
-rw-r--r-- | src/interfaces/libpgtcl/pgtclCmds.c | 14 | ||||
-rw-r--r-- | src/interfaces/libpgtcl/pgtclCmds.h | 11 | ||||
-rw-r--r-- | src/interfaces/libpgtcl/pgtclId.c | 13 | ||||
-rw-r--r-- | src/interfaces/libpgtcl/pgtclId.h | 3 |
6 files changed, 19 insertions, 34 deletions
diff --git a/src/interfaces/libpgtcl/libpgtcl.h b/src/interfaces/libpgtcl/libpgtcl.h index 2f9b49086fe..7d225d03e84 100644 --- a/src/interfaces/libpgtcl/libpgtcl.h +++ b/src/interfaces/libpgtcl/libpgtcl.h @@ -8,7 +8,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: libpgtcl.h,v 1.11 2001/01/24 19:43:29 momjian Exp $ + * $Id: libpgtcl.h,v 1.12 2001/10/25 05:50:12 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -20,5 +20,4 @@ extern int Pgtcl_Init(Tcl_Interp *interp); extern int Pgtcl_SafeInit(Tcl_Interp *interp); - #endif /* LIBPGTCL_H */ diff --git a/src/interfaces/libpgtcl/pgtcl.c b/src/interfaces/libpgtcl/pgtcl.c index 10f2ab03969..32e775f5d9b 100644 --- a/src/interfaces/libpgtcl/pgtcl.c +++ b/src/interfaces/libpgtcl/pgtcl.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtcl.c,v 1.23 2001/09/17 00:42:42 tgl Exp $ + * $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtcl.c,v 1.24 2001/10/25 05:50:12 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -29,7 +29,7 @@ int Pgtcl_Init(Tcl_Interp *interp) { - double tclversion; + double tclversion; /* * finish off the ChannelType struct. Much easier to do it here then @@ -41,8 +41,9 @@ Pgtcl_Init(Tcl_Interp *interp) #endif /* - * Tcl versions >= 8.1 use UTF-8 for their internal string representation. - * Therefore PGCLIENTENCODING must be set to UNICODE for these versions. + * Tcl versions >= 8.1 use UTF-8 for their internal string + * representation. Therefore PGCLIENTENCODING must be set to UNICODE + * for these versions. */ Tcl_GetDouble(interp, Tcl_GetVar(interp, "tcl_version", TCL_GLOBAL_ONLY), &tclversion); if (tclversion >= 8.1) diff --git a/src/interfaces/libpgtcl/pgtclCmds.c b/src/interfaces/libpgtcl/pgtclCmds.c index 8fef8732fd6..f3b4cf95f57 100644 --- a/src/interfaces/libpgtcl/pgtclCmds.c +++ b/src/interfaces/libpgtcl/pgtclCmds.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclCmds.c,v 1.57 2001/09/06 02:54:56 momjian Exp $ + * $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclCmds.c,v 1.58 2001/10/25 05:50:12 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -209,7 +209,6 @@ tcl_value(char *value) { if (*p == '\\') { - /* * escape sequence, translate it */ @@ -224,7 +223,6 @@ tcl_value(char *value) #endif return value; } - #endif /* TCL_ARRAYS */ @@ -310,7 +308,6 @@ Pg_connect(ClientData cData, Tcl_Interp *interp, int argc, char *argv[]) if (!strcmp("-conninfo", argv[1])) { - /* * Establish a connection using the new PQconnectdb() interface */ @@ -324,7 +321,6 @@ Pg_connect(ClientData cData, Tcl_Interp *interp, int argc, char *argv[]) } else { - /* * Establish a connection using the old PQsetdb() interface */ @@ -661,7 +657,6 @@ Pg_result(ClientData cData, Tcl_Interp *interp, int argc, char *argv[]) #else PQgetvalue(result, tupno, 0); - #endif char *workspace = malloc(strlen(field0) + strlen(appendstr) + 210); @@ -830,7 +825,6 @@ Pg_execute(ClientData cData, Tcl_Interp *interp, int argc, char *argv[]) if (strcmp(argv[i], "-array") == 0) { - /* * The rows should appear in an array vs. to single variables */ @@ -846,7 +840,6 @@ Pg_execute(ClientData cData, Tcl_Interp *interp, int argc, char *argv[]) if (strcmp(argv[i], "-oid") == 0) { - /* * We should place PQoidValue() somewhere */ @@ -955,7 +948,6 @@ Pg_execute(ClientData cData, Tcl_Interp *interp, int argc, char *argv[]) */ if (i == argc) { - /* * We don't have a loop body. If we have at least one result row, * we set all the variables to the first one and return. @@ -1272,7 +1264,6 @@ Pg_lo_read(ClientData cData, Tcl_Interp *interp, int argc, char *argv[]) return TCL_OK; } - #endif /*********************************** @@ -1365,7 +1356,6 @@ Pg_lo_write(ClientData cData, Tcl_Interp *interp, int argc, char *argv[]) sprintf(interp->result, "%d", nbytes); return TCL_OK; } - #endif /*********************************** @@ -1893,7 +1883,6 @@ Pg_listen(ClientData cData, Tcl_Interp *interp, int argc, char *argv[]) if (callback) { - /* * Create or update a callback for a relation */ @@ -1937,7 +1926,6 @@ Pg_listen(ClientData cData, Tcl_Interp *interp, int argc, char *argv[]) } else { - /* * Remove a callback for a relation */ diff --git a/src/interfaces/libpgtcl/pgtclCmds.h b/src/interfaces/libpgtcl/pgtclCmds.h index 6b40ea63c67..8f90af5aa98 100644 --- a/src/interfaces/libpgtcl/pgtclCmds.h +++ b/src/interfaces/libpgtcl/pgtclCmds.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: pgtclCmds.h,v 1.22 2001/09/06 02:54:56 momjian Exp $ + * $Id: pgtclCmds.h,v 1.23 2001/10/25 05:50:12 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -62,12 +62,13 @@ typedef struct Pg_ConnectionId_s int res_copyStatus; /* Copying status */ PGresult **results; /* The results */ - Pg_TclNotifies *notify_list;/* head of list of notify info */ + Pg_TclNotifies *notify_list; /* head of list of notify info */ int notifier_running; /* notify event source is live */ #if TCL_MAJOR_VERSION >= 8 - Tcl_Channel notifier_channel;/* Tcl_Channel on which notifier is listening */ + Tcl_Channel notifier_channel; /* Tcl_Channel on which notifier + * is listening */ #else - int notifier_socket;/* PQsocket on which notifier is listening */ + int notifier_socket; /* PQsocket on which notifier is listening */ #endif } Pg_ConnectionId; @@ -112,7 +113,6 @@ extern int Pg_lo_read( ClientData cData, Tcl_Interp *interp, int argc, char *argv[]); extern int Pg_lo_write( ClientData cData, Tcl_Interp *interp, int argc, char *argv[]); - #endif extern int Pg_lo_lseek( ClientData cData, Tcl_Interp *interp, int argc, char *argv[]); @@ -128,5 +128,4 @@ extern int Pg_lo_export( ClientData cData, Tcl_Interp *interp, int argc, char *argv[]); extern int Pg_listen( ClientData cData, Tcl_Interp *interp, int argc, char *argv[]); - #endif /* PGTCLCMDS_H */ diff --git a/src/interfaces/libpgtcl/pgtclId.c b/src/interfaces/libpgtcl/pgtclId.c index ef34c595a4d..06c3f3e18ec 100644 --- a/src/interfaces/libpgtcl/pgtclId.c +++ b/src/interfaces/libpgtcl/pgtclId.c @@ -13,7 +13,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclId.c,v 1.27 2001/09/07 21:55:00 momjian Exp $ + * $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclId.c,v 1.28 2001/10/25 05:50:12 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -135,7 +135,6 @@ PgGetFileProc(ClientData cData, int direction) { return (Tcl_File) NULL; } - #endif /* @@ -147,7 +146,7 @@ PgWatchProc(ClientData instanceData, int mask) } static int PgGetHandleProc(ClientData instanceData, int direction, - ClientData *handlePtr) + ClientData *handlePtr) { return TCL_ERROR; } @@ -163,7 +162,7 @@ Tcl_ChannelType Pg_ConnType = { NULL, /* GetOptionProc, Not used */ PgWatchProc, /* WatchProc, must be defined */ PgGetHandleProc, /* GetHandleProc, must be defined */ - NULL /* Close2Proc, Not used */ + NULL /* Close2Proc, Not used */ }; /* @@ -395,7 +394,7 @@ getresid(Tcl_Interp *interp, char *id, Pg_ConnectionId ** connid_p) /* * Get back the result pointer from the Id */ -PGresult * +PGresult * PgGetResultId(Tcl_Interp *interp, char *id) { Pg_ConnectionId *connid; @@ -710,7 +709,7 @@ PgStartNotifyEventSource(Pg_ConnectionId * connid) { #if TCL_MAJOR_VERSION >= 8 Tcl_CreateChannelHandler(connid->notifier_channel, TCL_READABLE, - Pg_Notify_FileHandler, (ClientData) connid); + Pg_Notify_FileHandler, (ClientData) connid); #else /* In Tcl 7.5 and 7.6, we need to gin up a Tcl_File. */ Tcl_File tclfile = Tcl_GetFile((ClientData) pqsock, TCL_UNIX_FD); @@ -732,7 +731,7 @@ PgStopNotifyEventSource(Pg_ConnectionId * connid) { #if TCL_MAJOR_VERSION >= 8 Tcl_DeleteChannelHandler(connid->notifier_channel, - Pg_Notify_FileHandler, (ClientData) connid); + Pg_Notify_FileHandler, (ClientData) connid); #else /* In Tcl 7.5 and 7.6, we need to gin up a Tcl_File. */ Tcl_File tclfile = Tcl_GetFile((ClientData) connid->notifier_socket, diff --git a/src/interfaces/libpgtcl/pgtclId.h b/src/interfaces/libpgtcl/pgtclId.h index fd12ee4a48a..4f37378f34a 100644 --- a/src/interfaces/libpgtcl/pgtclId.h +++ b/src/interfaces/libpgtcl/pgtclId.h @@ -10,7 +10,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: pgtclId.h,v 1.16 2001/01/24 19:43:29 momjian Exp $ + * $Id: pgtclId.h,v 1.17 2001/10/25 05:50:12 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -57,7 +57,6 @@ extern void PgNotifyInterpDelete(ClientData clientData, Tcl_Interp *interp); #if HAVE_TCL_GETFILEPROC extern Tcl_File PgGetFileProc(ClientData cData, int direction); - #endif extern Tcl_ChannelType Pg_ConnType; |