Blob Blame History Raw
diff -up pgsphere-1.1.1/box.c.pg11 pgsphere-1.1.1/box.c
--- pgsphere-1.1.1/box.c.pg11	2010-01-31 15:26:50.000000000 -0500
+++ pgsphere-1.1.1/box.c	2018-10-19 01:26:17.559133504 -0400
@@ -171,7 +171,7 @@
          ( ( sc->center.lat + sc->radius ) <= sb->ne.lat ) &&
          ( ( sc->center.lat - sc->radius ) >= sb->sw.lat );
       bool bcc = sbox_cont_point ( sb, &sc->center ) ;
-      bool ccb = FALSE;
+      bool ccb = false;
       static int8 pw, pe;
       static SLine   bw, be ; // west and east boundary
       static SPoint  bc;
@@ -209,7 +209,7 @@
         return PGS_BOX_CIRCLE_OVER;
       }
       if ( bcc && lat_b_cont_c ){
-        bool touw = FALSE , toue = FALSE;
+        bool touw = false , toue = false;
         if ( pw == PGS_CIRCLE_LINE_OVER ){
           touw = sline_circle_touch( &bw , sc );
         }
@@ -733,7 +733,7 @@
     }
 
     if ( !recheck ){
-      pe = sbox_box_pos ( b2 , b1 , TRUE );
+      pe = sbox_box_pos ( b2 , b1 , true );
       if ( pe == PGS_BOX_CONT ){
         return PGS_BOX_OVER;
       }
@@ -1284,40 +1284,40 @@
   {
     SBOX   * box1 = ( SBOX  * ) PG_GETARG_POINTER ( 0 ) ;
     SBOX   * box2 = ( SBOX  * ) PG_GETARG_POINTER ( 1 ) ;
-    PG_RETURN_BOOL ( sbox_box_pos ( box1, box2, FALSE ) ==  PGS_BOX_CONT );
+    PG_RETURN_BOOL ( sbox_box_pos ( box1, box2, false ) ==  PGS_BOX_CONT );
   }
 
   Datum spherebox_cont_box_neg (PG_FUNCTION_ARGS)
   {
     SBOX   * box1 = ( SBOX  * ) PG_GETARG_POINTER ( 0 ) ;
     SBOX   * box2 = ( SBOX  * ) PG_GETARG_POINTER ( 1 ) ;
-    PG_RETURN_BOOL ( !( sbox_box_pos ( box1, box2, FALSE ) ==  PGS_BOX_CONT ) );
+    PG_RETURN_BOOL ( !( sbox_box_pos ( box1, box2, false ) ==  PGS_BOX_CONT ) );
   }
 
   Datum spherebox_cont_box_com (PG_FUNCTION_ARGS)
   {
     SBOX   * box1 = ( SBOX  * ) PG_GETARG_POINTER ( 1 ) ;
     SBOX   * box2 = ( SBOX  * ) PG_GETARG_POINTER ( 0 ) ;
-    PG_RETURN_BOOL ( sbox_box_pos ( box1, box2, FALSE ) ==  PGS_BOX_CONT );
+    PG_RETURN_BOOL ( sbox_box_pos ( box1, box2, false ) ==  PGS_BOX_CONT );
   }
 
   Datum spherebox_cont_box_com_neg (PG_FUNCTION_ARGS)
   {
     SBOX   * box1 = ( SBOX  * ) PG_GETARG_POINTER ( 1 ) ;
     SBOX   * box2 = ( SBOX  * ) PG_GETARG_POINTER ( 0 ) ;
-    PG_RETURN_BOOL ( !( sbox_box_pos ( box1, box2, FALSE ) ==  PGS_BOX_CONT ) );
+    PG_RETURN_BOOL ( !( sbox_box_pos ( box1, box2, false ) ==  PGS_BOX_CONT ) );
   }
 
   Datum spherebox_overlap_box (PG_FUNCTION_ARGS)
   {
     SBOX   * box1 = ( SBOX  * ) PG_GETARG_POINTER ( 0 ) ;
     SBOX   * box2 = ( SBOX  * ) PG_GETARG_POINTER ( 1 ) ;
-    PG_RETURN_BOOL ( sbox_box_pos ( box1, box2, FALSE ) >  PGS_BOX_AVOID );
+    PG_RETURN_BOOL ( sbox_box_pos ( box1, box2, false ) >  PGS_BOX_AVOID );
   }
 
   Datum spherebox_overlap_box_neg (PG_FUNCTION_ARGS)
   {
     SBOX   * box1 = ( SBOX  * ) PG_GETARG_POINTER ( 0 ) ;
     SBOX   * box2 = ( SBOX  * ) PG_GETARG_POINTER ( 1 ) ;
-    PG_RETURN_BOOL ( sbox_box_pos ( box1, box2, FALSE ) ==  PGS_BOX_AVOID );
+    PG_RETURN_BOOL ( sbox_box_pos ( box1, box2, false ) ==  PGS_BOX_AVOID );
   }
diff -up pgsphere-1.1.1/circle.c.pg11 pgsphere-1.1.1/circle.c
--- pgsphere-1.1.1/circle.c.pg11	2010-01-31 15:26:50.000000000 -0500
+++ pgsphere-1.1.1/circle.c	2018-10-19 01:26:17.559133504 -0400
@@ -48,9 +48,9 @@
   {
     float8   dist =  spoint_dist ( p, &c->center );
     if ( FPle(dist,c->radius) ){
-      return ( TRUE );
+      return ( true );
     }
-    return ( FALSE );
+    return ( false );
   }
 
   SCIRCLE  * euler_scircle_trans ( SCIRCLE * out , const SCIRCLE  * in , const SEuler * se )
@@ -183,12 +183,12 @@
     SCIRCLE  * c2 =  ( SCIRCLE * ) PG_GETARG_POINTER ( 1 ) ;
     float8   dist =  spoint_dist ( &c1->center, &c2->center );
     if ( scircle_eq( c1, c2 ) ){
-      PG_RETURN_BOOL ( TRUE );
+      PG_RETURN_BOOL ( true );
     } else
     if ( FPle( ( dist + c1->radius ) , c2->radius ) ){
-      PG_RETURN_BOOL ( TRUE );
+      PG_RETURN_BOOL ( true );
     } else {
-      PG_RETURN_BOOL ( FALSE );
+      PG_RETURN_BOOL ( false );
     }
   }
 
