summaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
authorMarc G. Fournier1996-10-07 03:30:40 +0000
committerMarc G. Fournier1996-10-07 03:30:40 +0000
commitde466eb8f45da2db1a44716a31fcdfdf5080de16 (patch)
tree03e79e25f71226d06d1333b7adffbd6b4d97ceb9 /src/backend
parent257b4d090c96e6ca9b1c8e42c516090d7e7c8503 (diff)
Mostly adding "const" keyword and making some functions static.
Submitted by: D'Arcy Cain
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/catalog/pg_operator.c6
-rw-r--r--src/backend/include/miscadmin.h8
-rw-r--r--src/backend/utils/init/magic.c14
3 files changed, 14 insertions, 14 deletions
diff --git a/src/backend/catalog/pg_operator.c b/src/backend/catalog/pg_operator.c
index 27842971299..5e241202128 100644
--- a/src/backend/catalog/pg_operator.c
+++ b/src/backend/catalog/pg_operator.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.1.1.1 1996/07/09 06:21:17 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.2 1996/10/07 03:27:48 scrappy Exp $
*
* NOTES
* these routines moved here from commands/define.c and somewhat cleaned up.
@@ -35,7 +35,7 @@
#include "fmgr.h"
static Oid OperatorGetWithOpenRelation(Relation pg_operator_desc,
- char *operatorName,
+ const char *operatorName,
Oid leftObjectId,
Oid rightObjectId );
static Oid OperatorGet(char *operatorName,
@@ -79,7 +79,7 @@ static void OperatorUpd(Oid baseId , Oid commId , Oid negId );
*/
static Oid
OperatorGetWithOpenRelation(Relation pg_operator_desc,
- char *operatorName,
+ const char *operatorName,
Oid leftObjectId,
Oid rightObjectId)
{
diff --git a/src/backend/include/miscadmin.h b/src/backend/include/miscadmin.h
index 7f8b392b734..e67691d4aad 100644
--- a/src/backend/include/miscadmin.h
+++ b/src/backend/include/miscadmin.h
@@ -12,7 +12,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: miscadmin.h,v 1.3 1996/09/19 20:02:53 scrappy Exp $
+ * $Id: miscadmin.h,v 1.4 1996/10/07 03:28:12 scrappy Exp $
*
* NOTES
* some of the information in this file will be moved to
@@ -186,8 +186,8 @@ extern ProcessingMode GetProcessingMode(void);
/*
* Prototypes for utils/init/magic.c
*/
-extern int DatabaseMetaGunkIsConsistent(char database[], char path[]);
-extern int ValidPgVersion(char path []);
-extern void SetPgVersion(char path []);
+extern int DatabaseMetaGunkIsConsistent(const char *database, char *path);
+extern int ValidPgVersion(const char *path);
+extern void SetPgVersion(const char *path);
#endif /* MISCADMIN_H */
diff --git a/src/backend/utils/init/magic.c b/src/backend/utils/init/magic.c
index 8e93ff51f5e..c56de3769b5 100644
--- a/src/backend/utils/init/magic.c
+++ b/src/backend/utils/init/magic.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/magic.c,v 1.1.1.1 1996/07/09 06:22:09 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/magic.c,v 1.2 1996/10/07 03:29:30 scrappy Exp $
*
* NOTES
* XXX eventually, should be able to handle version identifiers
@@ -37,7 +37,7 @@ static char Pg_verfile[] = PG_VERFILE;
/*
* private function prototypes
*/
-static void PathSetVersionFilePath(char path[], char filepathbuf[]);
+static void PathSetVersionFilePath(const char *path, char *filepathbuf);
/*
* DatabaseMetaGunkIsConsistent
@@ -48,7 +48,7 @@ static void PathSetVersionFilePath(char path[], char filepathbuf[]);
* and checking the existence of the database whether Noversion is set or not.
*/
int
-DatabaseMetaGunkIsConsistent(char *database, char *path)
+DatabaseMetaGunkIsConsistent(const char *database, char *path)
{
int isValid;
#ifndef WIN32
@@ -80,7 +80,7 @@ DatabaseMetaGunkIsConsistent(char *database, char *path)
* version number.
*/
int
-ValidPgVersion(char *path)
+ValidPgVersion(const char *path)
{
int fd;
char version[4], buf[MAXPGPATH+1];
@@ -131,7 +131,7 @@ ValidPgVersion(char *path)
* SetPgVersion - writes the version to a database directory
*/
void
-SetPgVersion(char *path)
+SetPgVersion(const char *path)
{
int fd;
char version[4], buf[MAXPGPATH+1];
@@ -159,9 +159,9 @@ SetPgVersion(char *path)
* and the name of the version file name.
*/
static void
-PathSetVersionFilePath(char *path, char *filepathbuf)
+PathSetVersionFilePath(const char *path, char *filepathbuf)
{
if (strlen(path) > (MAXPGPATH - sizeof(Pg_verfile) - 1))
elog(FATAL, "PathSetVersionFilePath: %s: path too long");
- (void) sprintf(filepathbuf, "%s%c%s", path, SEP_CHAR, Pg_verfile);
+ sprintf(filepathbuf, "%s%c%s", path, SEP_CHAR, Pg_verfile);
}