diff options
author | Tom Lane | 2004-10-21 19:28:36 +0000 |
---|---|---|
committer | Tom Lane | 2004-10-21 19:28:36 +0000 |
commit | 380bd04c1658795c77b3b808ee766347188fab5f (patch) | |
tree | cb654e3e510cb1974120cd4d3ea1984b30f3eb32 /contrib/seg/seg.c | |
parent | a171fc1a4f37e37c1e80fe3e92a96b2bd37c8f98 (diff) |
Standardize on using the Min, Max, and Abs macros that are in our c.h file,
getting rid of numerous ad-hoc versions that have popped up in various
places. Shortens code and avoids conflict with Windows min() and max()
macros.
Diffstat (limited to 'contrib/seg/seg.c')
-rw-r--r-- | contrib/seg/seg.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/contrib/seg/seg.c b/contrib/seg/seg.c index ce857aac479..0de714854d0 100644 --- a/contrib/seg/seg.c +++ b/contrib/seg/seg.c @@ -14,8 +14,6 @@ #include "segdata.h" -#define abs(a) ((a) < (0) ? (-a) : (a)) - /* #define GIST_DEBUG #define GIST_QUERY_DEBUG @@ -717,7 +715,7 @@ rt_seg_size(SEG * a, float *size) if (a == (SEG *) NULL || a->upper <= a->lower) *size = 0.0; else - *size = (float) abs(a->upper - a->lower); + *size = (float) Abs(a->upper - a->lower); return; } @@ -729,7 +727,7 @@ seg_size(SEG * a) result = (float *) palloc(sizeof(float)); - *result = (float) abs(a->upper - a->lower); + *result = (float) Abs(a->upper - a->lower); return (result); } @@ -948,7 +946,7 @@ restore(char *result, float val, int n) } else { - if (abs(exp) <= 4) + if (Abs(exp) <= 4) { /* * remove the decimal point from the mantyssa and write the @@ -1036,7 +1034,7 @@ restore(char *result, float val, int n) } } - /* do nothing for abs(exp) > 4; %e must be OK */ + /* do nothing for Abs(exp) > 4; %e must be OK */ /* just get rid of zeroes after [eE]- and +zeroes after [Ee]. */ /* ... this is not done yet. */ |