#define ABS(x) (x<0?-x:x)
+#ifdef WIN32
+# define LWTFMT_ELEMID "lld"
+#else
+# define LWTFMT_ELEMID PRId64
+#endif
+
/*
* This is required for builds against pgsql
*/
appendStringInfoChar(str, '(');
if ( fields & LWT_COL_EDGE_EDGE_ID ) {
if ( edge->edge_id != -1 )
- appendStringInfo(str, "" INT64_FORMAT, edge->edge_id);
+ appendStringInfo(str, "%" LWTFMT_ELEMID, edge->edge_id);
else
appendStringInfoString(str, "DEFAULT");
sep = ",";
}
if ( fields & LWT_COL_EDGE_START_NODE ) {
- appendStringInfo(str, "%s" INT64_FORMAT, sep, edge->start_node);
+ appendStringInfo(str, "%s%" LWTFMT_ELEMID, sep, edge->start_node);
sep = ",";
}
if ( fields & LWT_COL_EDGE_END_NODE ) {
- appendStringInfo(str, "%s" INT64_FORMAT, sep, edge->end_node);
+ appendStringInfo(str, "%s%" LWTFMT_ELEMID, sep, edge->end_node);
sep = ",";
}
if ( fields & LWT_COL_EDGE_FACE_LEFT ) {
- appendStringInfo(str, "%s" INT64_FORMAT, sep, edge->face_left);
+ appendStringInfo(str, "%s%" LWTFMT_ELEMID, sep, edge->face_left);
sep = ",";
}
if ( fields & LWT_COL_EDGE_FACE_RIGHT ) {
- appendStringInfo(str, "%s" INT64_FORMAT, sep, edge->face_right);
+ appendStringInfo(str, "%s%" LWTFMT_ELEMID, sep, edge->face_right);
sep = ",";
}
if ( fields & LWT_COL_EDGE_NEXT_LEFT ) {
- appendStringInfo(str, "%s" INT64_FORMAT, sep, edge->next_left);
+ appendStringInfo(str, "%s%" LWTFMT_ELEMID, sep, edge->next_left);
if ( fullEdgeData )
- appendStringInfo(str, "," INT64_FORMAT, ABS(edge->next_left));
+ appendStringInfo(str, ",%" LWTFMT_ELEMID, ABS(edge->next_left));
sep = ",";
}
if ( fields & LWT_COL_EDGE_NEXT_RIGHT ) {
- appendStringInfo(str, "%s" INT64_FORMAT, sep, edge->next_right);
+ appendStringInfo(str, "%s%" LWTFMT_ELEMID, sep, edge->next_right);
if ( fullEdgeData )
- appendStringInfo(str, "," INT64_FORMAT, ABS(edge->next_right));
+ appendStringInfo(str, ",%" LWTFMT_ELEMID, ABS(edge->next_right));
sep = ",";
}
if ( fields & LWT_COL_EDGE_GEOM )
if ( fields & LWT_COL_EDGE_EDGE_ID ) {
appendStringInfoString(str, "edge_id ");
- appendStringInfo(str, "%s " INT64_FORMAT, op, edge->edge_id);
+ appendStringInfo(str, "%s %" LWTFMT_ELEMID, op, edge->edge_id);
sep = sep1;
}
if ( fields & LWT_COL_EDGE_START_NODE ) {
appendStringInfo(str, "%sstart_node ", sep);
- appendStringInfo(str, "%s " INT64_FORMAT, op, edge->start_node);
+ appendStringInfo(str, "%s %" LWTFMT_ELEMID, op, edge->start_node);
sep = sep1;
}
if ( fields & LWT_COL_EDGE_END_NODE ) {
appendStringInfo(str, "%send_node", sep);
- appendStringInfo(str, "%s " INT64_FORMAT, op, edge->end_node);
+ appendStringInfo(str, "%s %" LWTFMT_ELEMID, op, edge->end_node);
sep = sep1;
}
if ( fields & LWT_COL_EDGE_FACE_LEFT ) {
appendStringInfo(str, "%sleft_face", sep);
- appendStringInfo(str, "%s " INT64_FORMAT, op, edge->face_left);
+ appendStringInfo(str, "%s %" LWTFMT_ELEMID, op, edge->face_left);
sep = sep1;
}
if ( fields & LWT_COL_EDGE_FACE_RIGHT ) {
appendStringInfo(str, "%sright_face", sep);
- appendStringInfo(str, "%s " INT64_FORMAT, op, edge->face_right);
+ appendStringInfo(str, "%s %" LWTFMT_ELEMID, op, edge->face_right);
sep = sep1;
}
if ( fields & LWT_COL_EDGE_NEXT_LEFT ) {
appendStringInfo(str, "%snext_left_edge", sep);
- appendStringInfo(str, "%s " INT64_FORMAT, op, edge->next_left);
+ appendStringInfo(str, "%s %" LWTFMT_ELEMID, op, edge->next_left);
sep = sep1;
if ( fullEdgeData ) {
appendStringInfo(str, "%s abs_next_left_edge", sep);
- appendStringInfo(str, "%s " INT64_FORMAT, op, ABS(edge->next_left));
+ appendStringInfo(str, "%s %" LWTFMT_ELEMID, op, ABS(edge->next_left));
}
}
if ( fields & LWT_COL_EDGE_NEXT_RIGHT ) {
appendStringInfo(str, "%snext_right_edge", sep);
- appendStringInfo(str, "%s " INT64_FORMAT, op, edge->next_right);
+ appendStringInfo(str, "%s %" LWTFMT_ELEMID, op, edge->next_right);
sep = sep1;
if ( fullEdgeData ) {
appendStringInfo(str, "%s abs_next_right_edge", sep);
- appendStringInfo(str, "%s " INT64_FORMAT, op, ABS(edge->next_right));
+ appendStringInfo(str, "%s %" LWTFMT_ELEMID, op, ABS(edge->next_right));
}
}
if ( fields & LWT_COL_EDGE_GEOM ) {
if ( fields & LWT_COL_NODE_NODE_ID ) {
appendStringInfoString(str, "node_id ");
- appendStringInfo(str, "%s " INT64_FORMAT, op, node->node_id);
+ appendStringInfo(str, "%s %" LWTFMT_ELEMID, op, node->node_id);
sep = sep1;
}
if ( fields & LWT_COL_NODE_CONTAINING_FACE ) {
appendStringInfo(str, "%scontaining_face %s", sep, op);
if ( node->containing_face != -1 ) {
- appendStringInfo(str, "" INT64_FORMAT, node->containing_face);
+ appendStringInfo(str, "%" LWTFMT_ELEMID, node->containing_face);
} else {
appendStringInfoString(str, "null::int");
}
if ( fields & LWT_COL_NODE_NODE_ID ) {
if ( node->node_id != -1 )
- appendStringInfo(str, "" INT64_FORMAT, node->node_id);
+ appendStringInfo(str, "%" LWTFMT_ELEMID, node->node_id);
else
appendStringInfoString(str, "DEFAULT");
sep = ",";
if ( fields & LWT_COL_NODE_CONTAINING_FACE ) {
if ( node->containing_face != -1 )
- appendStringInfo(str, "%s" INT64_FORMAT, sep, node->containing_face);
+ appendStringInfo(str, "%s%" LWTFMT_ELEMID, sep, node->containing_face);
else appendStringInfo(str, "%snull::int", sep);
}
addFaceValues(StringInfo str, LWT_ISO_FACE *face, int srid)
{
if ( face->face_id != -1 )
- appendStringInfo(str, "(" INT64_FORMAT, face->face_id);
+ appendStringInfo(str, "(%" LWTFMT_ELEMID, face->face_id);
else
appendStringInfoString(str, "(DEFAULT");
appendStringInfoString(sql, " WHERE edge_id IN (");
// add all identifiers here
for (i=0; i<*numelems; ++i) {
- appendStringInfo(sql, "%s" INT64_FORMAT, (i?",":""), ids[i]);
+ appendStringInfo(sql, "%s%" LWTFMT_ELEMID, (i?",":""), ids[i]);
}
appendStringInfoString(sql, ")");
POSTGIS_DEBUGF(1, "cb_getEdgeById query: %s", sql->data);
appendStringInfoString(sql, " WHERE start_node IN (");
// add all identifiers here
for (i=0; i<*numelems; ++i) {
- appendStringInfo(sql, "%s" INT64_FORMAT, (i?",":""), ids[i]);
+ appendStringInfo(sql, "%s%" LWTFMT_ELEMID, (i?",":""), ids[i]);
}
appendStringInfoString(sql, ") OR end_node IN (");
// add all identifiers here
for (i=0; i<*numelems; ++i) {
- appendStringInfo(sql, "%s" INT64_FORMAT, (i?",":""), ids[i]);
+ appendStringInfo(sql, "%s%" LWTFMT_ELEMID, (i?",":""), ids[i]);
}
appendStringInfoString(sql, ")");
appendStringInfoString(sql, " WHERE left_face IN (");
// add all identifiers here
for (i=0; i<*numelems; ++i) {
- appendStringInfo(sql, "%s" INT64_FORMAT, (i?",":""), ids[i]);
+ appendStringInfo(sql, "%s%" LWTFMT_ELEMID, (i?",":""), ids[i]);
}
appendStringInfoString(sql, ") OR right_face IN (");
// add all identifiers here
for (i=0; i<*numelems; ++i) {
- appendStringInfo(sql, "%s" INT64_FORMAT, (i?",":""), ids[i]);
+ appendStringInfo(sql, "%s%" LWTFMT_ELEMID, (i?",":""), ids[i]);
}
appendStringInfoString(sql, ")");
appendStringInfoString(sql, " WHERE face_id IN (");
// add all identifiers here
for (i=0; i<*numelems; ++i) {
- appendStringInfo(sql, "%s" INT64_FORMAT, (i?",":""), ids[i]);
+ appendStringInfo(sql, "%s%" LWTFMT_ELEMID, (i?",":""), ids[i]);
}
appendStringInfoString(sql, ")");
initStringInfo(sql);
appendStringInfo(sql, "WITH RECURSIVE edgering AS ( "
- "SELECT " INT64_FORMAT
+ "SELECT %" LWTFMT_ELEMID
" as signed_edge_id, edge_id, next_left_edge, next_right_edge "
- "FROM \"%s\".edge_data WHERE edge_id = " INT64_FORMAT " UNION "
+ "FROM \"%s\".edge_data WHERE edge_id = %" LWTFMT_ELEMID " UNION "
"SELECT CASE WHEN "
"p.signed_edge_id < 0 THEN p.next_right_edge ELSE p.next_left_edge END, "
"e.edge_id, e.next_left_edge, e.next_right_edge "
}
val = DatumGetInt32(dat);
edges[i] = val;
- POSTGIS_DEBUGF(1, "Component %d in ring of edge " INT64_FORMAT
+ POSTGIS_DEBUGF(1, "Component %d in ring of edge %" LWTFMT_ELEMID
" is edge %d", i, edge, val);
}
appendStringInfoString(sql, " WHERE node_id IN (");
// add all identifiers here
for (i=0; i<*numelems; ++i) {
- appendStringInfo(sql, "%s" INT64_FORMAT, (i?",":""), ids[i]);
+ appendStringInfo(sql, "%s%" LWTFMT_ELEMID, (i?",":""), ids[i]);
}
appendStringInfoString(sql, ")");
POSTGIS_DEBUGF(1, "cb_getNodeById query: %s", sql->data);
appendStringInfoString(sql, " WHERE containing_face IN (");
// add all identifiers here
for (i=0; i<*numelems; ++i) {
- appendStringInfo(sql, "%s" INT64_FORMAT, (i?",":""), ids[i]);
+ appendStringInfo(sql, "%s%" LWTFMT_ELEMID, (i?",":""), ids[i]);
}
appendStringInfoString(sql, ")");
POSTGIS_DEBUGF(1, "cb_getNodeByFace query: %s", sql->data);
for (i=0; i<numfaces; ++i) {
const LWT_ISO_FACE* face = &(faces[i]);
if ( i ) appendStringInfoChar(sql, ',');
- appendStringInfo(sql, "(" INT64_FORMAT
+ appendStringInfo(sql, "(%" LWTFMT_ELEMID
", ST_SetSRID(ST_MakeEnvelope(%g,%g,%g,%g),%d))",
face->face_id, face->mbr->xmin, face->mbr->ymin,
face->mbr->xmax, face->mbr->ymax, topo->srid);
}
appendStringInfo( sql, " FROM \"%s\".relation r %s topology.layer l WHERE "
"l.topology_id = %d AND l.level = 0 AND l.layer_id = r.layer_id "
- "AND abs(r.element_id) = " INT64_FORMAT " AND r.element_type = 2",
+ "AND abs(r.element_id) = %" LWTFMT_ELEMID " AND r.element_type = 2",
topo->name, (new_edge2 == -1 ? "," : "USING" ), topo->id, split_edge );
if ( new_edge2 != -1 ) {
appendStringInfo(sql, " RETURNING %s", proj);
resetStringInfo(sql);
appendStringInfo(sql,
"INSERT INTO \"%s\".relation VALUES ("
- "%d,%d," INT64_FORMAT ",%d)", topo->name,
+ "%d,%d,%" LWTFMT_ELEMID ",%d)", topo->name,
topogeo_id, layer_id, negate ? -new_edge1 : new_edge1, element_type);
spi_result = SPI_execute(sql->data, false, 0);
MemoryContextSwitchTo( oldcontext ); /* switch back */
resetStringInfo(sql);
appendStringInfo(sql,
"INSERT INTO FROM \"%s\".relation VALUES ("
- "%d,%d," INT64_FORMAT ",%d", topo->name,
+ "%d,%d,%" LWTFMT_ELEMID ",%d", topo->name,
topogeo_id, layer_id, negate ? -new_edge2 : new_edge2, element_type);
spi_result = SPI_execute(sql->data, false, 0);
MemoryContextSwitchTo( oldcontext ); /* switch back */
const char *proj = "r.element_id, r.topogeo_id, r.layer_id, r.element_type";
POSTGIS_DEBUGF(1, "cb_updateTopoGeomFaceSplit signalled "
- "split of face " INT64_FORMAT " into "
- INT64_FORMAT " and " INT64_FORMAT,
+ "split of face %" LWTFMT_ELEMID " into %"
+ LWTFMT_ELEMID " and %" LWTFMT_ELEMID,
split_face, new_face1, new_face2);
initStringInfo(sql);
}
appendStringInfo( sql, " FROM \"%s\".relation r %s topology.layer l WHERE "
"l.topology_id = %d AND l.level = 0 AND l.layer_id = r.layer_id "
- "AND abs(r.element_id) = " INT64_FORMAT " AND r.element_type = 3",
+ "AND abs(r.element_id) = %" LWTFMT_ELEMID " AND r.element_type = 3",
topo->name, (new_face2 == -1 ? "," : "USING" ), topo->id, split_face );
if ( new_face2 != -1 ) {
appendStringInfo(sql, " RETURNING %s", proj);
resetStringInfo(sql);
appendStringInfo(sql,
"INSERT INTO \"%s\".relation VALUES ("
- "%d,%d," INT64_FORMAT ",%d)", topo->name,
+ "%d,%d,%" LWTFMT_ELEMID ",%d)", topo->name,
topogeo_id, layer_id, negate ? -new_face1 : new_face1, element_type);
POSTGIS_DEBUGF(1, "cb_updateTopoGeomFaceSplit query: %s", sql->data);
resetStringInfo(sql);
appendStringInfo(sql,
"INSERT INTO \"%s\".relation VALUES ("
- "%d,%d," INT64_FORMAT ",%d)", topo->name,
+ "%d,%d,%" LWTFMT_ELEMID ",%d)", topo->name,
topogeo_id, layer_id, negate ? -new_face2 : new_face2, element_type);
POSTGIS_DEBUGF(1, "cb_updateTopoGeomFaceSplit query: %s", sql->data);
"topology.layer l INNER JOIN \"%s\".relation r "
"ON (l.layer_id = r.layer_id) WHERE l.level = 0 AND "
"l.feature_type = 2 AND l.topology_id = %d"
- " AND abs(r.element_id) = " INT64_FORMAT,
+ " AND abs(r.element_id) = %" LWTFMT_ELEMID,
topo->name, topo->id, rem_edge );
POSTGIS_DEBUGF(1, "cb_checkTopoGeomRemEdge query 1: %s", sql->data);
cberror(topo->be_data, "TopoGeom %s in layer %s "
"(%s.%s.%s) cannot be represented "
- "dropping edge " INT64_FORMAT,
+ "dropping edge %" LWTFMT_ELEMID,
tg_id, layer_id, schema_name, table_name,
col_name, rem_edge);
return 0;
if ( face_left != face_right )
{
- POSTGIS_DEBUGF(1, "Deletion of edge " INT64_FORMAT " joins faces "
- INT64_FORMAT " and " INT64_FORMAT,
+ POSTGIS_DEBUGF(1, "Deletion of edge %" LWTFMT_ELEMID " joins faces %"
+ LWTFMT_ELEMID " and %" LWTFMT_ELEMID,
rem_edge, face_left, face_right);
/*
check if any topo_geom is defined only by one of the
" INNER JOIN \"%s\".relation r ON (l.layer_id = r.layer_id) "
"WHERE l.level = 0 and l.feature_type = 3 "
"AND l.topology_id = %d"
- " AND r.element_id = ANY (ARRAY[" INT64_FORMAT "," INT64_FORMAT
+ " AND r.element_id = ANY (ARRAY[%" LWTFMT_ELEMID ",%" LWTFMT_ELEMID
"]::int4[]) group by r.topogeo_id, r.layer_id, l.schema_name, "
- "l.table_name, l.feature_column ) t WHERE NOT t.elems @> ARRAY["
- INT64_FORMAT "," INT64_FORMAT "]::int4[]",
+ "l.table_name, l.feature_column ) t WHERE NOT t.elems @> ARRAY[%"
+ LWTFMT_ELEMID ",%" LWTFMT_ELEMID "]::int4[]",
+
topo->name, topo->id,
face_left, face_right, face_left, face_right );
cberror(topo->be_data, "TopoGeom %s in layer %s "
"(%s.%s.%s) cannot be represented "
- "healing faces " INT64_FORMAT
- " and " INT64_FORMAT,
+ "healing faces %" LWTFMT_ELEMID
+ " and %" LWTFMT_ELEMID,
tg_id, layer_id, schema_name, table_name,
col_name, face_right, face_left);
return 0;
" INNER JOIN \"%s\".relation r ON (l.layer_id = r.layer_id) "
"WHERE l.level = 0 and l.feature_type = 2 "
"AND l.topology_id = %d"
- " AND abs(r.element_id) = ANY (ARRAY[" INT64_FORMAT "," INT64_FORMAT
+ " AND abs(r.element_id) = ANY (ARRAY[%" LWTFMT_ELEMID ",%" LWTFMT_ELEMID
"]::int4[]) group by r.topogeo_id, r.layer_id, l.schema_name, "
- "l.table_name, l.feature_column ) t WHERE NOT t.elems @> ARRAY["
- INT64_FORMAT "," INT64_FORMAT "]::int4[]",
+ "l.table_name, l.feature_column ) t WHERE NOT t.elems @> ARRAY[%"
+ LWTFMT_ELEMID ",%" LWTFMT_ELEMID "]::int4[]",
topo->name, topo->id,
edge1, edge2, edge1, edge2 );
cberror(topo->be_data, "TopoGeom %s in layer %s "
"(%s.%s.%s) cannot be represented "
- "healing edges " INT64_FORMAT
- " and " INT64_FORMAT,
+ "healing edges %" LWTFMT_ELEMID
+ " and %" LWTFMT_ELEMID,
tg_id, layer_id, schema_name, table_name,
col_name, edge1, edge2);
return 0;
appendStringInfo( sql, "DELETE FROM \"%s\".relation r "
"USING topology.layer l WHERE l.level = 0 AND l.feature_type = 3"
" AND l.topology_id = %d AND l.layer_id = r.layer_id "
- " AND abs(r.element_id) IN ( " INT64_FORMAT "," INT64_FORMAT ")"
- " AND abs(r.element_id) != " INT64_FORMAT,
+ " AND abs(r.element_id) IN ( %" LWTFMT_ELEMID ",%" LWTFMT_ELEMID ")"
+ " AND abs(r.element_id) != %" LWTFMT_ELEMID,
topo->name, topo->id, face1, face2, newface );
POSTGIS_DEBUGF(1, "cb_updateTopoGeomFaceHeal query: %s", sql->data);
appendStringInfo( sql, "DELETE FROM \"%s\".relation r "
"USING topology.layer l WHERE l.level = 0 AND l.feature_type = 3"
" AND l.topology_id = %d AND l.layer_id = r.layer_id "
- " AND abs(r.element_id) = " INT64_FORMAT,
+ " AND abs(r.element_id) = %" LWTFMT_ELEMID,
topo->name, topo->id, face1 );
POSTGIS_DEBUGF(1, "cb_updateTopoGeomFaceHeal query 1: %s", sql->data);
initStringInfo(sql);
/* update face2 to newface */
appendStringInfo( sql, "UPDATE \"%s\".relation r "
- "SET element_id = " INT64_FORMAT " FROM topology.layer l "
+ "SET element_id = %" LWTFMT_ELEMID " FROM topology.layer l "
"WHERE l.level = 0 AND l.feature_type = 3 AND l.topology_id = %d"
- " AND l.layer_id = r.layer_id AND r.element_id = " INT64_FORMAT,
+ " AND l.layer_id = r.layer_id AND r.element_id = %" LWTFMT_ELEMID,
topo->name, newface, topo->id, face2 );
POSTGIS_DEBUGF(1, "cb_updateTopoGeomFaceHeal query 2: %s", sql->data);
appendStringInfo( sql, "DELETE FROM \"%s\".relation r "
"USING topology.layer l WHERE l.level = 0 AND l.feature_type = 2"
" AND l.topology_id = %d AND l.layer_id = r.layer_id "
- " AND abs(r.element_id) IN ( " INT64_FORMAT "," INT64_FORMAT ")"
- " AND abs(r.element_id) != " INT64_FORMAT,
+ " AND abs(r.element_id) IN ( %" LWTFMT_ELEMID ",%" LWTFMT_ELEMID ")"
+ " AND abs(r.element_id) != %" LWTFMT_ELEMID,
topo->name, topo->id, edge1, edge2, newedge );
POSTGIS_DEBUGF(1, "cb_updateTopoGeomEdgeHeal query: %s", sql->data);
appendStringInfo( sql, "DELETE FROM \"%s\".relation r "
"USING topology.layer l WHERE l.level = 0 AND l.feature_type = 2"
" AND l.topology_id = %d AND l.layer_id = r.layer_id "
- " AND abs(r.element_id) = " INT64_FORMAT,
+ " AND abs(r.element_id) = %" LWTFMT_ELEMID,
topo->name, topo->id, edge2 );
POSTGIS_DEBUGF(1, "cb_updateTopoGeomEdgeHeal query 1: %s", sql->data);
initStringInfo(sql);
/* update edge2 to newedge */
appendStringInfo( sql, "UPDATE \"%s\".relation r "
- "SET element_id = " INT64_FORMAT " *(element_id/" INT64_FORMAT
+ "SET element_id = %" LWTFMT_ELEMID " *(element_id/%" LWTFMT_ELEMID
") FROM topology.layer l "
"WHERE l.level = 0 AND l.feature_type = 2 AND l.topology_id = %d"
- " AND l.layer_id = r.layer_id AND abs(r.element_id) = " INT64_FORMAT,
+ " AND l.layer_id = r.layer_id AND abs(r.element_id) = %" LWTFMT_ELEMID,
topo->name, newedge, edge1, topo->id, edge1 );
POSTGIS_DEBUGF(1, "cb_updateTopoGeomEdgeHeal query 2: %s", sql->data);
initStringInfo(sql);
appendStringInfo(sql, "DELETE FROM \"%s\".face WHERE face_id IN (", topo->name);
for (i=0; i<numelems; ++i) {
- appendStringInfo(sql, "%s" INT64_FORMAT, (i?",":""), ids[i]);
+ appendStringInfo(sql, "%s%" LWTFMT_ELEMID, (i?",":""), ids[i]);
}
appendStringInfoString(sql, ")");
appendStringInfo(sql, "DELETE FROM \"%s\".node WHERE node_id IN (",
topo->name);
for (i=0; i<numelems; ++i) {
- appendStringInfo(sql, "%s" INT64_FORMAT, (i?",":""), ids[i]);
+ appendStringInfo(sql, "%s%" LWTFMT_ELEMID, (i?",":""), ids[i]);
}
appendStringInfoString(sql, ")");
lwerror("Face edge sequence number does not fit 32 chars ?!: %d",
state->curr+1);
}
- if ( snprintf(values[1], 32, INT64_FORMAT,
+ if ( snprintf(values[1], 32, "%" LWTFMT_ELEMID,
state->elems[state->curr]) >= 32 )
{
- lwerror("Signed edge identifier does not fit 32 chars ?!: "
- INT64_FORMAT, state->elems[state->curr]);
+ lwerror("Signed edge identifier does not fit 32 chars ?!: %"
+ LWTFMT_ELEMID, state->elems[state->curr]);
}
POSTGIS_DEBUGF(1, "ST_GetFaceEdges: cur:%d, val0:%s, val1:%s",
SPI_finish();
- if ( snprintf(buf, 64, "Edge " INT64_FORMAT " changed", edge_id) >= 64 )
+ if ( snprintf(buf, 64, "Edge %" LWTFMT_ELEMID " changed", edge_id) >= 64 )
{
buf[63] = '\0';
}
SPI_finish();
- if ( snprintf(buf, 64, "Isolated node " INT64_FORMAT
+ if ( snprintf(buf, 64, "Isolated node %" LWTFMT_ELEMID
" removed", node_id) >= 64 )
{
buf[63] = '\0';
SPI_finish();
- if ( snprintf(buf, 64, "Isolated edge " INT64_FORMAT
+ if ( snprintf(buf, 64, "Isolated edge %" LWTFMT_ELEMID
" removed", node_id) >= 64 )
{
buf[63] = '\0';
SPI_finish();
- if ( snprintf(buf, 64, "Isolated Node " INT64_FORMAT
+ if ( snprintf(buf, 64, "Isolated Node %" LWTFMT_ELEMID
" moved to location %g,%g",
node_id, p.x, p.y) >= 64 )
{
}
id = state->elems[state->curr++];
- POSTGIS_DEBUGF(1, "TopoGeo_AddLinestring: cur:%d, val:" INT64_FORMAT,
+ POSTGIS_DEBUGF(1, "TopoGeo_AddLinestring: cur:%d, val:%" LWTFMT_ELEMID,
state->curr-1, id);
result = Int32GetDatum((int32)id);
}
id = state->elems[state->curr++];
- POSTGIS_DEBUGF(1, "TopoGeo_AddPolygon: cur:%d, val:" INT64_FORMAT,
+ POSTGIS_DEBUGF(1, "TopoGeo_AddPolygon: cur:%d, val:%" LWTFMT_ELEMID,
state->curr-1, id);
result = Int32GetDatum((int32)id);