@@ -198,12 +198,12 @@
     SCIRCLE  * c2 =  ( SCIRCLE * ) PG_GETARG_POINTER ( 1 ) ;
     float8   dist =  spoint_dist ( &c1->center, &c2->center );
     if ( scircle_eq( c1, c2 ) ){
-      PG_RETURN_BOOL ( FALSE );
+      PG_RETURN_BOOL ( false );
     } else
     if ( FPgt( ( dist + c1->radius ) , c2->radius ) ){
-      PG_RETURN_BOOL ( TRUE );
+      PG_RETURN_BOOL ( true );
     } else {
-      PG_RETURN_BOOL ( FALSE );
+      PG_RETURN_BOOL ( false );
     }
   }
 
@@ -213,12 +213,12 @@
     SCIRCLE  * c2 =  ( SCIRCLE * ) PG_GETARG_POINTER ( 0 ) ;
     float8   dist =  spoint_dist ( &c1->center, &c2->center );
     if ( scircle_eq( c1, c2 ) ){
-      PG_RETURN_BOOL ( TRUE );
+      PG_RETURN_BOOL ( true );
     } else
     if ( FPle( ( dist + c1->radius ) , c2->radius ) ){
-      PG_RETURN_BOOL ( TRUE );
+      PG_RETURN_BOOL ( true );
     } else {
-      PG_RETURN_BOOL ( FALSE );
+      PG_RETURN_BOOL ( false );
     }
   }
 
@@ -228,12 +228,12 @@
     SCIRCLE  * c2 =  ( SCIRCLE * ) PG_GETARG_POINTER ( 0 ) ;
     float8   dist =  spoint_dist ( &c1->center, &c2->center );
     if ( scircle_eq( c1, c2 ) ){
-      PG_RETURN_BOOL ( FALSE );
+      PG_RETURN_BOOL ( false );
     } else
     if ( FPgt( ( dist + c1->radius ) , c2->radius ) ){
-      PG_RETURN_BOOL ( TRUE );
+      PG_RETURN_BOOL ( true );
     } else {
-      PG_RETURN_BOOL ( FALSE );
+      PG_RETURN_BOOL ( false );
     }
   }
 
@@ -243,12 +243,12 @@
     SCIRCLE  * c2 =  ( SCIRCLE * ) PG_GETARG_POINTER ( 1 ) ;
     float8   dist =  spoint_dist ( &c1->center, &c2->center );
     if ( scircle_eq( c1, c2 ) ){
-      PG_RETURN_BOOL ( TRUE );
+      PG_RETURN_BOOL ( true );
     } else
     if ( FPlt( ( c1->radius + c2->radius ) , dist ) ) {
-      PG_RETURN_BOOL ( FALSE );
+      PG_RETURN_BOOL ( false );
     } else {
-      PG_RETURN_BOOL ( TRUE ) ;
+      PG_RETURN_BOOL ( true ) ;
     }
   }
 
@@ -258,12 +258,12 @@
     SCIRCLE  * c2 =  ( SCIRCLE * ) PG_GETARG_POINTER ( 1 ) ;
     float8   dist =  spoint_dist ( &c1->center, &c2->center );
     if ( scircle_eq( c1, c2 ) ){
-      PG_RETURN_BOOL ( FALSE );
+      PG_RETURN_BOOL ( false );
     } else
     if ( FPge( ( c1->radius + c2->radius ) , dist ) ) {
-      PG_RETURN_BOOL ( FALSE );
+      PG_RETURN_BOOL ( false );
     } else {
-      PG_RETURN_BOOL ( TRUE  ) ;
+      PG_RETURN_BOOL ( true  ) ;
     }
   }
 
