Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit a03b817

Browse files
committed
Const fixes from D'Arcy.
1 parent ce3afcc commit a03b817

File tree

3 files changed

+22
-22
lines changed

3 files changed

+22
-22
lines changed

src/interfaces/libpq/fe-connect.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.89 1999/01/27 01:18:22 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.90 1999/02/04 03:20:39 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -48,7 +48,7 @@ static PGconn *makeEmptyPGconn(void);
4848
static void freePGconn(PGconn *conn);
4949
static void closePGconn(PGconn *conn);
5050
static int conninfo_parse(const char *conninfo, char *errorMessage);
51-
static char *conninfo_getval(char *keyword);
51+
static const char *conninfo_getval(const char *keyword);
5252
static void conninfo_free(void);
5353
static void defaultNoticeProcessor(void *arg, const char *message);
5454

@@ -172,8 +172,8 @@ static struct EnvironmentOptions
172172
PGconn *
173173
PQconnectdb(const char *conninfo)
174174
{
175-
PGconn *conn;
176-
char *tmp;
175+
PGconn *conn;
176+
const char *tmp;
177177

178178
/* ----------
179179
* Allocate memory for the conn structure
@@ -284,8 +284,8 @@ PQconndefaults(void)
284284
PGconn *
285285
PQsetdbLogin(const char *pghost, const char *pgport, const char *pgoptions, const char *pgtty, const char *dbName, const char *login, const char *pwd)
286286
{
287-
PGconn *conn;
288-
char *tmp;
287+
PGconn *conn;
288+
const char *tmp;
289289

290290
/* An error message from some service we call. */
291291
bool error = FALSE;
@@ -1137,7 +1137,7 @@ conninfo_parse(const char *conninfo, char *errorMessage)
11371137
char *pname;
11381138
char *pval;
11391139
char *buf;
1140-
char *tmp;
1140+
const char *tmp;
11411141
char *cp;
11421142
char *cp2;
11431143
PQconninfoOption *option;
@@ -1343,8 +1343,8 @@ conninfo_parse(const char *conninfo, char *errorMessage)
13431343
}
13441344

13451345

1346-
static char *
1347-
conninfo_getval(char *keyword)
1346+
static const char *
1347+
conninfo_getval(const char *keyword)
13481348
{
13491349
PQconninfoOption *option;
13501350

src/interfaces/libpq/fe-print.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* didn't really belong there.
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-print.c,v 1.17 1999/02/03 21:17:50 momjian Exp $
12+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-print.c,v 1.18 1999/02/04 03:20:39 momjian Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -679,7 +679,7 @@ do_header(FILE *fout, PQprintOpt *po, const int nFields, int *fieldMax,
679679
p = border;
680680
if (po->standard)
681681
{
682-
char *fs = po->fieldSep;
682+
const char *fs = po->fieldSep;
683683

684684
while (*fs++)
685685
*p++ = '+';
@@ -691,7 +691,7 @@ do_header(FILE *fout, PQprintOpt *po, const int nFields, int *fieldMax,
691691
for (len = fieldMax[j] + (po->standard ? 2 : 0); len--; *p++ = '-');
692692
if (po->standard || (j + 1) < nFields)
693693
{
694-
char *fs = po->fieldSep;
694+
const char *fs = po->fieldSep;
695695

696696
while (*fs++)
697697
*p++ = '+';

src/interfaces/libpq/libpq-fe.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: libpq-fe.h,v 1.45 1998/10/06 14:16:49 tgl Exp $
9+
* $Id: libpq-fe.h,v 1.46 1999/02/04 03:20:39 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -100,9 +100,9 @@ extern "C"
100100
pqbool html3; /* output html tables */
101101
pqbool expanded; /* expand tables */
102102
pqbool pager; /* use pager for output if needed */
103-
char *fieldSep; /* field separator */
104-
char *tableOpt; /* insert to HTML <table ...> */
105-
char *caption; /* HTML <caption> */
103+
const char *fieldSep; /* field separator */
104+
const char *tableOpt; /* insert to HTML <table ...> */
105+
const char *caption; /* HTML <caption> */
106106
char **fieldName; /* null terminated array of repalcement
107107
* field names */
108108
} PQprintOpt;
@@ -113,12 +113,12 @@ extern "C"
113113
*/
114114
typedef struct _PQconninfoOption
115115
{
116-
char *keyword; /* The keyword of the option */
117-
char *envvar; /* Fallback environment variable name */
118-
char *compiled; /* Fallback compiled in default value */
119-
char *val; /* Options value */
120-
char *label; /* Label for field in connect dialog */
121-
char *dispchar; /* Character to display for this field */
116+
const char *keyword; /* The keyword of the option */
117+
const char *envvar; /* Fallback environment variable name */
118+
const char *compiled; /* Fallback compiled in default value */
119+
char *val; /* Options value */
120+
const char *label; /* Label for field in connect dialog */
121+
const char *dispchar; /* Character to display for this field */
122122
/* in a connect dialog. Values are: */
123123
/* "" Display entered value as is */
124124
/* "*" Password field - hide value */

0 commit comments

Comments
 (0)