mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
Add typdefs to pgindent run.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.15 1997/09/08 02:30:15 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.16 1997/09/08 20:57:16 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -22,9 +22,9 @@
|
||||
#include "miscadmin.h"
|
||||
|
||||
static char *getid(char *s, char *n);
|
||||
static int32 aclitemeq(AclItem * a1, AclItem * a2);
|
||||
static int32 aclitemgt(AclItem * a1, AclItem * a2);
|
||||
static char *aclparse(char *s, AclItem * aip, unsigned *modechg);
|
||||
static int32 aclitemeq(AclItem *a1, AclItem *a2);
|
||||
static int32 aclitemgt(AclItem *a1, AclItem *a2);
|
||||
static char *aclparse(char *s, AclItem *aip, unsigned *modechg);
|
||||
|
||||
#define ACL_IDTYPE_GID_KEYWORD "group"
|
||||
#define ACL_IDTYPE_UID_KEYWORD "user"
|
||||
@@ -83,7 +83,7 @@ getid(char *s, char *n)
|
||||
* - loads 'modechg' with the mode change flag.
|
||||
*/
|
||||
static char *
|
||||
aclparse(char *s, AclItem * aip, unsigned *modechg)
|
||||
aclparse(char *s, AclItem *aip, unsigned *modechg)
|
||||
{
|
||||
HeapTuple htp;
|
||||
char name[NAMEDATALEN];
|
||||
@@ -240,7 +240,7 @@ aclitemin(char *s)
|
||||
* the new string
|
||||
*/
|
||||
char *
|
||||
aclitemout(AclItem * aip)
|
||||
aclitemout(AclItem *aip)
|
||||
{
|
||||
register char *p;
|
||||
char *out;
|
||||
@@ -312,7 +312,7 @@ aclitemout(AclItem * aip)
|
||||
* a boolean value indicating = or >
|
||||
*/
|
||||
static int32
|
||||
aclitemeq(AclItem * a1, AclItem * a2)
|
||||
aclitemeq(AclItem *a1, AclItem *a2)
|
||||
{
|
||||
if (!a1 && !a2)
|
||||
return (1);
|
||||
@@ -322,7 +322,7 @@ aclitemeq(AclItem * a1, AclItem * a2)
|
||||
}
|
||||
|
||||
static int32
|
||||
aclitemgt(AclItem * a1, AclItem * a2)
|
||||
aclitemgt(AclItem *a1, AclItem *a2)
|
||||
{
|
||||
if (a1 && !a2)
|
||||
return (1);
|
||||
@@ -364,7 +364,7 @@ acldefault(void)
|
||||
}
|
||||
|
||||
Acl *
|
||||
aclinsert3(Acl * old_acl, AclItem * mod_aip, unsigned modechg)
|
||||
aclinsert3(Acl *old_acl, AclItem *mod_aip, unsigned modechg)
|
||||
{
|
||||
Acl *new_acl;
|
||||
AclItem *old_aip,
|
||||
@@ -481,13 +481,13 @@ aclinsert3(Acl * old_acl, AclItem * mod_aip, unsigned modechg)
|
||||
*
|
||||
*/
|
||||
Acl *
|
||||
aclinsert(Acl * old_acl, AclItem * mod_aip)
|
||||
aclinsert(Acl *old_acl, AclItem *mod_aip)
|
||||
{
|
||||
return (aclinsert3(old_acl, mod_aip, ACL_MODECHG_EQL));
|
||||
}
|
||||
|
||||
Acl *
|
||||
aclremove(Acl * old_acl, AclItem * mod_aip)
|
||||
aclremove(Acl *old_acl, AclItem *mod_aip)
|
||||
{
|
||||
Acl *new_acl;
|
||||
AclItem *old_aip,
|
||||
@@ -547,7 +547,7 @@ aclremove(Acl * old_acl, AclItem * mod_aip)
|
||||
}
|
||||
|
||||
int32
|
||||
aclcontains(Acl * acl, AclItem * aip)
|
||||
aclcontains(Acl *acl, AclItem *aip)
|
||||
{
|
||||
unsigned i,
|
||||
num;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.17 1997/09/08 02:30:19 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.18 1997/09/08 20:57:21 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -70,14 +70,14 @@ static char *_AdvanceBy1word(char *str, char **word);
|
||||
#endif
|
||||
static void
|
||||
_ArrayRange(int st[], int endp[], int bsize, char *destPtr,
|
||||
ArrayType * array, int from);
|
||||
static int _ArrayClipCount(int stI[], int endpI[], ArrayType * array);
|
||||
ArrayType *array, int from);
|
||||
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);
|
||||
@@ -613,7 +613,7 @@ _CopyArrayEls(char **values,
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
char *
|
||||
array_out(ArrayType * v, Oid element_type)
|
||||
array_out(ArrayType *v, Oid element_type)
|
||||
{
|
||||
int typlen;
|
||||
bool typbyval;
|
||||
@@ -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;
|
||||
@@ -810,7 +810,7 @@ array_dims(ArrayType * v, bool * isNull)
|
||||
*---------------------------------------------------------------------------
|
||||
*/
|
||||
Datum
|
||||
array_ref(ArrayType * array,
|
||||
array_ref(ArrayType *array,
|
||||
int n,
|
||||
int indx[],
|
||||
int reftype,
|
||||
@@ -931,7 +931,7 @@ array_ref(ArrayType * array,
|
||||
*-----------------------------------------------------------------------------
|
||||
*/
|
||||
Datum
|
||||
array_clip(ArrayType * array,
|
||||
array_clip(ArrayType *array,
|
||||
int n,
|
||||
int upperIndx[],
|
||||
int lowerIndx[],
|
||||
@@ -1073,7 +1073,7 @@ array_clip(ArrayType * array,
|
||||
*-----------------------------------------------------------------------------
|
||||
*/
|
||||
char *
|
||||
array_set(ArrayType * array,
|
||||
array_set(ArrayType *array,
|
||||
int n,
|
||||
int indx[],
|
||||
char *dataPtr,
|
||||
@@ -1208,11 +1208,11 @@ array_set(ArrayType * array,
|
||||
*----------------------------------------------------------------------------
|
||||
*/
|
||||
char *
|
||||
array_assgn(ArrayType * array,
|
||||
array_assgn(ArrayType *array,
|
||||
int n,
|
||||
int upperIndx[],
|
||||
int lowerIndx[],
|
||||
ArrayType * newArr,
|
||||
ArrayType *newArr,
|
||||
int reftype,
|
||||
int len,
|
||||
bool * isNull)
|
||||
@@ -1283,7 +1283,7 @@ array_assgn(ArrayType * array,
|
||||
*-----------------------------------------------------------------------------
|
||||
*/
|
||||
int
|
||||
array_eq(ArrayType * array1, ArrayType * array2)
|
||||
array_eq(ArrayType *array1, ArrayType *array2)
|
||||
{
|
||||
if ((array1 == NULL) || (array2 == NULL))
|
||||
return (0);
|
||||
@@ -1445,7 +1445,7 @@ _ArrayRange(int st[],
|
||||
int endp[],
|
||||
int bsize,
|
||||
char *destPtr,
|
||||
ArrayType * array,
|
||||
ArrayType *array,
|
||||
int from)
|
||||
{
|
||||
int n,
|
||||
@@ -1487,7 +1487,7 @@ _ArrayRange(int st[],
|
||||
}
|
||||
|
||||
static int
|
||||
_ArrayClipCount(int stI[], int endpI[], ArrayType * array)
|
||||
_ArrayClipCount(int stI[], int endpI[], ArrayType *array)
|
||||
{
|
||||
int n,
|
||||
*dim,
|
||||
@@ -1568,7 +1568,7 @@ _LOArrayRange(int st[],
|
||||
int bsize,
|
||||
int srcfd,
|
||||
int destfd,
|
||||
ArrayType * array,
|
||||
ArrayType *array,
|
||||
int isSrcLO,
|
||||
bool * isNull)
|
||||
{
|
||||
@@ -1622,7 +1622,7 @@ _ReadArray(int st[],
|
||||
int bsize,
|
||||
int srcfd,
|
||||
int destfd,
|
||||
ArrayType * array,
|
||||
ArrayType *array,
|
||||
int isDestLO,
|
||||
bool * isNull)
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/char.c,v 1.9 1997/09/08 02:30:29 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/char.c,v 1.10 1997/09/08 20:57:22 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -138,46 +138,55 @@ chareq(int8 arg1, int8 arg2)
|
||||
{
|
||||
return (arg1 == arg2);
|
||||
}
|
||||
|
||||
bool
|
||||
charne(int8 arg1, int8 arg2)
|
||||
{
|
||||
return (arg1 != arg2);
|
||||
}
|
||||
|
||||
bool
|
||||
charlt(int8 arg1, int8 arg2)
|
||||
{
|
||||
return ((uint8) arg1 < (uint8) arg2);
|
||||
}
|
||||
|
||||
bool
|
||||
charle(int8 arg1, int8 arg2)
|
||||
{
|
||||
return ((uint8) arg1 <= (uint8) arg2);
|
||||
}
|
||||
|
||||
bool
|
||||
chargt(int8 arg1, int8 arg2)
|
||||
{
|
||||
return ((uint8) arg1 > (uint8) arg2);
|
||||
}
|
||||
|
||||
bool
|
||||
charge(int8 arg1, int8 arg2)
|
||||
{
|
||||
return ((uint8) arg1 >= (uint8) arg2);
|
||||
}
|
||||
|
||||
int8
|
||||
charpl(int8 arg1, int8 arg2)
|
||||
{
|
||||
return (arg1 + arg2);
|
||||
}
|
||||
|
||||
int8
|
||||
charmi(int8 arg1, int8 arg2)
|
||||
{
|
||||
return (arg1 - arg2);
|
||||
}
|
||||
|
||||
int8
|
||||
charmul(int8 arg1, int8 arg2)
|
||||
{
|
||||
return (arg1 * arg2);
|
||||
}
|
||||
|
||||
int8
|
||||
chardiv(int8 arg1, int8 arg2)
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/chunk.c,v 1.8 1997/09/08 02:30:31 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/chunk.c,v 1.9 1997/09/08 20:57:24 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -439,7 +439,7 @@ _ReadChunkArray(int st[],
|
||||
int bsize,
|
||||
int fp,
|
||||
char *destfp,
|
||||
ArrayType * array,
|
||||
ArrayType *array,
|
||||
int isDestLO,
|
||||
bool * isNull)
|
||||
{
|
||||
@@ -637,7 +637,7 @@ struct varlena *
|
||||
_ReadChunkArray1El(int st[],
|
||||
int bsize,
|
||||
int fp,
|
||||
ArrayType * array,
|
||||
ArrayType *array,
|
||||
bool * isNull)
|
||||
{
|
||||
int i,
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.16 1997/09/08 02:30:32 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.17 1997/09/08 20:57:26 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* This code is actually (almost) unused.
|
||||
@@ -104,8 +104,8 @@ static int correct_dir(char direction[], int *signptr);
|
||||
|
||||
static int
|
||||
istinterval(char *i_string,
|
||||
AbsoluteTime * i_start,
|
||||
AbsoluteTime * i_end);
|
||||
AbsoluteTime *i_start,
|
||||
AbsoluteTime *i_end);
|
||||
|
||||
/*****************************************************************************
|
||||
* USER I/O ROUTINES *
|
||||
@@ -952,8 +952,8 @@ correct_dir(char direction[], int *signptr)
|
||||
*/
|
||||
static int
|
||||
istinterval(char *i_string,
|
||||
AbsoluteTime * i_start,
|
||||
AbsoluteTime * i_end)
|
||||
AbsoluteTime *i_start,
|
||||
AbsoluteTime *i_end)
|
||||
{
|
||||
register char *p,
|
||||
*p1;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.21 1997/09/08 02:30:42 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.22 1997/09/08 20:57:29 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -31,10 +31,10 @@
|
||||
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 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);
|
||||
@@ -57,7 +57,7 @@ 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 double box_ar(BOX * box);
|
||||
static double box_ar(BOX *box);
|
||||
static Point *interpt_sl(LSEG * lseg, LINE * line);
|
||||
static LINE *line_construct_pp(Point * pt1, Point * pt2);
|
||||
|
||||
@@ -384,7 +384,7 @@ box_in(char *str)
|
||||
/* box_out - convert a box to external form.
|
||||
*/
|
||||
char *
|
||||
box_out(BOX * box)
|
||||
box_out(BOX *box)
|
||||
{
|
||||
if (!PointerIsValid(box))
|
||||
return (NULL);
|
||||
@@ -407,7 +407,7 @@ box_construct(double x1, double x2, double y1, double y2)
|
||||
/* box_fill - fill in a static box
|
||||
*/
|
||||
static BOX *
|
||||
box_fill(BOX * result, double x1, double x2, double y1, double y2)
|
||||
box_fill(BOX *result, double x1, double x2, double y1, double y2)
|
||||
{
|
||||
if (x1 > x2)
|
||||
{
|
||||
@@ -437,7 +437,7 @@ box_fill(BOX * result, double x1, double x2, double y1, double y2)
|
||||
/* box_copy - copy a box
|
||||
*/
|
||||
static BOX *
|
||||
box_copy(BOX * box)
|
||||
box_copy(BOX *box)
|
||||
{
|
||||
BOX *result = PALLOCTYPE(BOX);
|
||||
|
||||
@@ -455,7 +455,7 @@ box_copy(BOX * box)
|
||||
/* box_same - are two boxes identical?
|
||||
*/
|
||||
bool
|
||||
box_same(BOX * box1, BOX * box2)
|
||||
box_same(BOX *box1, BOX *box2)
|
||||
{
|
||||
return ((FPeq(box1->high.x, box2->high.x) && FPeq(box1->low.x, box2->low.x)) &&
|
||||
(FPeq(box1->high.y, box2->high.y) && FPeq(box1->low.y, box2->low.y)));
|
||||
@@ -464,7 +464,7 @@ box_same(BOX * box1, BOX * box2)
|
||||
/* box_overlap - does box1 overlap box2?
|
||||
*/
|
||||
bool
|
||||
box_overlap(BOX * box1, BOX * box2)
|
||||
box_overlap(BOX *box1, BOX *box2)
|
||||
{
|
||||
return (((FPge(box1->high.x, box2->high.x) && FPle(box1->low.x, box2->high.x)) ||
|
||||
(FPge(box2->high.x, box1->high.x) && FPle(box2->low.x, box1->high.x))) &&
|
||||
@@ -479,7 +479,7 @@ box_overlap(BOX * box1, BOX * box2)
|
||||
* when time ranges are stored as rectangles.
|
||||
*/
|
||||
bool
|
||||
box_overleft(BOX * box1, BOX * box2)
|
||||
box_overleft(BOX *box1, BOX *box2)
|
||||
{
|
||||
return (FPle(box1->high.x, box2->high.x));
|
||||
}
|
||||
@@ -487,7 +487,7 @@ box_overleft(BOX * box1, BOX * box2)
|
||||
/* box_left - is box1 strictly left of box2?
|
||||
*/
|
||||
bool
|
||||
box_left(BOX * box1, BOX * box2)
|
||||
box_left(BOX *box1, BOX *box2)
|
||||
{
|
||||
return (FPlt(box1->high.x, box2->low.x));
|
||||
}
|
||||
@@ -495,7 +495,7 @@ box_left(BOX * box1, BOX * box2)
|
||||
/* box_right - is box1 strictly right of box2?
|
||||
*/
|
||||
bool
|
||||
box_right(BOX * box1, BOX * box2)
|
||||
box_right(BOX *box1, BOX *box2)
|
||||
{
|
||||
return (FPgt(box1->low.x, box2->high.x));
|
||||
}
|
||||
@@ -507,7 +507,7 @@ box_right(BOX * box1, BOX * box2)
|
||||
* are stored as rectangles.
|
||||
*/
|
||||
bool
|
||||
box_overright(BOX * box1, BOX * box2)
|
||||
box_overright(BOX *box1, BOX *box2)
|
||||
{
|
||||
return (box1->low.x >= box2->low.x);
|
||||
}
|
||||
@@ -515,7 +515,7 @@ box_overright(BOX * box1, BOX * box2)
|
||||
/* box_contained - is box1 contained by box2?
|
||||
*/
|
||||
bool
|
||||
box_contained(BOX * box1, BOX * box2)
|
||||
box_contained(BOX *box1, BOX *box2)
|
||||
{
|
||||
return ((FPle(box1->high.x, box2->high.x) && FPge(box1->low.x, box2->low.x)) &&
|
||||
(FPle(box1->high.y, box2->high.y) && FPge(box1->low.y, box2->low.y)));
|
||||
@@ -524,7 +524,7 @@ box_contained(BOX * box1, BOX * box2)
|
||||
/* box_contain - does box1 contain box2?
|
||||
*/
|
||||
bool
|
||||
box_contain(BOX * box1, BOX * box2)
|
||||
box_contain(BOX *box1, BOX *box2)
|
||||
{
|
||||
return ((FPge(box1->high.x, box2->high.x) && FPle(box1->low.x, box2->low.x) &&
|
||||
FPge(box1->high.y, box2->high.y) && FPle(box1->low.y, box2->low.y)));
|
||||
@@ -535,13 +535,13 @@ box_contain(BOX * box1, BOX * box2)
|
||||
* is box1 entirely {above,below} box2?
|
||||
*/
|
||||
bool
|
||||
box_below(BOX * box1, BOX * box2)
|
||||
box_below(BOX *box1, BOX *box2)
|
||||
{
|
||||
return (FPle(box1->high.y, box2->low.y));
|
||||
}
|
||||
|
||||
bool
|
||||
box_above(BOX * box1, BOX * box2)
|
||||
box_above(BOX *box1, BOX *box2)
|
||||
{
|
||||
return (FPge(box1->low.y, box2->high.y));
|
||||
}
|
||||
@@ -551,31 +551,31 @@ box_above(BOX * box1, BOX * box2)
|
||||
* our accuracy constraint?
|
||||
*/
|
||||
bool
|
||||
box_lt(BOX * box1, BOX * box2)
|
||||
box_lt(BOX *box1, BOX *box2)
|
||||
{
|
||||
return (FPlt(box_ar(box1), box_ar(box2)));
|
||||
}
|
||||
|
||||
bool
|
||||
box_gt(BOX * box1, BOX * box2)
|
||||
box_gt(BOX *box1, BOX *box2)
|
||||
{
|
||||
return (FPgt(box_ar(box1), box_ar(box2)));
|
||||
}
|
||||
|
||||
bool
|
||||
box_eq(BOX * box1, BOX * box2)
|
||||
box_eq(BOX *box1, BOX *box2)
|
||||
{
|
||||
return (FPeq(box_ar(box1), box_ar(box2)));
|
||||
}
|
||||
|
||||
bool
|
||||
box_le(BOX * box1, BOX * box2)
|
||||
box_le(BOX *box1, BOX *box2)
|
||||
{
|
||||
return (FPle(box_ar(box1), box_ar(box2)));
|
||||
}
|
||||
|
||||
bool
|
||||
box_ge(BOX * box1, BOX * box2)
|
||||
box_ge(BOX *box1, BOX *box2)
|
||||
{
|
||||
return (FPge(box_ar(box1), box_ar(box2)));
|
||||
}
|
||||
@@ -593,7 +593,7 @@ box_ge(BOX * box1, BOX * box2)
|
||||
/* box_area - returns the area of the box.
|
||||
*/
|
||||
double *
|
||||
box_area(BOX * box)
|
||||
box_area(BOX *box)
|
||||
{
|
||||
double *result = PALLOCTYPE(double);
|
||||
|
||||
@@ -607,7 +607,7 @@ box_area(BOX * box)
|
||||
* (horizontal magnitude).
|
||||
*/
|
||||
double *
|
||||
box_width(BOX * box)
|
||||
box_width(BOX *box)
|
||||
{
|
||||
double *result = PALLOCTYPE(double);
|
||||
|
||||
@@ -621,7 +621,7 @@ box_width(BOX * box)
|
||||
* (vertical magnitude).
|
||||
*/
|
||||
double *
|
||||
box_height(BOX * box)
|
||||
box_height(BOX *box)
|
||||
{
|
||||
double *result = PALLOCTYPE(double);
|
||||
|
||||
@@ -635,7 +635,7 @@ box_height(BOX * box)
|
||||
* center points of two boxes.
|
||||
*/
|
||||
double *
|
||||
box_distance(BOX * box1, BOX * box2)
|
||||
box_distance(BOX *box1, BOX *box2)
|
||||
{
|
||||
double *result = PALLOCTYPE(double);
|
||||
Point *a,
|
||||
@@ -654,7 +654,7 @@ box_distance(BOX * box1, BOX * box2)
|
||||
/* box_center - returns the center point of the box.
|
||||
*/
|
||||
Point *
|
||||
box_center(BOX * box)
|
||||
box_center(BOX *box)
|
||||
{
|
||||
Point *result = PALLOCTYPE(Point);
|
||||
|
||||
@@ -668,7 +668,7 @@ box_center(BOX * box)
|
||||
/* box_ar - returns the area of the box.
|
||||
*/
|
||||
static double
|
||||
box_ar(BOX * box)
|
||||
box_ar(BOX *box)
|
||||
{
|
||||
return (box_wd(box) * box_ht(box));
|
||||
}
|
||||
@@ -678,7 +678,7 @@ box_ar(BOX * box)
|
||||
* (horizontal magnitude).
|
||||
*/
|
||||
static double
|
||||
box_wd(BOX * box)
|
||||
box_wd(BOX *box)
|
||||
{
|
||||
return (box->high.x - box->low.x);
|
||||
}
|
||||
@@ -688,7 +688,7 @@ box_wd(BOX * box)
|
||||
* (vertical magnitude).
|
||||
*/
|
||||
static double
|
||||
box_ht(BOX * box)
|
||||
box_ht(BOX *box)
|
||||
{
|
||||
return (box->high.y - box->low.y);
|
||||
}
|
||||
@@ -699,7 +699,7 @@ box_ht(BOX * box)
|
||||
*/
|
||||
#ifdef NOT_USED
|
||||
static double
|
||||
box_dt(BOX * box1, BOX * box2)
|
||||
box_dt(BOX *box1, BOX *box2)
|
||||
{
|
||||
double result;
|
||||
Point *a,
|
||||
@@ -725,7 +725,7 @@ box_dt(BOX * box1, BOX * box2)
|
||||
* or NULL if they do not intersect.
|
||||
*/
|
||||
BOX *
|
||||
box_intersect(BOX * box1, BOX * box2)
|
||||
box_intersect(BOX *box1, BOX *box2)
|
||||
{
|
||||
BOX *result;
|
||||
|
||||
@@ -749,7 +749,7 @@ box_intersect(BOX * box1, BOX * box2)
|
||||
* provided, of course, we have LSEGs.
|
||||
*/
|
||||
LSEG *
|
||||
box_diagonal(BOX * box)
|
||||
box_diagonal(BOX *box)
|
||||
{
|
||||
Point p1,
|
||||
p2;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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);
|
||||
@@ -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);
|
||||
@@ -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);
|
||||
@@ -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);
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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,
|
||||
@@ -3273,7 +3273,7 @@ poly_box(POLYGON * poly)
|
||||
* Convert a box to a polygon.
|
||||
*/
|
||||
POLYGON *
|
||||
box_poly(BOX * box)
|
||||
box_poly(BOX *box)
|
||||
{
|
||||
POLYGON *poly;
|
||||
int size;
|
||||
@@ -3958,7 +3958,7 @@ circle_box(CIRCLE * circle)
|
||||
* Convert a box to a circle.
|
||||
*/
|
||||
CIRCLE *
|
||||
box_circle(BOX * box)
|
||||
box_circle(BOX *box)
|
||||
{
|
||||
CIRCLE *circle;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.6 1997/09/08 02:30:45 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.7 1997/09/08 20:57:32 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -248,26 +248,31 @@ int4eq(int32 arg1, int32 arg2)
|
||||
{
|
||||
return (arg1 == arg2);
|
||||
}
|
||||
|
||||
bool
|
||||
int4ne(int32 arg1, int32 arg2)
|
||||
{
|
||||
return (arg1 != arg2);
|
||||
}
|
||||
|
||||
bool
|
||||
int4lt(int32 arg1, int32 arg2)
|
||||
{
|
||||
return (arg1 < arg2);
|
||||
}
|
||||
|
||||
bool
|
||||
int4le(int32 arg1, int32 arg2)
|
||||
{
|
||||
return (arg1 <= arg2);
|
||||
}
|
||||
|
||||
bool
|
||||
int4gt(int32 arg1, int32 arg2)
|
||||
{
|
||||
return (arg1 > arg2);
|
||||
}
|
||||
|
||||
bool
|
||||
int4ge(int32 arg1, int32 arg2)
|
||||
{
|
||||
@@ -279,26 +284,31 @@ int2eq(int16 arg1, int16 arg2)
|
||||
{
|
||||
return (arg1 == arg2);
|
||||
}
|
||||
|
||||
bool
|
||||
int2ne(int16 arg1, int16 arg2)
|
||||
{
|
||||
return (arg1 != arg2);
|
||||
}
|
||||
|
||||
bool
|
||||
int2lt(int16 arg1, int16 arg2)
|
||||
{
|
||||
return (arg1 < arg2);
|
||||
}
|
||||
|
||||
bool
|
||||
int2le(int16 arg1, int16 arg2)
|
||||
{
|
||||
return (arg1 <= arg2);
|
||||
}
|
||||
|
||||
bool
|
||||
int2gt(int16 arg1, int16 arg2)
|
||||
{
|
||||
return (arg1 > arg2);
|
||||
}
|
||||
|
||||
bool
|
||||
int2ge(int16 arg1, int16 arg2)
|
||||
{
|
||||
@@ -310,26 +320,31 @@ int24eq(int32 arg1, int32 arg2)
|
||||
{
|
||||
return (arg1 == arg2);
|
||||
}
|
||||
|
||||
bool
|
||||
int24ne(int32 arg1, int32 arg2)
|
||||
{
|
||||
return (arg1 != arg2);
|
||||
}
|
||||
|
||||
bool
|
||||
int24lt(int32 arg1, int32 arg2)
|
||||
{
|
||||
return (arg1 < arg2);
|
||||
}
|
||||
|
||||
bool
|
||||
int24le(int32 arg1, int32 arg2)
|
||||
{
|
||||
return (arg1 <= arg2);
|
||||
}
|
||||
|
||||
bool
|
||||
int24gt(int32 arg1, int32 arg2)
|
||||
{
|
||||
return (arg1 > arg2);
|
||||
}
|
||||
|
||||
bool
|
||||
int24ge(int32 arg1, int32 arg2)
|
||||
{
|
||||
@@ -341,26 +356,31 @@ int42eq(int32 arg1, int32 arg2)
|
||||
{
|
||||
return (arg1 == arg2);
|
||||
}
|
||||
|
||||
bool
|
||||
int42ne(int32 arg1, int32 arg2)
|
||||
{
|
||||
return (arg1 != arg2);
|
||||
}
|
||||
|
||||
bool
|
||||
int42lt(int32 arg1, int32 arg2)
|
||||
{
|
||||
return (arg1 < arg2);
|
||||
}
|
||||
|
||||
bool
|
||||
int42le(int32 arg1, int32 arg2)
|
||||
{
|
||||
return (arg1 <= arg2);
|
||||
}
|
||||
|
||||
bool
|
||||
int42gt(int32 arg1, int32 arg2)
|
||||
{
|
||||
return (arg1 > arg2);
|
||||
}
|
||||
|
||||
bool
|
||||
int42ge(int32 arg1, int32 arg2)
|
||||
{
|
||||
@@ -385,26 +405,31 @@ int4um(int32 arg)
|
||||
{
|
||||
return (-arg);
|
||||
}
|
||||
|
||||
int32
|
||||
int4pl(int32 arg1, int32 arg2)
|
||||
{
|
||||
return (arg1 + arg2);
|
||||
}
|
||||
|
||||
int32
|
||||
int4mi(int32 arg1, int32 arg2)
|
||||
{
|
||||
return (arg1 - arg2);
|
||||
}
|
||||
|
||||
int32
|
||||
int4mul(int32 arg1, int32 arg2)
|
||||
{
|
||||
return (arg1 * arg2);
|
||||
}
|
||||
|
||||
int32
|
||||
int4div(int32 arg1, int32 arg2)
|
||||
{
|
||||
return (arg1 / arg2);
|
||||
}
|
||||
|
||||
int32
|
||||
int4inc(int32 arg)
|
||||
{
|
||||
@@ -416,26 +441,31 @@ int2um(int16 arg)
|
||||
{
|
||||
return (-arg);
|
||||
}
|
||||
|
||||
int16
|
||||
int2pl(int16 arg1, int16 arg2)
|
||||
{
|
||||
return (arg1 + arg2);
|
||||
}
|
||||
|
||||
int16
|
||||
int2mi(int16 arg1, int16 arg2)
|
||||
{
|
||||
return (arg1 - arg2);
|
||||
}
|
||||
|
||||
int16
|
||||
int2mul(int16 arg1, int16 arg2)
|
||||
{
|
||||
return (arg1 * arg2);
|
||||
}
|
||||
|
||||
int16
|
||||
int2div(int16 arg1, int16 arg2)
|
||||
{
|
||||
return (arg1 / arg2);
|
||||
}
|
||||
|
||||
int16
|
||||
int2inc(int16 arg)
|
||||
{
|
||||
@@ -447,16 +477,19 @@ int24pl(int32 arg1, int32 arg2)
|
||||
{
|
||||
return (arg1 + arg2);
|
||||
}
|
||||
|
||||
int32
|
||||
int24mi(int32 arg1, int32 arg2)
|
||||
{
|
||||
return (arg1 - arg2);
|
||||
}
|
||||
|
||||
int32
|
||||
int24mul(int32 arg1, int32 arg2)
|
||||
{
|
||||
return (arg1 * arg2);
|
||||
}
|
||||
|
||||
int32
|
||||
int24div(int32 arg1, int32 arg2)
|
||||
{
|
||||
@@ -468,16 +501,19 @@ int42pl(int32 arg1, int32 arg2)
|
||||
{
|
||||
return (arg1 + arg2);
|
||||
}
|
||||
|
||||
int32
|
||||
int42mi(int32 arg1, int32 arg2)
|
||||
{
|
||||
return (arg1 - arg2);
|
||||
}
|
||||
|
||||
int32
|
||||
int42mul(int32 arg1, int32 arg2)
|
||||
{
|
||||
return (arg1 * arg2);
|
||||
}
|
||||
|
||||
int32
|
||||
int42div(int32 arg1, int32 arg2)
|
||||
{
|
||||
@@ -492,16 +528,19 @@ int4mod(int32 arg1, int32 arg2)
|
||||
{
|
||||
return (arg1 % arg2);
|
||||
}
|
||||
|
||||
int32
|
||||
int2mod(int16 arg1, int16 arg2)
|
||||
{
|
||||
return (arg1 % arg2);
|
||||
}
|
||||
|
||||
int32
|
||||
int24mod(int32 arg1, int32 arg2)
|
||||
{
|
||||
return (arg1 % arg2);
|
||||
}
|
||||
|
||||
int32
|
||||
int42mod(int32 arg1, int32 arg2)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user