diff -up pgsphere-1.1.1/ellipse.c.pg11 pgsphere-1.1.1/ellipse.c
--- pgsphere-1.1.1/ellipse.c.pg11	2010-01-31 15:26:50.000000000 -0500
+++ pgsphere-1.1.1/ellipse.c	2018-10-19 01:26:17.560133504 -0400
@@ -491,7 +491,7 @@
   bool sellipse_eq ( const SELLIPSE * e1 , const SELLIPSE * e2 )
   {
     if ( FPne ( e1->rad[0], e2->rad[0] ) || FPne ( e1->rad[1], e2->rad[1] ) ){
-      return FALSE;
+      return false;
     } else
     if ( FPzero ( e1->rad[0] ) ){ // point
       static SPoint p[2];
@@ -510,7 +510,7 @@
       sellipse_trans( &se[1], e2 );
       return strans_eq ( &se[0], &se[1] );
     }
-    return FALSE;
+    return false;
   }
 
   bool sellipse_cont_point ( const SELLIPSE * se , const SPoint * sp )
@@ -519,10 +519,10 @@
     float8  dist = spoint_dist ( sp, sellipse_center( &c,se));
    
     if ( FPgt(dist,se->rad[0]) ){
-      return FALSE;
+      return false;
     }
     if ( FPle(dist,se->rad[1]) ){
-      return TRUE;
+      return true;
     }
     if ( FPzero(se->rad[1]) ){
       SLine l;
@@ -542,12 +542,12 @@
       }
       a = sellipse_dist ( se->rad[0] , se->rad[1], e );
       if ( FPge(a, dist) ) {
-        return TRUE;
+        return true;
       } else {
-        return FALSE;
+        return false;
       } 
     }
-    return FALSE;
+    return false;
   }
 
 
diff -up pgsphere-1.1.1/gist.c.pg11 pgsphere-1.1.1/gist.c
--- pgsphere-1.1.1/gist.c.pg11	2009-07-05 13:38:04.000000000 -0400
+++ pgsphere-1.1.1/gist.c	2018-10-19 01:26:17.560133504 -0400
@@ -157,11 +157,11 @@
         } \
         gistentryinit(*retval, PointerGetDatum(k) , \
           entry->rel, entry->page, \
-          entry->offset, KEYSIZE , FALSE ); \
+          entry->offset, KEYSIZE , false ); \
       } else { \
         gistentryinit(*retval, (Datum) 0, \
           entry->rel, entry->page, \
-          entry->offset, 0, FALSE ); \
+          entry->offset, 0, false ); \
       } \
     } else { \
       retval = entry; \
@@ -186,11 +186,11 @@
         } \
         gistentryinit(*retval, PointerGetDatum(k) , \
           entry->rel, entry->page, \
-          entry->offset, FALSE ); \
+          entry->offset, false ); \
       } else { \
         gistentryinit(*retval, (Datum) 0, \
           entry->rel, entry->page, \
-          entry->offset, FALSE ); \
+          entry->offset, false ); \
       } \
     } else { \
       retval = entry; \
@@ -272,14 +272,14 @@
     bool       *result = ( bool  * ) PG_GETARG_POINTER(2);
     static int       i ;
  
-    *result            = TRUE;
+    *result            = true;
 
     if ( c1 && c2 ){
       for ( i=0; i<6; i++ ){
         *result &= ( c1[i] == c2[i] );
       }
     } else {
-      *result = (c1 == NULL && c2 == NULL) ? TRUE : FALSE;
+      *result = (c1 == NULL && c2 == NULL) ? true : false;
     }
 
     PG_RETURN_POINTER(result);
@@ -317,10 +317,10 @@
     GISTENTRY          *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
     void               *query = ( void * ) PG_GETARG_POINTER(1) ;
     StrategyNumber strategy   = (StrategyNumber) PG_GETARG_UINT16(2);
-    bool             result   = FALSE ;
+    bool             result   = false ;
 
     if ( DatumGetPointer(entry->key) == NULL || ! query ) {
-      PG_RETURN_BOOL(FALSE);
+      PG_RETURN_BOOL(false);
     } else {
 
 #if PG_VERSION_NUM >= 80400
@@ -344,14 +344,14 @@
 
       if (GIST_LEAF(entry)) {
         switch ( strategy ) {
-          case  1 : if ( i == SCKEY_SAME     )  result = TRUE; break;
-          default : if ( i >  SCKEY_OVERLAP  )  result = TRUE; break;
+          case  1 : if ( i == SCKEY_SAME     )  result = true; break;
+          default : if ( i >  SCKEY_OVERLAP  )  result = true; break;
         }
       } else {
 
         switch ( strategy ) {
-          case  1 : if ( i > SCKEY_OVERLAP )  result = TRUE; break;
-          default : if ( i > SCKEY_DISJ    )  result = TRUE; break;
+          case  1 : if ( i > SCKEY_OVERLAP )  result = true; break;
+          default : if ( i > SCKEY_DISJ    )  result = true; break;
         }
 
       }
@@ -359,7 +359,7 @@
       PG_RETURN_BOOL( result );
 
     }
-    PG_RETURN_BOOL(FALSE);
+    PG_RETURN_BOOL(false);
   }
   
 
