summaryrefslogtreecommitdiff
path: root/contrib/cube/cube.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2017-08-16 00:22:32 -0400
committerPeter Eisentraut <peter_e@gmx.net>2017-11-08 11:37:28 -0500
commit2eb4a831e5fb5d8fc17e13aea56e04af3efe27b4 (patch)
treeb46993cceb7cd8b848e39a45c1bb8c73dc67b221 /contrib/cube/cube.c
parent4497f2f3b30fa5cd48898033c351bfcf01ce73e2 (diff)
Change TRUE/FALSE to true/false
The lower case spellings are C and C++ standard and are used in most parts of the PostgreSQL sources. The upper case spellings are only used in some files/modules. So standardize on the standard spellings. The APIs for ICU, Perl, and Windows define their own TRUE and FALSE, so those are left as is when using those APIs. In code comments, we use the lower-case spelling for the C concepts and keep the upper-case spelling for the SQL concepts. Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
Diffstat (limited to 'contrib/cube/cube.c')
-rw-r--r--contrib/cube/cube.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/contrib/cube/cube.c b/contrib/cube/cube.c
index b7702716fed..3e3d83323c8 100644
--- a/contrib/cube/cube.c
+++ b/contrib/cube/cube.c
@@ -309,7 +309,7 @@ cube_out(PG_FUNCTION_ARGS)
/*
** The GiST Consistent method for boxes
** Should return false if for all data items x below entry,
-** the predicate x op query == FALSE, where op is the oper
+** the predicate x op query == false, where op is the oper
** corresponding to strategy in the pg_amop table.
*/
Datum
@@ -396,7 +396,7 @@ g_cube_decompress(PG_FUNCTION_ARGS)
gistentryinit(*retval, PointerGetDatum(key),
entry->rel, entry->page,
- entry->offset, FALSE);
+ entry->offset, false);
PG_RETURN_POINTER(retval);
}
PG_RETURN_POINTER(entry);
@@ -590,9 +590,9 @@ g_cube_same(PG_FUNCTION_ARGS)
bool *result = (bool *) PG_GETARG_POINTER(2);
if (cube_cmp_v0(b1, b2) == 0)
- *result = TRUE;
+ *result = true;
else
- *result = FALSE;
+ *result = false;
PG_RETURN_NDBOX_P(result);
}
@@ -624,7 +624,7 @@ g_cube_leaf_consistent(NDBOX *key,
retval = cube_contains_v0(query, key);
break;
default:
- retval = FALSE;
+ retval = false;
}
return retval;
}
@@ -651,7 +651,7 @@ g_cube_internal_consistent(NDBOX *key,
retval = (bool) cube_overlap_v0(key, query);
break;
default:
- retval = FALSE;
+ retval = false;
}
return retval;
}
@@ -1059,7 +1059,7 @@ cube_contains_v0(NDBOX *a, NDBOX *b)
int i;
if ((a == NULL) || (b == NULL))
- return FALSE;
+ return false;
if (DIM(a) < DIM(b))
{
@@ -1071,9 +1071,9 @@ cube_contains_v0(NDBOX *a, NDBOX *b)
for (i = DIM(a); i < DIM(b); i++)
{
if (LL_COORD(b, i) != 0)
- return FALSE;
+ return false;
if (UR_COORD(b, i) != 0)
- return FALSE;
+ return false;
}
}
@@ -1082,13 +1082,13 @@ cube_contains_v0(NDBOX *a, NDBOX *b)
{
if (Min(LL_COORD(a, i), UR_COORD(a, i)) >
Min(LL_COORD(b, i), UR_COORD(b, i)))
- return FALSE;
+ return false;
if (Max(LL_COORD(a, i), UR_COORD(a, i)) <
Max(LL_COORD(b, i), UR_COORD(b, i)))
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
Datum
@@ -1129,7 +1129,7 @@ cube_overlap_v0(NDBOX *a, NDBOX *b)
int i;
if ((a == NULL) || (b == NULL))
- return FALSE;
+ return false;
/* swap the box pointers if needed */
if (DIM(a) < DIM(b))
@@ -1144,21 +1144,21 @@ cube_overlap_v0(NDBOX *a, NDBOX *b)
for (i = 0; i < DIM(b); i++)
{
if (Min(LL_COORD(a, i), UR_COORD(a, i)) > Max(LL_COORD(b, i), UR_COORD(b, i)))
- return FALSE;
+ return false;
if (Max(LL_COORD(a, i), UR_COORD(a, i)) < Min(LL_COORD(b, i), UR_COORD(b, i)))
- return FALSE;
+ return false;
}
/* compare to zero those dimensions in (a) absent in (b) */
for (i = DIM(b); i < DIM(a); i++)
{
if (Min(LL_COORD(a, i), UR_COORD(a, i)) > 0)
- return FALSE;
+ return false;
if (Max(LL_COORD(a, i), UR_COORD(a, i)) < 0)
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}