From ec6fb88894ff857093aeaf999188bfbb769a07ab Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Fri, 10 Aug 2007 11:22:17 +0300 Subject: [PATCH] Make things static. Remove some warnings. --- src/osm.c | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/src/osm.c b/src/osm.c index 56011bc..f571364 100644 --- a/src/osm.c +++ b/src/osm.c @@ -257,6 +257,8 @@ void print_way(way *w); gboolean db_open(void); void db_prepare(void); gboolean db_insert_node(node *n); +void db_close(void); +void db_prepare(void); /****************************************************/ /* Functions */ @@ -351,7 +353,7 @@ sqlite3_exec(db, "PRAGMA cache_size = 8000;", NULL, NULL, NULL); /********************************************************************/ -gboolean +static gboolean db_insert_node(node *n) { gint32 lat, lon; @@ -369,7 +371,7 @@ sqlite3_clear_bindings(sql.insert_node); return TRUE; } -gboolean +static gboolean db_insert_place(node *n) { if (!n->data) @@ -387,7 +389,7 @@ sqlite3_clear_bindings(sql.insert_place); return TRUE; } -gboolean +static gboolean db_insert_poi(node *n) { sqlite3_bind_int(sql.insert_poi, 1, n->id); @@ -411,7 +413,7 @@ sqlite3_clear_bindings(sql.insert_poi); return TRUE; } -void +static void db_update_node_links(node *n) { sqlite3_bind_int(sql.update_node, 1, n->id); @@ -421,7 +423,7 @@ sqlite3_reset(sql.update_node); 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); @@ -437,7 +439,7 @@ db_update_node_links(n); wsegcnt++; } -void +static void db_insert_way_seg2seg(way *w, node *nf, node *nt) { sqlite3_bind_int(sql.insert_way_seg2seg, 1, w->id); @@ -453,7 +455,7 @@ db_update_node_links(nt); wsegcnt++; } -void +static void db_insert_way_ref(way *w) { if (!w->data) @@ -473,7 +475,7 @@ sqlite3_reset(sql.insert_way_ref); sqlite3_clear_bindings(sql.insert_way_ref); } -void +static void db_insert_way_names(way *w) { if (!w->data) @@ -488,7 +490,7 @@ sqlite3_reset(sql.insert_way_name); 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); @@ -498,7 +500,7 @@ sqlite3_reset(sql.delete_way_seg_wsid); 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); @@ -508,7 +510,7 @@ sqlite3_reset(sql.delete_way_seg2seg); sqlite3_clear_bindings(sql.delete_way_seg2seg); } -gboolean +static gboolean db_insert_way_segments(segment *s, way *w) { node *f; @@ -544,7 +546,7 @@ db_insert_way_seg2seg(w,f,t); return TRUE; } -gboolean +static gboolean db_insert_way(way *w) { if (!w) @@ -610,7 +612,7 @@ while (*d!=NULL) { 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; @@ -623,12 +625,12 @@ else return ERROR; /********************************************************************/ -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); @@ -639,7 +641,7 @@ if (n->data) { } -inline gboolean +static inline gboolean osm_node_check_box(gdouble nlat, gdouble nlon) { if (use_bbox==FALSE) @@ -683,13 +685,13 @@ g_hash_table_insert(osm_nodes, GINT_TO_POINTER(id), n); 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); -- 2.39.5