@@ -368,10 +368,10 @@
     GISTENTRY          *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
     void               *query = ( void * ) PG_GETARG_POINTER(1) ;
     StrategyNumber strategy   = (StrategyNumber) PG_GETARG_UINT16(2);
-    bool             result   = FALSE ;
+    bool             result   = false ;
 
     if ( DatumGetPointer(entry->key) == NULL || ! query ) {
-      PG_RETURN_BOOL(FALSE);
+      PG_RETURN_BOOL(false);
     } else {
 
 #if PG_VERSION_NUM >= 80400
@@ -407,18 +407,18 @@
       if (GIST_LEAF(entry)) {
 
         switch ( strategy ) {
-          case  1 : if ( i == SCKEY_SAME     )  result = TRUE; break;
-          default : if ( i >  SCKEY_DISJ     )  result = TRUE; break;
+          case  1 : if ( i == SCKEY_SAME     )  result = true; break;
+          default : if ( i >  SCKEY_DISJ     )  result = true; break;
         }
       } else {
         switch ( strategy ) {
-          case  1 : if ( i >  SCKEY_OVERLAP  )  result = TRUE; break;
-          default : if ( i >  SCKEY_DISJ     )  result = TRUE; break;
+          case  1 : if ( i >  SCKEY_OVERLAP  )  result = true; break;
+          default : if ( i >  SCKEY_DISJ     )  result = true; break;
         }
       }
       PG_RETURN_BOOL( result );
     }
-    PG_RETURN_BOOL(FALSE);
+    PG_RETURN_BOOL(false);
   }
   
 
@@ -428,10 +428,10 @@
     GISTENTRY          *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
     void               *query = ( void * ) PG_GETARG_POINTER(1) ;
     StrategyNumber strategy   = (StrategyNumber) PG_GETARG_UINT16(2);
-    bool             result   = FALSE ;
+    bool             result   = false ;
 
     if ( DatumGetPointer(entry->key) == NULL || ! query ) {
-      PG_RETURN_BOOL(FALSE);
+      PG_RETURN_BOOL(false);
     } else {
 
 #if PG_VERSION_NUM >= 80400
@@ -462,18 +462,18 @@
 
       if (GIST_LEAF(entry)) {
         switch ( strategy ) {
-          case  1 : if ( i == SCKEY_SAME     )  result = TRUE; break;
-          default : if ( i >  SCKEY_DISJ     )  result = TRUE; break;
+          case  1 : if ( i == SCKEY_SAME     )  result = true; break;
+          default : if ( i >  SCKEY_DISJ     )  result = true; break;
         }
       } else {
         switch ( strategy ) {
-          case  1 : if ( i >  SCKEY_OVERLAP  )  result = TRUE; break;
-          default : if ( i >  SCKEY_DISJ     )  result = TRUE; break;
+          case  1 : if ( i >  SCKEY_OVERLAP  )  result = true; break;
+          default : if ( i >  SCKEY_DISJ     )  result = true; break;
         }
       }
       PG_RETURN_BOOL( result );
     }
-    PG_RETURN_BOOL(FALSE);
+    PG_RETURN_BOOL(false);
   }
   
 
@@ -483,10 +483,10 @@
     GISTENTRY          *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
     void               *query = ( void * ) PG_GETARG_POINTER(1) ;
     StrategyNumber strategy   = (StrategyNumber) PG_GETARG_UINT16(2);
-    bool             result   = FALSE ;
+    bool             result   = false ;
 
     if ( DatumGetPointer(entry->key) == NULL || ! query ) {
-      PG_RETURN_BOOL(FALSE);
+      PG_RETURN_BOOL(false);
     } else {
 
 #if PG_VERSION_NUM >= 80400
@@ -516,18 +516,18 @@
 
       if (GIST_LEAF(entry)) {
         switch ( strategy ) {
-          case  1 : if ( i == SCKEY_SAME     )  result = TRUE; break;
-          default : if ( i >  SCKEY_DISJ     )  result = TRUE; break;
+          case  1 : if ( i == SCKEY_SAME     )  result = true; break;
+          default : if ( i >  SCKEY_DISJ     )  result = true; break;
         }
       } else {
         switch ( strategy ) {
-          case  1 : if ( i >  SCKEY_OVERLAP  )  result = TRUE; break;
-          default : if ( i >  SCKEY_DISJ     )  result = TRUE; break;
+          case  1 : if ( i >  SCKEY_OVERLAP  )  result = true; break;
+          default : if ( i >  SCKEY_DISJ     )  result = true; break;
         }
       }
       PG_RETURN_BOOL( result );
     }
-    PG_RETURN_BOOL(FALSE);
+    PG_RETURN_BOOL(false);
   }
   
 
@@ -536,10 +536,10 @@
     GISTENTRY          *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
     void               *query = ( void * ) PG_GETARG_POINTER(1) ;
     StrategyNumber strategy   = (StrategyNumber) PG_GETARG_UINT16(2);
