diff options
Diffstat (limited to 'navit/map/csv/csv.c')
-rw-r--r-- | navit/map/csv/csv.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/navit/map/csv/csv.c b/navit/map/csv/csv.c index 0477f7fdf..3ee2d6239 100644 --- a/navit/map/csv/csv.c +++ b/navit/map/csv/csv.c @@ -127,11 +127,11 @@ save_map_csv(struct map_priv *m) } else if(ATTR_IS_STRING(*at)) { tmpstr = g_strdup(found_attr->u.str); } else { - dbg(lvl_error,"Cant represent attribute %s\n",attr_to_name(*at)); + dbg(lvl_error,"Cant represent attribute %s",attr_to_name(*at)); tmpstr=g_strdup(""); } } else { - dbg(lvl_debug,"No value defined for the attribute %s, assuming empty string\n",attr_to_name(*at)); + dbg(lvl_debug,"No value defined for the attribute %s, assuming empty string",attr_to_name(*at)); tmpstr=g_strdup(""); } } @@ -150,7 +150,7 @@ save_map_csv(struct map_priv *m) if(m->charset) { tmpstr=g_convert(csv_line, -1,m->charset,"utf-8",NULL,NULL,NULL); if(!tmpstr) - dbg(lvl_error,"Error converting '%s' to %s\n",csv_line, m->charset); + dbg(lvl_error,"Error converting '%s' to %s",csv_line, m->charset); } else tmpstr=csv_line; @@ -182,7 +182,7 @@ static const int zoom_max = 18; static void map_destroy_csv(struct map_priv *m) { - dbg(lvl_debug,"map_destroy_csv\n"); + dbg(lvl_debug,"map_destroy_csv"); /*save if changed */ save_map_csv(m); g_hash_table_destroy(m->qitem_hash); @@ -356,10 +356,10 @@ static int csv_type_set(void *priv_data, enum item_type type) { struct map_rect_priv* mr = (struct map_rect_priv*)priv_data; - dbg(lvl_debug,"Enter %d\n", type); + dbg(lvl_debug,"Enter %d", type); if(!mr || !mr->qitem) { - dbg(lvl_debug,"Nothing to do\n"); + dbg(lvl_debug,"Nothing to do"); return 0; } @@ -367,7 +367,7 @@ csv_type_set(void *priv_data, enum item_type type) return 0; mr->qitem->deleted=1; - dbg(lvl_debug,"Item %p is deleted\n",mr->qitem); + dbg(lvl_debug,"Item %p is deleted",mr->qitem); return 1; } @@ -396,7 +396,7 @@ csv_coord_set(void *priv_data, struct coord *c, int count, enum change_mode mode struct map_priv* m; struct quadtree_item* qi; GList* new_it; - dbg(lvl_debug,"Set coordinates %d %d\n", c->x, c->y); + dbg(lvl_debug,"Set coordinates %d %d", c->x, c->y); /* for now we only support coord modification only */ if( ! change_mode_modify) { @@ -431,7 +431,7 @@ csv_coord_set(void *priv_data, struct coord *c, int count, enum change_mode mode qi->longitude = cg.lng; qi->latitude = cg.lat; quadtree_add( m->tree_root, qi, mr->qiter); - dbg(lvl_debug,"Set coordinates %f %f\n", cg.lng, cg.lat); + dbg(lvl_debug,"Set coordinates %f %f", cg.lng, cg.lat); m->new_items = g_list_remove_link(m->new_items,new_it); m->dirty=1; save_map_csv(m); @@ -494,11 +494,11 @@ static void map_csv_debug_dump_hash_item(gpointer key, gpointer value, gpointer { struct quadtree_item *qi=value; GList *attrs; - dbg(lvl_debug,"%p del=%d ref=%d\n", qi,qi->deleted, qi->ref_count); + dbg(lvl_debug,"%p del=%d ref=%d", qi,qi->deleted, qi->ref_count); attrs=((struct quadtree_data *)qi->data)->attr_list; while(attrs) { if(((struct attr*)attrs->data)->type==attr_label) - dbg(lvl_debug,"... %s\n",((struct attr*)attrs->data)->u.str); + dbg(lvl_debug,"... %s",((struct attr*)attrs->data)->u.str); attrs=g_list_next(attrs); } } @@ -519,7 +519,7 @@ map_rect_new_csv(struct map_priv *map, struct map_selection *sel) struct coord_geo lu; struct coord_geo rl; struct quadtree_iter *res = NULL; - dbg(lvl_debug,"map_rect_new_csv\n"); + dbg(lvl_debug,"map_rect_new_csv"); if(debug_level_get("map_csv")>2) { map_csv_debug_dump(map); } @@ -726,7 +726,7 @@ map_new_csv(struct map_methods *meth, struct attr **attrs, struct callback_list charset = attr_search(attrs, NULL, attr_charset); if(charset) { - dbg(lvl_debug,"charset:%s\n",charset->u.str); + dbg(lvl_debug,"charset:%s",charset->u.str); m->charset=g_strdup(charset->u.str); } else { m->charset=g_strdup(map_methods_csv.charset); @@ -758,7 +758,7 @@ map_new_csv(struct map_methods *meth, struct attr **attrs, struct callback_list FILE *fp; wexp=file_wordexp_new(data->u.str); wexp_data=file_wordexp_get_array(wexp); - dbg(lvl_debug,"map_new_csv %s\n", data->u.str); + dbg(lvl_debug,"map_new_csv %s", data->u.str); m->filename=g_strdup(wexp_data[0]); file_wordexp_destroy(wexp); @@ -775,7 +775,7 @@ map_new_csv(struct map_methods *meth, struct attr **attrs, struct callback_list int col_cnt=0; char *tok; if(!line) { - dbg(lvl_error,"Error converting '%s' to utf-8 from %s\n",linebuf, m->charset); + dbg(lvl_error,"Error converting '%s' to utf-8 from %s",linebuf, m->charset); continue; } if(line[strlen(line)-1]=='\n' || line[strlen(line)-1]=='\r') { @@ -848,7 +848,7 @@ map_new_csv(struct map_methods *meth, struct attr **attrs, struct callback_list *pID = m->next_item_idx; g_hash_table_insert(m->qitem_hash, pID,qi); ++m->next_item_idx; - dbg(lvl_debug,"%s\n",line); + dbg(lvl_debug,"%s",line); } else { g_free(curr_item); @@ -856,7 +856,7 @@ map_new_csv(struct map_methods *meth, struct attr **attrs, struct callback_list } else { - dbg(lvl_error,"ERROR: Non-matching attr count and column count: %d %d SKIPPING line: %s\n",col_cnt, attr_cnt,line); + dbg(lvl_error,"ERROR: Non-matching attr count and column count: %d %d SKIPPING line: %s",col_cnt, attr_cnt,line); } g_free(line); g_free(line2); @@ -865,21 +865,21 @@ map_new_csv(struct map_methods *meth, struct attr **attrs, struct callback_list fclose(fp); } else { - dbg(lvl_error,"Error opening csv map file '%s': %s\n", m->filename, strerror(errno)); + dbg(lvl_error,"Error opening csv map file '%s': %s", m->filename, strerror(errno)); return NULL; } } else { - dbg(lvl_debug,"No data attribute, starting with in-memory map\n"); + dbg(lvl_debug,"No data attribute, starting with in-memory map"); } - dbg(lvl_info,"%p\n",tree_root); + dbg(lvl_info,"%p",tree_root); return m; } void plugin_init(void) { - dbg(lvl_debug,"csv: plugin_init\n"); + dbg(lvl_debug,"csv: plugin_init"); plugin_register_category_map("csv", map_new_csv); } |