aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils/adt')
-rw-r--r--src/backend/utils/adt/acl.c5
-rw-r--r--src/backend/utils/adt/arrayfuncs.c38
-rw-r--r--src/backend/utils/adt/cash.c30
-rw-r--r--src/backend/utils/adt/char.c4
-rw-r--r--src/backend/utils/adt/chunk.c16
-rw-r--r--src/backend/utils/adt/date.c6
-rw-r--r--src/backend/utils/adt/datetime.c22
-rw-r--r--src/backend/utils/adt/dt.c94
-rw-r--r--src/backend/utils/adt/float.c4
-rw-r--r--src/backend/utils/adt/geo_ops.c393
-rw-r--r--src/backend/utils/adt/int.c10
-rw-r--r--src/backend/utils/adt/like.c12
-rw-r--r--src/backend/utils/adt/misc.c6
-rw-r--r--src/backend/utils/adt/nabstime.c8
-rw-r--r--src/backend/utils/adt/name.c16
-rw-r--r--src/backend/utils/adt/oid.c8
-rw-r--r--src/backend/utils/adt/oidint2.c6
-rw-r--r--src/backend/utils/adt/oidint4.c6
-rw-r--r--src/backend/utils/adt/oidname.c18
-rw-r--r--src/backend/utils/adt/oracle_compat.c42
-rw-r--r--src/backend/utils/adt/regexp.c10
-rw-r--r--src/backend/utils/adt/timestamp.c2
-rw-r--r--src/backend/utils/adt/varlena.c14
23 files changed, 387 insertions, 383 deletions
diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c
index e1a2db85ff1..119bac40ef9 100644
--- a/src/backend/utils/adt/acl.c
+++ b/src/backend/utils/adt/acl.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.16 1997/09/08 20:57:16 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.17 1997/09/08 21:48:05 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -653,13 +653,14 @@ aclmakeuser(char *user_type, char *user)
*/
ChangeACLStmt *
-makeAclStmt(char *privileges, List * rel_list, char *grantee,
+makeAclStmt(char *privileges, List *rel_list, char *grantee,
char grant_or_revoke)
{
ChangeACLStmt *n = makeNode(ChangeACLStmt);
char str[MAX_PARSE_BUFFER];
n->aclitem = (AclItem *) palloc(sizeof(AclItem));
+
/* the grantee string is "G <group_name>", "U <user_name>", or "ALL" */
if (grantee[0] == 'G') /* group permissions */
{
diff --git a/src/backend/utils/adt/arrayfuncs.c b/src/backend/utils/adt/arrayfuncs.c
index 7b1cb869a98..a9a32d11c56 100644
--- a/src/backend/utils/adt/arrayfuncs.c
+++ b/src/backend/utils/adt/arrayfuncs.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.18 1997/09/08 20:57:21 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.19 1997/09/08 21:48:09 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -51,7 +51,7 @@ _ReadArrayStr(char *arrayStr, int nitems, int ndim, int dim[],
#ifdef LOARRAY
static char *
-_ReadLOArray(char *str, int *nbytes, int *fd, bool * chunkFlag,
+_ReadLOArray(char *str, int *nbytes, int *fd, bool *chunkFlag,
int ndim, int dim[], int baseSize);
#endif
@@ -60,7 +60,7 @@ _CopyArrayEls(char **values, char *p, int nitems, int typlen,
char typalign, bool typbyval);
static void
system_cache_lookup(Oid element_type, bool input, int *typlen,
- bool * typbyval, char *typdelim, Oid * typelem, Oid * proc,
+ bool *typbyval, char *typdelim, Oid *typelem, Oid *proc,
char *typalign);
static Datum _ArrayCast(char *value, bool byval, int len);
@@ -74,10 +74,10 @@ _ArrayRange(int st[], int endp[], int bsize, char *destPtr,
static int _ArrayClipCount(int stI[], int endpI[], ArrayType *array);
static void
_LOArrayRange(int st[], int endp[], int bsize, int srcfd,
- int destfd, ArrayType *array, int isSrcLO, bool * isNull);
+ int destfd, ArrayType *array, int isSrcLO, bool *isNull);
static void
_ReadArray(int st[], int endp[], int bsize, int srcfd, int destfd,
- ArrayType *array, int isDestLO, bool * isNull);
+ ArrayType *array, int isDestLO, bool *isNull);
static ArrayCastAndSet(char *src, bool typbyval, int typlen, char *dest);
static SanityCheckInput(int ndim, int n, int dim[], int lb[], int indx[]);
static int array_read(char *destptr, int eltsize, int nitems, char *srcptr);
@@ -521,7 +521,7 @@ static char *
_ReadLOArray(char *str,
int *nbytes,
int *fd,
- bool * chunkFlag,
+ bool *chunkFlag,
int ndim,
int dim[],
int baseSize)
@@ -771,7 +771,7 @@ array_out(ArrayType *v, Oid element_type)
*----------------------------------------------------------------------------
*/
char *
-array_dims(ArrayType *v, bool * isNull)
+array_dims(ArrayType *v, bool *isNull)
{
char *p,
*save_p;
@@ -816,7 +816,7 @@ array_ref(ArrayType *array,
int reftype,
int elmlen,
int arraylen,
- bool * isNull)
+ bool *isNull)
{
int i,
ndim,
@@ -937,7 +937,7 @@ array_clip(ArrayType *array,
int lowerIndx[],
int reftype,
int len,
- bool * isNull)
+ bool *isNull)
{
int i,
ndim,
@@ -1080,7 +1080,7 @@ array_set(ArrayType *array,
int reftype,
int elmlen,
int arraylen,
- bool * isNull)
+ bool *isNull)
{
int ndim,
*dim,
@@ -1215,7 +1215,7 @@ array_assgn(ArrayType *array,
ArrayType *newArr,
int reftype,
int len,
- bool * isNull)
+ bool *isNull)
{
int i,
ndim,
@@ -1301,10 +1301,10 @@ static void
system_cache_lookup(Oid element_type,
bool input,
int *typlen,
- bool * typbyval,
+ bool *typbyval,
char *typdelim,
- Oid * typelem,
- Oid * proc,
+ Oid *typelem,
+ Oid *proc,
char *typalign)
{
HeapTuple typeTuple;
@@ -1343,12 +1343,12 @@ _ArrayCast(char *value, bool byval, int len)
switch (len)
{
case 1:
- return ((Datum) * value);
+ return ((Datum) *value);
case 2:
- return ((Datum) * (int16 *) value);
+ return ((Datum) *(int16 *) value);
case 3:
case 4:
- return ((Datum) * (int32 *) value);
+ return ((Datum) *(int32 *) value);
default:
elog(WARN, "array_ref: byval and elt len > 4!");
break;
@@ -1570,7 +1570,7 @@ _LOArrayRange(int st[],
int destfd,
ArrayType *array,
int isSrcLO,
- bool * isNull)
+ bool *isNull)
{
int n,
*dim,
@@ -1624,7 +1624,7 @@ _ReadArray(int st[],
int destfd,
ArrayType *array,
int isDestLO,
- bool * isNull)
+ bool *isNull)
{
int n,
*dim,
diff --git a/src/backend/utils/adt/cash.c b/src/backend/utils/adt/cash.c
index a219ea3b832..6430e9d00f4 100644
--- a/src/backend/utils/adt/cash.c
+++ b/src/backend/utils/adt/cash.c
@@ -9,7 +9,7 @@
* workings can be found in the book "Software Solutions in C" by
* Dale Schumacher, Academic Press, ISBN: 0-12-632360-7.
*
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/cash.c,v 1.11 1997/09/08 02:30:27 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/cash.c,v 1.12 1997/09/08 21:48:13 momjian Exp $
*/
#include <stdio.h>
@@ -165,7 +165,7 @@ cash_in(const char *str)
* positive-valued amounts. - tgl 97/04/14
*/
const char *
-cash_out(Cash * value)
+cash_out(Cash *value)
{
char *result;
char buf[CASH_BUFSZ];
@@ -271,7 +271,7 @@ cash_out(Cash * value)
bool
-cash_eq(Cash * c1, Cash * c2)
+cash_eq(Cash *c1, Cash *c2)
{
if (!PointerIsValid(c1) || !PointerIsValid(c2))
return (FALSE);
@@ -280,7 +280,7 @@ cash_eq(Cash * c1, Cash * c2)
} /* cash_eq() */
bool
-cash_ne(Cash * c1, Cash * c2)
+cash_ne(Cash *c1, Cash *c2)
{
if (!PointerIsValid(c1) || !PointerIsValid(c2))
return (FALSE);
@@ -289,7 +289,7 @@ cash_ne(Cash * c1, Cash * c2)
} /* cash_ne() */
bool
-cash_lt(Cash * c1, Cash * c2)
+cash_lt(Cash *c1, Cash *c2)
{
if (!PointerIsValid(c1) || !PointerIsValid(c2))
return (FALSE);
@@ -298,7 +298,7 @@ cash_lt(Cash * c1, Cash * c2)
} /* cash_lt() */
bool
-cash_le(Cash * c1, Cash * c2)
+cash_le(Cash *c1, Cash *c2)
{
if (!PointerIsValid(c1) || !PointerIsValid(c2))
return (FALSE);
@@ -307,7 +307,7 @@ cash_le(Cash * c1, Cash * c2)
} /* cash_le() */
bool
-cash_gt(Cash * c1, Cash * c2)
+cash_gt(Cash *c1, Cash *c2)
{
if (!PointerIsValid(c1) || !PointerIsValid(c2))
return (FALSE);
@@ -316,7 +316,7 @@ cash_gt(Cash * c1, Cash * c2)
} /* cash_gt() */
bool
-cash_ge(Cash * c1, Cash * c2)
+cash_ge(Cash *c1, Cash *c2)
{
if (!PointerIsValid(c1) || !PointerIsValid(c2))
return (FALSE);
@@ -329,7 +329,7 @@ cash_ge(Cash * c1, Cash * c2)
* Add two cash values.
*/
Cash *
-cash_pl(Cash * c1, Cash * c2)
+cash_pl(Cash *c1, Cash *c2)
{
Cash *result;
@@ -349,7 +349,7 @@ cash_pl(Cash * c1, Cash * c2)
* Subtract two cash values.
*/
Cash *
-cash_mi(Cash * c1, Cash * c2)
+cash_mi(Cash *c1, Cash *c2)
{
Cash *result;
@@ -369,7 +369,7 @@ cash_mi(Cash * c1, Cash * c2)
* Multiply cash by floating point number.
*/
Cash *
-cash_mul(Cash * c, float8 * f)
+cash_mul(Cash *c, float8 *f)
{
Cash *result;
@@ -392,7 +392,7 @@ cash_mul(Cash * c, float8 * f)
* Round for now. - tgl 97/04/15
*/
Cash *
-cash_div(Cash * c, float8 * f)
+cash_div(Cash *c, float8 *f)
{
Cash *result;
@@ -415,7 +415,7 @@ cash_div(Cash * c, float8 * f)
* Return larger of two cash values.
*/
Cash *
-cashlarger(Cash * c1, Cash * c2)
+cashlarger(Cash *c1, Cash *c2)
{
Cash *result;
@@ -435,7 +435,7 @@ cashlarger(Cash * c1, Cash * c2)
* Return smaller of two cash values.
*/
Cash *
-cashsmaller(Cash * c1, Cash * c2)
+cashsmaller(Cash *c1, Cash *c2)
{
Cash *result;
@@ -456,7 +456,7 @@ cashsmaller(Cash * c1, Cash * c2)
* Obviously way North American centric - sorry
*/
const char *
-cash_words_out(Cash * value)
+cash_words_out(Cash *value)
{
static char buf[128];
char *p = buf;
diff --git a/src/backend/utils/adt/char.c b/src/backend/utils/adt/char.c
index 61f999b6700..9d719319d9a 100644
--- a/src/backend/utils/adt/char.c
+++ b/src/backend/utils/adt/char.c
@@ -12,7 +12,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/char.c,v 1.10 1997/09/08 20:57:22 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/char.c,v 1.11 1997/09/08 21:48:18 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -34,7 +34,7 @@ charin(char *ch)
{
if (ch == NULL)
return ((int32) NULL);
- return ((int32) * ch);
+ return ((int32) *ch);
}
/*
diff --git a/src/backend/utils/adt/chunk.c b/src/backend/utils/adt/chunk.c
index 353a221859c..ea274467a12 100644
--- a/src/backend/utils/adt/chunk.c
+++ b/src/backend/utils/adt/chunk.c
@@ -6,7 +6,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/chunk.c,v 1.9 1997/09/08 20:57:24 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/chunk.c,v 1.10 1997/09/08 21:48:19 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -49,7 +49,7 @@ static int
_FindBestChunk(int size, int dmax[], int dbest[], int dim,
int A[MAXPAT][MAXDIM + 1], int N);
static int get_next(int d[], int k, int C, int dmax[]);
-static void initialize_info(CHUNK_INFO * A, int ndim, int dim[], int chunk[]);
+static void initialize_info(CHUNK_INFO *A, int ndim, int dim[], int chunk[]);
#ifdef LOARRAY
static void
@@ -63,7 +63,7 @@ static int seek_and_read(int pos, int size, char buff[], int fp, int from);
#endif
static int
-GetChunkSize(FILE * fd, int ndim, int dim[MAXDIM], int baseSize,
+GetChunkSize(FILE *fd, int ndim, int dim[MAXDIM], int baseSize,
int d[MAXDIM]);
/*------------------------------------------------------------------------
@@ -77,7 +77,7 @@ GetChunkSize(FILE * fd, int ndim, int dim[MAXDIM], int baseSize,
*/
char *
_ChunkArray(int fd,
- FILE * afd,
+ FILE *afd,
int ndim,
int dim[],
int baseSize,
@@ -130,7 +130,7 @@ _ChunkArray(int fd,
*-----------------------------------------------------------------------
*/
static int
-GetChunkSize(FILE * fd,
+GetChunkSize(FILE *fd,
int ndim,
int dim[MAXDIM],
int baseSize,
@@ -276,7 +276,7 @@ static char a_chunk[BLCKSZ + 4];/* 4 since a_chunk is in varlena format */
#endif
static void
-initialize_info(CHUNK_INFO * A, int ndim, int dim[], int chunk[])
+initialize_info(CHUNK_INFO *A, int ndim, int dim[], int chunk[])
{
int i;
@@ -441,7 +441,7 @@ _ReadChunkArray(int st[],
char *destfp,
ArrayType *array,
int isDestLO,
- bool * isNull)
+ bool *isNull)
{
int i,
j,
@@ -638,7 +638,7 @@ _ReadChunkArray1El(int st[],
int bsize,
int fp,
ArrayType *array,
- bool * isNull)
+ bool *isNull)
{
int i,
j,
diff --git a/src/backend/utils/adt/date.c b/src/backend/utils/adt/date.c
index 7543780cffa..7843dee6493 100644
--- a/src/backend/utils/adt/date.c
+++ b/src/backend/utils/adt/date.c
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.17 1997/09/08 20:57:26 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.18 1997/09/08 21:48:21 momjian Exp $
*
* NOTES
* This code is actually (almost) unused.
@@ -304,7 +304,7 @@ tintervalout(TimeInterval interval)
*****************************************************************************/
RelativeTime
-timespan_reltime(TimeSpan * timespan)
+timespan_reltime(TimeSpan *timespan)
{
RelativeTime time;
int year,
@@ -1071,7 +1071,7 @@ timeofday(void)
gettimeofday(&tp, &tpz);
strftime(templ, sizeof(templ), "%a %b %d %H:%M:%S.%%d %Y %Z",
- localtime((time_t *) & tp.tv_sec));
+ localtime((time_t *) &tp.tv_sec));
sprintf(buf, templ, tp.tv_usec);
len = VARHDRSZ + strlen(buf);
diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c
index 0ab3b501022..ed41398dea8 100644
--- a/src/backend/utils/adt/datetime.c
+++ b/src/backend/utils/adt/datetime.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.15 1997/09/08 02:30:34 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.16 1997/09/08 21:48:22 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -268,7 +268,7 @@ date_datetime(DateADT dateVal)
* Convert datetime to date data type.
*/
DateADT
-datetime_date(DateTime * datetime)
+datetime_date(DateTime *datetime)
{
DateADT result;
struct tm tt,
@@ -485,7 +485,7 @@ time_in(char *str)
char *
-time_out(TimeADT * time)
+time_out(TimeADT *time)
{
char *result;
struct tm tt,
@@ -539,7 +539,7 @@ time_out(TimeADT * time)
bool
-time_eq(TimeADT * time1, TimeADT * time2)
+time_eq(TimeADT *time1, TimeADT *time2)
{
if (!PointerIsValid(time1) || !PointerIsValid(time2))
return (FALSE);
@@ -548,7 +548,7 @@ time_eq(TimeADT * time1, TimeADT * time2)
} /* time_eq() */
bool
-time_ne(TimeADT * time1, TimeADT * time2)
+time_ne(TimeADT *time1, TimeADT *time2)
{
if (!PointerIsValid(time1) || !PointerIsValid(time2))
return (FALSE);
@@ -557,7 +557,7 @@ time_ne(TimeADT * time1, TimeADT * time2)
} /* time_eq() */
bool
-time_lt(TimeADT * time1, TimeADT * time2)
+time_lt(TimeADT *time1, TimeADT *time2)
{
if (!PointerIsValid(time1) || !PointerIsValid(time2))
return (FALSE);
@@ -566,7 +566,7 @@ time_lt(TimeADT * time1, TimeADT * time2)
} /* time_eq() */
bool
-time_le(TimeADT * time1, TimeADT * time2)
+time_le(TimeADT *time1, TimeADT *time2)
{
if (!PointerIsValid(time1) || !PointerIsValid(time2))
return (FALSE);
@@ -575,7 +575,7 @@ time_le(TimeADT * time1, TimeADT * time2)
} /* time_eq() */
bool
-time_gt(TimeADT * time1, TimeADT * time2)
+time_gt(TimeADT *time1, TimeADT *time2)
{
if (!PointerIsValid(time1) || !PointerIsValid(time2))
return (FALSE);
@@ -584,7 +584,7 @@ time_gt(TimeADT * time1, TimeADT * time2)
} /* time_eq() */
bool
-time_ge(TimeADT * time1, TimeADT * time2)
+time_ge(TimeADT *time1, TimeADT *time2)
{
if (!PointerIsValid(time1) || !PointerIsValid(time2))
return (FALSE);
@@ -593,7 +593,7 @@ time_ge(TimeADT * time1, TimeADT * time2)
} /* time_eq() */
int
-time_cmp(TimeADT * time1, TimeADT * time2)
+time_cmp(TimeADT *time1, TimeADT *time2)
{
return ((*time1 < *time2) ? -1 : (((*time1 > *time2) ? 1 : 0)));
} /* time_cmp() */
@@ -603,7 +603,7 @@ time_cmp(TimeADT * time1, TimeADT * time2)
* Convert date and time to datetime data type.
*/
DateTime *
-datetime_datetime(DateADT date, TimeADT * time)
+datetime_datetime(DateADT date, TimeADT *time)
{
DateTime *result;
diff --git a/src/backend/utils/adt/dt.c b/src/backend/utils/adt/dt.c
index e7968e9a40c..12c43f1d7e2 100644
--- a/src/backend/utils/adt/dt.c
+++ b/src/backend/utils/adt/dt.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.39 1997/09/08 02:30:37 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.40 1997/09/08 21:48:23 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -45,12 +45,12 @@ DecodeTime(char *str, int fmask, int *tmask,
static int DecodeTimezone(char *str, int *tzp);
static int DecodeUnits(int field, char *lowtoken, int *val);
static int EncodeSpecialDateTime(DateTime dt, char *str);
-static datetkn *datebsearch(char *key, datetkn * base, unsigned int nel);
+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 int timespan2tm(TimeSpan span, struct tm * tm, float8 * fsec);
-static int tm2timespan(struct tm * tm, double fsec, TimeSpan * span);
+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
@@ -162,7 +162,7 @@ datetime_in(char *str)
* Convert a datetime to external form.
*/
char *
-datetime_out(DateTime * dt)
+datetime_out(DateTime *dt)
{
char *result;
int tz;
@@ -258,7 +258,7 @@ timespan_in(char *str)
* Convert a time span to external form.
*/
char *
-timespan_out(TimeSpan * span)
+timespan_out(TimeSpan *span)
{
char *result;
@@ -289,7 +289,7 @@ timespan_out(TimeSpan * span)
bool
-datetime_finite(DateTime * datetime)
+datetime_finite(DateTime *datetime)
{
if (!PointerIsValid(datetime))
return FALSE;
@@ -300,7 +300,7 @@ datetime_finite(DateTime * datetime)
#ifdef NOT_USED
bool
-timespan_finite(TimeSpan * timespan)
+timespan_finite(TimeSpan *timespan)
{
if (!PointerIsValid(timespan))
return FALSE;
@@ -371,7 +371,7 @@ SetDateTime(DateTime dt)
/* datetime_relop - is datetime1 relop datetime2
*/
bool
-datetime_eq(DateTime * datetime1, DateTime * datetime2)
+datetime_eq(DateTime *datetime1, DateTime *datetime2)
{
DateTime dt1,
dt2;
@@ -394,7 +394,7 @@ datetime_eq(DateTime * datetime1, DateTime * datetime2)
} /* datetime_eq() */
bool
-datetime_ne(DateTime * datetime1, DateTime * datetime2)
+datetime_ne(DateTime *datetime1, DateTime *datetime2)
{
DateTime dt1,
dt2;
@@ -417,7 +417,7 @@ datetime_ne(DateTime * datetime1, DateTime * datetime2)
} /* datetime_ne() */
bool
-datetime_lt(DateTime * datetime1, DateTime * datetime2)
+datetime_lt(DateTime *datetime1, DateTime *datetime2)
{
DateTime dt1,
dt2;
@@ -440,7 +440,7 @@ datetime_lt(DateTime * datetime1, DateTime * datetime2)
} /* datetime_lt() */
bool
-datetime_gt(DateTime * datetime1, DateTime * datetime2)
+datetime_gt(DateTime *datetime1, DateTime *datetime2)
{
DateTime dt1,
dt2;
@@ -466,7 +466,7 @@ datetime_gt(DateTime * datetime1, DateTime * datetime2)
} /* datetime_gt() */
bool
-datetime_le(DateTime * datetime1, DateTime * datetime2)
+datetime_le(DateTime *datetime1, DateTime *datetime2)
{
DateTime dt1,
dt2;
@@ -489,7 +489,7 @@ datetime_le(DateTime * datetime1, DateTime * datetime2)
} /* datetime_le() */
bool
-datetime_ge(DateTime * datetime1, DateTime * datetime2)
+datetime_ge(DateTime *datetime1, DateTime *datetime2)
{
DateTime dt1,
dt2;
@@ -516,7 +516,7 @@ datetime_ge(DateTime * datetime1, DateTime * datetime2)
* collate invalid datetime at the end
*/
int
-datetime_cmp(DateTime * datetime1, DateTime * datetime2)
+datetime_cmp(DateTime *datetime1, DateTime *datetime2)
{
DateTime dt1,
dt2;
@@ -552,7 +552,7 @@ datetime_cmp(DateTime * datetime1, DateTime * datetime2)
/* timespan_relop - is timespan1 relop timespan2
*/
bool
-timespan_eq(TimeSpan * timespan1, TimeSpan * timespan2)
+timespan_eq(TimeSpan *timespan1, TimeSpan *timespan2)
{
if (!PointerIsValid(timespan1) || !PointerIsValid(timespan2))
return FALSE;
@@ -565,7 +565,7 @@ timespan_eq(TimeSpan * timespan1, TimeSpan * timespan2)
} /* timespan_eq() */
bool
-timespan_ne(TimeSpan * timespan1, TimeSpan * timespan2)
+timespan_ne(TimeSpan *timespan1, TimeSpan *timespan2)
{
if (!PointerIsValid(timespan1) || !PointerIsValid(timespan2))
return FALSE;
@@ -578,7 +578,7 @@ timespan_ne(TimeSpan * timespan1, TimeSpan * timespan2)
} /* timespan_ne() */
bool
-timespan_lt(TimeSpan * timespan1, TimeSpan * timespan2)
+timespan_lt(TimeSpan *timespan1, TimeSpan *timespan2)
{
double span1,
span2;
@@ -600,7 +600,7 @@ timespan_lt(TimeSpan * timespan1, TimeSpan * timespan2)
} /* timespan_lt() */
bool
-timespan_gt(TimeSpan * timespan1, TimeSpan * timespan2)
+timespan_gt(TimeSpan *timespan1, TimeSpan *timespan2)
{
double span1,
span2;
@@ -622,7 +622,7 @@ timespan_gt(TimeSpan * timespan1, TimeSpan * timespan2)
} /* timespan_gt() */
bool
-timespan_le(TimeSpan * timespan1, TimeSpan * timespan2)
+timespan_le(TimeSpan *timespan1, TimeSpan *timespan2)
{
double span1,
span2;
@@ -644,7 +644,7 @@ timespan_le(TimeSpan * timespan1, TimeSpan * timespan2)
} /* timespan_le() */
bool
-timespan_ge(TimeSpan * timespan1, TimeSpan * timespan2)
+timespan_ge(TimeSpan *timespan1, TimeSpan *timespan2)
{
double span1,
span2;
@@ -669,7 +669,7 @@ timespan_ge(TimeSpan * timespan1, TimeSpan * timespan2)
/* timespan_cmp - 3-state comparison for timespan
*/
int
-timespan_cmp(TimeSpan * timespan1, TimeSpan * timespan2)
+timespan_cmp(TimeSpan *timespan1, TimeSpan *timespan2)
{
double span1,
span2;
@@ -707,7 +707,7 @@ timespan_cmp(TimeSpan * timespan1, TimeSpan * timespan2)
*---------------------------------------------------------*/
DateTime *
-datetime_smaller(DateTime * datetime1, DateTime * datetime2)
+datetime_smaller(DateTime *datetime1, DateTime *datetime2)
{
DateTime *result;
@@ -744,7 +744,7 @@ datetime_smaller(DateTime * datetime1, DateTime * datetime2)
} /* datetime_smaller() */
DateTime *
-datetime_larger(DateTime * datetime1, DateTime * datetime2)
+datetime_larger(DateTime *datetime1, DateTime *datetime2)
{
DateTime *result;
@@ -782,7 +782,7 @@ datetime_larger(DateTime * datetime1, DateTime * datetime2)
TimeSpan *
-datetime_mi(DateTime * datetime1, DateTime * datetime2)
+datetime_mi(DateTime *datetime1, DateTime *datetime2)
{
TimeSpan *result;
@@ -831,7 +831,7 @@ datetime_mi(DateTime * datetime1, DateTime * datetime2)
* to the last day of month.
*/
DateTime *
-datetime_pl_span(DateTime * datetime, TimeSpan * span)
+datetime_pl_span(DateTime *datetime, TimeSpan *span)
{
DateTime *result;
DateTime dt;
@@ -925,7 +925,7 @@ datetime_pl_span(DateTime * datetime, TimeSpan * span)
} /* datetime_pl_span() */
DateTime *
-datetime_mi_span(DateTime * datetime, TimeSpan * span)
+datetime_mi_span(DateTime *datetime, TimeSpan *span)
{
DateTime *result;
TimeSpan tspan;
@@ -943,7 +943,7 @@ datetime_mi_span(DateTime * datetime, TimeSpan * span)
TimeSpan *
-timespan_um(TimeSpan * timespan)
+timespan_um(TimeSpan *timespan)
{
TimeSpan *result;
@@ -960,7 +960,7 @@ timespan_um(TimeSpan * timespan)
TimeSpan *
-timespan_smaller(TimeSpan * timespan1, TimeSpan * timespan2)
+timespan_smaller(TimeSpan *timespan1, TimeSpan *timespan2)
{
TimeSpan *result;
@@ -1015,7 +1015,7 @@ timespan_smaller(TimeSpan * timespan1, TimeSpan * timespan2)
} /* timespan_smaller() */
TimeSpan *
-timespan_larger(TimeSpan * timespan1, TimeSpan * timespan2)
+timespan_larger(TimeSpan *timespan1, TimeSpan *timespan2)
{
TimeSpan *result;
@@ -1071,7 +1071,7 @@ timespan_larger(TimeSpan * timespan1, TimeSpan * timespan2)
TimeSpan *
-timespan_pl(TimeSpan * span1, TimeSpan * span2)
+timespan_pl(TimeSpan *span1, TimeSpan *span2)
{
TimeSpan *result;
@@ -1087,7 +1087,7 @@ timespan_pl(TimeSpan * span1, TimeSpan * span2)
} /* timespan_pl() */
TimeSpan *
-timespan_mi(TimeSpan * span1, TimeSpan * span2)
+timespan_mi(TimeSpan *span1, TimeSpan *span2)
{
TimeSpan *result;
@@ -1103,7 +1103,7 @@ timespan_mi(TimeSpan * span1, TimeSpan * span2)
} /* timespan_mi() */
TimeSpan *
-timespan_div(TimeSpan * span1, float8 * arg2)
+timespan_div(TimeSpan *span1, float8 *arg2)
{
TimeSpan *result;
@@ -1129,7 +1129,7 @@ timespan_div(TimeSpan * span1, float8 * arg2)
* is done.
*/
TimeSpan *
-datetime_age(DateTime * datetime1, DateTime * datetime2)
+datetime_age(DateTime *datetime1, DateTime *datetime2)
{
TimeSpan *result;
@@ -1276,7 +1276,7 @@ datetime_age(DateTime * datetime1, DateTime * datetime2)
* Convert datetime to text data type.
*/
text *
-datetime_text(DateTime * datetime)
+datetime_text(DateTime *datetime)
{
text *result;
char *str;
@@ -1309,7 +1309,7 @@ datetime_text(DateTime * datetime)
* then call the standard input routine.
*/
DateTime *
-text_datetime(text * str)
+text_datetime(text *str)
{
DateTime *result;
int i;
@@ -1336,7 +1336,7 @@ text_datetime(text * str)
* Convert timespan to text data type.
*/
text *
-timespan_text(TimeSpan * timespan)
+timespan_text(TimeSpan *timespan)
{
text *result;
char *str;
@@ -1370,7 +1370,7 @@ timespan_text(TimeSpan * timespan)
*/
#ifdef NOT_USED
TimeSpan *
-text_timespan(text * str)
+text_timespan(text *str)
{
TimeSpan *result;
int i;
@@ -1398,7 +1398,7 @@ text_timespan(text * str)
* Extract specified field from datetime.
*/
DateTime *
-datetime_trunc(text * units, DateTime * datetime)
+datetime_trunc(text *units, DateTime *datetime)
{
DateTime *result;
@@ -1546,7 +1546,7 @@ datetime_trunc(text * units, DateTime * datetime)
* Extract specified field from timespan.
*/
TimeSpan *
-timespan_trunc(text * units, TimeSpan * timespan)
+timespan_trunc(text *units, TimeSpan *timespan)
{
TimeSpan *result;
@@ -1672,7 +1672,7 @@ timespan_trunc(text * units, TimeSpan * timespan)
* Extract specified field from datetime.
*/
float64
-datetime_part(text * units, DateTime * datetime)
+datetime_part(text *units, DateTime *datetime)
{
float64 result;
@@ -1824,7 +1824,7 @@ datetime_part(text * units, DateTime * datetime)
* Extract specified field from timespan.
*/
float64
-timespan_part(text * units, TimeSpan * timespan)
+timespan_part(text *units, TimeSpan *timespan)
{
float64 result;
@@ -1961,7 +1961,7 @@ timespan_part(text * units, TimeSpan * timespan)
* Encode datetime type with specified time zone.
*/
text *
-datetime_zone(text * zone, DateTime * datetime)
+datetime_zone(text *zone, DateTime *datetime)
{
text *result;
@@ -2553,7 +2553,7 @@ datetime2tm(DateTime dt, int *tzp, struct tm * tm, double *fsec, char **tzn)
* Also, month is one-based, _not_ zero-based.
*/
int
-tm2datetime(struct tm * tm, double fsec, int *tzp, DateTime * result)
+tm2datetime(struct tm * tm, double fsec, int *tzp, DateTime *result)
{
double date,
@@ -2581,7 +2581,7 @@ tm2datetime(struct tm * tm, double fsec, int *tzp, DateTime * result)
* Convert a timespan data type to a tm structure.
*/
static int
-timespan2tm(TimeSpan span, struct tm * tm, float8 * fsec)
+timespan2tm(TimeSpan span, struct tm * tm, float8 *fsec)
{
double time;
@@ -2618,7 +2618,7 @@ timespan2tm(TimeSpan span, struct tm * tm, float8 * fsec)
} /* timespan2tm() */
static int
-tm2timespan(struct tm * tm, double fsec, TimeSpan * span)
+tm2timespan(struct tm * tm, double fsec, TimeSpan *span)
{
span->month = ((tm->tm_year * 12) + tm->tm_mon);
span->time = ((((((tm->tm_mday * 24) + tm->tm_hour) * 60) + tm->tm_min) * 60) + tm->tm_sec);
@@ -3995,7 +3995,7 @@ DecodeUnits(int field, char *lowtoken, int *val)
* is WAY faster than the generic bsearch().
*/
static datetkn *
-datebsearch(char *key, datetkn * base, unsigned int nel)
+datebsearch(char *key, datetkn *base, unsigned int nel)
{
register datetkn *last = base + nel - 1,
*position;
diff --git a/src/backend/utils/adt/float.c b/src/backend/utils/adt/float.c
index 03bd767dc65..c69d9141a80 100644
--- a/src/backend/utils/adt/float.c
+++ b/src/backend/utils/adt/float.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.19 1997/09/08 02:30:41 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.20 1997/09/08 21:48:25 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -981,7 +981,7 @@ dtrunc(float64 arg1)
if (*arg1 >= 0)
*result = (float64data) floor(tmp);
else
- *result = (float64data) - (floor(-tmp));
+ *result = (float64data) -(floor(-tmp));
return (result);
}
diff --git a/src/backend/utils/adt/geo_ops.c b/src/backend/utils/adt/geo_ops.c
index 95287601bc5..031f754ee65 100644
--- a/src/backend/utils/adt/geo_ops.c
+++ b/src/backend/utils/adt/geo_ops.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.22 1997/09/08 20:57:29 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.23 1997/09/08 21:48:27 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -28,38 +28,38 @@
#define PI 3.1415926536
#endif
-static int point_inside(Point * p, int npts, Point plist[]);
+static int point_inside(Point *p, int npts, Point plist[]);
static int lseg_crossing(double x, double y, double px, double py);
static BOX *box_construct(double x1, double x2, double y1, double y2);
static BOX *box_copy(BOX *box);
static BOX *box_fill(BOX *result, double x1, double x2, double y1, double y2);
static double box_ht(BOX *box);
static double box_wd(BOX *box);
-static double circle_ar(CIRCLE * circle);
-static CIRCLE *circle_copy(CIRCLE * circle);
-static LINE *line_construct_pm(Point * pt, double m);
-static bool line_horizontal(LINE * line);
-static Point *line_interpt(LINE * l1, LINE * l2);
-static bool line_intersect(LINE * l1, LINE * l2);
-static bool line_parallel(LINE * l1, LINE * l2);
-static bool line_vertical(LINE * line);
-static double lseg_dt(LSEG * l1, LSEG * l2);
-static void make_bound_box(POLYGON * poly);
-static PATH *path_copy(PATH * path);
+static double circle_ar(CIRCLE *circle);
+static CIRCLE *circle_copy(CIRCLE *circle);
+static LINE *line_construct_pm(Point *pt, double m);
+static bool line_horizontal(LINE *line);
+static Point *line_interpt(LINE *l1, LINE *l2);
+static bool line_intersect(LINE *l1, LINE *l2);
+static bool line_parallel(LINE *l1, LINE *l2);
+static bool line_vertical(LINE *line);
+static double lseg_dt(LSEG *l1, LSEG *l2);
+static void make_bound_box(POLYGON *poly);
+static PATH *path_copy(PATH *path);
static bool plist_same(int npts, Point p1[], Point p2[]);
static Point *point_construct(double x, double y);
-static Point *point_copy(Point * pt);
-static int single_decode(char *str, float8 * x, char **ss);
+static Point *point_copy(Point *pt);
+static int single_decode(char *str, float8 *x, char **ss);
static int single_encode(float8 x, char *str);
-static int pair_decode(char *str, float8 * x, float8 * y, char **s);
+static int pair_decode(char *str, float8 *x, float8 *y, char **s);
static int pair_encode(float8 x, float8 y, char *str);
static int pair_count(char *s, char delim);
-static int path_decode(int opentype, int npts, char *str, int *isopen, char **ss, Point * p);
-static char *path_encode(bool closed, int npts, Point * pt);
-static void statlseg_construct(LSEG * lseg, Point * pt1, Point * pt2);
+static int path_decode(int opentype, int npts, char *str, int *isopen, char **ss, Point *p);
+static char *path_encode(bool closed, int npts, Point *pt);
+static void statlseg_construct(LSEG *lseg, Point *pt1, Point *pt2);
static double box_ar(BOX *box);
-static Point *interpt_sl(LSEG * lseg, LINE * line);
-static LINE *line_construct_pp(Point * pt1, Point * pt2);
+static Point *interpt_sl(LSEG *lseg, LINE *line);
+static LINE *line_construct_pp(Point *pt1, Point *pt2);
/*
@@ -109,7 +109,7 @@ static int digits8 = P_MAXDIG;
*/
static int
-single_decode(char *str, float8 * x, char **s)
+single_decode(char *str, float8 *x, char **s)
{
char *cp;
@@ -141,7 +141,7 @@ single_encode(float8 x, char *str)
} /* single_encode() */
static int
-pair_decode(char *str, float8 * x, float8 * y, char **s)
+pair_decode(char *str, float8 *x, float8 *y, char **s)
{
int has_delim;
char *cp;
@@ -192,7 +192,7 @@ pair_encode(float8 x, float8 y, char *str)
}
static int
-path_decode(int opentype, int npts, char *str, int *isopen, char **ss, Point * p)
+path_decode(int opentype, int npts, char *str, int *isopen, char **ss, Point *p)
{
int depth = 0;
char *s,
@@ -264,7 +264,7 @@ path_decode(int opentype, int npts, char *str, int *isopen, char **ss, Point * p
} /* path_decode() */
static char *
-path_encode(bool closed, int npts, Point * pt)
+path_encode(bool closed, int npts, Point *pt)
{
char *result = PALLOC(npts * (P_MAXLEN + 3) + 2);
@@ -389,7 +389,7 @@ box_out(BOX *box)
if (!PointerIsValid(box))
return (NULL);
- return (path_encode(-1, 2, (Point *) & (box->high)));
+ return (path_encode(-1, 2, (Point *) &(box->high)));
} /* box_out() */
@@ -777,7 +777,7 @@ box_diagonal(BOX *box)
*---------------------------------------------------------*/
static LINE * /* point-slope */
-line_construct_pm(Point * pt, double m)
+line_construct_pm(Point *pt, double m)
{
LINE *result = PALLOCTYPE(LINE);
@@ -793,7 +793,7 @@ line_construct_pm(Point * pt, double m)
static LINE * /* two points */
-line_construct_pp(Point * pt1, Point * pt2)
+line_construct_pp(Point *pt1, Point *pt2)
{
LINE *result = PALLOCTYPE(LINE);
@@ -845,13 +845,13 @@ line_construct_pp(Point * pt1, Point * pt2)
*---------------------------------------------------------*/
static bool
-line_intersect(LINE * l1, LINE * l2)
+line_intersect(LINE *l1, LINE *l2)
{
return (!line_parallel(l1, l2));
}
static bool
-line_parallel(LINE * l1, LINE * l2)
+line_parallel(LINE *l1, LINE *l2)
{
#if FALSE
return (FPeq(l1->m, l2->m));
@@ -866,7 +866,7 @@ line_parallel(LINE * l1, LINE * l2)
#ifdef NOT_USED
bool
-line_perp(LINE * l1, LINE * l2)
+line_perp(LINE *l1, LINE *l2)
{
#if FALSE
if (l1->m)
@@ -889,7 +889,7 @@ line_perp(LINE * l1, LINE * l2)
#endif
static bool
-line_vertical(LINE * line)
+line_vertical(LINE *line)
{
#if FALSE
return (FPeq(line->A, -1.0) && FPzero(line->B));
@@ -898,7 +898,7 @@ line_vertical(LINE * line)
} /* line_vertical() */
static bool
-line_horizontal(LINE * line)
+line_horizontal(LINE *line)
{
#if FALSE
return (FPzero(line->m));
@@ -908,7 +908,7 @@ line_horizontal(LINE * line)
#ifdef NOT_USED
bool
-line_eq(LINE * l1, LINE * l2)
+line_eq(LINE *l1, LINE *l2)
{
double k;
@@ -933,7 +933,7 @@ line_eq(LINE * l1, LINE * l2)
*---------------------------------------------------------*/
double * /* distance between l1, l2 */
-line_distance(LINE * l1, LINE * l2)
+line_distance(LINE *l1, LINE *l2)
{
double *result = PALLOCTYPE(double);
Point *tmp;
@@ -958,7 +958,7 @@ line_distance(LINE * l1, LINE * l2)
* Point where two lines l1, l2 intersect (if any)
*/
static Point *
-line_interpt(LINE * l1, LINE * l2)
+line_interpt(LINE *l1, LINE *l2)
{
Point *result;
double x,
@@ -1068,7 +1068,7 @@ path_in(char *str)
depth++;
}
- size = offsetof(PATH, p[0]) + (sizeof(path->p[0]) * npts);
+ size = offsetof(PATH, p[0]) +(sizeof(path->p[0]) * npts);
path = PALLOC(size);
path->size = size;
@@ -1085,12 +1085,12 @@ path_in(char *str)
char *
-path_out(PATH * path)
+path_out(PATH *path)
{
if (!PointerIsValid(path))
return NULL;
- return (path_encode(path->closed, path->npts, (Point *) & (path->p[0])));
+ return (path_encode(path->closed, path->npts, (Point *) &(path->p[0])));
} /* path_out() */
@@ -1103,31 +1103,31 @@ path_out(PATH * path)
*---------------------------------------------------------*/
bool
-path_n_lt(PATH * p1, PATH * p2)
+path_n_lt(PATH *p1, PATH *p2)
{
return ((p1->npts < p2->npts));
}
bool
-path_n_gt(PATH * p1, PATH * p2)
+path_n_gt(PATH *p1, PATH *p2)
{
return ((p1->npts > p2->npts));
}
bool
-path_n_eq(PATH * p1, PATH * p2)
+path_n_eq(PATH *p1, PATH *p2)
{
return ((p1->npts == p2->npts));
}
bool
-path_n_le(PATH * p1, PATH * p2)
+path_n_le(PATH *p1, PATH *p2)
{
return ((p1->npts <= p2->npts));
}
bool
-path_n_ge(PATH * p1, PATH * p2)
+path_n_ge(PATH *p1, PATH *p2)
{
return ((p1->npts >= p2->npts));
}
@@ -1138,7 +1138,7 @@ path_n_ge(PATH * p1, PATH * p2)
*---------------------------------------------------------*/
bool
-path_isclosed(PATH * path)
+path_isclosed(PATH *path)
{
if (!PointerIsValid(path))
return FALSE;
@@ -1147,7 +1147,7 @@ path_isclosed(PATH * path)
} /* path_isclosed() */
bool
-path_isopen(PATH * path)
+path_isopen(PATH *path)
{
if (!PointerIsValid(path))
return FALSE;
@@ -1157,7 +1157,7 @@ path_isopen(PATH * path)
int4
-path_npoints(PATH * path)
+path_npoints(PATH *path)
{
if (!PointerIsValid(path))
return 0;
@@ -1166,7 +1166,7 @@ path_npoints(PATH * path)
} /* path_npoints() */
PATH *
-path_close(PATH * path)
+path_close(PATH *path)
{
PATH *result;
@@ -1181,7 +1181,7 @@ path_close(PATH * path)
PATH *
-path_open(PATH * path)
+path_open(PATH *path)
{
PATH *result;
@@ -1196,12 +1196,12 @@ path_open(PATH * path)
PATH *
-path_copy(PATH * path)
+path_copy(PATH *path)
{
PATH *result;
int size;
- size = offsetof(PATH, p[0]) + (sizeof(path->p[0]) * path->npts);
+ size = offsetof(PATH, p[0]) +(sizeof(path->p[0]) * path->npts);
result = PALLOC(size);
memmove((char *) result, (char *) path, size);
@@ -1215,7 +1215,7 @@ path_copy(PATH * path)
* O(n^2) iterative edge check.
*/
bool
-path_inter(PATH * p1, PATH * p2)
+path_inter(PATH *p1, PATH *p2)
{
BOX b1,
b2;
@@ -1264,7 +1264,7 @@ path_inter(PATH * p1, PATH * p2)
/* this essentially does a cartesian product of the lsegs in the
two paths, and finds the min distance between any two lsegs */
double *
-path_distance(PATH * p1, PATH * p2)
+path_distance(PATH *p1, PATH *p2)
{
double *min = NULL,
*tmp;
@@ -1307,7 +1307,7 @@ path_distance(PATH * p1, PATH * p2)
*---------------------------------------------------------*/
double *
-path_length(PATH * path)
+path_length(PATH *path)
{
double *result;
int i;
@@ -1324,7 +1324,7 @@ path_length(PATH * path)
#ifdef NOT_USED
double
-path_ln(PATH * path)
+path_ln(PATH *path)
{
double result;
int i;
@@ -1375,7 +1375,7 @@ point_in(char *str)
} /* point_in() */
char *
-point_out(Point * pt)
+point_out(Point *pt)
{
if (!PointerIsValid(pt))
return (NULL);
@@ -1396,7 +1396,7 @@ point_construct(double x, double y)
static Point *
-point_copy(Point * pt)
+point_copy(Point *pt)
{
Point *result;
@@ -1421,43 +1421,43 @@ point_copy(Point * pt)
*---------------------------------------------------------*/
bool
-point_left(Point * pt1, Point * pt2)
+point_left(Point *pt1, Point *pt2)
{
return (FPlt(pt1->x, pt2->x));
}
bool
-point_right(Point * pt1, Point * pt2)
+point_right(Point *pt1, Point *pt2)
{
return (FPgt(pt1->x, pt2->x));
}
bool
-point_above(Point * pt1, Point * pt2)
+point_above(Point *pt1, Point *pt2)
{
return (FPgt(pt1->y, pt2->y));
}
bool
-point_below(Point * pt1, Point * pt2)
+point_below(Point *pt1, Point *pt2)
{
return (FPlt(pt1->y, pt2->y));
}
bool
-point_vert(Point * pt1, Point * pt2)
+point_vert(Point *pt1, Point *pt2)
{
return (FPeq(pt1->x, pt2->x));
}
bool
-point_horiz(Point * pt1, Point * pt2)
+point_horiz(Point *pt1, Point *pt2)
{
return (FPeq(pt1->y, pt2->y));
}
bool
-point_eq(Point * pt1, Point * pt2)
+point_eq(Point *pt1, Point *pt2)
{
return (point_horiz(pt1, pt2) && point_vert(pt1, pt2));
}
@@ -1467,7 +1467,7 @@ point_eq(Point * pt1, Point * pt2)
*---------------------------------------------------------*/
int32
-pointdist(Point * p1, Point * p2)
+pointdist(Point *p1, Point *p2)
{
int32 result;
@@ -1476,7 +1476,7 @@ pointdist(Point * p1, Point * p2)
}
double *
-point_distance(Point * pt1, Point * pt2)
+point_distance(Point *pt1, Point *pt2)
{
double *result = PALLOCTYPE(double);
@@ -1486,13 +1486,13 @@ point_distance(Point * pt1, Point * pt2)
double
-point_dt(Point * pt1, Point * pt2)
+point_dt(Point *pt1, Point *pt2)
{
return (HYPOT(pt1->x - pt2->x, pt1->y - pt2->y));
}
double *
-point_slope(Point * pt1, Point * pt2)
+point_slope(Point *pt1, Point *pt2)
{
double *result = PALLOCTYPE(double);
@@ -1505,7 +1505,7 @@ point_slope(Point * pt1, Point * pt2)
double
-point_sl(Point * pt1, Point * pt2)
+point_sl(Point *pt1, Point *pt2)
{
return (point_vert(pt1, pt2)
? (double) DBL_MAX
@@ -1552,12 +1552,12 @@ lseg_in(char *str)
char *
-lseg_out(LSEG * ls)
+lseg_out(LSEG *ls)
{
if (!PointerIsValid(ls))
return (NULL);
- return (path_encode(FALSE, 2, (Point *) & (ls->p[0])));
+ return (path_encode(FALSE, 2, (Point *) &(ls->p[0])));
} /* lseg_out() */
@@ -1565,7 +1565,7 @@ lseg_out(LSEG * ls)
* form a LSEG from two Points.
*/
LSEG *
-lseg_construct(Point * pt1, Point * pt2)
+lseg_construct(Point *pt1, Point *pt2)
{
LSEG *result = PALLOCTYPE(LSEG);
@@ -1581,7 +1581,7 @@ lseg_construct(Point * pt1, Point * pt2)
/* like lseg_construct, but assume space already allocated */
static void
-statlseg_construct(LSEG * lseg, Point * pt1, Point * pt2)
+statlseg_construct(LSEG *lseg, Point *pt1, Point *pt2)
{
lseg->p[0].x = pt1->x;
lseg->p[0].y = pt1->y;
@@ -1600,7 +1600,7 @@ statlseg_construct(LSEG * lseg, Point * pt1, Point * pt2)
** both segments.
*/
bool
-lseg_intersect(LSEG * l1, LSEG * l2)
+lseg_intersect(LSEG *l1, LSEG *l2)
{
LINE *ln;
Point *interpt;
@@ -1620,7 +1620,7 @@ lseg_intersect(LSEG * l1, LSEG * l2)
}
bool
-lseg_parallel(LSEG * l1, LSEG * l2)
+lseg_parallel(LSEG *l1, LSEG *l2)
{
#if FALSE
return (FPeq(l1->m, l2->m));
@@ -1630,7 +1630,7 @@ lseg_parallel(LSEG * l1, LSEG * l2)
} /* lseg_parallel() */
bool
-lseg_perp(LSEG * l1, LSEG * l2)
+lseg_perp(LSEG *l1, LSEG *l2)
{
double m1,
m2;
@@ -1646,20 +1646,20 @@ lseg_perp(LSEG * l1, LSEG * l2)
} /* lseg_perp() */
bool
-lseg_vertical(LSEG * lseg)
+lseg_vertical(LSEG *lseg)
{
return (FPeq(lseg->p[0].x, lseg->p[1].x));
}
bool
-lseg_horizontal(LSEG * lseg)
+lseg_horizontal(LSEG *lseg)
{
return (FPeq(lseg->p[0].y, lseg->p[1].y));
}
bool
-lseg_eq(LSEG * l1, LSEG * l2)
+lseg_eq(LSEG *l1, LSEG *l2)
{
return (FPeq(l1->p[0].x, l2->p[0].x) &&
FPeq(l1->p[1].y, l2->p[1].y) &&
@@ -1678,7 +1678,7 @@ lseg_eq(LSEG * l1, LSEG * l2)
* segment.
*/
double *
-lseg_distance(LSEG * l1, LSEG * l2)
+lseg_distance(LSEG *l1, LSEG *l2)
{
double *result = PALLOCTYPE(double);
@@ -1689,7 +1689,7 @@ lseg_distance(LSEG * l1, LSEG * l2)
/* distance between l1, l2 */
static double
-lseg_dt(LSEG * l1, LSEG * l2)
+lseg_dt(LSEG *l1, LSEG *l2)
{
double *d,
result;
@@ -1720,7 +1720,7 @@ lseg_dt(LSEG * l1, LSEG * l2)
Point *
-lseg_center(LSEG * lseg)
+lseg_center(LSEG *lseg)
{
Point *result;
@@ -1746,7 +1746,7 @@ lseg_center(LSEG * lseg)
* lsb residue. - tgl 1997-07-09
*/
Point *
-lseg_interpt(LSEG * l1, LSEG * l2)
+lseg_interpt(LSEG *l1, LSEG *l2)
{
Point *result;
LINE *tmp1,
@@ -1806,7 +1806,7 @@ lseg_interpt(LSEG * l1, LSEG * l2)
*-------------------------------------------------------------------*/
double *
-dist_pl(Point * pt, LINE * line)
+dist_pl(Point *pt, LINE *line)
{
double *result = PALLOCTYPE(double);
@@ -1817,7 +1817,7 @@ dist_pl(Point * pt, LINE * line)
}
double *
-dist_ps(Point * pt, LSEG * lseg)
+dist_ps(Point *pt, LSEG *lseg)
{
double m; /* slope of perp. */
LINE *ln;
@@ -1888,7 +1888,7 @@ dist_ps(Point * pt, LSEG * lseg)
** Distance from a point to a path
*/
double *
-dist_ppath(Point * pt, PATH * path)
+dist_ppath(Point *pt, PATH *path)
{
double *result;
double *tmp;
@@ -1928,7 +1928,7 @@ dist_ppath(Point * pt, PATH * path)
}
double *
-dist_pb(Point * pt, BOX *box)
+dist_pb(Point *pt, BOX *box)
{
Point *tmp;
double *result;
@@ -1942,7 +1942,7 @@ dist_pb(Point * pt, BOX *box)
double *
-dist_sl(LSEG * lseg, LINE * line)
+dist_sl(LSEG *lseg, LINE *line)
{
double *result,
*d2;
@@ -1973,7 +1973,7 @@ dist_sl(LSEG * lseg, LINE * line)
double *
-dist_sb(LSEG * lseg, BOX *box)
+dist_sb(LSEG *lseg, BOX *box)
{
Point *tmp;
double *result;
@@ -1995,7 +1995,7 @@ dist_sb(LSEG * lseg, BOX *box)
double *
-dist_lb(LINE * line, BOX *box)
+dist_lb(LINE *line, BOX *box)
{
Point *tmp;
double *result;
@@ -2017,7 +2017,7 @@ dist_lb(LINE * line, BOX *box)
double *
-dist_cpoly(CIRCLE * circle, POLYGON * poly)
+dist_cpoly(CIRCLE *circle, POLYGON *poly)
{
double *result;
int i;
@@ -2080,7 +2080,7 @@ dist_cpoly(CIRCLE * circle, POLYGON * poly)
*-------------------------------------------------------------------*/
static Point *
-interpt_sl(LSEG * lseg, LINE * line)
+interpt_sl(LSEG *lseg, LINE *line)
{
LINE *tmp;
Point *p;
@@ -2127,7 +2127,7 @@ interpt_sl(LSEG * lseg, LINE * line)
* through the point.
*/
Point *
-close_pl(Point * pt, LINE * line)
+close_pl(Point *pt, LINE *line)
{
Point *result;
LINE *tmp;
@@ -2175,7 +2175,7 @@ close_pl(Point * pt, LINE * line)
* point of the segment and its perpendicular through the point.
*/
Point *
-close_ps(Point * pt, LSEG * lseg)
+close_ps(Point *pt, LSEG *lseg)
{
Point *result;
LINE *tmp;
@@ -2227,7 +2227,7 @@ close_ps(Point * pt, LSEG * lseg)
} /* close_ps() */
Point *
-close_pb(Point * pt, BOX *box)
+close_pb(Point *pt, BOX *box)
{
/* think about this one for a while */
elog(WARN, "close_pb not implemented", NULL);
@@ -2236,7 +2236,7 @@ close_pb(Point * pt, BOX *box)
}
Point *
-close_sl(LSEG * lseg, LINE * line)
+close_sl(LSEG *lseg, LINE *line)
{
Point *result;
double *d1,
@@ -2258,7 +2258,7 @@ close_sl(LSEG * lseg, LINE * line)
}
Point *
-close_sb(LSEG * lseg, BOX *box)
+close_sb(LSEG *lseg, BOX *box)
{
/* think about this one for a while */
elog(WARN, "close_sb not implemented", NULL);
@@ -2267,7 +2267,7 @@ close_sb(LSEG * lseg, BOX *box)
}
Point *
-close_lb(LINE * line, BOX *box)
+close_lb(LINE *line, BOX *box)
{
/* think about this one for a while */
elog(WARN, "close_lb not implemented", NULL);
@@ -2284,7 +2284,7 @@ close_lb(LINE * line, BOX *box)
* Does the point satisfy the equation?
*/
bool
-on_pl(Point * pt, LINE * line)
+on_pl(Point *pt, LINE *line)
{
if (!PointerIsValid(pt) || !PointerIsValid(line))
return (FALSE);
@@ -2298,7 +2298,7 @@ on_pl(Point * pt, LINE * line)
* This algorithm seems to behave nicely even with lsb residues - tgl 1997-07-09
*/
bool
-on_ps(Point * pt, LSEG * lseg)
+on_ps(Point *pt, LSEG *lseg)
{
if (!PointerIsValid(pt) || !PointerIsValid(lseg))
return (FALSE);
@@ -2308,7 +2308,7 @@ on_ps(Point * pt, LSEG * lseg)
}
bool
-on_pb(Point * pt, BOX *box)
+on_pb(Point *pt, BOX *box)
{
if (!PointerIsValid(pt) || !PointerIsValid(box))
return (FALSE);
@@ -2331,7 +2331,7 @@ on_pb(Point * pt, BOX *box)
#define NEXT(A) ((A+1) % path->npts) /* cyclic "i+1" */
bool
-on_ppath(Point * pt, PATH * path)
+on_ppath(Point *pt, PATH *path)
{
#if FALSE
int above,
@@ -2424,7 +2424,7 @@ on_ppath(Point * pt, PATH * path)
bool
-on_sl(LSEG * lseg, LINE * line)
+on_sl(LSEG *lseg, LINE *line)
{
if (!PointerIsValid(lseg) || !PointerIsValid(line))
return (FALSE);
@@ -2433,7 +2433,7 @@ on_sl(LSEG * lseg, LINE * line)
} /* on_sl() */
bool
-on_sb(LSEG * lseg, BOX *box)
+on_sb(LSEG *lseg, BOX *box)
{
if (!PointerIsValid(lseg) || !PointerIsValid(box))
return (FALSE);
@@ -2447,7 +2447,7 @@ on_sb(LSEG * lseg, BOX *box)
*-------------------------------------------------------------------*/
bool
-inter_sl(LSEG * lseg, LINE * line)
+inter_sl(LSEG *lseg, LINE *line)
{
Point *tmp;
@@ -2466,7 +2466,7 @@ inter_sl(LSEG * lseg, LINE * line)
/* XXX segment and box should be able to intersect; tgl - 97/01/09 */
bool
-inter_sb(LSEG * lseg, BOX *box)
+inter_sb(LSEG *lseg, BOX *box)
{
return (0);
}
@@ -2474,7 +2474,7 @@ inter_sb(LSEG * lseg, BOX *box)
/* XXX line and box should be able to intersect; tgl - 97/01/09 */
bool
-inter_lb(LINE * line, BOX *box)
+inter_lb(LINE *line, BOX *box)
{
return (0);
}
@@ -2491,7 +2491,7 @@ inter_lb(LINE * line, BOX *box)
* Make the smallest bounding box for the given polygon.
*---------------------------------------------------------------------*/
static void
-make_bound_box(POLYGON * poly)
+make_bound_box(POLYGON *poly)
{
int i;
double x1,
@@ -2546,7 +2546,7 @@ poly_in(char *str)
if ((npts = pair_count(str, ',')) <= 0)
elog(WARN, "Bad polygon external representation '%s'", str);
- size = offsetof(POLYGON, p[0]) + (sizeof(poly->p[0]) * npts);
+ size = offsetof(POLYGON, p[0]) +(sizeof(poly->p[0]) * npts);
poly = PALLOC(size);
memset((char *) poly, 0, size); /* zero any holes */
@@ -2568,7 +2568,7 @@ poly_in(char *str)
* also support old format "(f8,f8,...,f8,f8)"
*---------------------------------------------------------------*/
char *
-poly_out(POLYGON * poly)
+poly_out(POLYGON *poly)
{
if (!PointerIsValid(poly))
return NULL;
@@ -2583,7 +2583,7 @@ poly_out(POLYGON * poly)
* of B?
*-------------------------------------------------------*/
bool
-poly_left(POLYGON * polya, POLYGON * polyb)
+poly_left(POLYGON *polya, POLYGON *polyb)
{
return (polya->boundbox.high.x < polyb->boundbox.low.x);
}
@@ -2594,7 +2594,7 @@ poly_left(POLYGON * polya, POLYGON * polyb)
* of B?
*-------------------------------------------------------*/
bool
-poly_overleft(POLYGON * polya, POLYGON * polyb)
+poly_overleft(POLYGON *polya, POLYGON *polyb)
{
return (polya->boundbox.low.x <= polyb->boundbox.high.x);
}
@@ -2605,7 +2605,7 @@ poly_overleft(POLYGON * polya, POLYGON * polyb)
* of B?
*-------------------------------------------------------*/
bool
-poly_right(POLYGON * polya, POLYGON * polyb)
+poly_right(POLYGON *polya, POLYGON *polyb)
{
return (polya->boundbox.low.x > polyb->boundbox.high.x);
}
@@ -2616,7 +2616,7 @@ poly_right(POLYGON * polya, POLYGON * polyb)
* of B?
*-------------------------------------------------------*/
bool
-poly_overright(POLYGON * polya, POLYGON * polyb)
+poly_overright(POLYGON *polya, POLYGON *polyb)
{
return (polya->boundbox.high.x > polyb->boundbox.low.x);
}
@@ -2629,7 +2629,7 @@ poly_overright(POLYGON * polya, POLYGON * polyb)
* closed shapes.
*-------------------------------------------------------*/
bool
-poly_same(POLYGON * polya, POLYGON * polyb)
+poly_same(POLYGON *polya, POLYGON *polyb)
{
if (!PointerIsValid(polya) || !PointerIsValid(polyb))
return FALSE;
@@ -2655,7 +2655,7 @@ poly_same(POLYGON * polya, POLYGON * polyb)
* their bounding boxes overlap.
*-----------------------------------------------------------------*/
bool
-poly_overlap(POLYGON * polya, POLYGON * polyb)
+poly_overlap(POLYGON *polya, POLYGON *polyb)
{
return box_overlap(&(polya->boundbox), &(polyb->boundbox));
}
@@ -2667,7 +2667,7 @@ poly_overlap(POLYGON * polya, POLYGON * polyb)
*-----------------------------------------------------------------*/
#if FALSE
bool
-poly_contain(POLYGON * polya, POLYGON * polyb)
+poly_contain(POLYGON *polya, POLYGON *polyb)
{
return box_contain(&(polya->boundbox), &(polyb->boundbox));
}
@@ -2675,7 +2675,7 @@ poly_contain(POLYGON * polya, POLYGON * polyb)
#endif
bool
-poly_contain(POLYGON * polya, POLYGON * polyb)
+poly_contain(POLYGON *polya, POLYGON *polyb)
{
int i;
@@ -2721,7 +2721,7 @@ poly_contain(POLYGON * polya, POLYGON * polyb)
*-----------------------------------------------------------------*/
#if FALSE
bool
-poly_contained(POLYGON * polya, POLYGON * polyb)
+poly_contained(POLYGON *polya, POLYGON *polyb)
{
return (box_contained(&(polya->boundbox), &(polyb->boundbox)));
}
@@ -2729,7 +2729,7 @@ poly_contained(POLYGON * polya, POLYGON * polyb)
#endif
bool
-poly_contained(POLYGON * polya, POLYGON * polyb)
+poly_contained(POLYGON *polya, POLYGON *polyb)
{
return (poly_contain(polyb, polya));
} /* poly_contained() */
@@ -2746,7 +2746,7 @@ poly_contained(POLYGON * polya, POLYGON * polyb)
*/
bool
-poly_contain_pt(POLYGON * poly, Point * p)
+poly_contain_pt(POLYGON *poly, Point *p)
{
if (!PointerIsValid(poly) || !PointerIsValid(p))
return (FALSE);
@@ -2755,7 +2755,7 @@ poly_contain_pt(POLYGON * poly, Point * p)
} /* poly_contain_pt() */
bool
-pt_contained_poly(Point * p, POLYGON * poly)
+pt_contained_poly(Point *p, POLYGON *poly)
{
if (!PointerIsValid(p) || !PointerIsValid(poly))
return (FALSE);
@@ -2765,7 +2765,7 @@ pt_contained_poly(Point * p, POLYGON * poly)
double *
-poly_distance(POLYGON * polya, POLYGON * polyb)
+poly_distance(POLYGON *polya, POLYGON *polyb)
{
double *result;
@@ -2787,7 +2787,7 @@ poly_distance(POLYGON * polya, POLYGON * polyb)
***********************************************************************/
Point *
-point(float8 * x, float8 * y)
+point(float8 *x, float8 *y)
{
if (!(PointerIsValid(x) && PointerIsValid(y)))
return (NULL);
@@ -2797,7 +2797,7 @@ point(float8 * x, float8 * y)
Point *
-point_add(Point * p1, Point * p2)
+point_add(Point *p1, Point *p2)
{
Point *result;
@@ -2813,7 +2813,7 @@ point_add(Point * p1, Point * p2)
} /* point_add() */
Point *
-point_sub(Point * p1, Point * p2)
+point_sub(Point *p1, Point *p2)
{
Point *result;
@@ -2829,7 +2829,7 @@ point_sub(Point * p1, Point * p2)
} /* point_sub() */
Point *
-point_mul(Point * p1, Point * p2)
+point_mul(Point *p1, Point *p2)
{
Point *result;
@@ -2845,7 +2845,7 @@ point_mul(Point * p1, Point * p2)
} /* point_mul() */
Point *
-point_div(Point * p1, Point * p2)
+point_div(Point *p1, Point *p2)
{
Point *result;
double div;
@@ -2874,7 +2874,7 @@ point_div(Point * p1, Point * p2)
***********************************************************************/
BOX *
-box(Point * p1, Point * p2)
+box(Point *p1, Point *p2)
{
BOX *result;
@@ -2887,7 +2887,7 @@ box(Point * p1, Point * p2)
} /* box() */
BOX *
-box_add(BOX *box, Point * p)
+box_add(BOX *box, Point *p)
{
BOX *result;
@@ -2901,7 +2901,7 @@ box_add(BOX *box, Point * p)
} /* box_add() */
BOX *
-box_sub(BOX *box, Point * p)
+box_sub(BOX *box, Point *p)
{
BOX *result;
@@ -2915,7 +2915,7 @@ box_sub(BOX *box, Point * p)
} /* box_sub() */
BOX *
-box_mul(BOX *box, Point * p)
+box_mul(BOX *box, Point *p)
{
BOX *result;
Point *high,
@@ -2935,7 +2935,7 @@ box_mul(BOX *box, Point * p)
} /* box_mul() */
BOX *
-box_div(BOX *box, Point * p)
+box_div(BOX *box, Point *p)
{
BOX *result;
Point *high,
@@ -2975,7 +2975,7 @@ box_div(BOX *box, Point * p)
* Concatenate two paths (only if they are both open).
*/
PATH *
-path_add(PATH * p1, PATH * p2)
+path_add(PATH *p1, PATH *p2)
{
PATH *result;
int size;
@@ -2985,7 +2985,7 @@ path_add(PATH * p1, PATH * p2)
|| p1->closed || p2->closed)
return (NULL);
- size = offsetof(PATH, p[0]) + (sizeof(p1->p[0]) * (p1->npts + p2->npts));
+ size = offsetof(PATH, p[0]) +(sizeof(p1->p[0]) * (p1->npts + p2->npts));
result = PALLOC(size);
result->size = size;
@@ -3010,7 +3010,7 @@ path_add(PATH * p1, PATH * p2)
* Translation operator.
*/
PATH *
-path_add_pt(PATH * path, Point * point)
+path_add_pt(PATH *path, Point *point)
{
PATH *result;
int i;
@@ -3030,7 +3030,7 @@ path_add_pt(PATH * path, Point * point)
} /* path_add_pt() */
PATH *
-path_sub_pt(PATH * path, Point * point)
+path_sub_pt(PATH *path, Point *point)
{
PATH *result;
int i;
@@ -3054,7 +3054,7 @@ path_sub_pt(PATH * path, Point * point)
* Rotation and scaling operators.
*/
PATH *
-path_mul_pt(PATH * path, Point * point)
+path_mul_pt(PATH *path, Point *point)
{
PATH *result;
Point *p;
@@ -3077,7 +3077,7 @@ path_mul_pt(PATH * path, Point * point)
} /* path_mul_pt() */
PATH *
-path_div_pt(PATH * path, Point * point)
+path_div_pt(PATH *path, Point *point)
{
PATH *result;
Point *p;
@@ -3101,7 +3101,7 @@ path_div_pt(PATH * path, Point * point)
bool
-path_contain_pt(PATH * path, Point * p)
+path_contain_pt(PATH *path, Point *p)
{
if (!PointerIsValid(path) || !PointerIsValid(p))
return (FALSE);
@@ -3110,7 +3110,7 @@ path_contain_pt(PATH * path, Point * p)
} /* path_contain_pt() */
bool
-pt_contained_path(Point * p, PATH * path)
+pt_contained_path(Point *p, PATH *path)
{
if (!PointerIsValid(p) || !PointerIsValid(path))
return (FALSE);
@@ -3120,7 +3120,7 @@ pt_contained_path(Point * p, PATH * path)
Point *
-path_center(PATH * path)
+path_center(PATH *path)
{
Point *result;
@@ -3136,7 +3136,7 @@ path_center(PATH * path)
} /* path_center() */
POLYGON *
-path_poly(PATH * path)
+path_poly(PATH *path)
{
POLYGON *poly;
int size;
@@ -3148,7 +3148,7 @@ path_poly(PATH * path)
if (!path->closed)
elog(WARN, "Open path cannot be converted to polygon", NULL);
- size = offsetof(POLYGON, p[0]) + (sizeof(poly->p[0]) * path->npts);
+ size = offsetof(POLYGON, p[0]) +(sizeof(poly->p[0]) * path->npts);
poly = PALLOC(size);
poly->size = size;
@@ -3174,7 +3174,8 @@ path_poly(PATH * path)
* '[(x1,y1),...]' for open path
*/
PATH
-* upgradepath(PATH * path)
+ *
+upgradepath(PATH *path)
{
PATH *result;
int size,
@@ -3188,7 +3189,7 @@ PATH
elog(WARN, "upgradepath: path already upgraded?", NULL);
npts = (path->npts - 1);
- size = offsetof(PATH, p[0]) + (sizeof(path->p[0]) * npts);
+ size = offsetof(PATH, p[0]) +(sizeof(path->p[0]) * npts);
result = PALLOC(size);
memset((char *) result, 0, size);
@@ -3206,7 +3207,7 @@ PATH
} /* upgradepath() */
bool
-isoldpath(PATH * path)
+isoldpath(PATH *path)
{
if (!PointerIsValid(path) || (path->npts < 2))
return (FALSE);
@@ -3222,7 +3223,7 @@ isoldpath(PATH * path)
***********************************************************************/
int4
-poly_npoints(POLYGON * poly)
+poly_npoints(POLYGON *poly)
{
if (!PointerIsValid(poly))
return (0);
@@ -3232,7 +3233,7 @@ poly_npoints(POLYGON * poly)
Point *
-poly_center(POLYGON * poly)
+poly_center(POLYGON *poly)
{
Point *result;
CIRCLE *circle;
@@ -3256,7 +3257,7 @@ poly_center(POLYGON * poly)
BOX *
-poly_box(POLYGON * poly)
+poly_box(POLYGON *poly)
{
BOX *box;
@@ -3282,7 +3283,7 @@ box_poly(BOX *box)
return (NULL);
/* map four corners of the box to a polygon */
- size = offsetof(POLYGON, p[0]) + (sizeof(poly->p[0]) * 4);
+ size = offsetof(POLYGON, p[0]) +(sizeof(poly->p[0]) * 4);
poly = PALLOC(size);
poly->size = size;
@@ -3304,7 +3305,7 @@ box_poly(BOX *box)
PATH *
-poly_path(POLYGON * poly)
+poly_path(POLYGON *poly)
{
PATH *path;
int size;
@@ -3313,7 +3314,7 @@ poly_path(POLYGON * poly)
if (!PointerIsValid(poly) || (poly->npts < 0))
return (NULL);
- size = offsetof(PATH, p[0]) + (sizeof(path->p[0]) * poly->npts);
+ size = offsetof(PATH, p[0]) +(sizeof(path->p[0]) * poly->npts);
path = PALLOC(size);
path->size = size;
@@ -3336,7 +3337,8 @@ poly_path(POLYGON * poly)
* New-style: '(x1,y1,x2,y2,...)'
*/
POLYGON
-* upgradepoly(POLYGON * poly)
+ *
+upgradepoly(POLYGON *poly)
{
POLYGON *result;
int size;
@@ -3347,7 +3349,7 @@ POLYGON
if (!PointerIsValid(poly) || (poly->npts < 1))
return (NULL);
- size = offsetof(POLYGON, p[0]) + (sizeof(poly->p[0]) * poly->npts);
+ size = offsetof(POLYGON, p[0]) +(sizeof(poly->p[0]) * poly->npts);
result = PALLOC(size);
memset((char *) result, 0, size);
@@ -3382,7 +3384,8 @@ POLYGON
* Reverse effect of upgradepoly().
*/
POLYGON
-* revertpoly(POLYGON * poly)
+ *
+revertpoly(POLYGON *poly)
{
POLYGON *result;
int size;
@@ -3393,7 +3396,7 @@ POLYGON
if (!PointerIsValid(poly) || (poly->npts < 1))
return (NULL);
- size = offsetof(POLYGON, p[0]) + (sizeof(poly->p[0]) * poly->npts);
+ size = offsetof(POLYGON, p[0]) +(sizeof(poly->p[0]) * poly->npts);
result = PALLOC(size);
memset((char *) result, 0, size);
@@ -3506,7 +3509,7 @@ circle_in(char *str)
/* circle_out - convert a circle to external form.
*/
char *
-circle_out(CIRCLE * circle)
+circle_out(CIRCLE *circle)
{
char *result;
char *cp;
@@ -3544,7 +3547,7 @@ circle_out(CIRCLE * circle)
/* circles identical?
*/
bool
-circle_same(CIRCLE * circle1, CIRCLE * circle2)
+circle_same(CIRCLE *circle1, CIRCLE *circle2)
{
return (FPeq(circle1->radius, circle2->radius)
&& FPeq(circle1->center.x, circle2->center.x)
@@ -3554,7 +3557,7 @@ circle_same(CIRCLE * circle1, CIRCLE * circle2)
/* circle_overlap - does circle1 overlap circle2?
*/
bool
-circle_overlap(CIRCLE * circle1, CIRCLE * circle2)
+circle_overlap(CIRCLE *circle1, CIRCLE *circle2)
{
return (FPle(point_dt(&circle1->center, &circle2->center), (circle1->radius + circle2->radius)));
}
@@ -3563,7 +3566,7 @@ circle_overlap(CIRCLE * circle1, CIRCLE * circle2)
* the right edge of circle2?
*/
bool
-circle_overleft(CIRCLE * circle1, CIRCLE * circle2)
+circle_overleft(CIRCLE *circle1, CIRCLE *circle2)
{
return (FPle((circle1->center.x + circle1->radius), (circle2->center.x + circle2->radius)));
}
@@ -3571,7 +3574,7 @@ circle_overleft(CIRCLE * circle1, CIRCLE * circle2)
/* circle_left - is circle1 strictly left of circle2?
*/
bool
-circle_left(CIRCLE * circle1, CIRCLE * circle2)
+circle_left(CIRCLE *circle1, CIRCLE *circle2)
{
return (FPle((circle1->center.x + circle1->radius), (circle2->center.x - circle2->radius)));
}
@@ -3579,7 +3582,7 @@ circle_left(CIRCLE * circle1, CIRCLE * circle2)
/* circle_right - is circle1 strictly right of circle2?
*/
bool
-circle_right(CIRCLE * circle1, CIRCLE * circle2)
+circle_right(CIRCLE *circle1, CIRCLE *circle2)
{
return (FPge((circle1->center.x - circle1->radius), (circle2->center.x + circle2->radius)));
}
@@ -3588,7 +3591,7 @@ circle_right(CIRCLE * circle1, CIRCLE * circle2)
* the left edge of circle2?
*/
bool
-circle_overright(CIRCLE * circle1, CIRCLE * circle2)
+circle_overright(CIRCLE *circle1, CIRCLE *circle2)
{
return (FPge((circle1->center.x - circle1->radius), (circle2->center.x - circle2->radius)));
}
@@ -3596,7 +3599,7 @@ circle_overright(CIRCLE * circle1, CIRCLE * circle2)
/* circle_contained - is circle1 contained by circle2?
*/
bool
-circle_contained(CIRCLE * circle1, CIRCLE * circle2)
+circle_contained(CIRCLE *circle1, CIRCLE *circle2)
{
return (FPle((point_dt(&circle1->center, &circle2->center) + circle1->radius), circle2->radius));
}
@@ -3604,7 +3607,7 @@ circle_contained(CIRCLE * circle1, CIRCLE * circle2)
/* circle_contain - does circle1 contain circle2?
*/
bool
-circle_contain(CIRCLE * circle1, CIRCLE * circle2)
+circle_contain(CIRCLE *circle1, CIRCLE *circle2)
{
return (FPle((point_dt(&circle1->center, &circle2->center) + circle2->radius), circle1->radius));
}
@@ -3614,13 +3617,13 @@ circle_contain(CIRCLE * circle1, CIRCLE * circle2)
* is circle1 entirely {above,below} circle2?
*/
bool
-circle_below(CIRCLE * circle1, CIRCLE * circle2)
+circle_below(CIRCLE *circle1, CIRCLE *circle2)
{
return (FPle((circle1->center.y + circle1->radius), (circle2->center.y - circle2->radius)));
}
bool
-circle_above(CIRCLE * circle1, CIRCLE * circle2)
+circle_above(CIRCLE *circle1, CIRCLE *circle2)
{
return (FPge((circle1->center.y - circle1->radius), (circle2->center.y + circle2->radius)));
}
@@ -3630,37 +3633,37 @@ circle_above(CIRCLE * circle1, CIRCLE * circle2)
* our accuracy constraint?
*/
bool
-circle_eq(CIRCLE * circle1, CIRCLE * circle2)
+circle_eq(CIRCLE *circle1, CIRCLE *circle2)
{
return (FPeq(circle_ar(circle1), circle_ar(circle2)));
} /* circle_eq() */
bool
-circle_ne(CIRCLE * circle1, CIRCLE * circle2)
+circle_ne(CIRCLE *circle1, CIRCLE *circle2)
{
return (!circle_eq(circle1, circle2));
} /* circle_ne() */
bool
-circle_lt(CIRCLE * circle1, CIRCLE * circle2)
+circle_lt(CIRCLE *circle1, CIRCLE *circle2)
{
return (FPlt(circle_ar(circle1), circle_ar(circle2)));
} /* circle_lt() */
bool
-circle_gt(CIRCLE * circle1, CIRCLE * circle2)
+circle_gt(CIRCLE *circle1, CIRCLE *circle2)
{
return (FPgt(circle_ar(circle1), circle_ar(circle2)));
} /* circle_gt() */
bool
-circle_le(CIRCLE * circle1, CIRCLE * circle2)
+circle_le(CIRCLE *circle1, CIRCLE *circle2)
{
return (FPle(circle_ar(circle1), circle_ar(circle2)));
} /* circle_le() */
bool
-circle_ge(CIRCLE * circle1, CIRCLE * circle2)
+circle_ge(CIRCLE *circle1, CIRCLE *circle2)
{
return (FPge(circle_ar(circle1), circle_ar(circle2)));
} /* circle_ge() */
@@ -3675,7 +3678,7 @@ circle_ge(CIRCLE * circle1, CIRCLE * circle2)
*---------------------------------------------------------*/
static CIRCLE *
-circle_copy(CIRCLE * circle)
+circle_copy(CIRCLE *circle)
{
CIRCLE *result;
@@ -3693,7 +3696,7 @@ circle_copy(CIRCLE * circle)
* Translation operator.
*/
CIRCLE *
-circle_add_pt(CIRCLE * circle, Point * point)
+circle_add_pt(CIRCLE *circle, Point *point)
{
CIRCLE *result;
@@ -3709,7 +3712,7 @@ circle_add_pt(CIRCLE * circle, Point * point)
} /* circle_add_pt() */
CIRCLE *
-circle_sub_pt(CIRCLE * circle, Point * point)
+circle_sub_pt(CIRCLE *circle, Point *point)
{
CIRCLE *result;
@@ -3729,7 +3732,7 @@ circle_sub_pt(CIRCLE * circle, Point * point)
* Rotation and scaling operators.
*/
CIRCLE *
-circle_mul_pt(CIRCLE * circle, Point * point)
+circle_mul_pt(CIRCLE *circle, Point *point)
{
CIRCLE *result;
Point *p;
@@ -3749,7 +3752,7 @@ circle_mul_pt(CIRCLE * circle, Point * point)
} /* circle_mul_pt() */
CIRCLE *
-circle_div_pt(CIRCLE * circle, Point * point)
+circle_div_pt(CIRCLE *circle, Point *point)
{
CIRCLE *result;
Point *p;
@@ -3772,7 +3775,7 @@ circle_div_pt(CIRCLE * circle, Point * point)
/* circle_area - returns the area of the circle.
*/
double *
-circle_area(CIRCLE * circle)
+circle_area(CIRCLE *circle)
{
double *result;
@@ -3786,7 +3789,7 @@ circle_area(CIRCLE * circle)
/* circle_diameter - returns the diameter of the circle.
*/
double *
-circle_diameter(CIRCLE * circle)
+circle_diameter(CIRCLE *circle)
{
double *result;
@@ -3800,7 +3803,7 @@ circle_diameter(CIRCLE * circle)
/* circle_radius - returns the radius of the circle.
*/
double *
-circle_radius(CIRCLE * circle)
+circle_radius(CIRCLE *circle)
{
double *result;
@@ -3815,7 +3818,7 @@ circle_radius(CIRCLE * circle)
* two circles.
*/
double *
-circle_distance(CIRCLE * circle1, CIRCLE * circle2)
+circle_distance(CIRCLE *circle1, CIRCLE *circle2)
{
double *result;
@@ -3830,7 +3833,7 @@ circle_distance(CIRCLE * circle1, CIRCLE * circle2)
bool
-circle_contain_pt(CIRCLE * circle, Point * point)
+circle_contain_pt(CIRCLE *circle, Point *point)
{
bool within;
double *d;
@@ -3847,7 +3850,7 @@ circle_contain_pt(CIRCLE * circle, Point * point)
bool
-pt_contained_circle(Point * point, CIRCLE * circle)
+pt_contained_circle(Point *point, CIRCLE *circle)
{
return (circle_contain_pt(circle, point));
} /* circle_contain_pt() */
@@ -3857,7 +3860,7 @@ pt_contained_circle(Point * point, CIRCLE * circle)
* a point and a circle.
*/
double *
-dist_pc(Point * point, CIRCLE * circle)
+dist_pc(Point *point, CIRCLE *circle)
{
double *result;
@@ -3874,7 +3877,7 @@ dist_pc(Point * point, CIRCLE * circle)
/* circle_center - returns the center point of the circle.
*/
Point *
-circle_center(CIRCLE * circle)
+circle_center(CIRCLE *circle)
{
Point *result;
@@ -3889,7 +3892,7 @@ circle_center(CIRCLE * circle)
/* circle_ar - returns the area of the circle.
*/
static double
-circle_ar(CIRCLE * circle)
+circle_ar(CIRCLE *circle)
{
return (PI * (circle->radius * circle->radius));
}
@@ -3900,7 +3903,7 @@ circle_ar(CIRCLE * circle)
*/
#ifdef NOT_USED
double
-circle_dt(CIRCLE * circle1, CIRCLE * circle2)
+circle_dt(CIRCLE *circle1, CIRCLE *circle2)
{
double result;
@@ -3916,7 +3919,7 @@ circle_dt(CIRCLE * circle1, CIRCLE * circle2)
*---------------------------------------------------------*/
CIRCLE *
-circle(Point * center, float8 * radius)
+circle(Point *center, float8 *radius)
{
CIRCLE *result;
@@ -3934,7 +3937,7 @@ circle(Point * center, float8 * radius)
BOX *
-circle_box(CIRCLE * circle)
+circle_box(CIRCLE *circle)
{
BOX *box;
double delta;
@@ -3977,7 +3980,7 @@ box_circle(BOX *box)
POLYGON *
-circle_poly(int npts, CIRCLE * circle)
+circle_poly(int npts, CIRCLE *circle)
{
POLYGON *poly;
int size;
@@ -3990,7 +3993,7 @@ circle_poly(int npts, CIRCLE * circle)
if (FPzero(circle->radius) || (npts < 2))
elog(WARN, "Unable to convert circle to polygon", NULL);
- size = offsetof(POLYGON, p[0]) + (sizeof(poly->p[0]) * npts);
+ size = offsetof(POLYGON, p[0]) +(sizeof(poly->p[0]) * npts);
poly = PALLOC(size);
memset((char *) poly, 0, size); /* zero any holes */
@@ -4015,7 +4018,7 @@ circle_poly(int npts, CIRCLE * circle)
* rather than straight average values of points - tgl 97/01/21.
*/
CIRCLE *
-poly_circle(POLYGON * poly)
+poly_circle(POLYGON *poly)
{
CIRCLE *circle;
int i;
@@ -4062,7 +4065,7 @@ poly_circle(POLYGON * poly)
#define HIT_IT INT_MAX
static int
-point_inside(Point * p, int npts, Point plist[])
+point_inside(Point *p, int npts, Point plist[])
{
double x0,
y0;
diff --git a/src/backend/utils/adt/int.c b/src/backend/utils/adt/int.c
index 1eaededbf2d..a086f00c73e 100644
--- a/src/backend/utils/adt/int.c
+++ b/src/backend/utils/adt/int.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.7 1997/09/08 20:57:32 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.8 1997/09/08 21:48:29 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -69,12 +69,12 @@ int2out(int16 sh)
int16 *
int28in(char *shs)
{
- register int16(*result)[];
+ register int16 (*result)[];
int nums;
if (shs == NULL)
return (NULL);
- result = (int16(*)[]) palloc(sizeof(int16[8]));
+ result = (int16 (*)[]) palloc(sizeof(int16[8]));
if ((nums = sscanf(shs, "%hd%hd%hd%hd%hd%hd%hd%hd",
*result,
*result + 1,
@@ -96,7 +96,7 @@ int28in(char *shs)
* int28out - converts internal form to "num num ..."
*/
char *
-int28out(int16(*shs)[])
+int28out(int16 (*shs)[])
{
register int num;
register int16 *sp;
@@ -389,7 +389,7 @@ int42ge(int32 arg1, int32 arg2)
bool
-keyfirsteq(int16 * arg1, int16 arg2)
+keyfirsteq(int16 *arg1, int16 arg2)
{
return (*arg1 == arg2);
}
diff --git a/src/backend/utils/adt/like.c b/src/backend/utils/adt/like.c
index 5e9c0e7ebbe..4a758b0ba28 100644
--- a/src/backend/utils/adt/like.c
+++ b/src/backend/utils/adt/like.c
@@ -122,7 +122,7 @@ char16nlike(char *s, struct varlena * p)
}
bool
-namelike(NameData * n, struct varlena * p)
+namelike(NameData *n, struct varlena * p)
{
if (!n)
return FALSE;
@@ -130,7 +130,7 @@ namelike(NameData * n, struct varlena * p)
}
bool
-namenlike(NameData * s, struct varlena * p)
+namenlike(NameData *s, struct varlena * p)
{
return (!namelike(s, p));
}
@@ -150,7 +150,7 @@ textnlike(struct varlena * s, struct varlena * p)
}
-/* $Revision: 1.8 $
+/* $Revision: 1.9 $
** "like.c" A first attempt at a LIKE operator for Postgres95.
**
** Originally written by Rich $alz, mirror!rs, Wed Nov 26 19:03:17 EST 1986.
@@ -189,7 +189,7 @@ DoMatch(register char *text, register char *p)
{
register int matched;
- for (; *p; text++, p++)
+ for (; *p; text ++, p++)
{
if (*text == '\0' && *p != '%')
return LIKE_ABORT;
@@ -200,7 +200,7 @@ DoMatch(register char *text, register char *p)
p++;
/* FALLTHROUGH */
default:
- if (*text != *p)
+ if (*text !=*p)
return LIKE_FALSE;
continue;
case '_':
@@ -214,7 +214,7 @@ DoMatch(register char *text, register char *p)
/* Trailing percent matches everything. */
return LIKE_TRUE;
while (*text)
- if ((matched = DoMatch(text++, p)) != LIKE_FALSE)
+ if ((matched = DoMatch(text ++, p)) != LIKE_FALSE)
return matched;
return LIKE_ABORT;
}
diff --git a/src/backend/utils/adt/misc.c b/src/backend/utils/adt/misc.c
index 90d9c0289e3..06bc79374f9 100644
--- a/src/backend/utils/adt/misc.c
+++ b/src/backend/utils/adt/misc.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/misc.c,v 1.9 1997/09/08 02:30:48 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/misc.c,v 1.10 1997/09/08 21:48:31 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -25,7 +25,7 @@
* Check if data is Null
*/
bool
-nullvalue(Datum value, bool * isNull)
+nullvalue(Datum value, bool *isNull)
{
if (*isNull)
{
@@ -40,7 +40,7 @@ nullvalue(Datum value, bool * isNull)
* check if data is not Null *
*--------------------------------------------------------------------- */
bool
-nonnullvalue(Datum value, bool * isNull)
+nonnullvalue(Datum value, bool *isNull)
{
if (*isNull)
{
diff --git a/src/backend/utils/adt/nabstime.c b/src/backend/utils/adt/nabstime.c
index 9e929c579c5..eb1c8eff2b7 100644
--- a/src/backend/utils/adt/nabstime.c
+++ b/src/backend/utils/adt/nabstime.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.33 1997/09/08 02:30:49 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.34 1997/09/08 21:48:32 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -132,11 +132,11 @@ abstime2tm(AbsoluteTime time, int *tzp, struct tm * tm, char *tzn)
#ifdef USE_POSIX_TIME
if (tzp != NULL)
{
- tx = localtime((time_t *) & time);
+ tx = localtime((time_t *) &time);
}
else
{
- tx = gmtime((time_t *) & time);
+ tx = gmtime((time_t *) &time);
};
#else
#endif
@@ -487,7 +487,7 @@ abstimege(AbsoluteTime t1, AbsoluteTime t2)
* Convert datetime to abstime.
*/
AbsoluteTime
-datetime_abstime(DateTime * datetime)
+datetime_abstime(DateTime *datetime)
{
AbsoluteTime result;
diff --git a/src/backend/utils/adt/name.c b/src/backend/utils/adt/name.c
index 1c8f4563f7b..977360cc954 100644
--- a/src/backend/utils/adt/name.c
+++ b/src/backend/utils/adt/name.c
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/name.c,v 1.8 1997/09/08 02:30:50 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/name.c,v 1.9 1997/09/08 21:48:33 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -49,7 +49,7 @@ namein(char *s)
* nameout - converts internal reprsentation to "..."
*/
char *
-nameout(NameData * s)
+nameout(NameData *s)
{
if (s == NULL)
return "-";
@@ -77,7 +77,7 @@ nameout(NameData * s)
*
*/
bool
-nameeq(NameData * arg1, NameData * arg2)
+nameeq(NameData *arg1, NameData *arg2)
{
if (!arg1 || !arg2)
return 0;
@@ -86,7 +86,7 @@ nameeq(NameData * arg1, NameData * arg2)
}
bool
-namene(NameData * arg1, NameData * arg2)
+namene(NameData *arg1, NameData *arg2)
{
if (arg1 == NULL || arg2 == NULL)
return ((bool) 0);
@@ -94,7 +94,7 @@ namene(NameData * arg1, NameData * arg2)
}
bool
-namelt(NameData * arg1, NameData * arg2)
+namelt(NameData *arg1, NameData *arg2)
{
if (arg1 == NULL || arg2 == NULL)
return ((bool) 0);
@@ -102,7 +102,7 @@ namelt(NameData * arg1, NameData * arg2)
}
bool
-namele(NameData * arg1, NameData * arg2)
+namele(NameData *arg1, NameData *arg2)
{
if (arg1 == NULL || arg2 == NULL)
return ((bool) 0);
@@ -110,7 +110,7 @@ namele(NameData * arg1, NameData * arg2)
}
bool
-namegt(NameData * arg1, NameData * arg2)
+namegt(NameData *arg1, NameData *arg2)
{
if (arg1 == NULL || arg2 == NULL)
return ((bool) 0);
@@ -119,7 +119,7 @@ namegt(NameData * arg1, NameData * arg2)
}
bool
-namege(NameData * arg1, NameData * arg2)
+namege(NameData *arg1, NameData *arg2)
{
if (arg1 == NULL || arg2 == NULL)
return ((bool) 0);
diff --git a/src/backend/utils/adt/oid.c b/src/backend/utils/adt/oid.c
index 0e064b44a38..77c2e9a112f 100644
--- a/src/backend/utils/adt/oid.c
+++ b/src/backend/utils/adt/oid.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/oid.c,v 1.10 1997/09/08 02:30:54 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/oid.c,v 1.11 1997/09/08 21:48:33 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -31,12 +31,12 @@
Oid *
oid8in(char *oidString)
{
- register Oid(*result)[];
+ register Oid (*result)[];
int nums;
if (oidString == NULL)
return (NULL);
- result = (Oid(*)[]) palloc(sizeof(Oid[8]));
+ result = (Oid (*)[]) palloc(sizeof(Oid[8]));
if ((nums = sscanf(oidString, "%d%d%d%d%d%d%d%d",
&(*result)[0],
&(*result)[1],
@@ -58,7 +58,7 @@ oid8in(char *oidString)
* oid8out - converts internal form to "num num ..."
*/
char *
-oid8out(Oid(*oidArray)[])
+oid8out(Oid (*oidArray)[])
{
register int num;
register Oid *sp;
diff --git a/src/backend/utils/adt/oidint2.c b/src/backend/utils/adt/oidint2.c
index d40dae7a6cc..25e034aaecb 100644
--- a/src/backend/utils/adt/oidint2.c
+++ b/src/backend/utils/adt/oidint2.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/oidint2.c,v 1.3 1997/09/08 02:30:54 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/oidint2.c,v 1.4 1997/09/08 21:48:34 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -60,8 +60,8 @@ bool
oidint2lt(OidInt2 o1, OidInt2 o2)
{
return
- ((bool) (o1->oi_oid < o2->oi_oid ||
- (o1->oi_oid == o2->oi_oid && o1->oi_int2 < o2->oi_int2)));
+ ((bool) (o1->oi_oid < o2->oi_oid ||
+ (o1->oi_oid == o2->oi_oid && o1->oi_int2 < o2->oi_int2)));
}
bool
diff --git a/src/backend/utils/adt/oidint4.c b/src/backend/utils/adt/oidint4.c
index 18931efc69a..c8c7c3de4bd 100644
--- a/src/backend/utils/adt/oidint4.c
+++ b/src/backend/utils/adt/oidint4.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/oidint4.c,v 1.3 1997/09/08 02:30:55 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/oidint4.c,v 1.4 1997/09/08 21:48:35 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -60,8 +60,8 @@ bool
oidint4lt(OidInt4 o1, OidInt4 o2)
{
return
- ((bool) (o1->oi_oid < o2->oi_oid ||
- (o1->oi_oid == o2->oi_oid && o1->oi_int4 < o2->oi_int4)));
+ ((bool) (o1->oi_oid < o2->oi_oid ||
+ (o1->oi_oid == o2->oi_oid && o1->oi_int4 < o2->oi_int4)));
}
bool
diff --git a/src/backend/utils/adt/oidname.c b/src/backend/utils/adt/oidname.c
index 915b953ae49..a6ff8e1a305 100644
--- a/src/backend/utils/adt/oidname.c
+++ b/src/backend/utils/adt/oidname.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/oidname.c,v 1.6 1997/09/08 02:30:56 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/oidname.c,v 1.7 1997/09/08 21:48:37 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -61,32 +61,32 @@ bool
oidnamelt(OidName o1, OidName o2)
{
return (bool)
- (o1->id < o2->id ||
- (o1->id == o2->id && namecmp(&o1->name, &o2->name) < 0));
+ (o1->id < o2->id ||
+ (o1->id == o2->id && namecmp(&o1->name, &o2->name) < 0));
}
bool
oidnamele(OidName o1, OidName o2)
{
return (bool)
- (o1->id < o2->id ||
- (o1->id == o2->id && namecmp(&o1->name, &o2->name) <= 0));
+ (o1->id < o2->id ||
+ (o1->id == o2->id && namecmp(&o1->name, &o2->name) <= 0));
}
bool
oidnameeq(OidName o1, OidName o2)
{
return (bool)
- (o1->id == o2->id &&
- (namecmp(&o1->name, &o2->name) == 0));
+ (o1->id == o2->id &&
+ (namecmp(&o1->name, &o2->name) == 0));
}
bool
oidnamene(OidName o1, OidName o2)
{
return (bool)
- (o1->id != o2->id ||
- (namecmp(&o1->name, &o2->name) != 0));
+ (o1->id != o2->id ||
+ (namecmp(&o1->name, &o2->name) != 0));
}
bool
diff --git a/src/backend/utils/adt/oracle_compat.c b/src/backend/utils/adt/oracle_compat.c
index fb8a512ed79..27216ab3d80 100644
--- a/src/backend/utils/adt/oracle_compat.c
+++ b/src/backend/utils/adt/oracle_compat.c
@@ -1,7 +1,7 @@
/*
* Edmund Mergl <E.Mergl@bawue.de>
*
- * $Id: oracle_compat.c,v 1.9 1997/09/08 02:30:57 momjian Exp $
+ * $Id: oracle_compat.c,v 1.10 1997/09/08 21:48:39 momjian Exp $
*
*/
@@ -10,16 +10,16 @@
#include "postgres.h"
-text *lower(text * string);
-text *upper(text * string);
-text *initcap(text * string);
-text *lpad(text * string1, int4 len, text * string2);
-text *rpad(text * string1, int4 len, text * string2);
-text *btrim(text * string, text * set);
-text *ltrim(text * string, text * set);
-text *rtrim(text * string, text * set);
-text *substr(text * string, int4 m, int4 n);
-text *translate(text * string, char from, char to);
+text *lower(text *string);
+text *upper(text *string);
+text *initcap(text *string);
+text *lpad(text *string1, int4 len, text *string2);
+text *rpad(text *string1, int4 len, text *string2);
+text *btrim(text *string, text *set);
+text *ltrim(text *string, text *set);
+text *rtrim(text *string, text *set);
+text *substr(text *string, int4 m, int4 n);
+text *translate(text *string, char from, char to);
/********************************************************************
@@ -37,7 +37,7 @@ text *translate(text * string, char from, char to);
********************************************************************/
text *
-lower(text * string)
+lower(text *string)
{
text *ret;
char *ptr,
@@ -77,7 +77,7 @@ lower(text * string)
********************************************************************/
text *
-upper(text * string)
+upper(text *string)
{
text *ret;
char *ptr,
@@ -119,7 +119,7 @@ upper(text * string)
********************************************************************/
text *
-initcap(text * string)
+initcap(text *string)
{
text *ret;
char *ptr,
@@ -170,7 +170,7 @@ initcap(text * string)
********************************************************************/
text *
-lpad(text * string1, int4 len, text * string2)
+lpad(text *string1, int4 len, text *string2)
{
text *ret;
char *ptr1,
@@ -226,7 +226,7 @@ lpad(text * string1, int4 len, text * string2)
********************************************************************/
text *
-rpad(text * string1, int4 len, text * string2)
+rpad(text *string1, int4 len, text *string2)
{
text *ret;
char *ptr1,
@@ -282,7 +282,7 @@ rpad(text * string1, int4 len, text * string2)
********************************************************************/
text *
-btrim(text * string, text * set)
+btrim(text *string, text *set)
{
text *ret;
char *ptr,
@@ -368,7 +368,7 @@ btrim(text * string, text * set)
********************************************************************/
text *
-ltrim(text * string, text * set)
+ltrim(text *string, text *set)
{
text *ret;
char *ptr,
@@ -431,7 +431,7 @@ ltrim(text * string, text * set)
********************************************************************/
text *
-rtrim(text * string, text * set)
+rtrim(text *string, text *set)
{
text *ret;
char *ptr,
@@ -503,7 +503,7 @@ rtrim(text * string, text * set)
********************************************************************/
text *
-substr(text * string, int4 m, int4 n)
+substr(text *string, int4 m, int4 n)
{
text *ret;
char *ptr,
@@ -549,7 +549,7 @@ substr(text * string, int4 m, int4 n)
********************************************************************/
text *
-translate(text * string, char from, char to)
+translate(text *string, char from, char to)
{
text *ret;
char *ptr,
diff --git a/src/backend/utils/adt/regexp.c b/src/backend/utils/adt/regexp.c
index 5c94ca8bb8d..b172cc6b486 100644
--- a/src/backend/utils/adt/regexp.c
+++ b/src/backend/utils/adt/regexp.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/regexp.c,v 1.9 1997/09/08 02:30:58 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/regexp.c,v 1.10 1997/09/08 21:48:40 momjian Exp $
*
* Alistair Crooks added the code for the regex caching
* agc - cached the regular expressions used - there's a good chance
@@ -256,7 +256,7 @@ char16regexne(char *s, struct varlena * p)
}
bool
-nameregexeq(NameData * n, struct varlena * p)
+nameregexeq(NameData *n, struct varlena * p)
{
if (!n)
return FALSE;
@@ -264,7 +264,7 @@ nameregexeq(NameData * n, struct varlena * p)
}
bool
-nameregexne(NameData * s, struct varlena * p)
+nameregexne(NameData *s, struct varlena * p)
{
return (!nameregexeq(s, p));
}
@@ -357,7 +357,7 @@ texticregexne(struct varlena * s, struct varlena * p)
}
bool
-nameicregexeq(NameData * n, struct varlena * p)
+nameicregexeq(NameData *n, struct varlena * p)
{
if (!n)
return FALSE;
@@ -366,7 +366,7 @@ nameicregexeq(NameData * n, struct varlena * p)
}
bool
-nameicregexne(NameData * s, struct varlena * p)
+nameicregexne(NameData *s, struct varlena * p)
{
return (!nameicregexeq(s, p));
}
diff --git a/src/backend/utils/adt/timestamp.c b/src/backend/utils/adt/timestamp.c
index 09fabfe72a0..4e66ea4cb3c 100644
--- a/src/backend/utils/adt/timestamp.c
+++ b/src/backend/utils/adt/timestamp.c
@@ -209,7 +209,7 @@ timestamp_datetime(time_t timestamp)
if (!PointerIsValid(result = PALLOCTYPE(DateTime)))
elog(WARN, "Memory allocation failed, can't convert timestamp to datetime", NULL);
- tm = localtime((time_t *) & timestamp);
+ tm = localtime((time_t *) &timestamp);
tm->tm_year += 1900;
tm->tm_mon += 1;
diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c
index ccd4b9c0acd..e149cc1a4bb 100644
--- a/src/backend/utils/adt/varlena.c
+++ b/src/backend/utils/adt/varlena.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.20 1997/09/08 02:31:06 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.21 1997/09/08 21:48:42 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -212,7 +212,7 @@ textout(struct varlena * vlena)
*/
#ifdef NOT_USED
int
-textlen(text * t)
+textlen(text *t)
{
int i = 0;
int max = VARSIZE(t) - VARHDRSZ;
@@ -239,7 +239,7 @@ textlen(text * t)
*/
text *
-textcat(text * t1, text * t2)
+textcat(text *t1, text *t2)
{
int len1,
len2,
@@ -281,7 +281,7 @@ textcat(text * t1, text * t2)
*/
int32
-textpos(text * t1, text * t2)
+textpos(text *t1, text *t2)
{
int pos;
int px,
@@ -348,7 +348,7 @@ texteq(struct varlena * arg1, struct varlena * arg2)
bool
textne(struct varlena * arg1, struct varlena * arg2)
{
- return ((bool) ! texteq(arg1, arg2));
+ return ((bool) !texteq(arg1, arg2));
}
/* text_lt()
@@ -466,13 +466,13 @@ text_le(struct varlena * arg1, struct varlena * arg2)
bool
text_gt(struct varlena * arg1, struct varlena * arg2)
{
- return ((bool) ! text_le(arg1, arg2));
+ return ((bool) !text_le(arg1, arg2));
}
bool
text_ge(struct varlena * arg1, struct varlena * arg2)
{
- return ((bool) ! text_lt(arg1, arg2));
+ return ((bool) !text_lt(arg1, arg2));
}
/*-------------------------------------------------------------