1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-15 03:41:20 +03:00

Make functions static or ifdef NOT_USED. Prevent pg_version creation.

This commit is contained in:
Bruce Momjian
1998-10-08 18:30:52 +00:00
parent 0a1c2805b3
commit 173c555948
52 changed files with 173 additions and 164 deletions

View File

@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.27 1998/09/01 04:32:29 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.28 1998/10/08 18:30:05 momjian Exp $
*
* NOTES
* This code is actually (almost) unused.
@@ -941,6 +941,7 @@ intervalend(TimeInterval i)
* PRIVATE ROUTINES *
*****************************************************************************/
#ifdef NOT_USED
/*
* isreltime - returns 1, iff datestring is of type reltime
* 2, iff datestring is 'invalid time' identifier
@@ -987,6 +988,7 @@ isreltime(char *str)
return 0;
} /* isreltime() */
#endif
#if FALSE
int

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.58 1998/09/23 17:51:46 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.59 1998/10/08 18:30:07 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -46,6 +46,9 @@ static datetkn *datebsearch(char *key, datetkn *base, unsigned int nel);
static DateTime dt2local(DateTime dt, int timezone);
static void dt2time(DateTime dt, int *hour, int *min, double *sec);
static int j2day(int jd);
static double time2t(const int hour, const int min, const double sec);
static int timespan2tm(TimeSpan span, struct tm * tm, float8 *fsec);
static int tm2timespan(struct tm * tm, double fsec, TimeSpan *span);
#define USE_DATE_CACHE 1
#define ROUND_ALL 0
@@ -2529,7 +2532,7 @@ tm2datetime(struct tm * tm, double fsec, int *tzp, DateTime *result)
/* timespan2tm()
* Convert a timespan data type to a tm structure.
*/
int
static int
timespan2tm(TimeSpan span, struct tm * tm, float8 *fsec)
{
double time;
@@ -2566,7 +2569,7 @@ timespan2tm(TimeSpan span, struct tm * tm, float8 *fsec)
return 0;
} /* timespan2tm() */
int
static int
tm2timespan(struct tm * tm, double fsec, TimeSpan *span)
{
span->month = ((tm->tm_year * 12) + tm->tm_mon);
@@ -2590,7 +2593,7 @@ dt2local(DateTime dt, int tz)
return dt;
} /* dt2local() */
double
static double
time2t(const int hour, const int min, const double sec)
{
return (((hour * 60) + min) * 60) + sec;

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.45 1998/09/01 03:26:08 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.46 1998/10/08 18:30:09 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -361,6 +361,7 @@ AbsoluteTimeIsBefore(AbsoluteTime time1, AbsoluteTime time2)
return time1 < time2;
}
#ifdef NOT_USED
bool
AbsoluteTimeIsAfter(AbsoluteTime time1, AbsoluteTime time2)
{
@@ -375,7 +376,7 @@ AbsoluteTimeIsAfter(AbsoluteTime time1, AbsoluteTime time2)
return time1 > time2;
}
#endif
/* abstime_finite()
*/

View File

@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/name.c,v 1.15 1998/09/01 04:32:40 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/name.c,v 1.16 1998/10/08 18:30:11 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -155,11 +155,13 @@ namecat(Name n1, Name n2)
#endif
#ifdef NOT_USED
int
namecmp(Name n1, Name n2)
{
return strncmp(n1->data, n2->data, NAMEDATALEN);
}
#endif
int
namestrcpy(Name name, char *str)

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.43 1998/09/02 23:37:08 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.44 1998/10/08 18:30:12 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -20,6 +20,9 @@
#include "mb/pg_wchar.h"
static int text_cmp(text *arg1, text *arg2);
/*****************************************************************************
* USER I/O ROUTINES *
*****************************************************************************/
@@ -515,6 +518,7 @@ varstr_cmp(char *arg1, int len1, char *arg2, int len2)
return result;
} /* varstr_cmp() */
/* text_cmp()
* Comparison function for text strings.
* Includes locale support, but must copy strings to temporary memory
@@ -523,7 +527,7 @@ varstr_cmp(char *arg1, int len1, char *arg2, int len2)
* but it appears that most routines (incl. this one) assume not! - tgl 97/04/07
* Returns -1, 0 or 1
*/
int
static int
text_cmp(text *arg1, text *arg2)
{
char *a1p,

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.20 1998/09/01 03:26:42 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.21 1998/10/08 18:30:14 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -47,8 +47,6 @@ static int pronargs_save;
static func_ptr user_fn_save = (func_ptr) NULL;
static func_ptr handle_load(char *filename, char *funcname);
func_ptr trigger_dynamic(char *filename, char *funcname);
func_ptr
fmgr_dynamic(Oid procedureId, int *pronargs)
{
@@ -279,6 +277,7 @@ load_file(char *filename)
handle_load(filename, (char *) NULL);
}
/* Is this used? bjm 1998/10/08 */
func_ptr
trigger_dynamic(char *filename, char *funcname)
{

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.23 1998/10/05 02:48:49 thomas Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.24 1998/10/08 18:30:16 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -114,7 +114,6 @@ AbortPostgres()
proc_exit(FatalExitStatus);
}
#endif
/* ----------------
* StatusBackendExit
@@ -138,6 +137,8 @@ StatusPostmasterExit(int status)
/* someday, do some real cleanup and then call the LISP exit */
proc_exit(status);
}
#endif
/* ----------------------------------------------------------------
* processing mode support stuff (used to be in pmod.c)
@@ -145,6 +146,7 @@ StatusPostmasterExit(int status)
*/
static ProcessingMode Mode = NoProcessing;
#ifdef NOT_USED
/*
* IsNoProcessingMode --
* True iff processing mode is NoProcessing.
@@ -154,6 +156,7 @@ IsNoProcessingMode()
{
return (bool) (Mode == NoProcessing);
}
#endif
/*
* IsBootstrapProcessingMode --