-    bool             result   = FALSE ;
+    bool             result   = false ;
 
     if ( DatumGetPointer(entry->key) == NULL || ! query ) {
-      PG_RETURN_BOOL(FALSE);
+      PG_RETURN_BOOL(false);
     } else {
 
 #if PG_VERSION_NUM >= 80400
@@ -574,18 +574,18 @@
 
       if (GIST_LEAF(entry)) {
         switch ( strategy ) {
-          case  1 : if ( i == SCKEY_SAME     )  result = TRUE; break;
-          default : if ( i >  SCKEY_DISJ     )  result = TRUE; break;
+          case  1 : if ( i == SCKEY_SAME     )  result = true; break;
+          default : if ( i >  SCKEY_DISJ     )  result = true; break;
         }
       } else {
         switch ( strategy ) {
-          case  1 : if ( i >  SCKEY_OVERLAP  )  result = TRUE; break;
-          default : if ( i >  SCKEY_DISJ     )  result = TRUE; break;
+          case  1 : if ( i >  SCKEY_OVERLAP  )  result = true; break;
+          default : if ( i >  SCKEY_DISJ     )  result = true; break;
         }
       }
       PG_RETURN_BOOL( result );
     }
-    PG_RETURN_BOOL(FALSE);
+    PG_RETURN_BOOL(false);
   }
 
 
@@ -594,10 +594,10 @@
     GISTENTRY          *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
     void               *query = ( void * ) PG_GETARG_POINTER(1) ;
     StrategyNumber strategy   = (StrategyNumber) PG_GETARG_UINT16(2);
-    bool             result   = FALSE ;
+    bool             result   = false ;
 
     if ( DatumGetPointer(entry->key) == NULL || ! query ) {
-      PG_RETURN_BOOL(FALSE);
+      PG_RETURN_BOOL(false);
     } else {
 
 #if PG_VERSION_NUM >= 80400
@@ -632,18 +632,18 @@
 
       if (GIST_LEAF(entry)) {
         switch ( strategy ) {
-          case  1 : if ( i == SCKEY_SAME     )  result = TRUE; break;
-          default : if ( i >  SCKEY_DISJ     )  result = TRUE; break;
+          case  1 : if ( i == SCKEY_SAME     )  result = true; break;
+          default : if ( i >  SCKEY_DISJ     )  result = true; break;
         }
       } else {
         switch ( strategy ) {
-          case  1 : if ( i >  SCKEY_OVERLAP  )  result = TRUE; break;
-          default : if ( i >  SCKEY_DISJ     )  result = TRUE; break;
+          case  1 : if ( i >  SCKEY_OVERLAP  )  result = true; break;
+          default : if ( i >  SCKEY_DISJ     )  result = true; break;
         }
       }
       PG_RETURN_BOOL( result );
     }
-    PG_RETURN_BOOL(FALSE);
+    PG_RETURN_BOOL(false);
   }
 
 
@@ -652,10 +652,10 @@
     GISTENTRY          *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
     void               *query = ( void * ) PG_GETARG_POINTER(1) ;
     StrategyNumber strategy   = (StrategyNumber) PG_GETARG_UINT16(2);
-    bool             result   = FALSE ;
+    bool             result   = false ;
 
     if ( DatumGetPointer(entry->key) == NULL || ! query ) {
-      PG_RETURN_BOOL(FALSE);
+      PG_RETURN_BOOL(false);
     } else {
 
 #if PG_VERSION_NUM >= 80400
@@ -690,18 +690,18 @@
 
       if (GIST_LEAF(entry)) {
         switch ( strategy ) {
-          case  1 : if ( i == SCKEY_SAME     )  result = TRUE; break;
-          default : if ( i >  SCKEY_DISJ     )  result = TRUE; break;
+          case  1 : if ( i == SCKEY_SAME     )  result = true; break;
+          default : if ( i >  SCKEY_DISJ     )  result = true; break;
         }
       } else {
         switch ( strategy ) {
-          case  1 : if ( i >  SCKEY_OVERLAP  )  result = TRUE; break;
-          default : if ( i >  SCKEY_DISJ     )  result = TRUE; break;
+          case  1 : if ( i >  SCKEY_OVERLAP  )  result = true; break;
+          default : if ( i >  SCKEY_DISJ     )  result = true; break;
         }
       }
       PG_RETURN_BOOL( result );
     }
-    PG_RETURN_BOOL(FALSE);
+    PG_RETURN_BOOL(false);
   }
 
 
diff -up pgsphere-1.1.1/gq_cache.c.pg11 pgsphere-1.1.1/gq_cache.c
--- pgsphere-1.1.1/gq_cache.c.pg11	2008-02-03 07:43:33.000000000 -0500
+++ pgsphere-1.1.1/gq_cache.c	2018-10-19 01:26:17.561133504 -0400
@@ -32,7 +32,7 @@ static int32      npts    = 0   ; // for
 /*!
   \brief If query type and value are equal, this value is true
 */
-static bool       res     = FALSE ;
+static bool       res     = false ;
 
 
 /*!
@@ -42,7 +42,7 @@ static bool       res     = FALSE ;
 */
 #define GQ_MEMCMP( type ) do { \
   if ( keytype == PGS_TYPE_##type ){ \
-    if ( memcmp ( (void*)cquery , (void*)query , sizeof( type ) ) == 0  ) res = TRUE; \
+    if ( memcmp ( (void*)cquery , (void*)query , sizeof( type ) ) == 0  ) res = true; \
   } \
 } while(0);
 
