Commit a03b8173 authored by Bruce Momjian's avatar Bruce Momjian

Const fixes from D'Arcy.

parent ce3afccf
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.89 1999/01/27 01:18:22 scrappy Exp $ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.90 1999/02/04 03:20:39 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -48,7 +48,7 @@ static PGconn *makeEmptyPGconn(void); ...@@ -48,7 +48,7 @@ static PGconn *makeEmptyPGconn(void);
static void freePGconn(PGconn *conn); static void freePGconn(PGconn *conn);
static void closePGconn(PGconn *conn); static void closePGconn(PGconn *conn);
static int conninfo_parse(const char *conninfo, char *errorMessage); static int conninfo_parse(const char *conninfo, char *errorMessage);
static char *conninfo_getval(char *keyword); static const char *conninfo_getval(const char *keyword);
static void conninfo_free(void); static void conninfo_free(void);
static void defaultNoticeProcessor(void *arg, const char *message); static void defaultNoticeProcessor(void *arg, const char *message);
...@@ -172,8 +172,8 @@ static struct EnvironmentOptions ...@@ -172,8 +172,8 @@ static struct EnvironmentOptions
PGconn * PGconn *
PQconnectdb(const char *conninfo) PQconnectdb(const char *conninfo)
{ {
PGconn *conn; PGconn *conn;
char *tmp; const char *tmp;
/* ---------- /* ----------
* Allocate memory for the conn structure * Allocate memory for the conn structure
...@@ -284,8 +284,8 @@ PQconndefaults(void) ...@@ -284,8 +284,8 @@ PQconndefaults(void)
PGconn * PGconn *
PQsetdbLogin(const char *pghost, const char *pgport, const char *pgoptions, const char *pgtty, const char *dbName, const char *login, const char *pwd) PQsetdbLogin(const char *pghost, const char *pgport, const char *pgoptions, const char *pgtty, const char *dbName, const char *login, const char *pwd)
{ {
PGconn *conn; PGconn *conn;
char *tmp; const char *tmp;
/* An error message from some service we call. */ /* An error message from some service we call. */
bool error = FALSE; bool error = FALSE;
...@@ -1137,7 +1137,7 @@ conninfo_parse(const char *conninfo, char *errorMessage) ...@@ -1137,7 +1137,7 @@ conninfo_parse(const char *conninfo, char *errorMessage)
char *pname; char *pname;
char *pval; char *pval;
char *buf; char *buf;
char *tmp; const char *tmp;
char *cp; char *cp;
char *cp2; char *cp2;
PQconninfoOption *option; PQconninfoOption *option;
...@@ -1343,8 +1343,8 @@ conninfo_parse(const char *conninfo, char *errorMessage) ...@@ -1343,8 +1343,8 @@ conninfo_parse(const char *conninfo, char *errorMessage)
} }
static char * static const char *
conninfo_getval(char *keyword) conninfo_getval(const char *keyword)
{ {
PQconninfoOption *option; PQconninfoOption *option;
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* didn't really belong there. * didn't really belong there.
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-print.c,v 1.17 1999/02/03 21:17:50 momjian Exp $ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-print.c,v 1.18 1999/02/04 03:20:39 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -679,7 +679,7 @@ do_header(FILE *fout, PQprintOpt *po, const int nFields, int *fieldMax, ...@@ -679,7 +679,7 @@ do_header(FILE *fout, PQprintOpt *po, const int nFields, int *fieldMax,
p = border; p = border;
if (po->standard) if (po->standard)
{ {
char *fs = po->fieldSep; const char *fs = po->fieldSep;
while (*fs++) while (*fs++)
*p++ = '+'; *p++ = '+';
...@@ -691,7 +691,7 @@ do_header(FILE *fout, PQprintOpt *po, const int nFields, int *fieldMax, ...@@ -691,7 +691,7 @@ do_header(FILE *fout, PQprintOpt *po, const int nFields, int *fieldMax,
for (len = fieldMax[j] + (po->standard ? 2 : 0); len--; *p++ = '-'); for (len = fieldMax[j] + (po->standard ? 2 : 0); len--; *p++ = '-');
if (po->standard || (j + 1) < nFields) if (po->standard || (j + 1) < nFields)
{ {
char *fs = po->fieldSep; const char *fs = po->fieldSep;
while (*fs++) while (*fs++)
*p++ = '+'; *p++ = '+';
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* $Id: libpq-fe.h,v 1.45 1998/10/06 14:16:49 tgl Exp $ * $Id: libpq-fe.h,v 1.46 1999/02/04 03:20:39 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -100,9 +100,9 @@ extern "C" ...@@ -100,9 +100,9 @@ extern "C"
pqbool html3; /* output html tables */ pqbool html3; /* output html tables */
pqbool expanded; /* expand tables */ pqbool expanded; /* expand tables */
pqbool pager; /* use pager for output if needed */ pqbool pager; /* use pager for output if needed */
char *fieldSep; /* field separator */ const char *fieldSep; /* field separator */
char *tableOpt; /* insert to HTML <table ...> */ const char *tableOpt; /* insert to HTML <table ...> */
char *caption; /* HTML <caption> */ const char *caption; /* HTML <caption> */
char **fieldName; /* null terminated array of repalcement char **fieldName; /* null terminated array of repalcement
* field names */ * field names */
} PQprintOpt; } PQprintOpt;
...@@ -113,12 +113,12 @@ extern "C" ...@@ -113,12 +113,12 @@ extern "C"
*/ */
typedef struct _PQconninfoOption typedef struct _PQconninfoOption
{ {
char *keyword; /* The keyword of the option */ const char *keyword; /* The keyword of the option */
char *envvar; /* Fallback environment variable name */ const char *envvar; /* Fallback environment variable name */
char *compiled; /* Fallback compiled in default value */ const char *compiled; /* Fallback compiled in default value */
char *val; /* Options value */ char *val; /* Options value */
char *label; /* Label for field in connect dialog */ const char *label; /* Label for field in connect dialog */
char *dispchar; /* Character to display for this field */ const char *dispchar; /* Character to display for this field */
/* in a connect dialog. Values are: */ /* in a connect dialog. Values are: */
/* "" Display entered value as is */ /* "" Display entered value as is */
/* "*" Password field - hide value */ /* "*" Password field - hide value */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment