diff options
author | sleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2014-11-22 22:34:19 +0000 |
---|---|---|
committer | sleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2014-11-22 22:34:19 +0000 |
commit | 2a6aa9b917249f44e4aa27d88e255f61eb171d6a (patch) | |
tree | 0ad46b248e42f96e93b54874aa3b073ad1273aa1 /navit/map.c | |
parent | 05edfdebd6b83267121b11538abafe39bff266e7 (diff) | |
download | navit-2a6aa9b917249f44e4aa27d88e255f61eb171d6a.tar.gz |
Refactor:core:Introduce enum for debug levels, and use it everywhere.|First part of #1269.
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5960 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/map.c')
-rw-r--r-- | navit/map.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/navit/map.c b/navit/map.c index fbc7fba87..bb8a52385 100644 --- a/navit/map.c +++ b/navit/map.c @@ -96,12 +96,12 @@ map_new(struct attr *parent, struct attr **attrs) struct attr *type=attr_search(attrs, NULL, attr_type); if (! type) { - dbg(0,"missing type\n"); + dbg(lvl_error,"missing type\n"); return NULL; } maptype_new=plugin_get_map_type(type->u.str); if (! maptype_new) { - dbg(0,"invalid type '%s'\n", type->u.str); + dbg(lvl_error,"invalid type '%s'\n", type->u.str); return NULL; } @@ -227,7 +227,7 @@ map_convert_string_tmp(struct map *this_, char *str) return str; map_converted_string_tmp=g_convert(str, -1, "utf-8", this_->meth.charset, NULL, NULL, NULL); if(!map_converted_string_tmp) { - dbg(0,"Error converting '%s' from %s to utf-8\n", str, this_->meth.charset); + dbg(lvl_error,"Error converting '%s' from %s to utf-8\n", str, this_->meth.charset); return str; } return map_converted_string_tmp; @@ -442,8 +442,8 @@ struct map_search * map_search_new(struct map *m, struct item *item, struct attr *search_attr, int partial) { struct map_search *this_; - dbg(1,"enter(%p,%p,%p,%d)\n", m, item, search_attr, partial); - dbg(1,"0x%x 0x%x 0x%x\n", attr_country_all, search_attr->type, attr_country_name); + dbg(lvl_warning,"enter(%p,%p,%p,%d)\n", m, item, search_attr, partial); + dbg(lvl_warning,"0x%x 0x%x 0x%x\n", attr_country_all, search_attr->type, attr_country_name); this_=g_new0(struct map_search,1); this_->m=m; this_->search_attr=*search_attr; @@ -712,7 +712,7 @@ map_dump_file(struct map *map, const char *file) map_dump_filedesc(map, f); fclose(f); } else - dbg(0,"failed to open file '%s'\n",file); + dbg(lvl_error,"failed to open file '%s'\n",file); } void |