Changeset: d8a3bb91d7d9 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/d8a3bb91d7d9
Modified Files:
gdk/gdk.h
gdk/gdk_utils.c
geom/lib/libgeom.h
geom/monetdb5/geod.c
geom/monetdb5/geod.h
geom/monetdb5/geom.c
geom/monetdb5/geomBulk.c
geom/monetdb5/geom_atoms.c
monetdb5/mal/mal_parser.c
monetdb5/optimizer/opt_remap.c
monetdb_config.h.in
sql/backends/monet5/UDF/pyapi3/pyapi3.c
sql/backends/monet5/UDF/pyapi3/pyloader3.c
sql/backends/monet5/UDF/pyapi3/type_conversion.h
sql/backends/monet5/rel_physical.c
sql/backends/monet5/sql_bincopyconvert.c
sql/backends/monet5/sql_gencode.c
sql/backends/monet5/sql_statistics.c
sql/server/rel_exp.c
sql/server/rel_optimize_others.c
sql/server/rel_optimize_proj.c
sql/server/rel_planner.c
sql/server/rel_propagate.c
sql/server/rel_psm.c
sql/server/rel_select.c
sql/server/rel_semantic.c
sql/server/rel_updates.c
sql/server/sql_decimal.c
sql/server/sql_scan.c
sql/server/sql_semantic.c
sql/storage/objectset.c
sql/storage/sql_storage.h
sql/storage/store.c
Branch: Dec2025
Log Message:
Use tabs to indent C files.
diffs (truncated from 832 to 300 lines):
diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -1775,7 +1775,7 @@ gdk_export allocator_state ma_open(alloc
gdk_export void ma_close(const allocator_state *); /* close temporary frame,
reset to old state */
gdk_export void ma_free(allocator *sa, void *);
gdk_export exception_buffer *ma_get_eb(allocator *sa)
- __attribute__((__pure__));
+ __attribute__((__pure__));
gdk_export int ma_info(allocator *sa, char *buf, size_t buflen, const char
*pref);
diff --git a/gdk/gdk_utils.c b/gdk/gdk_utils.c
--- a/gdk/gdk_utils.c
+++ b/gdk/gdk_utils.c
@@ -2526,7 +2526,7 @@ ma_close(const allocator_state *state)
bool
ma_tmp_active(const allocator *a)
{
- return a && (a->tmp_used > 0);
+ return a && (a->tmp_used > 0);
}
#undef ma_free
diff --git a/geom/lib/libgeom.h b/geom/lib/libgeom.h
--- a/geom/lib/libgeom.h
+++ b/geom/lib/libgeom.h
@@ -100,7 +100,7 @@ libgeom_export GEOSContextHandle_t libge
#define geoshandle (libgeom_tls())
typedef enum wkb_type {
- // TODO: deprecated type REMOVE
+ // TODO: deprecated type REMOVE
//wkbGeometry_mbd = 0,
wkbPoint_mdb = 1,
wkbLineString_mdb = 2,
diff --git a/geom/monetdb5/geod.c b/geom/monetdb5/geod.c
--- a/geom/monetdb5/geod.c
+++ b/geom/monetdb5/geod.c
@@ -1254,59 +1254,59 @@ geodeticEdgeBoundingBox(const CartPoint3
CartPoint2D s1, s2, ep, o;
int rotation_to_origin, rotation_to_ep;
- // check coinciding points
+ // check coinciding points
if (FP_EQUALS(p1->x,p2->x) && FP_EQUALS(p1->y,p2->y) &&
FP_EQUALS(p1->z,p2->z))
return MAL_SUCCEED;
- // check antipodal points
+ // check antipodal points
if (FP_EQUALS(p1->x,-p2->x) && FP_EQUALS(p1->y,-p2->y) &&
FP_EQUALS(p1->z,-p2->z))
throw(MAL, "geom.geodeticEdgeBoundingBox", SQLSTATE(38000)
"Antipodal edge");
- // create the great circle plane coord system (p1, p3)
- // pn = p1 x p2
- // p3 = pn x p1
+ // create the great circle plane coord system (p1, p3)
+ // pn = p1 x p2
+ // p3 = pn x p1
// TODO handle the narrow and wide angle cases
pn = crossProduct(p1,p2);
normalize3D(&pn);
p3 = crossProduct(&pn,p1);
normalize3D(&p3);
- // represent p1, p2 with (s1, s2) 2-D space
- // s1.x = 1, s1.y = 0
- // s2.x = p2 * p1, s2.y = p2 * p3
+ // represent p1, p2 with (s1, s2) 2-D space
+ // s1.x = 1, s1.y = 0
+ // s2.x = p2 * p1, s2.y = p2 * p3
s1.x = 1;
s1.y = 0;
s2.x = dotProduct(p2, p1);
s2.y = dotProduct(p2, &p3);
- // 2-D space origin
- // O.x = 0, O.y = 0
+ // 2-D space origin
+ // O.x = 0, O.y = 0
o.x = 0;
o.y = 0;
- // create 3D endpoints E.x, E.-x, ...
- // E.x = (1, 0, 0), E.-x = (-1, 0, 0) ...
+ // create 3D endpoints E.x, E.-x, ...
+ // E.x = (1, 0, 0), E.-x = (-1, 0, 0) ...
memset(e, 0, sizeof(CartPoint2D) * 6);
e[0].x = e[1].y = e[2].z = 1;
e[3].x = e[4].y = e[5].z = -1;
- // find the rotation between s1->s2 and s1->O
- // rot = norm( vec(s1,s2) x vec(s1,0))
+ // find the rotation between s1->s2 and s1->O
+ // rot = norm( vec(s1,s2) x vec(s1,0))
rotation_to_origin = angleRotation(s1,s2,o);
- // for every endpoint E
+ // for every endpoint E
for (int i = 0; i < 6; i++) {
// project the endpoint in the 2-D space
ep.x = dotProduct(&e[i],p1);
ep.y = dotProduct(&e[i],&p3);
- // re-normalize it e.g. EP (for endpoint_projection)
+ // re-normalize it e.g. EP (for endpoint_projection)
normalize2D(&ep);
- // ep_rot = norm( vec(s1,s2) x vec(s1,EP_end) )
+ // ep_rot = norm( vec(s1,s2) x vec(s1,EP_end) )
rotation_to_ep = angleRotation(s1,s2,ep);
if (rotation_to_origin != rotation_to_ep) {
// convert the 2-D EP into 3-D space
ep3d.x = ep.x * p1->x + ep.y * p3.x;
ep3d.y = ep.x * p1->y + ep.y * p3.y;
ep3d.z = ep.x * p1->z + ep.y * p3.z;
- // expand the mbox in order to include 3-D representation of EP
+ // expand the mbox in order to include 3-D
representation of EP
boundingBoxAddPoint(mbox,ep3d);
}
}
diff --git a/geom/monetdb5/geod.h b/geom/monetdb5/geod.h
--- a/geom/monetdb5/geod.h
+++ b/geom/monetdb5/geod.h
@@ -13,50 +13,50 @@
/* Geographic data types */
//Bounding box of a geographic shape
typedef struct BoundingBox {
- double xmin;
- double ymin;
- double zmin;
- double xmax;
- double ymax;
- double zmax;
+ double xmin;
+ double ymin;
+ double zmin;
+ double xmax;
+ double ymax;
+ double zmax;
} BoundingBox;
//Geographic point
typedef struct GeoPoint
{
- double lat;
- double lon;
+ double lat;
+ double lon;
} GeoPoint;
//Geographic line
typedef struct GeoLines
{
- GeoPoint *points;
- int pointCount;
- BoundingBox* bbox;
+ GeoPoint *points;
+ int pointCount;
+ BoundingBox* bbox;
} GeoLines;
//Geographic polygon
typedef struct GeoPolygon
{
- GeoLines exteriorRing;
- GeoLines *interiorRings;
- int interiorRingsCount;
- BoundingBox* bbox;
+ GeoLines exteriorRing;
+ GeoLines *interiorRings;
+ int interiorRingsCount;
+ BoundingBox* bbox;
} GeoPolygon;
//Cartesian representation of a geographic point (converted from
Latitude/Longitude)
typedef struct CartPoint3D
{
- double x;
- double y;
- double z;
+ double x;
+ double y;
+ double z;
} CartPoint3D;
typedef struct CartPoint2D
{
- double x;
- double y;
+ double x;
+ double y;
} CartPoint2D;
str wkbGetCompatibleGeometries(wkb * const *a, wkb * const *b, GEOSGeom *ga,
GEOSGeom *gb);
diff --git a/geom/monetdb5/geom.c b/geom/monetdb5/geom.c
--- a/geom/monetdb5/geom.c
+++ b/geom/monetdb5/geom.c
@@ -260,12 +260,12 @@ wkbCollectAggr(Client ctx, wkb **out, co
if (*out == NULL)
msg = createException(MAL, "geom.ConvexHull", SQLSTATE(38000)
"Geos operation geos2wkb failed");
- // Cleanup
- // Data ownership has been transferred from unionGroup elements to
- // collection. Check libgeos GEOSGeom_createCollection_r(geoshandle, ) for
more.
- bat_iterator_end(&bi);
- GEOSGeom_destroy_r(geoshandle, collection);
- BBPunfix(b->batCacheid);
+ // Cleanup
+ // Data ownership has been transferred from unionGroup elements to
+ // collection. Check libgeos GEOSGeom_createCollection_r(geoshandle, )
for more.
+ bat_iterator_end(&bi);
+ GEOSGeom_destroy_r(geoshandle, collection);
+ BBPunfix(b->batCacheid);
return msg;
}
@@ -682,11 +682,11 @@ wkbTransform(Client ctx, wkb **transform
}
//Create PROJ transformation object with PROJ strings passed as argument
P = proj_create_crs_to_crs(PJ_DEFAULT_CTX,
- *proj4_src_str,
- *proj4_dst_str,
- NULL);
+ *proj4_src_str,
+ *proj4_dst_str,
+ NULL);
if (P==0)
- throw(MAL, "geom.Transform", SQLSTATE(38000) "PROJ initialization
failed");
+ throw(MAL, "geom.Transform", SQLSTATE(38000) "PROJ
initialization failed");
/* get the geosGeometry from the wkb */
geosGeometry = wkb2geos(*geomWKB);
diff --git a/geom/monetdb5/geomBulk.c b/geom/monetdb5/geomBulk.c
--- a/geom/monetdb5/geomBulk.c
+++ b/geom/monetdb5/geomBulk.c
@@ -767,11 +767,11 @@ wkbTransform_bat_cand(bat *outBAT_id, ba
//Create PROJ transformation object with PROJ strings passed as argument
P = proj_create_crs_to_crs(PJ_DEFAULT_CTX,
- *proj4_src_str,
- *proj4_dst_str,
- NULL);
+ *proj4_src_str,
+ *proj4_dst_str,
+ NULL);
if (P==0)
- throw(MAL, "batgeom.Transform", SQLSTATE(38000) "PROJ initialization
failed");
+ throw(MAL, "batgeom.Transform", SQLSTATE(38000) "PROJ
initialization failed");
//get the descriptor of the BAT
if ((inBAT = BATdescriptor(*inBAT_id)) == NULL) {
diff --git a/geom/monetdb5/geom_atoms.c b/geom/monetdb5/geom_atoms.c
--- a/geom/monetdb5/geom_atoms.c
+++ b/geom/monetdb5/geom_atoms.c
@@ -1154,7 +1154,7 @@ mbrIntersects(Client ctx, bit *out, mbr*
if (((*mbr1)->ymax < (*mbr2)->ymin) || ((*mbr1)->ymin > (*mbr2)->ymax))
(*out) = false;
else if (((*mbr1)->xmax < (*mbr2)->xmin) || ((*mbr1)->xmin >
(*mbr2)->xmax))
- (*out) = false;
+ (*out) = false;
else
(*out) = true;
return MAL_SUCCEED;
diff --git a/monetdb5/mal/mal_parser.c b/monetdb5/mal/mal_parser.c
--- a/monetdb5/mal/mal_parser.c
+++ b/monetdb5/mal/mal_parser.c
@@ -1305,7 +1305,7 @@ argument(Client ctx, mel_func *curFunc,
int tt = getBatType(type);
if (tt != TYPE_any) {
assert(strlen(BATatoms[tt].name) < 14);
- strcpy(curArg->type, BATatoms[tt].name);
+ strcpy(curArg->type, BATatoms[tt].name);
}
if (isaBatType(type))
curArg->isbat = true;
@@ -1320,7 +1320,7 @@ argument(Client ctx, mel_func *curFunc,
int tt = getBatType(type);
if (tt != TYPE_any) {
assert(strlen(BATatoms[tt].name) < 14);
- strcpy(curArg->type, BATatoms[tt].name);
+ strcpy(curArg->type, BATatoms[tt].name);
}
if (isaBatType(type))
curArg->isbat = true;
diff --git a/monetdb5/optimizer/opt_remap.c b/monetdb5/optimizer/opt_remap.c
--- a/monetdb5/optimizer/opt_remap.c
+++ b/monetdb5/optimizer/opt_remap.c
@@ -22,16 +22,16 @@
static InstrPtr
pushNilAt(MalBlkPtr mb, InstrPtr p, int pos)
{
- int i;
+ int i;
- p = pushNilBat(mb, p); /* push at end */
+ p = pushNilBat(mb, p); /* push at end */
if (mb->errors == NULL) {
int arg = getArg(p, p->argc - 1);
- for (i = p->argc - 1; i > pos; i--)
- getArg(p, i) = getArg(p, i - 1);
- getArg(p, pos) = arg;
- }
- return p;
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]