@@ -51,9 +51,9 @@ static bool       res     = FALSE ;
   {
     
     if ( keytype == 0 ){
-      return FALSE;
+      return false;
     } else {
-      res = FALSE ;
+      res = false ;
 
       switch ( pgstype ) {
         case PGS_TYPE_SPoint   : GQ_MEMCMP ( SPoint   ); break;
@@ -63,15 +63,15 @@ static bool       res     = FALSE ;
         case PGS_TYPE_SBOX     : GQ_MEMCMP ( SBOX     ); break;
         case PGS_TYPE_SPATH    :
             if ( keytype == pgstype && ( (SPATH*) query)->npts == npts ) {
-              if ( memcmp( (void*)cquery , (void*) &( (SPATH*) query)->p , ( (SPATH*) query)->size ) == 0  ) res = TRUE;
+              if ( memcmp( (void*)cquery , (void*) &( (SPATH*) query)->p , ( (SPATH*) query)->size ) == 0  ) res = true;
             }
             break;
         case PGS_TYPE_SPOLY    :
             if ( keytype == pgstype && ( (SPOLY*) query)->npts == npts ) {
-              if ( memcmp( (void*)cquery , (void*) &( (SPOLY*) query)->p , ( (SPOLY*) query)->size ) == 0  ) res = TRUE;
+              if ( memcmp( (void*)cquery , (void*) &( (SPOLY*) query)->p , ( (SPOLY*) query)->size ) == 0  ) res = true;
             }
             break;
-        default                : res = FALSE ; break;
+        default                : res = false ; break;
       }
 
       if ( res ) {
diff -up pgsphere-1.1.1/key.c.pg11 pgsphere-1.1.1/key.c
--- pgsphere-1.1.1/key.c.pg11	2018-10-19 01:26:38.693133504 -0400
+++ pgsphere-1.1.1/key.c	2018-10-19 01:26:48.313133504 -0400
@@ -317,7 +317,7 @@
       static int32   i,k,r;
       static SLine       l;
       static int32   tk[6];
-      bool   start = TRUE;
+      bool   start = true;
 
       for ( i=0; i<sp->npts; i++ ){
         for ( k=i+1; i<sp->npts; i++ ){
@@ -325,7 +325,7 @@
           sline_from_points ( &l, &sp->p[i], &sp->p[r] );
           sphereline_gen_key ( &tk[0] , &l );
           if ( start ){   
-            start = FALSE;
+            start = false;
             memcpy( (void*) key, (void*) &tk[0], KEYSIZE);
           } else {
             key[0] = min(key[0],tk[0]);
@@ -347,7 +347,7 @@
       static  int32   i,k,r;
       static  SLine       l;
       static  int32   tk[6];
-      bool    start = TRUE;
+      bool    start = true;
 
       for ( i=0; i<sp->npts; i++ ){
         for ( k=i+1; i<sp->npts; i++ ){
@@ -355,7 +355,7 @@
           sline_from_points ( &l, &sp->p[i], &sp->p[r] );
           sphereline_gen_key ( &tk[0] , &l );
           if ( start ){
-            start = FALSE;
+            start = false;
             memcpy( (void*) key, (void*) &tk[0], KEYSIZE);
           } else {
             key[0] = min(key[0],tk[0]);
diff -up pgsphere-1.1.1/line.c.pg11 pgsphere-1.1.1/line.c
--- pgsphere-1.1.1/line.c.pg11	2018-10-19 01:26:17.554133504 -0400
+++ pgsphere-1.1.1/line.c	2018-10-19 01:26:17.562133504 -0400
@@ -82,7 +82,7 @@
       e2.psi   = l2->psi;
       return ( strans_eq ( &e1, &e2 ) );
     }
-    return FALSE;
+    return false;
   }
 
 
@@ -97,9 +97,9 @@
     if ( FPeq ( l,PI ) ){
       if ( FPeq( pbeg->lng, pend->lng ) ){
         sline_meridian( sl, pbeg->lng );
-        return TRUE;
+        return true;
       }
-      return FALSE;
+      return false;
     }
 
     if ( spherevector_to_euler ( &se, pbeg, pend ) ){
@@ -113,7 +113,7 @@
       sl->psi    = pbeg->lng - PIH ;
       sl->length = 0.0;
     }
-    return ( TRUE );
+    return ( true );
     
   }
 
@@ -410,9 +410,9 @@
     if ( FPge(tc.center.lng,0.0) && FPle(tc.center.lng,sl->length) ){
       if ( FPeq( fabs(tc.center.lat), sc->radius ) )
       {
-        return TRUE;
+        return true;
       }
-      return FALSE;
+      return false;
 
     } else {
       SPoint p;
diff -up pgsphere-1.1.1/path.c.pg11 pgsphere-1.1.1/path.c
--- pgsphere-1.1.1/path.c.pg11	2010-01-31 15:26:50.000000000 -0500
+++ pgsphere-1.1.1/path.c	2018-10-19 01:26:17.562133504 -0400
@@ -215,10 +215,10 @@
      for ( i=0 ; i<n; i++ ){
         spath_segment ( &sl , path , i );
         if ( sline_sline_pos ( &sl, line  ) != PGS_LINE_AVOID ){
-          return TRUE;
+          return true;
         }
      }
-     return FALSE;
+     return false;
   }
 
 
@@ -300,10 +300,10 @@
      for ( i=0 ; i<path1->npts; i++ ){
         spath_segment ( &sl , path1 , i );
         if ( path_line_overlap ( path2 , &sl ) ){
-          return TRUE; // overlap
+          return true; // overlap
         }
      }
-     return  FALSE;
+     return  false;
   }  
 
 
@@ -412,17 +412,17 @@
       static  int32   i;
       static  bool  ret;
 
-      ret = TRUE;
+      ret = true;
 
       for ( i=0; i<p1->npts; i++ ){
         if ( ! spoint_eq ( &p1->p[i], &p2->p[i]) ){
-          ret = FALSE;
+          ret = false;
           break;
         }
       }
       return ( ret );
     }
-    return ( FALSE );
+    return ( false );
   }
 
   bool spath_cont_point ( const SPATH  * path, const SPoint   * sp )
@@ -432,12 +432,12 @@
     static SLine sl;
     static int32  i;
     n   = path->npts - 1;
-    ret = FALSE;
+    ret = false;
 
     for ( i=0; i<n; i++ ){
       spath_segment ( &sl , path , i );
       if ( spoint_at_sline( sp, &sl ) ){
-        ret = TRUE;
+        ret = true;
         break;
       }
     }
diff -up pgsphere-1.1.1/point.c.pg11 pgsphere-1.1.1/point.c
--- pgsphere-1.1.1/point.c.pg11	2010-01-31 15:26:50.000000000 -0500
+++ pgsphere-1.1.1/point.c	2018-10-19 01:26:17.563133504 -0400
@@ -35,7 +35,7 @@
   SPoint *  spoint_check (SPoint * spoint)
   {
     static bool lat_is_neg;
-    lat_is_neg = ( spoint->lat < 0 )?( TRUE ):( FALSE );
+    lat_is_neg = ( spoint->lat < 0 )?( true ):( false );
 
     spoint->lng  = spoint->lng - floor(spoint->lng / ( PID ) )  * PID;
     spoint->lat  = spoint->lat - floor(spoint->lat / ( PID ) )  * PID;
diff -up pgsphere-1.1.1/polygon.c.pg11 pgsphere-1.1.1/polygon.c
--- pgsphere-1.1.1/polygon.c.pg11	2010-01-31 15:26:50.000000000 -0500
+++ pgsphere-1.1.1/polygon.c	2018-10-19 01:26:17.563133504 -0400
@@ -118,7 +118,7 @@
     spherepoly_center ( &v , poly );
     // If 0-vector
     if ( FPzero(v.x) && FPzero(v.y) && FPzero(v.z) ){
-      return FALSE;
+      return false;
     }
     
     for ( i=0; i<poly->npts; i++ ){
@@ -127,7 +127,7 @@
         spoly_segment ( &slk , poly , k );
         pos = sline_sline_pos( &sli, &slk );
         if ( ! ( pos == PGS_LINE_CONNECT || pos == PGS_LINE_AVOID ) ) {
-          return FALSE;
+          return false;
         }
       }
     }
@@ -146,10 +146,10 @@
       // less _and_ equal are important !!
       // Do not change it!
       if ( FPle(p.lat,0.0) ) {
-        return FALSE;
+        return false;
       }
     }
-    return TRUE ;
+    return true ;
   }
 
 
@@ -408,7 +408,7 @@
 
      if ( res == sp_os ) {
         if ( ! recheck ){
-          pos = poly_poly_pos ( p2, p1, TRUE );
+          pos = poly_poly_pos ( p2, p1, true );
         }
         if ( pos == PGS_POLY_CONT ){
           return PGS_POLY_OVER;
@@ -426,7 +426,7 @@
 
   bool spoly_eq ( const SPOLY * p1, const SPOLY * p2, bool dir )
   {
-    bool    ret = FALSE;
+    bool    ret = false;
 
     if ( p1->npts == p2->npts ){
 
@@ -443,14 +443,14 @@
           }
         }
         if ( cntr == p1->npts ){
-          ret = TRUE;
+          ret = true;
           break;
         }
       }
 
       // Try other direction, if not equal
       if ( !dir && !ret ){
-        ret = spoly_eq ( p1, p2, TRUE );
+        ret = spoly_eq ( p1, p2, true );
       }
 
     }
@@ -478,7 +478,7 @@
   {
     static int32   i;
     static SLine   sl;
-    bool    res = FALSE ;
+    bool    res = false ;
     static float8  scp;
     static Vector3D vc, vp;
 
@@ -493,7 +493,7 @@
     // Check whether point is edge
     for ( i=0; i<pg->npts; i++ ){
       if ( spoint_eq ( &pg->p[i] , sp ) ){
-        return TRUE;
+        return true;
       }
     }
     
@@ -501,7 +501,7 @@
     for ( i=0; i<pg->npts; i++ ){
       spoly_segment ( &sl , pg , i );
       if ( spoint_at_sline( sp, &sl ) ){
-        return TRUE;
+        return true;
       }
     }
 
@@ -534,13 +534,13 @@
 
       cntr = 0;
       do {
-        eqa = FALSE;
+        eqa = false;
         for ( i=0; i<pg->npts; i++ ){
           if ( FPzero(tmp->p[i].lat) ){
             if ( FPeq( cos(tmp->p[i].lng) , -1.0 ) ){
               return false;
             } else {
-              eqa = TRUE;
+              eqa = true;
               break;
             }
           }
@@ -594,7 +594,7 @@
 
       FREE ( tmp );
       if ( cntr % 2 ){
-        res = TRUE;
+        res = true;
       }        
 
     } while (0);
@@ -700,14 +700,14 @@
   {
     SPOLY  * p1 = PG_GETARG_SPOLY( 0 ) ;
     SPOLY  * p2 = PG_GETARG_SPOLY( 1 ) ;
-    PG_RETURN_BOOL ( spoly_eq ( p1, p2, FALSE ) );
+    PG_RETURN_BOOL ( spoly_eq ( p1, p2, false ) );
   }
 
   Datum  spherepoly_equal_neg(PG_FUNCTION_ARGS)
   {
     SPOLY  * p1 = PG_GETARG_SPOLY( 0 ) ;
     SPOLY  * p2 = PG_GETARG_SPOLY( 1 ) ;
-    PG_RETURN_BOOL ( !spoly_eq ( p1, p2, FALSE ) );
+    PG_RETURN_BOOL ( !spoly_eq ( p1, p2, false ) );
   }
 
   Datum  spherepoly_circ(PG_FUNCTION_ARGS)
@@ -949,42 +949,42 @@
   {
     SPOLY   * poly1 = PG_GETARG_SPOLY( 0 ) ;
     SPOLY   * poly2 = PG_GETARG_SPOLY( 1 ) ;
-    PG_RETURN_BOOL ( poly_poly_pos ( poly1, poly2, FALSE ) ==  PGS_POLY_CONT );
+    PG_RETURN_BOOL ( poly_poly_pos ( poly1, poly2, false ) ==  PGS_POLY_CONT );
   }
 
   Datum spherepoly_cont_poly_neg (PG_FUNCTION_ARGS)
   {
     SPOLY   * poly1 = PG_GETARG_SPOLY( 0 ) ;
     SPOLY   * poly2 = PG_GETARG_SPOLY( 1 ) ;
-    PG_RETURN_BOOL ( poly_poly_pos ( poly1, poly2, FALSE ) !=  PGS_POLY_CONT );
+    PG_RETURN_BOOL ( poly_poly_pos ( poly1, poly2, false ) !=  PGS_POLY_CONT );
   }
 
   Datum spherepoly_cont_poly_com (PG_FUNCTION_ARGS)
   {
     SPOLY   * poly1 = PG_GETARG_SPOLY( 1 ) ;
     SPOLY   * poly2 = PG_GETARG_SPOLY( 0 ) ;
-    PG_RETURN_BOOL ( poly_poly_pos ( poly1, poly2, FALSE ) ==  PGS_POLY_CONT );
+    PG_RETURN_BOOL ( poly_poly_pos ( poly1, poly2, false ) ==  PGS_POLY_CONT );
   }
 
   Datum spherepoly_cont_poly_com_neg (PG_FUNCTION_ARGS)
   {
     SPOLY   * poly1 = PG_GETARG_SPOLY( 1 ) ;
     SPOLY   * poly2 = PG_GETARG_SPOLY( 0 ) ;
-    PG_RETURN_BOOL ( poly_poly_pos ( poly1, poly2, FALSE ) !=  PGS_POLY_CONT );
+    PG_RETURN_BOOL ( poly_poly_pos ( poly1, poly2, false ) !=  PGS_POLY_CONT );
   }
 
   Datum spherepoly_overlap_poly (PG_FUNCTION_ARGS)
   {
     SPOLY   * poly1 = PG_GETARG_SPOLY( 0 ) ;
     SPOLY   * poly2 = PG_GETARG_SPOLY( 1 ) ;
-    PG_RETURN_BOOL ( poly_poly_pos ( poly1, poly2, FALSE ) > PGS_POLY_AVOID );
+    PG_RETURN_BOOL ( poly_poly_pos ( poly1, poly2, false ) > PGS_POLY_AVOID );
   }
 
   Datum spherepoly_overlap_poly_neg (PG_FUNCTION_ARGS)
   {
     SPOLY   * poly1 = PG_GETARG_SPOLY( 0 ) ;
     SPOLY   * poly2 = PG_GETARG_SPOLY( 1 ) ;
-    PG_RETURN_BOOL ( poly_poly_pos ( poly1, poly2, FALSE ) == PGS_POLY_AVOID );
+    PG_RETURN_BOOL ( poly_poly_pos ( poly1, poly2, false ) == PGS_POLY_AVOID );
   }
   
   Datum spherepoly_cont_ellipse (PG_FUNCTION_ARGS)