gboolean db_open(void);
void db_prepare(void);
gboolean db_insert_node(node *n);
+void db_close(void);
+void db_prepare(void);
/****************************************************/
/* Functions */
/********************************************************************/
-gboolean
+static gboolean
db_insert_node(node *n)
{
gint32 lat, lon;
return TRUE;
}
-gboolean
+static gboolean
db_insert_place(node *n)
{
if (!n->data)
return TRUE;
}
-gboolean
+static gboolean
db_insert_poi(node *n)
{
sqlite3_bind_int(sql.insert_poi, 1, n->id);
return TRUE;
}
-void
+static void
db_update_node_links(node *n)
{
sqlite3_bind_int(sql.update_node, 1, n->id);
sqlite3_clear_bindings(sql.update_node);
}
-void
+static void
db_insert_way_seg(node *n, way *w)
{
sqlite3_bind_int(sql.insert_way_seg, 1, w->id);
wsegcnt++;
}
-void
+static void
db_insert_way_seg2seg(way *w, node *nf, node *nt)
{
sqlite3_bind_int(sql.insert_way_seg2seg, 1, w->id);
wsegcnt++;
}
-void
+static void
db_insert_way_ref(way *w)
{
if (!w->data)
sqlite3_clear_bindings(sql.insert_way_ref);
}
-void
+static void
db_insert_way_names(way *w)
{
if (!w->data)
sqlite3_clear_bindings(sql.insert_way_name);
}
-void
+static void
db_delete_way_segments(way *w)
{
sqlite3_bind_int(sql.delete_way_seg_wsid, 1, w->id);
sqlite3_clear_bindings(sql.delete_way_seg_wsid);
}
-void
+static void
db_delete_way_segments2seg(way *w)
{
sqlite3_bind_int(sql.delete_way_seg2seg, 1, w->id);
sqlite3_clear_bindings(sql.delete_way_seg2seg);
}
-gboolean
+static gboolean
db_insert_way_segments(segment *s, way *w)
{
node *f;
return TRUE;
}
-gboolean
+static gboolean
db_insert_way(way *w)
{
if (!w)
return NULL;
}
-tag_state_t check_tag(const gchar *tag)
+static tag_state_t check_tag(const gchar *tag)
{
if (strcmp(tag,"node")==0) return IN_NODE_TAG;
else if (strcmp(tag,"segment")==0) return IN_SEGMENT_TAG;
/********************************************************************/
-void
+static void
print_node (node *n)
{
g_assert(n);
if (n->data) {
- g_printf("N: %d [%f:%f][%s](%d) %d\n",
+ g_printf("N: %d [%f:%f][%s](%d)\n",
n->id, n->lat, n->lon,
n->data->name ? n->data->name : "-",
n->data->type);
}
-inline gboolean
+static inline gboolean
osm_node_check_box(gdouble nlat, gdouble nlon)
{
if (use_bbox==FALSE)
return n;
}
-void
+static void
print_segment(segment *s)
{
g_printf("Segment %d %d-%d:\n", s->id, s->from, s->to);
}
-void
+static void
_print_segment_helper(segment *s, void *data)
{
print_segment(s);