summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220>2014-11-22 22:36:24 +0000
committersleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220>2014-11-22 22:36:24 +0000
commitcb575bf823793db3620c77a3c7bf12a7d3856ed3 (patch)
tree0118c6ec64520748c7daefd46e57c226343621d2
parent72471adee798a3a1d8414f0d4f77be816fb4dad6 (diff)
downloadnavit-cb575bf823793db3620c77a3c7bf12a7d3856ed3.tar.gz
Fix:core:Change all logging at lvl_error/warning to lvl_debug, unless it looks like an error message.|#1269, part 5
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5967 ffa7fe5e-494d-0410-b361-a75ebd5db220
-rw-r--r--navit/android.c86
-rw-r--r--navit/attr.c4
-rw-r--r--navit/autoload/osso/osso.c4
-rw-r--r--navit/binding/dbus/binding_dbus.c52
-rw-r--r--navit/binding/python/config.c2
-rw-r--r--navit/binding/python/navit.c6
-rw-r--r--navit/binding/python/pcoord.c2
-rw-r--r--navit/binding/win32/binding_win32.c10
-rw-r--r--navit/bookmarks.c6
-rw-r--r--navit/cache.c40
-rw-r--r--navit/command.c16
-rw-r--r--navit/config_.c2
-rw-r--r--navit/coord.c24
-rw-r--r--navit/debug.c4
-rw-r--r--navit/file.c22
-rw-r--r--navit/font/freetype/font_freetype.c4
-rw-r--r--navit/graphics.c38
-rw-r--r--navit/graphics/android/graphics_android.c68
-rw-r--r--navit/graphics/gd/graphics_gd.c32
-rw-r--r--navit/graphics/gtk_drawing_area/graphics_gtk_drawing_area.c12
-rw-r--r--navit/graphics/null/graphics_null.c20
-rw-r--r--navit/graphics/opengl/graphics_opengl.c24
-rw-r--r--navit/graphics/opengl/graphics_opengl_egl.c2
-rw-r--r--navit/graphics/opengl/graphics_opengl_x11.c14
-rw-r--r--navit/graphics/qt_qpainter/RenderArea.cpp12
-rw-r--r--navit/graphics/qt_qpainter/graphics_qt_qpainter.cpp26
-rw-r--r--navit/graphics/sdl/event.c28
-rw-r--r--navit/graphics/sdl/event_sdl.c24
-rw-r--r--navit/graphics/sdl/graphics_sdl.c78
-rw-r--r--navit/graphics/win32/graphics_win32.c44
-rw-r--r--navit/gui/gtk/datawindow.c2
-rw-r--r--navit/gui/gtk/destination.c14
-rw-r--r--navit/gui/gtk/gui_gtk_poi.c6
-rw-r--r--navit/gui/gtk/gui_gtk_window.c4
-rw-r--r--navit/gui/internal/gui_internal.c40
-rw-r--r--navit/gui/internal/gui_internal_bookmark.c6
-rw-r--r--navit/gui/internal/gui_internal_command.c24
-rw-r--r--navit/gui/internal/gui_internal_gesture.c8
-rw-r--r--navit/gui/internal/gui_internal_html.c6
-rw-r--r--navit/gui/internal/gui_internal_menu.c2
-rw-r--r--navit/gui/internal/gui_internal_poi.c16
-rw-r--r--navit/gui/internal/gui_internal_search.c14
-rw-r--r--navit/gui/internal/gui_internal_widget.c6
-rw-r--r--navit/gui/qml/bookmarksProxy.h2
-rw-r--r--navit/gui/qml/gui_qml.cpp4
-rw-r--r--navit/gui/qml/navitProxy.h2
-rw-r--r--navit/gui/qml/proxy.h2
-rw-r--r--navit/gui/qml/routeProxy.h4
-rw-r--r--navit/gui/qml/searchProxy.h4
-rw-r--r--navit/gui/win32/gui_win32.c2
-rw-r--r--navit/gui/win32/win32_gui_destination.c2
-rw-r--r--navit/linguistics.c2
-rw-r--r--navit/log.c12
-rw-r--r--navit/map.c4
-rw-r--r--navit/map/binfile/binfile.c148
-rw-r--r--navit/map/csv/csv.c26
-rw-r--r--navit/map/csv/quadtree.c20
-rw-r--r--navit/map/filter/filter.c10
-rw-r--r--navit/map/mg/block.c14
-rw-r--r--navit/map/mg/map.c18
-rw-r--r--navit/map/mg/poly.c4
-rw-r--r--navit/map/mg/street.c74
-rw-r--r--navit/map/mg/town.c18
-rw-r--r--navit/map/mg/tree.c52
-rw-r--r--navit/map/shapefile/shapefile.c20
-rw-r--r--navit/map/textfile/textfile.c44
-rw-r--r--navit/maps.c2
-rw-r--r--navit/mapset.c2
-rw-r--r--navit/maptool/ch.c10
-rw-r--r--navit/maptool/coastline.c16
-rw-r--r--navit/navigation.c96
-rw-r--r--navit/navit.c68
-rw-r--r--navit/osd.c10
-rw-r--r--navit/osd/core/osd_core.c24
-rw-r--r--navit/plugin.c8
-rw-r--r--navit/plugin/pedestrian/pedestrian.c134
-rw-r--r--navit/popup.c12
-rw-r--r--navit/profile.c2
-rw-r--r--navit/profile_option.c2
-rw-r--r--navit/projection.c6
-rw-r--r--navit/route.c112
-rw-r--r--navit/routech.c22
-rw-r--r--navit/script.c8
-rw-r--r--navit/search.c58
-rw-r--r--navit/search_houseno_interpol.c18
-rw-r--r--navit/speech.c12
-rw-r--r--navit/speech/android/speech_android.c8
-rw-r--r--navit/speech/cmdline/speech_cmdline.c14
-rw-r--r--navit/speech/espeak/speak.c10
-rw-r--r--navit/start_real.c6
-rw-r--r--navit/support/libc/stat.c6
-rw-r--r--navit/support/win32/serial_io.c12
-rw-r--r--navit/support/wordexp/glob.c6
-rw-r--r--navit/track.c46
-rw-r--r--navit/transform.c26
-rw-r--r--navit/util.c10
-rw-r--r--navit/vehicle.c16
-rw-r--r--navit/vehicle/android/vehicle_android.c34
-rw-r--r--navit/vehicle/demo/vehicle_demo.c20
-rw-r--r--navit/vehicle/file/vehicle_file.c34
-rw-r--r--navit/vehicle/gpsd/vehicle_gpsd.c26
-rw-r--r--navit/vehicle/gpsd_dbus/vehicle_gpsd_dbus.c2
-rw-r--r--navit/vehicle/gypsy/vehicle_gypsy.c6
-rw-r--r--navit/vehicle/iphone/vehicle_iphone.c8
-rw-r--r--navit/vehicle/maemo/vehicle_maemo.c64
-rw-r--r--navit/vehicle/null/vehicle_null.c12
-rw-r--r--navit/vehicle/webos/bluetooth.c36
-rw-r--r--navit/vehicle/webos/vehicle_webos.c4
-rw-r--r--navit/vehicle/wince/vehicle_wince.c46
-rw-r--r--navit/vehicleprofile.c6
-rw-r--r--navit/xmlconfig.c24
111 files changed, 1232 insertions, 1214 deletions
diff --git a/navit/android.c b/navit/android.c
index bee9ec8b0..f1b443868 100644
--- a/navit/android.c
+++ b/navit/android.c
@@ -83,12 +83,12 @@ Java_org_navitproject_navit_Navit_NavitMain( JNIEnv* env, jobject thiz, jobject
jnienv=env;
android_activity = (*jnienv)->NewGlobalRef(jnienv, activity);
langstr=(*env)->GetStringUTFChars(env, lang, NULL);
- dbg(lvl_error,"enter env=%p thiz=%p activity=%p lang=%s version=%d\n",env,thiz,android_activity,langstr,version);
+ dbg(lvl_debug,"enter env=%p thiz=%p activity=%p lang=%s version=%d\n",env,thiz,android_activity,langstr,version);
setenv("LANG",langstr,1);
(*env)->ReleaseStringUTFChars(env, lang, langstr);
displaydensitystr=(*env)->GetStringUTFChars(env, display_density_string, NULL);
- dbg(lvl_error,"*****displaydensity=%s\n",displaydensitystr);
+ dbg(lvl_debug,"*****displaydensity=%s\n",displaydensitystr);
setenv("ANDROID_DENSITY",displaydensitystr,1);
(*env)->ReleaseStringUTFChars(env, display_density_string, displaydensitystr);
const char *strings=(*env)->GetStringUTFChars(env, path, NULL);
@@ -99,14 +99,14 @@ Java_org_navitproject_navit_Navit_NavitMain( JNIEnv* env, jobject thiz, jobject
JNIEXPORT void JNICALL
Java_org_navitproject_navit_Navit_NavitDestroy( JNIEnv* env)
{
- dbg(lvl_error, "shutdown navit\n");
+ dbg(lvl_debug, "shutdown navit\n");
exit(0);
}
JNIEXPORT void JNICALL
Java_org_navitproject_navit_NavitGraphics_SizeChangedCallback( JNIEnv* env, jobject thiz, int id, int w, int h)
{
- dbg(lvl_error,"enter %p %d %d\n",(struct callback *)id,w,h);
+ dbg(lvl_debug,"enter %p %d %d\n",(struct callback *)id,w,h);
if (id)
callback_call_2((struct callback *)id,w,h);
}
@@ -114,7 +114,7 @@ Java_org_navitproject_navit_NavitGraphics_SizeChangedCallback( JNIEnv* env, jobj
JNIEXPORT void JNICALL
Java_org_navitproject_navit_NavitGraphics_ButtonCallback( JNIEnv* env, jobject thiz, int id, int pressed, int button, int x, int y)
{
- dbg(lvl_warning,"enter %p %d %d\n",(struct callback *)id,pressed,button);
+ dbg(lvl_debug,"enter %p %d %d\n",(struct callback *)id,pressed,button);
if (id)
callback_call_4((struct callback *)id,pressed,button,x,y);
}
@@ -122,7 +122,7 @@ Java_org_navitproject_navit_NavitGraphics_ButtonCallback( JNIEnv* env, jobject t
JNIEXPORT void JNICALL
Java_org_navitproject_navit_NavitGraphics_MotionCallback( JNIEnv* env, jobject thiz, int id, int x, int y)
{
- dbg(lvl_warning,"enter %p %d %d\n",(struct callback *)id,x,y);
+ dbg(lvl_debug,"enter %p %d %d\n",(struct callback *)id,x,y);
if (id)
callback_call_2((struct callback *)id,x,y);
}
@@ -131,9 +131,9 @@ JNIEXPORT void JNICALL
Java_org_navitproject_navit_NavitGraphics_KeypressCallback( JNIEnv* env, jobject thiz, int id, jobject str)
{
const char *s;
- dbg(lvl_error,"enter %p %p\n",(struct callback *)id,str);
+ dbg(lvl_debug,"enter %p %p\n",(struct callback *)id,str);
s=(*env)->GetStringUTFChars(env, str, NULL);
- dbg(lvl_error,"key=%d",s);
+ dbg(lvl_debug,"key=%d",s);
if (id)
callback_call_1((struct callback *)id,s);
(*env)->ReleaseStringUTFChars(env, str, s);
@@ -143,7 +143,7 @@ JNIEXPORT void JNICALL
Java_org_navitproject_navit_NavitTimeout_TimeoutCallback( JNIEnv* env, jobject thiz, int id)
{
void (*event_handler)(void *) = *(void **)id;
- dbg(lvl_warning,"enter %p %p\n",thiz, (void *)id);
+ dbg(lvl_debug,"enter %p %p\n",thiz, (void *)id);
event_handler((void*)id);
}
@@ -156,7 +156,7 @@ Java_org_navitproject_navit_NavitVehicle_VehicleCallback( JNIEnv * env, jobject
JNIEXPORT void JNICALL
Java_org_navitproject_navit_NavitIdle_IdleCallback( JNIEnv* env, jobject thiz, int id)
{
- dbg(lvl_warning,"enter %p %p\n",thiz, (void *)id);
+ dbg(lvl_debug,"enter %p %p\n",thiz, (void *)id);
callback_call_0((struct callback *)id);
}
@@ -171,14 +171,14 @@ Java_org_navitproject_navit_NavitWatch_poll( JNIEnv* env, jobject thiz, int func
JNIEXPORT void JNICALL
Java_org_navitproject_navit_NavitWatch_WatchCallback( JNIEnv* env, jobject thiz, int id)
{
- dbg(lvl_warning,"enter %p %p\n",thiz, (void *)id);
+ dbg(lvl_debug,"enter %p %p\n",thiz, (void *)id);
callback_call_0((struct callback *)id);
}
JNIEXPORT void JNICALL
Java_org_navitproject_navit_NavitSensors_SensorCallback( JNIEnv* env, jobject thiz, int id, int sensor, float x, float y, float z)
{
- dbg(lvl_warning,"enter %p %p %f %f %f\n",thiz, (void *)id,x,y,z);
+ dbg(lvl_debug,"enter %p %p %f %f %f\n",thiz, (void *)id,x,y,z);
callback_call_4((struct callback *)id, sensor, &x, &y, &z);
}
@@ -208,10 +208,10 @@ Java_org_navitproject_navit_NavitGraphics_CallbackLocalizedString( JNIEnv* env,
const char *localized_str;
s=(*env)->GetStringUTFChars(env, str, NULL);
- //dbg(lvl_error,"*****string=%s\n",s);
+ //dbg(lvl_debug,"*****string=%s\n",s);
localized_str=navit_nls_gettext(s);
- //dbg(lvl_error,"localized string=%s",localized_str);
+ //dbg(lvl_debug,"localized string=%s",localized_str);
// jstring dataStringValue = (jstring) localized_str;
jstring js = (*env)->NewStringUTF(env,localized_str);
@@ -227,7 +227,7 @@ Java_org_navitproject_navit_NavitGraphics_CallbackMessageChannel( JNIEnv* env, j
struct attr attr;
const char *s;
jint ret = 0;
- dbg(lvl_error,"enter %d %p\n",channel,str);
+ dbg(lvl_debug,"enter %d %p\n",channel,str);
config_get_attr(config_get(), attr_navit, &attr, NULL);
@@ -248,7 +248,7 @@ Java_org_navitproject_navit_NavitGraphics_CallbackMessageChannel( JNIEnv* env, j
struct mapset *ms = navit_get_mapset(attr.u.navit);
struct attr type, name, data, *attrs[4];
const char *map_location=(*env)->GetStringUTFChars(env, str, NULL);
- dbg(lvl_error,"*****string=%s\n",map_location);
+ dbg(lvl_debug,"*****string=%s\n",map_location);
type.type=attr_type;
type.u.str="binfile";
@@ -280,7 +280,7 @@ Java_org_navitproject_navit_NavitGraphics_CallbackMessageChannel( JNIEnv* env, j
if (delete_map)
{
- dbg(lvl_error,"delete map %s (%p)", map_location, delete_map);
+ dbg(lvl_debug,"delete map %s (%p)", map_location, delete_map);
map_r.type=attr_map;
map_r.u.map=delete_map;
ret = mapset_remove_attr(ms, &map_r);
@@ -292,7 +292,7 @@ Java_org_navitproject_navit_NavitGraphics_CallbackMessageChannel( JNIEnv* env, j
case 5:
// call a command (like in gui)
s=(*env)->GetStringUTFChars(env, str, NULL);
- dbg(lvl_error,"*****string=%s\n",s);
+ dbg(lvl_debug,"*****string=%s\n",s);
command_evaluate(&attr,s);
(*env)->ReleaseStringUTFChars(env, str, s);
break;
@@ -310,7 +310,7 @@ Java_org_navitproject_navit_NavitGraphics_CallbackMessageChannel( JNIEnv* env, j
char parse_str[strlen(s) + 1];
strcpy(parse_str, s);
(*env)->ReleaseStringUTFChars(env, str, s);
- dbg(lvl_error,"*****string=%s\n",parse_str);
+ dbg(lvl_debug,"*****string=%s\n",parse_str);
// set destination to (pixel-x#pixel-y)
// pixel-x
@@ -320,8 +320,8 @@ Java_org_navitproject_navit_NavitGraphics_CallbackMessageChannel( JNIEnv* env, j
pstr = strtok (NULL, "#");
p.y = atoi(pstr);
- dbg(lvl_error,"11x=%d\n",p.x);
- dbg(lvl_error,"11y=%d\n",p.y);
+ dbg(lvl_debug,"11x=%d\n",p.x);
+ dbg(lvl_debug,"11y=%d\n",p.y);
transform_reverse(transform, &p, &c);
@@ -330,8 +330,8 @@ Java_org_navitproject_navit_NavitGraphics_CallbackMessageChannel( JNIEnv* env, j
pc.y = c.y;
pc.pro = transform_get_projection(transform);
- dbg(lvl_error,"22x=%d\n",pc.x);
- dbg(lvl_error,"22y=%d\n",pc.y);
+ dbg(lvl_debug,"22x=%d\n",pc.x);
+ dbg(lvl_debug,"22y=%d\n",pc.y);
// start navigation asynchronous
navit_set_destination(attr.u.navit, &pc, parse_str, 1);
@@ -345,7 +345,7 @@ Java_org_navitproject_navit_NavitGraphics_CallbackMessageChannel( JNIEnv* env, j
char parse_str[strlen(s) + 1];
strcpy(parse_str, s);
(*env)->ReleaseStringUTFChars(env, str, s);
- dbg(lvl_error,"*****string=%s\n",s);
+ dbg(lvl_debug,"*****string=%s\n",s);
// set destination to (lat#lon#title)
struct coord_geo g;
@@ -361,9 +361,9 @@ Java_org_navitproject_navit_NavitGraphics_CallbackMessageChannel( JNIEnv* env, j
// description
name = strtok (NULL, "#");
- dbg(lvl_error,"lat=%f\n",g.lat);
- dbg(lvl_error,"lng=%f\n",g.lng);
- dbg(lvl_error,"str1=%s\n",name);
+ dbg(lvl_debug,"lat=%f\n",g.lat);
+ dbg(lvl_debug,"lng=%f\n",g.lng);
+ dbg(lvl_debug,"str1=%s\n",name);
struct coord c;
transform_from_geo(projection_mg, &g, &c);
@@ -379,7 +379,7 @@ Java_org_navitproject_navit_NavitGraphics_CallbackMessageChannel( JNIEnv* env, j
}
break;
default:
- dbg(lvl_error, "Unknown command");
+ dbg(lvl_error, "Unknown command: %d", channel);
}
return ret;
@@ -394,7 +394,7 @@ Java_org_navitproject_navit_NavitGraphics_GetDefaultCountry( JNIEnv* env, jobjec
jstring return_string = NULL;
struct attr attr;
- dbg(lvl_error,"enter %d %p\n",channel,str);
+ dbg(lvl_debug,"enter %d %p\n",channel,str);
config_get_attr(config_get(), attr_navit, &attr, NULL);
@@ -409,12 +409,12 @@ Java_org_navitproject_navit_NavitGraphics_GetDefaultCountry( JNIEnv* env, jobjec
struct mapset *ms=navit_get_mapset(attr.u.navit);
struct search_list *search_list = search_list_new(ms);
search_attr.type=attr_country_all;
- dbg(lvl_error,"country %s\n", country_name.u.str);
+ dbg(lvl_debug,"country %s\n", country_name.u.str);
search_attr.u.str=country_name.u.str;
search_list_search(search_list, &search_attr, 0);
while((res=search_list_get_result(search_list)))
{
- dbg(lvl_error,"Get result: %s\n", res->country->iso2);
+ dbg(lvl_debug,"Get result: %s\n", res->country->iso2);
}
if (item_attr_get(item, attr_country_iso2, &country_iso2))
return_string = (*env)->NewStringUTF(env,country_iso2.u.str);
@@ -435,7 +435,7 @@ Java_org_navitproject_navit_NavitGraphics_GetAllCountries( JNIEnv* env, jobject
jobjectArray all_countries;
struct attr attr;
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
config_get_attr(config_get(), attr_navit, &attr, NULL);
@@ -443,12 +443,12 @@ Java_org_navitproject_navit_NavitGraphics_GetAllCountries( JNIEnv* env, jobject
struct search_list *search_list = search_list_new(ms);
jobjectArray current_country = NULL;
search_attr.type=attr_country_all;
- //dbg(lvl_error,"country %s\n", country_name.u.str);
+ //dbg(lvl_debug,"country %s\n", country_name.u.str);
search_attr.u.str=g_strdup("");//country_name.u.str;
search_list_search(search_list, &search_attr, 1);
while((res=search_list_get_result(search_list)))
{
- dbg(lvl_error,"Get result: %s\n", res->country->iso2);
+ dbg(lvl_debug,"Get result: %s\n", res->country->iso2);
if (strlen(res->country->iso2)==2)
{
@@ -543,7 +543,7 @@ town_str(struct search_list_result *res, int level)
static void
android_search_end(struct android_search_priv *search_priv)
{
- dbg(lvl_warning, "End search");
+ dbg(lvl_debug, "End search");
JNIEnv* env = search_priv->search_result_obj.env;
if (search_priv->idle_ev) {
event_remove_idle(search_priv->idle_ev);
@@ -575,11 +575,11 @@ static enum attr_type android_search_level[] = {
static void
android_search_idle(struct android_search_priv *search_priv)
{
- dbg(lvl_warning, "enter android_search_idle");
+ dbg(lvl_debug, "enter android_search_idle");
struct search_list_result *res = search_list_get_result(search_priv->search_list);
if (res) {
- dbg(lvl_warning, "Town: %s, Street: %s\n",res->town ? res->town->common.town_name : "no town", res->street ? res->street->name : "no street");
+ dbg(lvl_debug, "Town: %s, Street: %s\n",res->town ? res->town->common.town_name : "no town", res->street ? res->street->name : "no street");
search_priv->found = 1;
switch (search_priv->search_attr.type)
{
@@ -634,7 +634,7 @@ android_search_idle(struct android_search_priv *search_priv)
}
} while (level > 0 ? search_priv->current_phrase_per_level[level] == search_priv->current_phrase_per_level[level-1] : 0);
dbg(lvl_info, "used phrase: %d,%d, %d, level %d, '%s'", search_priv->current_phrase_per_level[0], search_priv->current_phrase_per_level[1], search_priv->current_phrase_per_level[2] , level, attr_to_name(android_search_level[level]))
- dbg(lvl_warning, "Search for '%s'", search_priv->phrases[search_priv->current_phrase_per_level[level]]);
+ dbg(lvl_debug, "Search for '%s'", search_priv->phrases[search_priv->current_phrase_per_level[level]]);
search_priv->search_attr.type = android_search_level[level];
search_priv->search_attr.u.str = search_priv->phrases[search_priv->current_phrase_per_level[level]];
struct attr test;
@@ -677,12 +677,12 @@ search_fix_spaces(const char *str)
static void start_search(struct android_search_priv *search_priv, const char *search_string)
{
- dbg(lvl_warning,"enter %s\n", search_string);
+ dbg(lvl_debug,"enter %s\n", search_string);
char *str=search_fix_spaces(search_string);
search_priv->phrases = g_strsplit(str, " ", 0);
//ret=search_address_town(ret, sl, phrases, NULL, partial, jni);
- dbg(lvl_warning,"First search phrase %s", search_priv->phrases[0]);
+ dbg(lvl_debug,"First search phrase %s", search_priv->phrases[0]);
search_priv->search_attr.u.str= search_priv->phrases[0];
search_priv->search_attr.type=attr_town_or_district_name;
search_list_search(search_priv->search_list, &search_priv->search_attr, search_priv->partial);
@@ -692,7 +692,7 @@ static void start_search(struct android_search_priv *search_priv, const char *se
//callback_call_0(search_priv->idle_clb);
g_free(str);
- dbg(lvl_warning,"leave\n");
+ dbg(lvl_debug,"leave\n");
}
JNIEXPORT jlong JNICALL
@@ -700,7 +700,7 @@ Java_org_navitproject_navit_NavitAddressSearchActivity_CallbackStartAddressSearc
{
struct attr attr;
const char *search_string =(*env)->GetStringUTFChars(env, str, NULL);
- dbg(lvl_error,"search '%s'\n", search_string);
+ dbg(lvl_debug,"search '%s'\n", search_string);
config_get_attr(config_get(), attr_navit, &attr, NULL);
@@ -733,7 +733,7 @@ Java_org_navitproject_navit_NavitAddressSearchActivity_CallbackStartAddressSearc
if (!count)
dbg(lvl_error,"Country not found");
- dbg(lvl_warning,"search in country '%s'\n", str_country);
+ dbg(lvl_debug,"search in country '%s'\n", str_country);
(*env)->ReleaseStringUTFChars(env, country, str_country);
search_priv->search_result_obj.env = env;
diff --git a/navit/attr.c b/navit/attr.c
index 441344903..cc0b026b5 100644
--- a/navit/attr.c
+++ b/navit/attr.c
@@ -278,7 +278,7 @@ attr_new_from_text(const char *name, const char *value)
transform_to_geo(projection_mg, &c, g);
break;
}
- dbg(lvl_warning,"default\n");
+ dbg(lvl_debug,"default\n");
g_free(ret);
ret=NULL;
}
@@ -887,7 +887,7 @@ attr_from_line(char *line, char *name, int *pos, char *val_ret, char *name_ret)
int len=0,quoted;
char *p,*e,*n;
- dbg(lvl_warning,"get_tag %s from %s\n", name, line);
+ dbg(lvl_debug,"get_tag %s from %s\n", name, line);
if (name)
len=strlen(name);
if (pos)
diff --git a/navit/autoload/osso/osso.c b/navit/autoload/osso/osso.c
index 9cb0eccf9..f6672090c 100644
--- a/navit/autoload/osso/osso.c
+++ b/navit/autoload/osso/osso.c
@@ -33,7 +33,7 @@ osso_display_on(struct navit *this_)
static gboolean
osso_cb_hw_state_idle(struct cb_hw_state_trail * params)
{
- dbg(lvl_error, "(inact=%d, save=%d, shut=%d, memlow=%d, state=%d)\n",
+ dbg(lvl_debug, "(inact=%d, save=%d, shut=%d, memlow=%d, state=%d)\n",
params->state->system_inactivity_ind,
params->state->save_unsaved_data_ind, params->state->shutdown_ind,
params->state->memory_low_ind, params->state->sig_device_mode_ind);
@@ -69,7 +69,7 @@ osso_cb_hw_state(osso_hw_state_t * state, gpointer data)
static void
osso_navit(struct navit *nav, int add)
{
- dbg(lvl_warning, "Installing osso context for org.navit_project.navit\n");
+ dbg(lvl_debug, "Installing osso context for org.navit_project.navit\n");
osso_context = osso_initialize("org.navit_project.navit", version, TRUE, NULL);
if (osso_context == NULL) {
dbg(lvl_error, "error initiating osso context\n");
diff --git a/navit/binding/dbus/binding_dbus.c b/navit/binding/dbus/binding_dbus.c
index ab2f9975d..36d3fb079 100644
--- a/navit/binding/dbus/binding_dbus.c
+++ b/navit/binding/dbus/binding_dbus.c
@@ -84,7 +84,7 @@ object_new(char *type, void *object)
{
int id;
char *ret;
- dbg(lvl_warning,"enter %s\n", type);
+ dbg(lvl_debug,"enter %s\n", type);
if ((ret=g_hash_table_lookup(object_hash_rev, object)))
return ret;
id=GPOINTER_TO_INT(g_hash_table_lookup(object_count, type));
@@ -92,7 +92,7 @@ object_new(char *type, void *object)
ret=g_strdup_printf("%s/%s/%d", object_path, type, id);
g_hash_table_insert(object_hash, ret, object);
g_hash_table_insert(object_hash_rev, object, ret);
- dbg(lvl_warning,"return %s\n", ret);
+ dbg(lvl_debug,"return %s\n", ret);
return (ret);
}
@@ -151,7 +151,7 @@ resolve_object(const char *opath, char *type)
if (!config_get_attr(config, attr_navit, &navit, NULL))
return NULL;
if (!oprefix[0]) {
- dbg(lvl_error,"default_navit\n");
+ dbg(lvl_debug,"default_navit\n");
return navit.u.navit;
}
if (!strncmp(oprefix,def_graphics,strlen(def_graphics))) {
@@ -382,42 +382,42 @@ dbus_dump_iter(char *prefix, DBusMessageIter *iter)
switch (arg) {
case DBUS_TYPE_INT32:
dbus_message_iter_get_basic(iter, &vali);
- dbg(lvl_error,"%sDBUS_TYPE_INT32: %d\n",prefix,vali);
+ dbg(lvl_debug,"%sDBUS_TYPE_INT32: %d\n",prefix,vali);
break;
case DBUS_TYPE_STRING:
dbus_message_iter_get_basic(iter, &vals);
- dbg(lvl_error,"%sDBUS_TYPE_STRING: %s\n",prefix,vals);
+ dbg(lvl_debug,"%sDBUS_TYPE_STRING: %s\n",prefix,vals);
break;
case DBUS_TYPE_STRUCT:
- dbg(lvl_error,"%sDBUS_TYPE_STRUCT:\n",prefix);
+ dbg(lvl_debug,"%sDBUS_TYPE_STRUCT:\n",prefix);
prefixr=g_strdup_printf("%s ",prefix);
dbus_message_iter_recurse(iter, &iterr);
dbus_dump_iter(prefixr, &iterr);
g_free(prefixr);
break;
case DBUS_TYPE_VARIANT:
- dbg(lvl_error,"%sDBUS_TYPE_VARIANT:\n",prefix);
+ dbg(lvl_debug,"%sDBUS_TYPE_VARIANT:\n",prefix);
prefixr=g_strdup_printf("%s ",prefix);
dbus_message_iter_recurse(iter, &iterr);
dbus_dump_iter(prefixr, &iterr);
g_free(prefixr);
break;
case DBUS_TYPE_DICT_ENTRY:
- dbg(lvl_error,"%sDBUS_TYPE_DICT_ENTRY:\n",prefix);
+ dbg(lvl_debug,"%sDBUS_TYPE_DICT_ENTRY:\n",prefix);
prefixr=g_strdup_printf("%s ",prefix);
dbus_message_iter_recurse(iter, &iterr);
dbus_dump_iter(prefixr, &iterr);
g_free(prefixr);
break;
case DBUS_TYPE_ARRAY:
- dbg(lvl_error,"%sDBUS_TYPE_ARRAY:\n",prefix);
+ dbg(lvl_debug,"%sDBUS_TYPE_ARRAY:\n",prefix);
prefixr=g_strdup_printf("%s ",prefix);
dbus_message_iter_recurse(iter, &iterr);
dbus_dump_iter(prefixr, &iterr);
g_free(prefixr);
break;
default:
- dbg(lvl_error,"%c\n",arg);
+ dbg(lvl_debug,"%c\n",arg);
}
dbus_message_iter_next(iter);
}
@@ -517,7 +517,7 @@ decode_attr_type_from_iter(DBusMessageIter *iter)
dbus_message_iter_get_basic(iter, &attr_type);
dbus_message_iter_next(iter);
ret=attr_from_name(attr_type);
- dbg(lvl_warning, "attr value: 0x%x string: %s\n", ret, attr_type);
+ dbg(lvl_debug, "attr value: 0x%x string: %s\n", ret, attr_type);
return ret;
}
@@ -534,7 +534,7 @@ decode_attr_from_iter(DBusMessageIter *iter, struct attr *attr)
dbus_message_iter_recurse(iter, &iterattr);
dbus_message_iter_next(iter);
- dbg(lvl_warning, "seems valid. signature: %s\n", dbus_message_iter_get_signature(&iterattr));
+ dbg(lvl_debug, "seems valid. signature: %s\n", dbus_message_iter_get_signature(&iterattr));
if (attr->type >= attr_type_item_begin && attr->type <= attr_type_item_end)
return 0;
@@ -1121,7 +1121,7 @@ point_get_from_message(DBusMessage *message, DBusMessageIter *iter, struct point
{
DBusMessageIter iter2;
- dbg(lvl_error,"%s\n", dbus_message_iter_get_signature(iter));
+ dbg(lvl_debug,"%s\n", dbus_message_iter_get_signature(iter));
dbus_message_iter_recurse(iter, &iter2);
@@ -1135,7 +1135,7 @@ point_get_from_message(DBusMessage *message, DBusMessageIter *iter, struct point
return 0;
dbus_message_iter_get_basic(&iter2, &p->y);
- dbg(lvl_error, " x -> %x y -> %x\n", p->x, p->y);
+ dbg(lvl_debug, " x -> %x y -> %x\n", p->x, p->y);
dbus_message_iter_next(&iter2);
@@ -1268,7 +1268,7 @@ request_navit_zoom(DBusConnection *connection, DBusMessage *message)
return dbus_error_invalid_object_path(connection, message);
dbus_message_iter_init(message, &iter);
- dbg(lvl_error,"%s\n", dbus_message_iter_get_signature(&iter));
+ dbg(lvl_debug,"%s\n", dbus_message_iter_get_signature(&iter));
dbus_message_iter_get_basic(&iter, &factor);
@@ -1313,7 +1313,7 @@ request_navit_route_export_gpx(DBusConnection *connection, DBusMessage *message)
pp=&p;
}
- dbg(lvl_warning,"Dumping route from dbus to %s\n", filename);
+ dbg(lvl_debug,"Dumping route from dbus to %s\n", filename);
struct map * map=NULL;
struct navigation * nav = NULL;
@@ -1392,7 +1392,7 @@ request_navit_resize(DBusConnection *connection, DBusMessage *message)
return dbus_error_invalid_object_path(connection, message);
dbus_message_iter_init(message, &iter);
- dbg(lvl_error,"%s\n", dbus_message_iter_get_signature(&iter));
+ dbg(lvl_debug,"%s\n", dbus_message_iter_get_signature(&iter));
if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_INT32)
return dbus_error_invalid_parameter(connection, message);
@@ -1404,7 +1404,7 @@ request_navit_resize(DBusConnection *connection, DBusMessage *message)
return dbus_error_invalid_parameter(connection, message);
dbus_message_iter_get_basic(&iter, &h);
- dbg(lvl_error, " w -> %i h -> %i\n", w, h);
+ dbg(lvl_debug, " w -> %i h -> %i\n", w, h);
navit_handle_resize(navit, w, h);
@@ -1503,7 +1503,7 @@ request_navit_set_destination(DBusConnection *connection, DBusMessage *message)
dbus_message_iter_next(&iter);
dbus_message_iter_get_basic(&iter, &description);
- dbg(lvl_error, " destination -> %s\n", description);
+ dbg(lvl_debug, " destination -> %s\n", description);
navit_set_destination(navit, &pc, description, 1);
return empty_reply(connection, message);
@@ -1865,7 +1865,7 @@ introspect_path(const char *object)
if (strncmp(object, object_path, strlen(object_path)))
return NULL;
ret=g_strdup(object+strlen(object_path));
- dbg(lvl_warning,"path=%s\n",ret);
+ dbg(lvl_debug,"path=%s\n",ret);
for (i = strlen(ret)-1 ; i >= 0 ; i--) {
if (ret[i] == '/' || (ret[i] >= '0' && ret[i] <= '9'))
ret[i]='\0';
@@ -1893,7 +1893,7 @@ generate_navitintrospectxml(const char *object)
char *path=introspect_path(object);
if (!path)
return NULL;
- dbg(lvl_warning,"path=%s\n",path);
+ dbg(lvl_debug,"path=%s\n",path);
// write header and make navit introspectable
navitintrospectxml = g_strdup_printf("%s%s%s\n", navitintrospectxml_head1, object, navitintrospectxml_head2);
@@ -1936,11 +1936,11 @@ navit_handler_func(DBusConnection *connection, DBusMessage *message, void *user_
{
int i;
char *path;
- dbg(lvl_warning,"type=%s interface=%s path=%s member=%s signature=%s\n", dbus_message_type_to_string(dbus_message_get_type(message)), dbus_message_get_interface(message), dbus_message_get_path(message), dbus_message_get_member(message), dbus_message_get_signature(message));
+ dbg(lvl_debug,"type=%s interface=%s path=%s member=%s signature=%s\n", dbus_message_type_to_string(dbus_message_get_type(message)), dbus_message_get_interface(message), dbus_message_get_path(message), dbus_message_get_member(message), dbus_message_get_signature(message));
if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Introspectable", "Introspect")) {
DBusMessage *reply;
char *navitintrospectxml = generate_navitintrospectxml(dbus_message_get_path(message));
- dbg(lvl_warning,"Introspect %s:Result:%s\n",dbus_message_get_path(message), navitintrospectxml);
+ dbg(lvl_debug,"Introspect %s:Result:%s\n",dbus_message_get_path(message), navitintrospectxml);
if (navitintrospectxml) {
reply = dbus_message_new_method_return(message);
dbus_message_append_args(reply, DBUS_TYPE_STRING, &navitintrospectxml, DBUS_TYPE_INVALID);
@@ -1974,7 +1974,7 @@ static DBusObjectPathVTable dbus_navit_vtable = {
DBusHandlerResult
filter(DBusConnection *connection, DBusMessage *message, void *user_data)
{
- dbg(lvl_error,"type=%s interface=%s path=%s member=%s signature=%s\n", dbus_message_type_to_string(dbus_message_get_type(message)), dbus_message_get_interface(message), dbus_message_get_path(message), dbus_message_get_member(message), dbus_message_get_signature(message));
+ dbg(lvl_debug,"type=%s interface=%s path=%s member=%s signature=%s\n", dbus_message_type_to_string(dbus_message_get_type(message)), dbus_message_get_interface(message), dbus_message_get_path(message), dbus_message_get_member(message), dbus_message_get_signature(message));
if (dbus_message_is_signal(message, DBUS_INTERFACE_DBUS, "NameOwnerChanged")) {
}
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
@@ -1987,7 +1987,7 @@ dbus_cmd_send_signal(struct navit *navit, char *command, struct attr **in, struc
DBusMessage* msg;
char *opath=object_new("navit",navit);
char *interface=g_strdup_printf("%s%s", service_name, ".navit");
- dbg(lvl_error,"enter %s %s %s\n",opath,command,interface);
+ dbg(lvl_debug,"enter %s %s %s\n",opath,command,interface);
msg = dbus_message_new_signal(opath, interface, "signal");
if (msg) {
DBusMessageIter iter1,iter2,iter3;
@@ -2042,7 +2042,7 @@ void plugin_init(void)
object_hash=g_hash_table_new(g_str_hash, g_str_equal);
object_hash_rev=g_hash_table_new(NULL, NULL);
object_count=g_hash_table_new(g_str_hash, g_str_equal);
- dbg(lvl_warning,"enter\n");
+ dbg(lvl_debug,"enter\n");
dbus_error_init(&error);
#ifdef DBUS_USE_SYSTEM_BUS
connection = dbus_bus_get(DBUS_BUS_SYSTEM, &error);
diff --git a/navit/binding/python/config.c b/navit/binding/python/config.c
index 207dcdc4b..c3f04c4df 100644
--- a/navit/binding/python/config.c
+++ b/navit/binding/python/config.c
@@ -66,7 +66,7 @@ config_py(PyObject *self, PyObject *args)
{
configObject *ret;
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
ret=PyObject_NEW(configObject, &config_Type);
return (PyObject *)ret;
}
diff --git a/navit/binding/python/navit.c b/navit/binding/python/navit.c
index ca87d7ffb..2fde44cbe 100644
--- a/navit/binding/python/navit.c
+++ b/navit/binding/python/navit.c
@@ -47,7 +47,7 @@ navit_get_attr_py(navitObject *self, PyObject *args)
dbg(lvl_error,"get_attr not ok\n");
Py_RETURN_NONE;
}
- dbg(lvl_error,"get_attr ok\n");
+ dbg(lvl_debug,"get_attr ok\n");
return python_object_from_attr(&attr);
}
@@ -131,7 +131,7 @@ navit_py(PyObject *self, PyObject *args)
{
navitObject *ret;
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
ret=PyObject_NEW(navitObject, &navit_Type);
return (PyObject *)ret;
}
@@ -139,7 +139,7 @@ navit_py(PyObject *self, PyObject *args)
PyObject *
navit_py_ref(struct navit *navit)
{
- dbg(lvl_error,"navit=%p\n", navit);
+ dbg(lvl_debug,"navit=%p\n", navit);
navitObject *ret=PyObject_NEW(navitObject, &navit_Type);
ret->navit=navit;
return (PyObject *)ret;
diff --git a/navit/binding/python/pcoord.c b/navit/binding/python/pcoord.c
index 2ee4a9285..4fe734a70 100644
--- a/navit/binding/python/pcoord.c
+++ b/navit/binding/python/pcoord.c
@@ -76,7 +76,7 @@ pcoord_py(PyObject *self, PyObject *args)
ret->pc.pro=pro;
ret->pc.x=c.x;
ret->pc.y=c.y;
- dbg(lvl_error,"0x%x,0x%x\n", c.x, c.y);
+ dbg(lvl_debug,"0x%x,0x%x\n", c.x, c.y);
return (PyObject *)ret;
}
diff --git a/navit/binding/win32/binding_win32.c b/navit/binding/win32/binding_win32.c
index 835a2f6e2..c6d3295cc 100644
--- a/navit/binding/win32/binding_win32.c
+++ b/navit/binding/win32/binding_win32.c
@@ -63,7 +63,7 @@ win32_cmd_send_signal(struct navit *navit, char *command, struct attr **in, stru
dbg(lvl_error,"this function is a stub\n");
if (in) {
while (*in) {
- dbg(lvl_error,"another attribute to be sent\n");
+ dbg(lvl_debug,"another attribute to be sent\n");
in++;
}
}
@@ -100,7 +100,7 @@ win32_wm_copydata(struct win32_binding_private *this, int *hwndSender, COPYDATAS
dbg(lvl_error,"Got request with wrong MAGIC, expected %s, got %*s.\n",NAVIT_BINDING_W32_MAGIC, msg->magic,sizeof(msg->magic));
return;
}
- dbg(lvl_error,"Running command %s\n", msg->text);
+ dbg(lvl_debug,"Running command %s\n", msg->text);
command_evaluate(&navit, msg->text);
}
@@ -120,9 +120,9 @@ static void
win32_main_navit(struct win32_binding_private *this, struct navit *navit, int added)
{
struct attr attr;
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
if (added==1) {
- dbg(lvl_error,"enter2\n");
+ dbg(lvl_debug,"enter2\n");
this->navit=navit;
command_add_table_attr(commands, sizeof(commands)/sizeof(struct command_table), navit, &attr);
navit_add_attr(navit, &attr);
@@ -137,7 +137,7 @@ void plugin_init(void)
{
struct attr callback;
struct win32_binding_private *this=g_new0(struct win32_binding_private,1);
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
callback.type=attr_callback;
callback.u.callback=callback_new_attr_1(callback_cast(win32_main_navit),attr_navit,this);
config_add_attr(config, &callback);
diff --git a/navit/bookmarks.c b/navit/bookmarks.c
index 9e411d792..aa180e947 100644
--- a/navit/bookmarks.c
+++ b/navit/bookmarks.c
@@ -207,7 +207,7 @@ bookmarks_load_hash(struct bookmarks *this_) {
finder=b_item->label;
while ((pos=strchr(finder,'/'))) {
*pos=0x00;
- dbg(lvl_warning,"Found path entry: %s\n",finder);
+ dbg(lvl_debug,"Found path entry: %s\n",finder);
if (!bookmarks_move_down(this_,finder)) {
struct bookmark_item_priv *path_item=g_new0(struct bookmark_item_priv,1);
path_item->type=type_bookmark_folder;
@@ -231,7 +231,7 @@ bookmarks_load_hash(struct bookmarks *this_) {
this_->bookmarks_list=g_list_append(this_->bookmarks_list,b_item);
this_->current->children=g_list_append(this_->current->children,b_item);
this_->current->children=g_list_first(this_->current->children);
- dbg(lvl_warning,"Added %s to %s and current list now %u long\n",b_item->label,this_->current->label,g_list_length(this_->current->children));
+ dbg(lvl_debug,"Added %s to %s and current list now %u long\n",b_item->label,this_->current->label,g_list_length(this_->current->children));
}
bookmarks_move_root(this_);
}
@@ -327,7 +327,7 @@ bookmarks_store_bookmarks_to_file(struct bookmarks *this_, int limit,int replac
g_free(fullname);
fullname=g_strdup(pathHelper);
g_free(pathHelper);
- dbg(lvl_warning,"full name: %s\n",fullname);
+ dbg(lvl_debug,"full name: %s\n",fullname);
}
}
diff --git a/navit/cache.c b/navit/cache.c
index 8e63b53cf..f1315cd9e 100644
--- a/navit/cache.c
+++ b/navit/cache.c
@@ -33,13 +33,13 @@ static void
cache_entry_dump(struct cache *cache, struct cache_entry *entry)
{
int i,size;
- dbg(lvl_error,"Usage: %d size %d\n",entry->usage, entry->size);
+ dbg(lvl_debug,"Usage: %d size %d\n",entry->usage, entry->size);
if (cache)
size=cache->id_size;
else
size=5;
for (i = 0 ; i < size ; i++) {
- dbg(lvl_error,"0x%x\n", entry->id[i]);
+ dbg(lvl_debug,"0x%x\n", entry->id[i]);
}
}
@@ -47,7 +47,7 @@ static void
cache_list_dump(char *str, struct cache *cache, struct cache_entry_list *list)
{
struct cache_entry *first=list->first;
- dbg(lvl_error,"dump %s %d\n",str, list->size);
+ dbg(lvl_debug,"dump %s %d\n",str, list->size);
while (first) {
cache_entry_dump(cache, first);
first=first->next;
@@ -152,7 +152,7 @@ cache_remove_from_list(struct cache_entry_list *list, struct cache_entry *entry)
static void
cache_remove(struct cache *cache, struct cache_entry *entry)
{
- dbg(lvl_warning,"remove 0x%x 0x%x 0x%x 0x%x 0x%x\n", entry->id[0], entry->id[1], entry->id[2], entry->id[3], entry->id[4]);
+ dbg(lvl_debug,"remove 0x%x 0x%x 0x%x 0x%x 0x%x\n", entry->id[0], entry->id[1], entry->id[2], entry->id[3], entry->id[4]);
g_hash_table_remove(cache->hash, (gpointer)(entry->id));
g_slice_free1(entry->size, entry);
}
@@ -185,7 +185,7 @@ cache_remove_lru(struct cache *cache, struct cache_entry_list *list)
last=list->last;
if (! last || last->usage || seen >= list->size)
return NULL;
- dbg(lvl_warning,"removing %d\n", last->id[0]);
+ dbg(lvl_debug,"removing %d\n", last->id[0]);
cache_remove_lru_helper(list);
if (cache) {
cache_remove(cache, last);
@@ -211,7 +211,7 @@ void
cache_entry_destroy(struct cache *cache, void *data)
{
struct cache_entry *entry=(struct cache_entry *)((char *)data-cache->entry_size);
- dbg(lvl_warning,"destroy 0x%x 0x%x 0x%x 0x%x 0x%x\n", entry->id[0], entry->id[1], entry->id[2], entry->id[3], entry->id[4]);
+ dbg(lvl_debug,"destroy 0x%x 0x%x 0x%x 0x%x 0x%x\n", entry->id[0], entry->id[1], entry->id[2], entry->id[3], entry->id[4]);
entry->usage--;
}
@@ -219,8 +219,8 @@ static struct cache_entry *
cache_trim(struct cache *cache, struct cache_entry *entry)
{
struct cache_entry *new_entry;
- dbg(lvl_warning,"trim 0x%x 0x%x 0x%x 0x%x 0x%x\n", entry->id[0], entry->id[1], entry->id[2], entry->id[3], entry->id[4]);
- dbg(lvl_warning,"Trim %x from %d -> %d\n", entry->id[0], entry->size, cache->size);
+ dbg(lvl_debug,"trim 0x%x 0x%x 0x%x 0x%x 0x%x\n", entry->id[0], entry->id[1], entry->id[2], entry->id[3], entry->id[4]);
+ dbg(lvl_debug,"Trim %x from %d -> %d\n", entry->id[0], entry->size, cache->size);
if ( cache->entry_size < entry->size )
{
g_hash_table_remove(cache->hash, (gpointer)(entry->id));
@@ -256,11 +256,11 @@ static int
cache_replace(struct cache *cache)
{
if (cache->t1.size >= MAX(1,cache->t1_target)) {
- dbg(lvl_warning,"replace 12\n");
+ dbg(lvl_debug,"replace 12\n");
if (!cache_move(cache, &cache->t1, &cache->b1))
cache_move(cache, &cache->t2, &cache->b2);
} else {
- dbg(lvl_warning,"replace t2\n");
+ dbg(lvl_debug,"replace t2\n");
if (!cache_move(cache, &cache->t2, &cache->b2))
cache_move(cache, &cache->t1, &cache->b1);
}
@@ -298,17 +298,17 @@ void *
cache_lookup(struct cache *cache, void *id) {
struct cache_entry *entry;
- dbg(lvl_warning,"get %d\n", ((int *)id)[0]);
+ dbg(lvl_debug,"get %d\n", ((int *)id)[0]);
entry=g_hash_table_lookup(cache->hash, id);
if (entry == NULL) {
cache->insert=&cache->t1;
#ifdef DEBUG_CACHE
fprintf(stderr,"-");
#endif
- dbg(lvl_warning,"not in cache\n");
+ dbg(lvl_debug,"not in cache\n");
return NULL;
}
- dbg(lvl_warning,"found 0x%x 0x%x 0x%x 0x%x 0x%x\n", entry->id[0], entry->id[1], entry->id[2], entry->id[3], entry->id[4]);
+ dbg(lvl_debug,"found 0x%x 0x%x 0x%x 0x%x 0x%x\n", entry->id[0], entry->id[1], entry->id[2], entry->id[3], entry->id[4]);
if (entry->where == &cache->t1 || entry->where == &cache->t2) {
cache->hits+=entry->size;
#ifdef DEBUG_CACHE
@@ -317,7 +317,7 @@ cache_lookup(struct cache *cache, void *id) {
else
fprintf(stderr,"H");
#endif
- dbg(lvl_warning,"in cache %s\n", entry->where == &cache->t1 ? "T1" : "T2");
+ dbg(lvl_debug,"in cache %s\n", entry->where == &cache->t1 ? "T1" : "T2");
cache_remove_from_list(entry->where, entry);
cache_insert_mru(NULL, &cache->t2, entry);
entry->usage++;
@@ -327,14 +327,14 @@ cache_lookup(struct cache *cache, void *id) {
#ifdef DEBUG_CACHE
fprintf(stderr,"m");
#endif
- dbg(lvl_warning,"in phantom cache B1\n");
+ dbg(lvl_debug,"in phantom cache B1\n");
cache->t1_target=MIN(cache->t1_target+MAX(cache->b2.size/cache->b1.size, 1),cache->size);
cache_remove_from_list(&cache->b1, entry);
} else if (entry->where == &cache->b2) {
#ifdef DEBUG_CACHE
fprintf(stderr,"M");
#endif
- dbg(lvl_warning,"in phantom cache B2\n");
+ dbg(lvl_debug,"in phantom cache B2\n");
cache->t1_target=MAX(cache->t1_target-MAX(cache->b1.size/cache->b2.size, 1),0);
cache_remove_from_list(&cache->b2, entry);
} else {
@@ -351,7 +351,7 @@ void
cache_insert(struct cache *cache, void *data)
{
struct cache_entry *entry=(struct cache_entry *)((char *)data-cache->entry_size);
- dbg(lvl_warning,"insert 0x%x 0x%x 0x%x 0x%x 0x%x\n", entry->id[0], entry->id[1], entry->id[2], entry->id[3], entry->id[4]);
+ dbg(lvl_debug,"insert 0x%x 0x%x 0x%x 0x%x 0x%x\n", entry->id[0], entry->id[1], entry->id[2], entry->id[3], entry->id[4]);
if (cache->insert == &cache->t1) {
if (cache->t1.size + cache->b1.size >= cache->size) {
if (cache->t1.size < cache->size) {
@@ -382,8 +382,8 @@ cache_insert_new(struct cache *cache, void *id, int size)
static void
cache_stats(struct cache *cache)
{
- dbg(lvl_error,"hits %d misses %d hitratio %d size %d entry_size %d id_size %d T1 target %d\n", cache->hits, cache->misses, cache->hits*100/(cache->hits+cache->misses), cache->size, cache->entry_size, cache->id_size, cache->t1_target);
- dbg(lvl_error,"T1:%d B1:%d T2:%d B2:%d\n", cache->t1.size, cache->b1.size, cache->t2.size, cache->b2.size);
+ dbg(lvl_debug,"hits %d misses %d hitratio %d size %d entry_size %d id_size %d T1 target %d\n", cache->hits, cache->misses, cache->hits*100/(cache->hits+cache->misses), cache->size, cache->entry_size, cache->id_size, cache->t1_target);
+ dbg(lvl_debug,"T1:%d B1:%d T2:%d B2:%d\n", cache->t1.size, cache->b1.size, cache->t2.size, cache->b2.size);
cache->hits=0;
cache->misses=0;
}
@@ -396,6 +396,6 @@ cache_dump(struct cache *cache)
cache_list_dump("B1", cache, &cache->b1);
cache_list_dump("T2", cache, &cache->t2);
cache_list_dump("B2", cache, &cache->b2);
- dbg(lvl_error,"dump end\n");
+ dbg(lvl_debug,"dump end\n");
}
diff --git a/navit/command.c b/navit/command.c
index a5d9f08d9..abc64ee14 100644
--- a/navit/command.c
+++ b/navit/command.c
@@ -152,8 +152,8 @@ dump(struct result *res)
if (res->attrn)
strncpy(attribute, res->attrn, res->attrnlen);
attribute[res->attrnlen]='\0';
- dbg(lvl_error,"type:%s\n", attr_to_name(res->attr.type));
- dbg(lvl_error,"attribute '%s' from '%s'\n", attribute, object);
+ dbg(lvl_debug,"type:%s\n", attr_to_name(res->attr.type));
+ dbg(lvl_debug,"attribute '%s' from '%s'\n", attribute, object);
#endif
}
@@ -315,7 +315,7 @@ get_int_bool(struct context *ctx, int is_bool, struct result *res)
return res->attr.u.data != NULL;
if (is_bool && ATTR_IS_STRING(res->attr.type))
return res->attr.u.data != NULL;
- dbg(lvl_error,"bool %d %s\n",is_bool,attr_to_name(res->attr.type));
+ dbg(lvl_debug,"bool %d %s\n",is_bool,attr_to_name(res->attr.type));
ctx->error=wrong_type;
return 0;
}
@@ -657,7 +657,7 @@ command_call_function(struct context *ctx, struct result *res)
if (res->attrn)
strncpy(function, res->attrn, res->attrnlen);
function[res->attrnlen]='\0';
- dbg(lvl_warning,"function=%s\n", function);
+ dbg(lvl_debug,"function=%s\n", function);
if (ctx->expr[0] != ')') {
list=eval_list(ctx);
if (ctx->error) {
@@ -716,7 +716,7 @@ command_call_function(struct context *ctx, struct result *res)
if (command_object_get_attr(ctx, &res->attr, attr_callback_list, &cbl)) {
int valid =0;
struct attr **out=NULL;
- dbg(lvl_warning,"function call %s from %s\n",function, attr_to_name(res->attr.type));
+ dbg(lvl_debug,"function call %s from %s\n",function, attr_to_name(res->attr.type));
callback_list_call_attr_4(cbl.u.callback_list, attr_command, function, list, &out, &valid);
if (valid!=1){
dbg(lvl_error, "invalid command ignored: \"%s\"; see http://wiki.navit-project.org/index.php/"
@@ -801,7 +801,7 @@ eval_postfix(struct context *ctx, struct result *res)
return;
}
} else if (op[0] == '(') {
- dbg(lvl_warning,"function call\n");
+ dbg(lvl_debug,"function call\n");
resolve_object(ctx, res);
command_call_function(ctx, res);
}
@@ -989,7 +989,7 @@ eval_conditional(struct context *ctx, struct result *res)
memset(&tmp,0,sizeof(tmp));
if (!get_op(ctx,0,":",NULL)) {
- dbg(lvl_error,"ctxerr\n");
+ dbg(lvl_debug,"ctxerr\n");
ctx->error=missing_colon;
return;
}
@@ -1110,7 +1110,7 @@ command_evaluate_to_attr(struct attr *attr, char *expr, int *error, struct attr
return attr_none;
resolve_object(&ctx, &res);
*ret=res.attr;
- dbg(lvl_warning,"type %s\n",attr_to_name(command_attr_type(&res)));
+ dbg(lvl_debug,"type %s\n",attr_to_name(command_attr_type(&res)));
return command_attr_type(&res);
}
diff --git a/navit/config_.c b/navit/config_.c
index b33e227ce..9f4bd5860 100644
--- a/navit/config_.c
+++ b/navit/config_.c
@@ -60,7 +60,7 @@ config_destroy(struct config *this_)
static void
config_terminate(int sig)
{
- dbg(lvl_error,"terminating\n");
+ dbg(lvl_debug,"terminating\n");
config_destroy(config);
}
diff --git a/navit/coord.c b/navit/coord.c
index f53005201..2bc169d46 100644
--- a/navit/coord.c
+++ b/navit/coord.c
@@ -171,14 +171,14 @@ coord_parse(const char *coord_input, enum projection output_projection, struct c
struct coord c,offset;
enum projection str_pro=projection_none;
- dbg(lvl_warning,"enter('%s',%d,%p)\n", coord_input, output_projection, result);
+ dbg(lvl_debug,"enter('%s',%d,%p)\n", coord_input, output_projection, result);
s=strchr(str,' ');
co=strchr(str,':');
if (co && co < s) {
proj=malloc(co-str+1);
strncpy(proj, str, co-str);
proj[co-str]='\0';
- dbg(lvl_warning,"projection=%s\n", proj);
+ dbg(lvl_debug,"projection=%s\n", proj);
str=co+1;
s=strchr(str,' ');
if (!strcmp(proj, "geo"))
@@ -202,8 +202,8 @@ coord_parse(const char *coord_input, enum projection output_projection, struct c
args=sscanf(str, "%i %i%n",&c.x, &c.y, &ret);
if (args < 2)
goto out;
- dbg(lvl_warning,"str='%s' x=0x%x y=0x%x c=%d\n", str, c.x, c.y, ret);
- dbg(lvl_warning,"rest='%s'\n", str+ret);
+ dbg(lvl_debug,"str='%s' x=0x%x y=0x%x c=%d\n", str, c.x, c.y, ret);
+ dbg(lvl_debug,"rest='%s'\n", str+ret);
if (str_pro == projection_none)
str_pro=projection_mg;
@@ -215,13 +215,13 @@ coord_parse(const char *coord_input, enum projection output_projection, struct c
} else if (*s == 'N' || *s == 'n' || *s == 'S' || *s == 's') {
double lng, lat;
char ns, ew;
- dbg(lvl_warning,"str='%s'\n", str);
+ dbg(lvl_debug,"str='%s'\n", str);
args=sscanf(str, "%lf %c %lf %c%n", &lat, &ns, &lng, &ew, &ret);
- dbg(lvl_warning,"args=%d\n", args);
- dbg(lvl_warning,"lat=%f %c lon=%f %c\n", lat, ns, lng, ew);
+ dbg(lvl_debug,"args=%d\n", args);
+ dbg(lvl_debug,"lat=%f %c lon=%f %c\n", lat, ns, lng, ew);
if (args < 4)
goto out;
- dbg(lvl_warning,"projection=%d str_pro=%d projection_none=%d\n", output_projection, str_pro, projection_none);
+ dbg(lvl_debug,"projection=%d str_pro=%d projection_none=%d\n", output_projection, str_pro, projection_none);
if (str_pro == projection_none) {
g.lat=floor(lat/100);
lat-=g.lat*100;
@@ -233,9 +233,9 @@ coord_parse(const char *coord_input, enum projection output_projection, struct c
g.lat=-g.lat;
if (ew == 'w' || ew == 'W')
g.lng=-g.lng;
- dbg(lvl_warning,"transform_from_geo(%f,%f)",g.lat,g.lng);
+ dbg(lvl_debug,"transform_from_geo(%f,%f)",g.lat,g.lng);
transform_from_geo(output_projection, &g, result);
- dbg(lvl_warning,"result 0x%x,0x%x\n", result->x,result->y);
+ dbg(lvl_debug,"result 0x%x,0x%x\n", result->x,result->y);
}
dbg(lvl_debug,"str='%s' x=%f ns=%c y=%f ew=%c c=%d\n", str, lng, ns, lat, ew, ret);
dbg(lvl_debug,"rest='%s'\n", str+ret);
@@ -256,8 +256,8 @@ coord_parse(const char *coord_input, enum projection output_projection, struct c
args=sscanf(str, "%lf %lf%n", &lng, &lat, &ret);
if (args < 2)
goto out;
- dbg(lvl_warning,"str='%s' x=%f y=%f c=%d\n", str, lng, lat, ret);
- dbg(lvl_warning,"rest='%s'\n", str+ret);
+ dbg(lvl_debug,"str='%s' x=%f y=%f c=%d\n", str, lng, lat, ret);
+ dbg(lvl_debug,"rest='%s'\n", str+ret);
g.lng=lng;
g.lat=lat;
transform_from_geo(output_projection, &g, result);
diff --git a/navit/debug.c b/navit/debug.c
index 23b00b999..2aa3bcb95 100644
--- a/navit/debug.c
+++ b/navit/debug.c
@@ -358,7 +358,7 @@ debug_dump_mallocs(void)
{
struct malloc_head *head=malloc_heads;
int i;
- dbg(lvl_error,"mallocs %d\n",mallocs);
+ dbg(lvl_debug,"mallocs %d\n",mallocs);
while (head) {
fprintf(stderr,"unfreed malloc from %s of size %d\n",head->where,head->size);
for (i = 0 ; i < 8 ; i++)
@@ -381,7 +381,7 @@ debug_malloc(const char *where, int line, const char *func, int size)
debug_malloc_size+=size;
if (debug_malloc_size/(1024*1024) != debug_malloc_size_m) {
debug_malloc_size_m=debug_malloc_size/(1024*1024);
- dbg(lvl_error,"malloced %d kb\n",debug_malloc_size/1024);
+ dbg(lvl_debug,"malloced %d kb\n",debug_malloc_size/1024);
}
head=malloc(size+sizeof(*head)+sizeof(*tail));
head->magic=0xdeadbeef;
diff --git a/navit/file.c b/navit/file.c
index 0545106a2..6764eafe1 100644
--- a/navit/file.c
+++ b/navit/file.c
@@ -112,7 +112,7 @@ file_http_request(struct file *file, char *method, char *host, char *path, char
{
char *request=g_strdup_printf("%s %s HTTP/1.0\r\nUser-Agent: navit %s\r\nHost: %s\r\n%s%s%s\r\n",method,path,version,host,persistent?"Connection: Keep-Alive\r\n":"",header?header:"",header?"\r\n":"");
write(file->fd, request, strlen(request));
- dbg(lvl_warning,"%s\n",request);
+ dbg(lvl_debug,"%s\n",request);
file->requests++;
}
@@ -149,7 +149,7 @@ file_request_do(struct file *file, struct attr **options, int connect)
host[path-name-7]='\0';
if (port)
*port++='\0';
- dbg(lvl_warning,"host=%s path=%s\n",host,path);
+ dbg(lvl_debug,"host=%s path=%s\n",host,path);
if (connect)
file->fd=file_socket_connect(host,port?port:"80");
file_http_request(file,method,host,path,header,persistent);
@@ -223,11 +223,11 @@ file_create(char *name, struct attr **options)
g_free(file);
return NULL;
}
- dbg(lvl_warning,"fd=%d\n", file->fd);
+ dbg(lvl_debug,"fd=%d\n", file->fd);
file->size=lseek(file->fd, 0, SEEK_END);
if (file->size < 0)
file->size=0;
- dbg(lvl_warning,"size="LONGLONG_FMT"\n", file->size);
+ dbg(lvl_debug,"size="LONGLONG_FMT"\n", file->size);
file->name_id = (long)atom(name);
}
#ifdef CACHE_SIZE
@@ -282,7 +282,7 @@ int file_mkdir(char *name, int pflag)
char *buffer=g_alloca(sizeof(char)*(strlen(name)+1));
int ret;
char *next;
- dbg(lvl_warning,"enter %s %d\n",name,pflag);
+ dbg(lvl_debug,"enter %s %d\n",name,pflag);
if (!pflag) {
if (file_is_dir(name))
return 0;
@@ -380,7 +380,7 @@ file_process_headers(struct file *file, unsigned char *headers)
if (*sep == ' ')
sep++;
strtolower(tok, tok);
- dbg(lvl_warning,"header '%s'='%s'\n",tok,sep);
+ dbg(lvl_debug,"header '%s'='%s'\n",tok,sep);
g_hash_table_insert(file->headers, tok, sep);
headers=NULL;
}
@@ -424,10 +424,10 @@ file_data_read_special(struct file *file, int size, int *size_ret)
eof=1;
}
if (file->requests) {
- dbg(lvl_warning,"checking header\n");
+ dbg(lvl_debug,"checking header\n");
if ((hdr=file_http_header_end(file->buffer, file->buffer_len))) {
hdr[-1]='\0';
- dbg(lvl_warning,"found %s\n",file->buffer);
+ dbg(lvl_debug,"found %s\n",file->buffer);
file_process_headers(file, file->buffer);
file_shift_buffer(file, hdr-file->buffer);
file->requests--;
@@ -461,7 +461,7 @@ file_data_flush(struct file *file, long long offset, int size)
if (file->cache) {
struct file_cache_id id={offset,size,file->name_id,0};
cache_flush(file_cache,&id);
- dbg(lvl_warning,"Flushing "LONGLONG_FMT" %d bytes\n",offset,size);
+ dbg(lvl_debug,"Flushing "LONGLONG_FMT" %d bytes\n",offset,size);
}
}
@@ -832,7 +832,7 @@ file_wordexp_new(const char *pattern)
ret->pattern=g_strdup(pattern);
ret->err=wordexp(pattern, &ret->we, 0);
if (ret->err)
- dbg(lvl_error,"wordexp('%s') returned %d\n", pattern, ret->err);
+ dbg(lvl_debug,"wordexp('%s') returned %d\n", pattern, ret->err);
return ret;
}
@@ -886,7 +886,7 @@ file_version(struct file *file, int mode)
file->mtime=st.st_mtime;
file->ctime=st.st_ctime;
file->version++;
- dbg(lvl_warning,"%s now version %d\n", file->name, file->version);
+ dbg(lvl_debug,"%s now version %d\n", file->name, file->version);
}
}
return file->version;
diff --git a/navit/font/freetype/font_freetype.c b/navit/font/freetype/font_freetype.c
index bf8682e66..131bd87e8 100644
--- a/navit/font/freetype/font_freetype.c
+++ b/navit/font/freetype/font_freetype.c
@@ -351,14 +351,14 @@ static FT_Error face_requester( FTC_FaceID face_id, FT_Library library, FT_Point
if (! face_id)
return FT_Err_Invalid_Handle;
fontfile=g_strdup((char *)face_id);
- dbg(lvl_warning,"fontfile=%s\n", fontfile);
+ dbg(lvl_debug,"fontfile=%s\n", fontfile);
fontindex=strrchr(fontfile,'/');
if (! fontindex) {
g_free(fontfile);
return FT_Err_Invalid_Handle;
}
*fontindex++='\0';
- dbg(lvl_warning,"new face %s %d\n", fontfile, atoi(fontindex));
+ dbg(lvl_debug,"new face %s %d\n", fontfile, atoi(fontindex));
ret = FT_New_Face( library, fontfile, atoi(fontindex), aface );
if(ret) {
dbg(lvl_error,"Error while creating freetype face: %d\n", ret);
diff --git a/navit/graphics.c b/navit/graphics.c
index 042d666bd..c8d967e64 100644
--- a/navit/graphics.c
+++ b/navit/graphics.c
@@ -204,7 +204,7 @@ int
graphics_set_attr(struct graphics *gra, struct attr *attr)
{
int ret=1;
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
if (gra->meth.set_attr)
ret=gra->meth.set_attr(gra->priv, attr);
if (!ret)
@@ -662,7 +662,7 @@ image_new_helper(struct graphics *gra, struct graphics_image *this_, char *path,
this_->priv=gra->meth.image_new(gra->priv, &this_->meth, new_name, &this_->width, &this_->height, &this_->hot, rotate);
}
if (this_->priv) {
- dbg(lvl_warning,"Using image '%s' for '%s' at %dx%d\n", new_name, path, width, height);
+ dbg(lvl_debug,"Using image '%s' for '%s' at %dx%d\n", new_name, path, width, height);
g_free(new_name);
break;
}
@@ -1139,7 +1139,7 @@ static void label_line(struct graphics *gra, struct graphics_gc *fg, struct grap
p_t.x=x;
p_t.y=y;
#if 0
- dbg(lvl_error,"display_text: '%s', %d, %d, %d, %d %d\n", label, x, y, dx*0x10000/l, dy*0x10000/l, l);
+ dbg(lvl_debug,"display_text: '%s', %d, %d, %d, %d %d\n", label, x, y, dx*0x10000/l, dy*0x10000/l, l);
#endif
if (x < gra->r.rl.x && x + tl > gra->r.lu.x && y + tl > gra->r.lu.y && y - tl < gra->r.rl.y)
gra->meth.draw_text(gra->priv, fg->priv, bg?bg->priv:NULL, font->priv, label, &p_t, dx*0x10000/l, dy*0x10000/l);
@@ -1186,11 +1186,11 @@ intersection(struct point * a1, int adx, int ady, struct point * b1, int bdx, in
struct point * res)
{
int n, a, b;
- dbg(lvl_warning,"%d,%d - %d,%d x %d,%d-%d,%d\n",a1->x,a1->y,a1->x+adx,a1->y+ady,b1->x,b1->y,b1->x+bdx,b1->y+bdy);
+ dbg(lvl_debug,"%d,%d - %d,%d x %d,%d-%d,%d\n",a1->x,a1->y,a1->x+adx,a1->y+ady,b1->x,b1->y,b1->x+bdx,b1->y+bdy);
n = bdy * adx - bdx * ady;
a = bdx * (a1->y - b1->y) - bdy * (a1->x - b1->x);
b = adx * (a1->y - b1->y) - ady * (a1->x - b1->x);
- dbg(lvl_warning,"a %d b %d n %d\n",a,b,n);
+ dbg(lvl_debug,"a %d b %d n %d\n",a,b,n);
if (n < 0) {
n = -n;
a = -a;
@@ -1206,7 +1206,7 @@ intersection(struct point * a1, int adx, int ady, struct point * b1, int bdx, in
return 0;
res->x = a1->x + a * adx / n;
res->y = a1->y + a * ady / n;
- dbg(lvl_warning,"%d,%d\n",res->x,res->y);
+ dbg(lvl_debug,"%d,%d\n",res->x,res->y);
return 1;
}
@@ -1285,7 +1285,7 @@ draw_circle(struct point *pnt, int diameter, int scale, int start, int len, stru
struct circle *c;
#if 0
- dbg(lvl_error,"diameter=%d start=%d len=%d pos=%d dir=%d\n", diameter, start, len, *pos, dir);
+ dbg(lvl_debug,"diameter=%d start=%d len=%d pos=%d dir=%d\n", diameter, start, len, *pos, dir);
#endif
int count=64;
int end=start+len;
@@ -1466,7 +1466,7 @@ draw_shape(struct draw_polyline_context *ctx, struct point *pnt, int wi)
struct draw_polyline_shape *prev=&ctx->prev_shape;
#if 0
- dbg(lvl_error,"enter %d,%d - %d,%d %d\n",pnt[0].x,pnt[0].y,pnt[1].x,pnt[1].y,wi);
+ dbg(lvl_debug,"enter %d,%d - %d,%d %d\n",pnt[0].x,pnt[0].y,pnt[1].x,pnt[1].y,wi);
#endif
*prev=*shape;
@@ -1495,7 +1495,7 @@ draw_shape(struct draw_polyline_context *ctx, struct point *pnt, int wi)
l = int_sqrt((dxs+dys)*lscales);
#endif
shape->fow=fowler(-shape->dy, shape->dx);
- dbg(lvl_warning,"fow=%d\n",shape->fow);
+ dbg(lvl_debug,"fow=%d\n",shape->fow);
if (! l)
l=1;
if (wi*lscale > 10000)
@@ -1544,7 +1544,7 @@ draw_middle(struct draw_polyline_context *ctx, struct point *p)
draw_point(&ctx->shape, p, &ctx->res[ctx->ppos++], 1);
return 1;
}
- dbg(lvl_warning,"delta %d\n",delta);
+ dbg(lvl_debug,"delta %d\n",delta);
if (delta > 0) {
struct point pos,poso;
draw_point(&ctx->shape, p, &pos, 1);
@@ -1604,9 +1604,9 @@ graphics_draw_polyline_as_polygon(struct graphics_priv *gra_priv, struct graphic
if (count < 2)
return;
#if 0
- dbg(lvl_error,"count=%d\n",count);
+ dbg(lvl_debug,"count=%d\n",count);
for (i = 0 ; i < count ; i++)
- dbg(lvl_error,"%d,%d width %d\n",pnt[i].x,pnt[i].y,width[i]);
+ dbg(lvl_debug,"%d,%d width %d\n",pnt[i].x,pnt[i].y,width[i]);
#endif
ctx.shape.l=0;
ctx.res=g_alloca(sizeof(struct point)*maxpoints);
@@ -1939,7 +1939,7 @@ graphics_icon_path(const char *icon)
static char *navit_sharedir;
char *ret=NULL;
struct file_wordexp *wordexp=NULL;
- dbg(lvl_warning,"enter %s\n",icon);
+ dbg(lvl_debug,"enter %s\n",icon);
if (strchr(icon, '$')) {
wordexp=file_wordexp_new(icon);
if (file_wordexp_get_count(wordexp))
@@ -1952,7 +1952,7 @@ graphics_icon_path(const char *icon)
// get resources for the correct screen density
//
// this part not needed, android unpacks only the correct version into res/drawable dir!
- // dbg(lvl_warning,"android icon_path %s\n",icon);
+ // dbg(lvl_debug,"android icon_path %s\n",icon);
// static char *android_density;
// android_density = getenv("ANDROID_DENSITY");
// ret=g_strdup_printf("res/drawable-%s/%s",android_density ,icon);
@@ -2116,7 +2116,7 @@ displayitem_draw(struct displayitem *di, void *dummy, struct display_context *dc
}
break;
case element_image:
- dbg(lvl_warning,"image: '%s'\n", di->label);
+ dbg(lvl_debug,"image: '%s'\n", di->label);
if (gra->meth.draw_image_warp) {
img=graphics_image_new_scaled_rotated(gra, di->label, -1, -1, 0);
if (img)
@@ -2295,7 +2295,7 @@ displaylist_update_hash(struct displaylist *displaylist)
displaylist->max_offset=0;
clear_hash(displaylist);
displaylist_update_layers(displaylist, displaylist->layout->layers, displaylist->order);
- dbg(lvl_warning,"max offset %d\n",displaylist->max_offset);
+ dbg(lvl_debug,"max offset %d\n",displaylist->max_offset);
}
@@ -2400,7 +2400,7 @@ do_draw(struct displaylist *displaylist, int cancel, int flags)
if (! count)
continue;
#if 0
- dbg(lvl_error,"%s 0x%x 0x%x\n",item_to_name(item->type), item->id_hi, item->id_lo);
+ dbg(lvl_debug,"%s 0x%x 0x%x\n",item_to_name(item->type), item->id_hi, item->id_lo);
#endif
if (displaylist->dc.pro != pro)
transform_from_to_count(ca, displaylist->dc.pro, ca, pro, count);
@@ -2510,14 +2510,14 @@ static void graphics_load_mapset(struct graphics *gra, struct displaylist *displ
{
int order=transform_get_order(trans);
- dbg(lvl_warning,"enter");
+ dbg(lvl_debug,"enter");
if (displaylist->busy) {
if (async == 1)
return;
do_draw(displaylist, 1, flags);
}
xdisplay_free(displaylist);
- dbg(lvl_warning,"order=%d\n", order);
+ dbg(lvl_debug,"order=%d\n", order);
displaylist->dc.gra=gra;
displaylist->ms=mapset;
diff --git a/navit/graphics/android/graphics_android.c b/navit/graphics/android/graphics_android.c
index 0f1040356..aeceecf79 100644
--- a/navit/graphics/android/graphics_android.c
+++ b/navit/graphics/android/graphics_android.c
@@ -222,18 +222,18 @@ image_new(struct graphics_priv *gra, struct graphics_image_methods *meth, char *
jclass localBitmap = NULL;
int id;
- dbg(lvl_warning,"enter %s\n",path);
+ dbg(lvl_debug,"enter %s\n",path);
if (!strncmp(path,"res/drawable/",13)) {
jstring a=(*jnienv)->NewStringUTF(jnienv, "drawable");
char *path_noext=g_strdup(path+13);
char *pos=strrchr(path_noext, '.');
if (pos)
*pos='\0';
- dbg(lvl_warning,"path_noext=%s\n",path_noext);
+ dbg(lvl_debug,"path_noext=%s\n",path_noext);
string = (*jnienv)->NewStringUTF(jnienv, path_noext);
g_free(path_noext);
id=(*jnienv)->CallIntMethod(jnienv, gra->Resources, gra->Resources_getIdentifier, string, a, gra->packageName);
- dbg(lvl_warning,"id=%d\n",id);
+ dbg(lvl_debug,"id=%d\n",id);
if (id)
localBitmap=(*jnienv)->CallStaticObjectMethod(jnienv, gra->BitmapFactoryClass, gra->BitmapFactory_decodeResource, gra->Resources, id);
(*jnienv)->DeleteLocalRef(jnienv, a);
@@ -241,13 +241,13 @@ image_new(struct graphics_priv *gra, struct graphics_image_methods *meth, char *
string = (*jnienv)->NewStringUTF(jnienv, path);
localBitmap=(*jnienv)->CallStaticObjectMethod(jnienv, gra->BitmapFactoryClass, gra->BitmapFactory_decodeFile, string);
}
- dbg(lvl_warning,"result=%p\n",localBitmap);
+ dbg(lvl_debug,"result=%p\n",localBitmap);
if (localBitmap) {
ret->Bitmap = (*jnienv)->NewGlobalRef(jnienv, localBitmap);
(*jnienv)->DeleteLocalRef(jnienv, localBitmap);
ret->width=(*jnienv)->CallIntMethod(jnienv, ret->Bitmap, gra->Bitmap_getWidth);
ret->height=(*jnienv)->CallIntMethod(jnienv, ret->Bitmap, gra->Bitmap_getHeight);
- dbg(lvl_warning,"w=%d h=%d for %s\n",ret->width,ret->height,path);
+ dbg(lvl_debug,"w=%d h=%d for %s\n",ret->width,ret->height,path);
ret->hot.x=ret->width/2;
ret->hot.y=ret->height/2;
} else {
@@ -346,7 +346,7 @@ static void
draw_text(struct graphics_priv *gra, struct graphics_gc_priv *fg, struct graphics_gc_priv *bg, struct graphics_font_priv *font, char *text, struct point *p, int dx, int dy)
{
int bgcolor=0;
- dbg(lvl_warning,"enter %s\n", text);
+ dbg(lvl_debug,"enter %s\n", text);
initPaint(gra, fg);
if(bg)
bgcolor=(bg->a<<24)| (bg->r<<16) | (bg->g<<8) | bg->b;
@@ -358,7 +358,7 @@ draw_text(struct graphics_priv *gra, struct graphics_gc_priv *fg, struct graphic
static void
draw_image(struct graphics_priv *gra, struct graphics_gc_priv *fg, struct point *p, struct graphics_image_priv *img)
{
- dbg(lvl_warning,"enter %p\n",img);
+ dbg(lvl_debug,"enter %p\n",img);
initPaint(gra, fg);
(*jnienv)->CallVoidMethod(jnienv, gra->NavitGraphics, gra->NavitGraphics_draw_image, fg->gra->Paint, p->x, p->y, img->Bitmap);
@@ -467,7 +467,7 @@ static struct graphics_methods graphics_methods = {
static void
resize_callback(struct graphics_priv *gra, int w, int h)
{
- dbg(lvl_error,"w=%d h=%d ok\n",w,h);
+ dbg(lvl_debug,"w=%d h=%d ok\n",w,h);
callback_list_call_attr_2(gra->cbl, attr_resize, (void *)w, (void *)h);
}
@@ -483,7 +483,7 @@ motion_callback(struct graphics_priv *gra, int x, int y)
static void
keypress_callback(struct graphics_priv *gra, char *s)
{
- dbg(lvl_error,"enter %s\n",s);
+ dbg(lvl_debug,"enter %s\n",s);
callback_list_call_attr_1(gra->cbl, attr_keypress, s);
}
@@ -504,20 +504,20 @@ set_activity(jobject graphics)
jmethodID cid;
ActivityClass = (*jnienv)->GetObjectClass(jnienv, android_activity);
- dbg(lvl_error,"at 5\n");
+ dbg(lvl_debug,"at 5\n");
if (ActivityClass == NULL) {
- dbg(lvl_error,"no activity class found\n");
+ dbg(lvl_debug,"no activity class found\n");
return 0;
}
- dbg(lvl_error,"at 6\n");
+ dbg(lvl_debug,"at 6\n");
cid = (*jnienv)->GetMethodID(jnienv, ActivityClass, "setContentView", "(Landroid/view/View;)V");
if (cid == NULL) {
dbg(lvl_error,"no setContentView method found\n");
return 0;
}
- dbg(lvl_error,"at 7\n");
+ dbg(lvl_debug,"at 7\n");
(*jnienv)->CallVoidMethod(jnienv, android_activity, cid, graphics);
- dbg(lvl_error,"at 8\n");
+ dbg(lvl_debug,"at 8\n");
return 1;
}
@@ -527,7 +527,7 @@ graphics_android_init(struct graphics_priv *ret, struct graphics_priv *parent, s
struct callback *cb;
jmethodID cid, Context_getPackageName;
- dbg(lvl_error,"at 2 jnienv=%p\n",jnienv);
+ dbg(lvl_debug,"at 2 jnienv=%p\n",jnienv);
if (!find_class_global("android/graphics/Paint", &ret->PaintClass))
return 0;
if (!find_method(ret->PaintClass, "<init>", "(I)V", &ret->Paint_init))
@@ -572,15 +572,15 @@ graphics_android_init(struct graphics_priv *ret, struct graphics_priv *parent, s
if (!find_class_global("org/navitproject/navit/NavitGraphics", &ret->NavitGraphicsClass))
return 0;
- dbg(lvl_error,"at 3\n");
+ dbg(lvl_debug,"at 3\n");
cid = (*jnienv)->GetMethodID(jnienv, ret->NavitGraphicsClass, "<init>", "(Landroid/app/Activity;Lorg/navitproject/navit/NavitGraphics;IIIIIII)V");
if (cid == NULL) {
dbg(lvl_error,"no method found\n");
return 0; /* exception thrown */
}
- dbg(lvl_error,"at 4 android_activity=%p\n",android_activity);
+ dbg(lvl_debug,"at 4 android_activity=%p\n",android_activity);
ret->NavitGraphics=(*jnienv)->NewObject(jnienv, ret->NavitGraphicsClass, cid, android_activity, parent ? parent->NavitGraphics : NULL, pnt ? pnt->x:0 , pnt ? pnt->y:0, w, h, alpha, wraparound, use_camera);
- dbg(lvl_error,"result=%p\n",ret->NavitGraphics);
+ dbg(lvl_debug,"result=%p\n",ret->NavitGraphics);
if (ret->NavitGraphics)
ret->NavitGraphics = (*jnienv)->NewGlobalRef(jnienv, ret->NavitGraphics);
@@ -589,7 +589,7 @@ graphics_android_init(struct graphics_priv *ret, struct graphics_priv *parent, s
/* 0x101 = text kerning (default), antialiasing */
ret->Paint=(*jnienv)->NewObject(jnienv, ret->PaintClass, ret->Paint_init, 0x101);
- dbg(lvl_error,"result=%p\n",ret->Paint);
+ dbg(lvl_debug,"result=%p\n",ret->Paint);
if (ret->Paint)
ret->Paint = (*jnienv)->NewGlobalRef(jnienv, ret->Paint);
@@ -666,7 +666,7 @@ graphics_android_fullscreen(struct window *win, int on)
static void
graphics_android_disable_suspend(struct window *win)
{
- dbg(lvl_warning,"enter\n");
+ dbg(lvl_debug,"enter\n");
(*jnienv)->CallVoidMethod(jnienv, android_activity, Navit_disableSuspend);
}
@@ -691,7 +691,7 @@ graphics_android_new(struct navit *nav, struct graphics_methods *meth, struct at
}
image_cache_hash = g_hash_table_new(g_str_hash, g_str_equal);
if (graphics_android_init(ret, NULL, NULL, 0, 0, 0, 0, use_camera)) {
- dbg(lvl_error,"returning %p\n",ret);
+ dbg(lvl_debug,"returning %p\n",ret);
return ret;
} else {
g_free(ret);
@@ -705,7 +705,7 @@ overlay_new(struct graphics_priv *gr, struct graphics_methods *meth, struct poin
struct graphics_priv *ret=g_new0(struct graphics_priv, 1);
*meth=graphics_methods;
if (graphics_android_init(ret, gr, p, w, h, alpha, wraparound, 0)) {
- dbg(lvl_error,"returning %p\n",ret);
+ dbg(lvl_debug,"returning %p\n",ret);
return ret;
} else {
g_free(ret);
@@ -717,12 +717,12 @@ overlay_new(struct graphics_priv *gr, struct graphics_methods *meth, struct poin
static void
event_android_main_loop_run(void)
{
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
}
static void event_android_main_loop_quit(void)
{
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
(*jnienv)->CallVoidMethod(jnienv, android_activity, Navit_exit);
}
@@ -744,7 +744,7 @@ static void do_poll(JNIEnv *env, int fd, int cond)
{
struct pollfd pfd;
pfd.fd=fd;
- dbg(lvl_warning,"%p poll called for %d %d\n", fd, cond);
+ dbg(lvl_debug,"%p poll called for %d %d\n", fd, cond);
switch ((enum event_watch_cond)cond) {
case event_watch_cond_read:
pfd.events=POLLIN;
@@ -767,7 +767,7 @@ event_android_add_watch(int h, enum event_watch_cond cond, struct callback *cb)
{
jobject ret;
ret=(*jnienv)->NewObject(jnienv, NavitWatchClass, NavitWatch_init, (int)do_poll, h, (int) cond, (int)cb);
- dbg(lvl_error,"result for %d,%d,%p=%p\n",h,cond,cb,ret);
+ dbg(lvl_debug,"result for %d,%d,%p=%p\n",h,cond,cb,ret);
if (ret)
ret = (*jnienv)->NewGlobalRef(jnienv, ret);
return (struct event_watch *)ret;
@@ -776,7 +776,7 @@ event_android_add_watch(int h, enum event_watch_cond cond, struct callback *cb)
static void
event_android_remove_watch(struct event_watch *ev)
{
- dbg(lvl_error,"enter %p\n",ev);
+ dbg(lvl_debug,"enter %p\n",ev);
if (ev) {
jobject obj=(jobject )ev;
(*jnienv)->CallVoidMethod(jnienv, obj, NavitWatch_remove);
@@ -828,9 +828,9 @@ event_android_add_idle(int priority, struct callback *cb)
{
#if 0
jobject ret;
- dbg(lvl_warning,"enter\n");
+ dbg(lvl_debug,"enter\n");
ret=(*jnienv)->NewObject(jnienv, NavitIdleClass, NavitIdle_init, (int)cb);
- dbg(lvl_warning,"result for %p=%p\n",cb,ret);
+ dbg(lvl_debug,"result for %p=%p\n",cb,ret);
if (ret)
ret = (*jnienv)->NewGlobalRef(jnienv, ret);
return (struct event_idle *)ret;
@@ -842,7 +842,7 @@ static void
event_android_remove_idle(struct event_idle *ev)
{
#if 0
- dbg(lvl_warning,"enter %p\n",ev);
+ dbg(lvl_debug,"enter %p\n",ev);
if (ev) {
jobject obj=(jobject )ev;
(*jnienv)->CallVoidMethod(jnienv, obj, NavitIdle_remove);
@@ -855,7 +855,7 @@ event_android_remove_idle(struct event_idle *ev)
static void
event_android_call_callback(struct callback_list *cb)
{
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
}
static struct event_methods event_android_methods = {
@@ -873,7 +873,7 @@ static struct event_methods event_android_methods = {
static struct event_priv *
event_android_new(struct event_methods *meth)
{
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
if (!find_class_global("org/navitproject/navit/NavitTimeout", &NavitTimeoutClass))
return NULL;
NavitTimeout_init = (*jnienv)->GetMethodID(jnienv, NavitTimeoutClass, "<init>", "(IZI)V");
@@ -913,7 +913,7 @@ event_android_new(struct event_methods *meth)
Navit_fullscreen = (*jnienv)->GetMethodID(jnienv, NavitClass, "fullscreen", "(I)V");
if (Navit_fullscreen == NULL)
return NULL;
- dbg(lvl_error,"ok\n");
+ dbg(lvl_debug,"ok\n");
*meth=event_android_methods;
return NULL;
}
@@ -922,7 +922,7 @@ event_android_new(struct event_methods *meth)
void
plugin_init(void)
{
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
plugin_register_graphics_type("android", graphics_android_new);
plugin_register_event_type("android", event_android_new);
}
diff --git a/navit/graphics/gd/graphics_gd.c b/navit/graphics/gd/graphics_gd.c
index 621683ed8..0d39b4701 100644
--- a/navit/graphics/gd/graphics_gd.c
+++ b/navit/graphics/gd/graphics_gd.c
@@ -516,7 +516,7 @@ draw_mode(struct graphics_priv *gr, enum draw_mode_num mode)
if (gr->flags & 2) {
struct shmem_header *next=shm_next(gr);
gr->shm_header->flag=1;
- dbg(lvl_warning,"next flag is %d\n",next->flag);
+ dbg(lvl_debug,"next flag is %d\n",next->flag);
if (!next->flag) {
gr->shm_header=next;
image_setup(gr);
@@ -537,7 +537,7 @@ draw_mode(struct graphics_priv *gr, enum draw_mode_num mode)
dbg(lvl_error,"connect failed\n");
} else {
size_written=write(fd, data, size);
- dbg(lvl_error,"size %d vs %d\n",size, size_written);
+ dbg(lvl_debug,"size %d vs %d\n",size, size_written);
if (shutdown(fd, SHUT_RDWR) < 0)
dbg(lvl_error,"shutdown failed\n");
}
@@ -591,7 +591,7 @@ get_data(struct graphics_priv *this, char *type)
int b;
struct point p;
gdImagePtr im = this->im;
- dbg(lvl_warning,"type=%s\n",type);
+ dbg(lvl_debug,"type=%s\n",type);
if (!strcmp(type,"window"))
return &this->window;
if (!strcmp(type,"image_png")) {
@@ -613,11 +613,11 @@ get_data(struct graphics_priv *this, char *type)
return &this->image;
}
if (sscanf(type,"click_%d_%d_%d",&p.x,&p.y,&b) == 3) {
- dbg(lvl_warning,"click %d %d %d\n",p.x,p.y,b);
+ dbg(lvl_debug,"click %d %d %d\n",p.x,p.y,b);
callback_list_call_attr_3(this->cbl, attr_button, (void *)b, (void *)1, (void *)&p);
}
if (sscanf(type,"move_%d_%d",&p.x,&p.y) == 2) {
- dbg(lvl_warning,"move %d %d\n",p.x,p.y);
+ dbg(lvl_debug,"move %d %d\n",p.x,p.y);
callback_list_call_attr_1(this->cbl, attr_motion, (void *)&p);
}
return NULL;
@@ -634,13 +634,13 @@ image_free(struct graphics_priv *gr, struct graphics_image_priv *priv)
static void
overlay_disable(struct graphics_priv *gr, int disable)
{
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
}
static void
overlay_resize(struct graphics_priv *gr, struct point *p, int w, int h, int alpha, int wraparound)
{
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
}
struct shmem_header *
@@ -648,10 +648,10 @@ shm_next(struct graphics_priv *gr)
{
char *next=(char *)gr->shm_header+gr->shmoffset;
if (next+gr->shmoffset > (char *)gr->shm+gr->shmsize) {
- dbg(lvl_warning,"wraparound\n");
+ dbg(lvl_debug,"wraparound\n");
return gr->shm;
}
- dbg(lvl_warning,"next 0x%x (offset 0x%x)\n",next-(char *)gr->shm,gr->shmoffset);
+ dbg(lvl_debug,"next 0x%x (offset 0x%x)\n",next-(char *)gr->shm,gr->shmoffset);
return (struct shmem_header *)next;
}
@@ -672,17 +672,17 @@ image_setup(struct graphics_priv *gr)
static void
image_create(struct graphics_priv *gr)
{
- dbg(lvl_error,"shmkey %d\n",gr->shmkey);
+ dbg(lvl_debug,"shmkey %d\n",gr->shmkey);
#ifdef HAVE_SHMEM
if (gr->shmkey) {
int size=gr->h*gr->w*sizeof(int);
int shmid=shmget(gr->shmkey, size, 0666);
- dbg(lvl_error,"shmid for key 0x%x is 0x%x\n",gr->shmkey, shmid);
+ dbg(lvl_debug,"shmid for key 0x%x is 0x%x\n",gr->shmkey, shmid);
if (shmid < 0)
- dbg(lvl_error,"shmget\n");
+ dbg(lvl_debug,"shmget\n");
gr->shm=shmat(shmid, NULL, 0);
if (!gr->shm)
- dbg(lvl_error,"shmat\n");
+ dbg(lvl_debug,"shmat\n");
gr->shm_header=gr->shm;
gr->im=g_new0(gdImage,1);
gr->im->tpixels=g_new(int *,gr->h);
@@ -759,7 +759,7 @@ set_attr_do(struct graphics_priv *gr, struct attr *attr, int init)
g_list_free(gr->sockets);
gr->sockets=NULL;
c=s=g_strdup(attr->u.str);
- dbg(lvl_error,"s=%s\n",s);
+ dbg(lvl_debug,"s=%s\n",s);
while (c) {
n=strchr(c,',');
if (n)
@@ -776,7 +776,7 @@ set_attr_do(struct graphics_priv *gr, struct attr *attr, int init)
dbg(lvl_error,"error in %s\n",c);
g_free(sin);
}
- dbg(lvl_error,"host=%s port=%s\n",c,p);
+ dbg(lvl_debug,"host=%s port=%s\n",c,p);
} else
dbg(lvl_error,"error in format: %s\n",p);
c=n;
@@ -827,7 +827,7 @@ overlay_new(struct graphics_priv *gr, struct graphics_methods *meth, struct poin
struct font_priv * (*font_freetype_new)(void *meth);
struct graphics_priv *ret;
- dbg(lvl_warning,"enter\n");
+ dbg(lvl_debug,"enter\n");
ret=g_new0(struct graphics_priv, 1);
*meth=graphics_methods;
font_freetype_new=plugin_get_font_type("freetype");
diff --git a/navit/graphics/gtk_drawing_area/graphics_gtk_drawing_area.c b/navit/graphics/gtk_drawing_area/graphics_gtk_drawing_area.c
index dea33aedb..835ee476f 100644
--- a/navit/graphics/gtk_drawing_area/graphics_gtk_drawing_area.c
+++ b/navit/graphics/gtk_drawing_area/graphics_gtk_drawing_area.c
@@ -470,7 +470,7 @@ draw_image_warp(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct po
{
int w,h;
static struct graphics_priv *imlib_gr;
- dbg(lvl_warning,"draw_image_warp data=%p\n", img);
+ dbg(lvl_debug,"draw_image_warp data=%p\n", img);
if (imlib_gr != gr) {
imlib_context_set_display(gdk_x11_drawable_get_xdisplay(gr->widget->window));
imlib_context_set_colormap(gdk_x11_colormap_get_xcolormap(gtk_widget_get_colormap(gr->widget)));
@@ -577,9 +577,9 @@ overlay_draw(struct graphics_priv *parent, struct graphics_priv *overlay, GdkRec
if (parent->overlay_disabled || overlay->overlay_disabled || overlay->overlay_autodisabled)
return;
- dbg(lvl_warning,"r->x=%d r->y=%d r->width=%d r->height=%d\n", re->x, re->y, re->width, re->height);
+ dbg(lvl_debug,"r->x=%d r->y=%d r->width=%d r->height=%d\n", re->x, re->y, re->width, re->height);
overlay_rect(parent, overlay, 0, &or);
- dbg(lvl_warning,"or.x=%d or.y=%d or.width=%d or.height=%d\n", or.x, or.y, or.width, or.height);
+ dbg(lvl_debug,"or.x=%d or.y=%d or.width=%d or.height=%d\n", or.x, or.y, or.width, or.height);
if (! gdk_rectangle_intersect(re, &or, &ir))
return;
or.x-=re->x;
@@ -719,7 +719,7 @@ configure(GtkWidget * widget, GdkEventConfigure * event, gpointer user_data)
gra->background_ready = 0;
}
#ifndef _WIN32
- dbg(lvl_warning,"window=%lu\n", GDK_WINDOW_XID(widget->window));
+ dbg(lvl_debug,"window=%lu\n", GDK_WINDOW_XID(widget->window));
#endif
gra->width=widget->allocation.width;
gra->height=widget->allocation.height;
@@ -1032,7 +1032,7 @@ get_data_window(struct graphics_priv *this, unsigned int xid)
if (!gtk_widget_get_parent(this->widget))
gtk_widget_ref(this->widget);
gtk_window_set_default_size(GTK_WINDOW(this->win), this->win_w, this->win_h);
- dbg(lvl_warning,"h= %i, w= %i\n",this->win_h, this->win_w);
+ dbg(lvl_debug,"h= %i, w= %i\n",this->win_h, this->win_w);
gtk_window_set_title(GTK_WINDOW(this->win), this->window_title);
gtk_window_set_wmclass (GTK_WINDOW (this->win), "navit", this->window_title);
gtk_widget_realize(this->win);
@@ -1156,7 +1156,7 @@ get_data(struct graphics_priv *this, char const *type)
f=popen("pidof /usr/bin/ipaq-sleep","r");
if (f) {
fscanf(f,"%d",&this->pid);
- dbg(lvl_warning,"ipaq_sleep pid=%d\n", this->pid);
+ dbg(lvl_debug,"ipaq_sleep pid=%d\n", this->pid);
pclose(f);
}
#endif
diff --git a/navit/graphics/null/graphics_null.c b/navit/graphics/null/graphics_null.c
index 183712b84..7b0270369 100644
--- a/navit/graphics/null/graphics_null.c
+++ b/navit/graphics/null/graphics_null.c
@@ -261,7 +261,7 @@ graphics_null_new(struct navit *nav, struct graphics_methods *meth, struct attr
event_loop_system = attr_search(attrs, NULL, attr_event_loop_system);
if (event_loop_system && event_loop_system->u.str) {
- dbg(lvl_warning, "event_system is %s\n", event_loop_system->u.str);
+ dbg(lvl_debug, "event_system is %s\n", event_loop_system->u.str);
if (!event_request_system(event_loop_system->u.str, "graphics_null"))
return NULL;
} else {
@@ -277,7 +277,7 @@ static void
event_null_main_loop_run(void)
{
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
for (;;)
sleep(1);
@@ -285,54 +285,54 @@ event_null_main_loop_run(void)
static void event_null_main_loop_quit(void)
{
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
}
static struct event_watch *
event_null_add_watch(int h, enum event_watch_cond cond, struct callback *cb)
{
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
return NULL;
}
static void
event_null_remove_watch(struct event_watch *ev)
{
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
}
static struct event_timeout *
event_null_add_timeout(int timeout, int multi, struct callback *cb)
{
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
return NULL;
}
static void
event_null_remove_timeout(struct event_timeout *to)
{
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
}
static struct event_idle *
event_null_add_idle(int priority, struct callback *cb)
{
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
return NULL;
}
static void
event_null_remove_idle(struct event_idle *ev)
{
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
}
static void
event_null_call_callback(struct callback_list *cb)
{
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
}
static struct event_methods event_null_methods = {
diff --git a/navit/graphics/opengl/graphics_opengl.c b/navit/graphics/opengl/graphics_opengl.c
index e5cf37862..87dcde0cb 100644
--- a/navit/graphics/opengl/graphics_opengl.c
+++ b/navit/graphics/opengl/graphics_opengl.c
@@ -748,7 +748,7 @@ getPrimitiveType(GLenum type)
void APIENTRY
tessBeginCB(GLenum which)
{
- dbg(lvl_warning, "glBegin( %s );\n", getPrimitiveType(which));
+ dbg(lvl_debug, "glBegin( %s );\n", getPrimitiveType(which));
tess_type=which;
tess_count=0;
}
@@ -758,7 +758,7 @@ tessBeginCB(GLenum which)
void APIENTRY
tessEndCB(void)
{
- dbg(lvl_warning, "glEnd();\n");
+ dbg(lvl_debug, "glEnd();\n");
draw_array(graphics_priv_root, tess_array, tess_count, tess_type);
}
@@ -769,7 +769,7 @@ tessVertexCB(const GLvoid * data)
{
// cast back to double type
const GLdouble *ptr = (const GLdouble *) data;
- dbg(lvl_warning, " glVertex3d();\n");
+ dbg(lvl_debug, " glVertex3d();\n");
tess_array[tess_count].x=ptr[0];
tess_array[tess_count].y=ptr[1];
@@ -1499,7 +1499,7 @@ static void
click_notify_do(struct graphics_priv *priv, int button, int state, int x, int y)
{
struct point p={x,y};
- dbg(lvl_error,"enter state %d button %d\n",state,button);
+ dbg(lvl_debug,"enter state %d button %d\n",state,button);
callback_list_call_attr_3(priv->cbl, attr_button, (void *) state, (void *)button, (void *) &p);
}
#endif
@@ -1749,55 +1749,55 @@ event_opengl_main_loop_run(void)
static void
event_opengl_main_loop_quit(void)
{
- dbg(lvl_error, "enter\n");
+ dbg(lvl_debug, "enter\n");
}
static struct event_watch *
event_opengl_add_watch(int fd, enum event_watch_cond cond,
struct callback *cb)
{
- dbg(lvl_error, "enter\n");
+ dbg(lvl_debug, "enter\n");
return NULL;
}
static void
event_opengl_remove_watch(struct event_watch *ev)
{
- dbg(lvl_error, "enter\n");
+ dbg(lvl_debug, "enter\n");
}
static struct event_timeout *
event_opengl_add_timeout(int timeout, int multi, struct callback *cb)
{
- dbg(lvl_error, "enter\n");
+ dbg(lvl_debug, "enter\n");
return NULL;
}
static void
event_opengl_remove_timeout(struct event_timeout *to)
{
- dbg(lvl_error, "enter\n");
+ dbg(lvl_debug, "enter\n");
}
static struct event_idle *
event_opengl_add_idle(int priority, struct callback *cb)
{
- dbg(lvl_error, "enter\n");
+ dbg(lvl_debug, "enter\n");
return NULL;
}
static void
event_opengl_remove_idle(struct event_idle *ev)
{
- dbg(lvl_error, "enter\n");
+ dbg(lvl_debug, "enter\n");
}
static void
event_opengl_call_callback(struct callback_list *cb)
{
- dbg(lvl_error, "enter\n");
+ dbg(lvl_debug, "enter\n");
}
static struct event_methods event_opengl_methods = {
diff --git a/navit/graphics/opengl/graphics_opengl_egl.c b/navit/graphics/opengl/graphics_opengl_egl.c
index 28e370615..cb91ac88e 100644
--- a/navit/graphics/opengl/graphics_opengl_egl.c
+++ b/navit/graphics/opengl/graphics_opengl_egl.c
@@ -68,7 +68,7 @@ graphics_opengl_egl_new(void *display, void *window, struct graphics_opengl_plat
dbg(lvl_error, "eglInitialize failed\n");
goto error;
}
- dbg(lvl_error,"eglInitialize ok with version %d.%d\n",major,minor);
+ dbg(lvl_debug,"eglInitialize ok with version %d.%d\n",major,minor);
eglBindAPI(EGL_OPENGL_ES_API);
if (!eglChooseConfig(ret->egldisplay, attributeList, ret->config, sizeof(ret->config)/sizeof(EGLConfig), &nconfig)) {
dbg(lvl_error, "eglChooseConfig failed\n");
diff --git a/navit/graphics/opengl/graphics_opengl_x11.c b/navit/graphics/opengl/graphics_opengl_x11.c
index cca4bf4c9..8f4b02eaf 100644
--- a/navit/graphics/opengl/graphics_opengl_x11.c
+++ b/navit/graphics/opengl/graphics_opengl_x11.c
@@ -86,29 +86,29 @@ graphics_opengl_x11_watch(struct graphics_opengl_window_system *x11)
x11->button(x11->data,event.xbutton.button,0,event.xbutton.x,event.xbutton.y);
break;
case ConfigureNotify:
- dbg(lvl_error,"ConfigureNotify\n");
+ dbg(lvl_debug,"ConfigureNotify\n");
break;
case Expose:
- dbg(lvl_error,"Expose\n");
+ dbg(lvl_debug,"Expose\n");
break;
case KeyPress:
- dbg(lvl_error,"KeyPress\n");
+ dbg(lvl_debug,"KeyPress\n");
break;
case KeyRelease:
- dbg(lvl_error,"KeyRelease\n");
+ dbg(lvl_debug,"KeyRelease\n");
break;
case MapNotify:
- dbg(lvl_error,"MapNotify\n");
+ dbg(lvl_debug,"MapNotify\n");
break;
case MotionNotify:
if (x11->motion)
x11->motion(x11->data,event.xmotion.x,event.xmotion.y);
break;
case ReparentNotify:
- dbg(lvl_error,"ReparentNotify\n");
+ dbg(lvl_debug,"ReparentNotify\n");
break;
default:
- dbg(lvl_error,"type %d\n",event.type);
+ dbg(lvl_debug,"type %d\n",event.type);
}
}
}
diff --git a/navit/graphics/qt_qpainter/RenderArea.cpp b/navit/graphics/qt_qpainter/RenderArea.cpp
index d394b6e5e..c1646e2ff 100644
--- a/navit/graphics/qt_qpainter/RenderArea.cpp
+++ b/navit/graphics/qt_qpainter/RenderArea.cpp
@@ -98,7 +98,7 @@ bool RenderArea::event(QEvent *event)
{
#if QT_VERSION >= 0x040700
if (event->type() == QEvent::Gesture) {
- dbg(lvl_error,"gesture\n");
+ dbg(lvl_debug,"gesture\n");
return true;
}
#endif
@@ -135,8 +135,8 @@ void RenderArea::do_resize(QSize size)
QPainter painter(pixmap);
QBrush brush;
painter.fillRect(0, 0, size.width(), size.height(), brush);
- dbg(lvl_error,"size %dx%d\n", size.width(), size.height());
- dbg(lvl_error,"pixmap %p %dx%d\n", pixmap, pixmap->width(), pixmap->height());
+ dbg(lvl_debug,"size %dx%d\n", size.width(), size.height());
+ dbg(lvl_debug,"pixmap %p %dx%d\n", pixmap, pixmap->width(), pixmap->height());
callback_list_call_attr_2(this->cbl, attr_resize, GINT_TO_POINTER(size.width()), GINT_TO_POINTER(size.height()));
}
@@ -240,9 +240,9 @@ void RenderArea::keyPressEvent(QKeyEvent *event)
#else
const char *text=str.toUtf8().constData();
#endif
- dbg(lvl_error,"enter text='%s' 0x%x (%zu) key=%d\n", text, text[0], strlen(text), event->key());
+ dbg(lvl_debug,"enter text='%s' 0x%x (%zu) key=%d\n", text, text[0], strlen(text), event->key());
if (!text || !text[0] || text[0] == 0x7f) {
- dbg(lvl_error,"special key\n");
+ dbg(lvl_debug,"special key\n");
switch (event->key()) {
case 4099:
{
@@ -305,7 +305,7 @@ void RenderArea::watchEvent(int fd)
{
#ifdef QT_QPAINTER_USE_EVENT_QT
struct event_watch *ev=(struct event_watch *)g_hash_table_lookup(watches, (void *)fd);
- dbg(lvl_warning,"fd=%d ev=%p cb=%p\n", fd, ev, ev->cb);
+ dbg(lvl_debug,"fd=%d ev=%p cb=%p\n", fd, ev, ev->cb);
callback_call_0(ev->cb);
#endif
}
diff --git a/navit/graphics/qt_qpainter/graphics_qt_qpainter.cpp b/navit/graphics/qt_qpainter/graphics_qt_qpainter.cpp
index f4d8c18da..55b22cfd9 100644
--- a/navit/graphics/qt_qpainter/graphics_qt_qpainter.cpp
+++ b/navit/graphics/qt_qpainter/graphics_qt_qpainter.cpp
@@ -65,7 +65,7 @@ qt_qpainter_draw(struct graphics_priv *gr, const QRect *r, int paintev)
{
if (!paintev) {
#ifndef QT_QPAINTER_NO_WIDGET
- dbg(lvl_warning,"update %d,%d %d x %d\n", r->x(), r->y(), r->width(), r->height());
+ dbg(lvl_debug,"update %d,%d %d x %d\n", r->x(), r->y(), r->width(), r->height());
if (r->x() <= -r->width())
return;
if (r->y() <= -r->height())
@@ -74,7 +74,7 @@ qt_qpainter_draw(struct graphics_priv *gr, const QRect *r, int paintev)
return;
if (r->y() > gr->widget->pixmap->height())
return;
- dbg(lvl_warning,"update valid %d,%d %dx%d\n", r->x(), r->y(), r->width(), r->height());
+ dbg(lvl_debug,"update valid %d,%d %dx%d\n", r->x(), r->y(), r->width(), r->height());
gr->widget->update(*r);
#endif
return;
@@ -380,7 +380,7 @@ static void draw_polygon(struct graphics_priv *gr, struct graphics_gc_priv *gc,
//##############################################################################################################
static void draw_rectangle(struct graphics_priv *gr, struct graphics_gc_priv *gc, struct point *p, int w, int h)
{
- dbg(lvl_warning,"gr=%p gc=%p %d,%d,%d,%d\n", gr, gc, p->x, p->y, w, h);
+ dbg(lvl_debug,"gr=%p gc=%p %d,%d,%d,%d\n", gr, gc, p->x, p->y, w, h);
gr->painter->fillRect(p->x,p->y, w, h, *gc->brush);
}
@@ -547,7 +547,7 @@ static void background_gc(struct graphics_priv *gr, struct graphics_gc_priv *gc)
//##############################################################################################################
static void draw_mode(struct graphics_priv *gr, enum draw_mode_num mode)
{
- dbg(lvl_warning,"mode for %p %d\n", gr, mode);
+ dbg(lvl_debug,"mode for %p %d\n", gr, mode);
QRect r;
if (mode == draw_mode_begin) {
#if QT_VERSION >= 0x040000
@@ -652,7 +652,7 @@ static void * get_data(struct graphics_priv *this_, const char *type)
bool ok;
if (!strcmp(type, "resize")) {
- dbg(lvl_error,"resize %d %d\n",this_->w,this_->h);
+ dbg(lvl_debug,"resize %d %d\n",this_->w,this_->h);
QSize size(this_->w,this_->h);
this_->widget->do_resize(size);
}
@@ -821,14 +821,14 @@ event_qt_main_loop_run(void)
static void event_qt_main_loop_quit(void)
{
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
exit(0);
}
static struct event_watch *
event_qt_add_watch(int fd, enum event_watch_cond cond, struct callback *cb)
{
- dbg(lvl_warning,"enter fd=%d\n",(int)(long)fd);
+ dbg(lvl_debug,"enter fd=%d\n",(int)(long)fd);
struct event_watch *ret=g_new0(struct event_watch, 1);
ret->fd=fd;
ret->cb=cb;
@@ -868,21 +868,21 @@ event_qt_remove_timeout(struct event_timeout *ev)
static struct event_idle *
event_qt_add_idle(int priority, struct callback *cb)
{
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
return (struct event_idle *)event_qt_add_timeout(0, 1, cb);
}
static void
event_qt_remove_idle(struct event_idle *ev)
{
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
event_qt_remove_timeout((struct event_timeout *) ev);
}
static void
event_qt_call_callback(struct callback_list *cb)
{
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
}
static struct event_methods event_qt_methods = {
@@ -903,7 +903,7 @@ struct event_priv {
struct event_priv *
event_qt_new(struct event_methods *meth)
{
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
*meth=event_qt_methods;
return NULL;
}
@@ -920,7 +920,7 @@ static struct graphics_priv * graphics_qt_qpainter_new(struct navit *nav, struct
struct font_priv * (*font_freetype_new)(void *meth);
struct attr *attr;
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
#ifdef QT_QPAINTER_USE_EVENT_QT
if (event_gr)
return NULL;
@@ -987,7 +987,7 @@ static struct graphics_priv * graphics_qt_qpainter_new(struct navit *nav, struct
else
ret->window_title=g_strdup("Navit");
- dbg(lvl_error,"return\n");
+ dbg(lvl_debug,"return\n");
return ret;
}
diff --git a/navit/graphics/sdl/event.c b/navit/graphics/sdl/event.c
index b4b58911e..cd4b81802 100644
--- a/navit/graphics/sdl/event.c
+++ b/navit/graphics/sdl/event.c
@@ -74,7 +74,7 @@ static void sdl_accelerometer_handler(void* param) {
sdl_orientation_count++;
if (new_orientation != orientation) {
- dbg(lvl_warning, "x(%d) y(%d) z(%d) o(%d)\n", xAxis, yAxis, zAxis,
+ dbg(lvl_debug, "x(%d) y(%d) z(%d) o(%d)\n", xAxis, yAxis, zAxis,
new_orientation);
orientation = new_orientation;
@@ -100,7 +100,7 @@ static void sdl_accelerometer_handler(void* param) {
static Uint32 sdl_timer_callback(Uint32 interval, void* param) {
struct event_timeout *timeout = (struct event_timeout*) param;
- dbg(lvl_warning, "timer(%p) multi(%d) interval(%d) fired\n", param, timeout->multi,
+ dbg(lvl_debug, "timer(%p) multi(%d) interval(%d) fired\n", param, timeout->multi,
interval);
SDL_Event event;
@@ -169,7 +169,7 @@ static void event_sdl_watch_thread(GPtrArray *watch_list) {
for (idx = 0; idx < watch_list->len; idx++) {
if (pfds[idx].revents == pfds[idx].events) { /* The requested event happened, notify mainloop! */
ew = g_ptr_array_index(watch_list, idx);
- dbg(lvl_warning, "watch(%p) event(%d) encountered\n", ew,
+ dbg(lvl_debug, "watch(%p) event(%d) encountered\n", ew,
pfds[idx].revents);
SDL_Event event;
@@ -194,7 +194,7 @@ static void event_sdl_watch_thread(GPtrArray *watch_list) {
}
static void event_sdl_watch_startthread(GPtrArray *watch_list) {
- dbg(lvl_warning, "enter\n");
+ dbg(lvl_debug, "enter\n");
if (sdl_watch_thread)
event_sdl_watch_stopthread();
@@ -206,7 +206,7 @@ static void event_sdl_watch_startthread(GPtrArray *watch_list) {
}
static void event_sdl_watch_stopthread() {
- dbg(lvl_warning, "enter\n");
+ dbg(lvl_debug, "enter\n");
if (sdl_watch_thread) {
/* Notify the watch thread that the list of FDs will change */
pthread_kill(sdl_watch_thread, SIGUSR1);
@@ -217,7 +217,7 @@ static void event_sdl_watch_stopthread() {
static struct event_watch *
event_sdl_add_watch(int fd, enum event_watch_cond cond, struct callback *cb) {
- dbg(lvl_warning, "fd(%d) cond(%x) cb(%x)\n", fd, cond, cb);
+ dbg(lvl_debug, "fd(%d) cond(%x) cb(%x)\n", fd, cond, cb);
event_sdl_watch_stopthread();
@@ -253,7 +253,7 @@ event_sdl_add_watch(int fd, enum event_watch_cond cond, struct callback *cb) {
}
static void event_sdl_remove_watch(struct event_watch *ew) {
- dbg(lvl_warning, "enter %p\n", ew);
+ dbg(lvl_debug, "enter %p\n", ew);
event_sdl_watch_stopthread();
@@ -272,7 +272,7 @@ event_sdl_add_timeout(int timeout, int multi, struct callback *cb) {
struct event_timeout * ret = g_new0(struct event_timeout, 1);
if (!ret)
return ret;
- dbg(lvl_warning, "timer(%p) multi(%d) interval(%d) cb(%p) added\n", ret, multi,
+ dbg(lvl_debug, "timer(%p) multi(%d) interval(%d) cb(%p) added\n", ret, multi,
timeout, cb);
ret->multi = multi;
ret->cb = cb;
@@ -286,10 +286,10 @@ static void event_sdl_remove_timeout(struct event_timeout *to) {
if (to != NULL) {
int ret = to->id ? SDL_RemoveTimer(to->id) : SDL_TRUE;
if (ret == SDL_FALSE) {
- dbg(lvl_error, "SDL_RemoveTimer (%p) failed\n", to->id);
+ dbg(lvl_debug, "SDL_RemoveTimer (%p) failed\n", to->id);
} else {
g_free(to);
- dbg(lvl_warning, "timer(%p) removed\n", to);
+ dbg(lvl_debug, "timer(%p) removed\n", to);
}
}
}
@@ -309,7 +309,7 @@ static gint sdl_sort_idle_tasks(gconstpointer parama, gconstpointer paramb) {
static struct event_idle *
event_sdl_add_idle(int priority, struct callback *cb) {
- dbg(lvl_warning, "add idle priority(%d) cb(%p)\n", priority, cb);
+ dbg(lvl_debug, "add idle priority(%d) cb(%p)\n", priority, cb);
struct idle_task *task = g_new0(struct idle_task, 1);
task->priority = priority;
@@ -321,7 +321,7 @@ event_sdl_add_idle(int priority, struct callback *cb) {
SDL_Event event;
SDL_UserEvent userevent;
- dbg(lvl_warning, "poking eventloop because of new idle_events\n");
+ dbg(lvl_debug, "poking eventloop because of new idle_events\n");
userevent.type = SDL_USEREVENT;
userevent.code = SDL_USEREVENT_CODE_IDLE_EVENT;
@@ -340,14 +340,14 @@ event_sdl_add_idle(int priority, struct callback *cb) {
}
static void event_sdl_remove_idle(struct event_idle *task) {
- dbg(lvl_warning, "remove task(%p)\n", task);
+ dbg(lvl_debug, "remove task(%p)\n", task);
g_ptr_array_remove(idle_tasks, (gpointer) task);
}
/* callback */
static void event_sdl_call_callback(struct callback_list *cbl) {
- dbg(lvl_warning, "call_callback cbl(%p)\n", cbl);
+ dbg(lvl_debug, "call_callback cbl(%p)\n", cbl);
SDL_Event event;
SDL_UserEvent userevent;
diff --git a/navit/graphics/sdl/event_sdl.c b/navit/graphics/sdl/event_sdl.c
index 068c95758..d640d5edb 100644
--- a/navit/graphics/sdl/event_sdl.c
+++ b/navit/graphics/sdl/event_sdl.c
@@ -48,7 +48,7 @@ sdl_timer_callback(Uint32 interval, void* param)
{
struct event_timeout *timeout=(struct event_timeout*)param;
- dbg(lvl_warning,"timer(%p) multi(%d) interval(%d) fired\n", param, timeout->multi, interval);
+ dbg(lvl_debug,"timer(%p) multi(%d) interval(%d) fired\n", param, timeout->multi, interval);
SDL_Event event;
SDL_UserEvent userevent;
@@ -104,7 +104,7 @@ event_sdl_watch_thread (GPtrArray *watch_list)
for (idx = 0; idx < watch_list->len; idx++ ) {
if (pfds[idx].revents == pfds[idx].events) { /* The requested event happened, notify mainloop! */
ew = g_ptr_array_index (watch_list, idx);
- dbg(lvl_warning,"watch(%p) event(%d) encountered\n", ew, pfds[idx].revents);
+ dbg(lvl_debug,"watch(%p) event(%d) encountered\n", ew, pfds[idx].revents);
SDL_Event event;
SDL_UserEvent userevent;
@@ -130,7 +130,7 @@ event_sdl_watch_thread (GPtrArray *watch_list)
static void
event_sdl_watch_startthread(GPtrArray *watch_list)
{
- dbg(lvl_warning,"enter\n");
+ dbg(lvl_debug,"enter\n");
if (sdl_watch_thread)
event_sdl_watch_stopthread();
@@ -143,7 +143,7 @@ event_sdl_watch_startthread(GPtrArray *watch_list)
static void
event_sdl_watch_stopthread()
{
- dbg(lvl_warning,"enter\n");
+ dbg(lvl_debug,"enter\n");
if (sdl_watch_thread) {
/* Notify the watch thread that the list of FDs will change */
pthread_kill(sdl_watch_thread, SIGUSR1);
@@ -155,7 +155,7 @@ event_sdl_watch_stopthread()
static struct event_watch *
event_sdl_add_watch(int fd, enum event_watch_cond cond, struct callback *cb)
{
- dbg(lvl_warning,"fd(%d) cond(%x) cb(%x)\n", fd, cond, cb);
+ dbg(lvl_debug,"fd(%d) cond(%x) cb(%x)\n", fd, cond, cb);
event_sdl_watch_stopthread();
@@ -193,7 +193,7 @@ event_sdl_add_watch(int fd, enum event_watch_cond cond, struct callback *cb)
static void
event_sdl_remove_watch(struct event_watch *ew)
{
- dbg(lvl_warning,"enter %p\n",ew);
+ dbg(lvl_debug,"enter %p\n",ew);
event_sdl_watch_stopthread();
@@ -215,7 +215,7 @@ event_sdl_add_timeout(int timeout, int multi, struct callback *cb)
dbg(lvl_error,"g_new0 failed\n");
return ret;
}
- dbg(lvl_warning,"timer(%p) multi(%d) interval(%d) cb(%p) added\n",ret, multi, timeout, cb);
+ dbg(lvl_debug,"timer(%p) multi(%d) interval(%d) cb(%p) added\n",ret, multi, timeout, cb);
ret->multi = multi;
ret->cb = cb;
ret->id = SDL_AddTimer(timeout, sdl_timer_callback, ret);
@@ -236,7 +236,7 @@ event_sdl_remove_timeout(struct event_timeout *to)
dbg(lvl_error,"SDL_RemoveTimer (%p) failed\n", to->id);
g_free(to);
- dbg(lvl_warning,"timer(%p) removed\n", to);
+ dbg(lvl_debug,"timer(%p) removed\n", to);
}
}
@@ -258,7 +258,7 @@ sdl_sort_idle_tasks(gconstpointer parama, gconstpointer paramb)
static struct event_idle *
event_sdl_add_idle(int priority, struct callback *cb)
{
- dbg(lvl_warning,"add idle priority(%d) cb(%p)\n", priority, cb);
+ dbg(lvl_debug,"add idle priority(%d) cb(%p)\n", priority, cb);
struct idle_task *task = g_new0(struct idle_task, 1);
task->priority = priority;
@@ -271,7 +271,7 @@ event_sdl_add_idle(int priority, struct callback *cb)
SDL_Event event;
SDL_UserEvent userevent;
- dbg(lvl_warning,"poking eventloop because of new idle_events\n");
+ dbg(lvl_debug,"poking eventloop because of new idle_events\n");
userevent.type = SDL_USEREVENT;
userevent.code = SDL_USEREVENT_CODE_IDLE_EVENT;
@@ -292,7 +292,7 @@ event_sdl_add_idle(int priority, struct callback *cb)
static void
event_sdl_remove_idle(struct event_idle *task)
{
- dbg(lvl_warning,"remove task(%p)\n", task);
+ dbg(lvl_debug,"remove task(%p)\n", task);
g_ptr_array_remove(idle_tasks, (gpointer)task);
}
@@ -301,7 +301,7 @@ event_sdl_remove_idle(struct event_idle *task)
static void
event_sdl_call_callback(struct callback_list *cbl)
{
- dbg(lvl_warning,"call_callback cbl(%p)\n",cbl);
+ dbg(lvl_debug,"call_callback cbl(%p)\n",cbl);
SDL_Event event;
SDL_UserEvent userevent;
diff --git a/navit/graphics/sdl/graphics_sdl.c b/navit/graphics/sdl/graphics_sdl.c
index 573dcdfdc..64e9a3d12 100644
--- a/navit/graphics/sdl/graphics_sdl.c
+++ b/navit/graphics/sdl/graphics_sdl.c
@@ -187,7 +187,7 @@ struct graphics_image_priv {
static void
graphics_destroy(struct graphics_priv *gr)
{
- dbg(lvl_error, "graphics_destroy %p %u\n", gr, gr->overlay_mode);
+ dbg(lvl_debug, "graphics_destroy %p %u\n", gr, gr->overlay_mode);
if(gr->overlay_mode)
{
@@ -222,7 +222,7 @@ gc_destroy(struct graphics_gc_priv *gc)
static void
gc_set_linewidth(struct graphics_gc_priv *gc, int w)
{
- dbg(lvl_warning, "gc_set_linewidth %p %d\n", gc, w);
+ dbg(lvl_debug, "gc_set_linewidth %p %d\n", gc, w);
gc->linewidth = w;
}
@@ -235,7 +235,7 @@ gc_set_dashes(struct graphics_gc_priv *gc, int w, int offset, unsigned char *das
static void
gc_set_foreground(struct graphics_gc_priv *gc, struct color *c)
{
- dbg(lvl_warning, "gc_set_foreground: %p %d %d %d %d\n", gc, c->a, c->r, c->g, c->b);
+ dbg(lvl_debug, "gc_set_foreground: %p %d %d %d %d\n", gc, c->a, c->r, c->g, c->b);
gc->fore_r = c->r/256;
gc->fore_g = c->g/256;
gc->fore_b = c->b/256;
@@ -245,7 +245,7 @@ gc_set_foreground(struct graphics_gc_priv *gc, struct color *c)
static void
gc_set_background(struct graphics_gc_priv *gc, struct color *c)
{
- dbg(lvl_warning, "gc_set_background: %p %d %d %d %d\n", gc, c->a, c->r, c->g, c->b);
+ dbg(lvl_debug, "gc_set_background: %p %d %d %d %d\n", gc, c->a, c->r, c->g, c->b);
gc->back_r = c->r/256;
gc->back_g = c->g/256;
gc->back_b = c->b/256;
@@ -331,7 +331,7 @@ draw_polygon(struct graphics_priv *gr, struct graphics_gc_priv *gc, struct point
vx[i] = x;
vy[i] = y;
- dbg(lvl_warning, "draw_polygon: %p %i %d,%d\n", gc, i, p[i].x, p[i].y);
+ dbg(lvl_debug, "draw_polygon: %p %i %d,%d\n", gc, i, p[i].x, p[i].y);
}
if(gr->aa)
@@ -362,7 +362,7 @@ draw_rectangle(struct graphics_priv *gr, struct graphics_gc_priv *gc, struct poi
return;
}
- dbg(lvl_warning, "draw_rectangle: %d %d %d %d r=%d g=%d b=%d a=%d\n", p->x, p->y, w, h,
+ dbg(lvl_debug, "draw_rectangle: %d %d %d %d r=%d g=%d b=%d a=%d\n", p->x, p->y, w, h,
gc->fore_r, gc->fore_g, gc->fore_b, gc->fore_a);
if(w > gr->screen->w)
{
@@ -495,10 +495,10 @@ draw_lines(struct graphics_priv *gr, struct graphics_gc_priv *gc, struct point *
y_lw_adj = round(cos(angle)*(float)lw/2.0);
if((x_lw_adj < 0) || (y_lw_adj < 0))
{
- dbg(lvl_warning, "i=%d\n", i);
- dbg(lvl_warning, " %d,%d->%d,%d\n", p[i].x, p[i].y, p[i+1].x, p[i+1].y);
- dbg(lvl_warning, " lw=%d angle=%f\n", lw, 180.0 * angle / M_PI);
- dbg(lvl_warning, " x_lw_adj=%d y_lw_adj=%d\n", x_lw_adj, y_lw_adj);
+ dbg(lvl_debug, "i=%d\n", i);
+ dbg(lvl_debug, " %d,%d->%d,%d\n", p[i].x, p[i].y, p[i+1].x, p[i+1].y);
+ dbg(lvl_debug, " lw=%d angle=%f\n", lw, 180.0 * angle / M_PI);
+ dbg(lvl_debug, " x_lw_adj=%d y_lw_adj=%d\n", x_lw_adj, y_lw_adj);
}
}
@@ -588,7 +588,7 @@ resize_ft_buffer (unsigned int new_size)
if (new_size > ft_buffer_size) {
g_free (ft_buffer);
ft_buffer = g_malloc (new_size);
- dbg(lvl_warning, "old_size(%u) new_size(%u) ft_buffer(%p)\n", ft_buffer_size, new_size, ft_buffer);
+ dbg(lvl_debug, "old_size(%u) new_size(%u) ft_buffer(%p)\n", ft_buffer_size, new_size, ft_buffer);
ft_buffer_size = new_size;
}
}
@@ -782,13 +782,13 @@ draw_image(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct point *
static void
draw_restore(struct graphics_priv *gr, struct point *p, int w, int h)
{
- dbg(lvl_warning, "draw_restore\n");
+ dbg(lvl_debug, "draw_restore\n");
}
static void
background_gc(struct graphics_priv *gr, struct graphics_gc_priv *gc)
{
- dbg(lvl_warning, "background_gc\n");
+ dbg(lvl_debug, "background_gc\n");
}
@@ -805,7 +805,7 @@ draw_mode(struct graphics_priv *gr, enum draw_mode_num mode)
}
else
{
- dbg(lvl_warning, "draw_mode: %d\n", mode);
+ dbg(lvl_debug, "draw_mode: %d\n", mode);
if(mode == draw_mode_end)
{
@@ -938,7 +938,7 @@ overlay_new(struct graphics_priv *gr, struct graphics_methods *meth, struct poin
return NULL;
}
- dbg(lvl_warning, "overlay_new %d %d %d %u %u (%x, %x, %x ,%x, %d)\n", i,
+ dbg(lvl_debug, "overlay_new %d %d %d %u %u (%x, %x, %x ,%x, %d)\n", i,
p->x,
p->y,
w,
@@ -1252,7 +1252,7 @@ static gboolean graphics_sdl_idle(void *data)
case SDL_MOUSEBUTTONDOWN:
{
- dbg(lvl_warning, "SDL_MOUSEBUTTONDOWN %d %d %d %d %d\n",
+ dbg(lvl_debug, "SDL_MOUSEBUTTONDOWN %d %d %d %d %d\n",
ev.button.which,
ev.button.button,
ev.button.state,
@@ -1267,7 +1267,7 @@ static gboolean graphics_sdl_idle(void *data)
case SDL_MOUSEBUTTONUP:
{
- dbg(lvl_warning, "SDL_MOUSEBUTTONUP %d %d %d %d %d\n",
+ dbg(lvl_debug, "SDL_MOUSEBUTTONUP %d %d %d %d %d\n",
ev.button.which,
ev.button.button,
ev.button.state,
@@ -1329,28 +1329,28 @@ static gboolean graphics_sdl_idle(void *data)
else if(userevent.code == SDL_USEREVENT_CODE_TIMER)
{
struct callback *cb = (struct callback *)userevent.data1;
- dbg(lvl_warning, "SDL_USEREVENT timer received cb(%p)\n", cb);
+ dbg(lvl_debug, "SDL_USEREVENT timer received cb(%p)\n", cb);
callback_call_0(cb);
}
else if(userevent.code == SDL_USEREVENT_CODE_WATCH)
{
struct callback *cb = (struct callback *)userevent.data1;
- dbg(lvl_warning, "SDL_USEREVENT watch received cb(%p)\n", cb);
+ dbg(lvl_debug, "SDL_USEREVENT watch received cb(%p)\n", cb);
callback_call_0(cb);
}
else if(userevent.code == SDL_USEREVENT_CODE_CALL_CALLBACK)
{
struct callback_list *cbl = (struct callback_list *)userevent.data1;
- dbg(lvl_warning, "SDL_USEREVENT call_callback received cbl(%p)\n", cbl);
+ dbg(lvl_debug, "SDL_USEREVENT call_callback received cbl(%p)\n", cbl);
callback_list_call_0(cbl);
}
else if(userevent.code == SDL_USEREVENT_CODE_IDLE_EVENT) {
- dbg(lvl_warning, "SDL_USEREVENT idle_event received\n");
+ dbg(lvl_debug, "SDL_USEREVENT idle_event received\n");
}
#ifdef USE_WEBOS_ACCELEROMETER
else if(userevent.code == SDL_USEREVENT_CODE_ROTATE)
{
- dbg(lvl_warning, "SDL_USEREVENT rotate received\n");
+ dbg(lvl_debug, "SDL_USEREVENT rotate received\n");
switch(gr->orientation)
{
case WEBOS_ORIENTATION_PORTRAIT:
@@ -1380,7 +1380,7 @@ static gboolean graphics_sdl_idle(void *data)
#endif
default:
{
- dbg(lvl_warning, "SDL_Event %d\n", ev.type);
+ dbg(lvl_debug, "SDL_Event %d\n", ev.type);
break;
}
}
@@ -1430,7 +1430,7 @@ graphics_sdl_new(struct navit *nav, struct graphics_methods *meth, struct attr *
int)) this->freetype_methods.font_new;
meth->get_text_bbox = (void*) this->freetype_methods.get_text_bbox;
- dbg(lvl_warning,"Calling SDL_Init\n");
+ dbg(lvl_debug,"Calling SDL_Init\n");
#ifdef USE_WEBOS
# ifdef USE_WEBOS_ACCELEROMETER
ret = SDL_Init(SDL_INIT_VIDEO|SDL_INIT_TIMER|SDL_INIT_JOYSTICK);
@@ -1449,7 +1449,7 @@ graphics_sdl_new(struct navit *nav, struct graphics_methods *meth, struct attr *
}
#ifdef USE_WEBOS
- dbg(lvl_warning,"Calling PDL_Init(0)\n");
+ dbg(lvl_debug,"Calling PDL_Init(0)\n");
ret = PDL_Init(0);
if(ret < 0)
{
@@ -1510,7 +1510,7 @@ graphics_sdl_new(struct navit *nav, struct graphics_methods *meth, struct attr *
w = this->screen->w;
h = this->screen->h;
- dbg(lvl_error, "using screen %ix%i@%i\n",
+ dbg(lvl_debug, "using screen %ix%i@%i\n",
this->screen->w, this->screen->h,
this->screen->format->BytesPerPixel * 8);
#ifdef USE_WEBOS_ACCELEROMETER
@@ -1537,7 +1537,7 @@ graphics_sdl_new(struct navit *nav, struct graphics_methods *meth, struct attr *
#ifdef USE_WEBOS
if(the_graphics!=NULL) {
- dbg(lvl_error,"graphics_sdl_new: graphics struct already set: %d!\n", the_graphics_count);
+ dbg(lvl_debug,"graphics_sdl_new: graphics struct already set: %d!\n", the_graphics_count);
}
the_graphics = this;
the_graphics_count++;
@@ -1563,7 +1563,7 @@ sdl_timer_callback(Uint32 interval, void* param)
{
struct event_timeout *timeout=(struct event_timeout*)param;
- dbg(lvl_warning,"timer(%p) multi(%d) interval(%d) fired\n", param, timeout->multi, interval);
+ dbg(lvl_debug,"timer(%p) multi(%d) interval(%d) fired\n", param, timeout->multi, interval);
SDL_Event event;
SDL_UserEvent userevent;
@@ -1620,7 +1620,7 @@ event_sdl_watch_thread (GPtrArray *watch_list)
for (idx = 0; idx < watch_list->len; idx++ ) {
if (pfds[idx].revents == pfds[idx].events) { /* The requested event happened, notify mainloop! */
ew = g_ptr_array_index (watch_list, idx);
- dbg(lvl_warning,"watch(%p) event(%d) encountered\n", ew, pfds[idx].revents);
+ dbg(lvl_debug,"watch(%p) event(%d) encountered\n", ew, pfds[idx].revents);
SDL_Event event;
SDL_UserEvent userevent;
@@ -1646,7 +1646,7 @@ event_sdl_watch_thread (GPtrArray *watch_list)
static void
event_sdl_watch_startthread(GPtrArray *watch_list)
{
- dbg(lvl_warning,"enter\n");
+ dbg(lvl_debug,"enter\n");
if (sdl_watch_thread)
event_sdl_watch_stopthread();
@@ -1659,7 +1659,7 @@ event_sdl_watch_startthread(GPtrArray *watch_list)
static void
event_sdl_watch_stopthread()
{
- dbg(lvl_warning,"enter\n");
+ dbg(lvl_debug,"enter\n");
if (sdl_watch_thread) {
/* Notify the watch thread that the list of FDs will change */
pthread_kill(sdl_watch_thread, SIGUSR1);
@@ -1671,7 +1671,7 @@ event_sdl_watch_stopthread()
static struct event_watch *
event_sdl_add_watch(int fd, enum event_watch_cond cond, struct callback *cb)
{
- dbg(lvl_warning,"fd(%d) cond(%x) cb(%x)\n", fd, cond, cb);
+ dbg(lvl_debug,"fd(%d) cond(%x) cb(%x)\n", fd, cond, cb);
event_sdl_watch_stopthread();
@@ -1709,7 +1709,7 @@ event_sdl_add_watch(int fd, enum event_watch_cond cond, struct callback *cb)
static void
event_sdl_remove_watch(struct event_watch *ew)
{
- dbg(lvl_warning,"enter %p\n",ew);
+ dbg(lvl_debug,"enter %p\n",ew);
event_sdl_watch_stopthread();
@@ -1731,7 +1731,7 @@ event_sdl_add_timeout(int timeout, int multi, struct callback *cb)
dbg(lvl_error,"g_new0 failed\n");
return ret;
}
- dbg(lvl_warning,"timer(%p) multi(%d) interval(%d) cb(%p) added\n",ret, multi, timeout, cb);
+ dbg(lvl_debug,"timer(%p) multi(%d) interval(%d) cb(%p) added\n",ret, multi, timeout, cb);
ret->multi = multi;
ret->cb = cb;
ret->id = SDL_AddTimer(timeout, sdl_timer_callback, ret);
@@ -1752,7 +1752,7 @@ event_sdl_remove_timeout(struct event_timeout *to)
dbg(lvl_error,"SDL_RemoveTimer (%p) failed\n", to->id);
g_free(to);
- dbg(lvl_warning,"timer(%p) removed\n", to);
+ dbg(lvl_debug,"timer(%p) removed\n", to);
}
}
@@ -1774,7 +1774,7 @@ sdl_sort_idle_tasks(gconstpointer parama, gconstpointer paramb)
static struct event_idle *
event_sdl_add_idle(int priority, struct callback *cb)
{
- dbg(lvl_warning,"add idle priority(%d) cb(%p)\n", priority, cb);
+ dbg(lvl_debug,"add idle priority(%d) cb(%p)\n", priority, cb);
struct idle_task *task = g_new0(struct idle_task, 1);
task->priority = priority;
@@ -1787,7 +1787,7 @@ event_sdl_add_idle(int priority, struct callback *cb)
SDL_Event event;
SDL_UserEvent userevent;
- dbg(lvl_warning,"poking eventloop because of new idle_events\n");
+ dbg(lvl_debug,"poking eventloop because of new idle_events\n");
userevent.type = SDL_USEREVENT;
userevent.code = SDL_USEREVENT_CODE_IDLE_EVENT;
@@ -1808,7 +1808,7 @@ event_sdl_add_idle(int priority, struct callback *cb)
static void
event_sdl_remove_idle(struct event_idle *task)
{
- dbg(lvl_warning,"remove task(%p)\n", task);
+ dbg(lvl_debug,"remove task(%p)\n", task);
g_ptr_array_remove(idle_tasks, (gpointer)task);
}
@@ -1817,7 +1817,7 @@ event_sdl_remove_idle(struct event_idle *task)
static void
event_sdl_call_callback(struct callback_list *cbl)
{
- dbg(lvl_warning,"call_callback cbl(%p)\n",cbl);
+ dbg(lvl_debug,"call_callback cbl(%p)\n",cbl);
SDL_Event event;
SDL_UserEvent userevent;
diff --git a/navit/graphics/win32/graphics_win32.c b/navit/graphics/win32/graphics_win32.c
index f59446f6c..038aa59ff 100644
--- a/navit/graphics/win32/graphics_win32.c
+++ b/navit/graphics/win32/graphics_win32.c
@@ -274,7 +274,7 @@ static void create_memory_dc(struct graphics_priv *gr)
hdc = GetDC( gr->wnd_handle );
// Creates memory DC
gr->hMemDC = CreateCompatibleDC(hdc);
- dbg(lvl_warning, "resize memDC to: %d %d \n", gr->width, gr->height );
+ dbg(lvl_debug, "resize memDC to: %d %d \n", gr->width, gr->height );
#ifndef FAST_TRANSPARENCY
@@ -311,7 +311,7 @@ static void HandleKeyChar(struct graphics_priv *gra_priv, WPARAM wParam)
TCHAR key = (TCHAR) wParam;
char *s=NULL;
char k[]={0,0};
- dbg(lvl_warning,"HandleKey %d\n",key);
+ dbg(lvl_debug,"HandleKey %d\n",key);
switch (key) {
default:
k[0]=key;
@@ -330,7 +330,7 @@ static void HandleKeyDown(struct graphics_priv *gra_priv, WPARAM wParam)
char left[]={NAVIT_KEY_LEFT,0};
char right[]={NAVIT_KEY_RIGHT,0};
char *s=NULL;
- dbg(lvl_warning,"HandleKey %d\n",key);
+ dbg(lvl_debug,"HandleKey %d\n",key);
switch (key) {
case 37:
s=left;
@@ -410,7 +410,7 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM l
gra_priv->width = LOWORD( lParam );
gra_priv->height = HIWORD( lParam );
create_memory_dc(gra_priv);
- dbg(lvl_error, "resize gfx to: %d %d \n", gra_priv->width, gra_priv->height );
+ dbg(lvl_debug, "resize gfx to: %d %d \n", gra_priv->width, gra_priv->height );
callback_list_call_attr_2(gra_priv->cbl, attr_resize, (void *)gra_priv->width, (void *)gra_priv->height);
}
break;
@@ -434,7 +434,7 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM l
PAINTSTRUCT ps = { 0 };
HDC hdc;
profile(0, NULL);
- dbg(lvl_warning, "WM_PAINT\n");
+ dbg(lvl_debug, "WM_PAINT\n");
overlay = gra_priv->overlays;
#ifndef FAST_TRANSPARENCY
@@ -535,13 +535,13 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM l
case WM_LBUTTONDOWN:
{
- dbg(lvl_warning, "LBUTTONDOWN\n");
+ dbg(lvl_debug, "LBUTTONDOWN\n");
HandleButtonClick( gra_priv, 1, 1, lParam);
}
break;
case WM_LBUTTONUP:
{
- dbg(lvl_warning, "LBUTTONUP\n");
+ dbg(lvl_debug, "LBUTTONUP\n");
HandleButtonClick( gra_priv, 0, 1, lParam);
}
break;
@@ -552,7 +552,7 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM l
HandleButtonClick( gra_priv, 0, 3,lParam );
break;
case WM_LBUTTONDBLCLK:
- dbg(lvl_warning, "LBUTTONDBLCLK\n");
+ dbg(lvl_debug, "LBUTTONDBLCLK\n");
HandleButtonClick( gra_priv, 1, 6,lParam );
break;
case WM_CHAR:
@@ -562,7 +562,7 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM l
HandleKeyDown( gra_priv, wParam);
break;
case WM_COPYDATA:
- dbg(lvl_error,"got WM_COPYDATA\n");
+ dbg(lvl_debug,"got WM_COPYDATA\n");
callback_list_call_attr_2(gra_priv->cbl, attr_wm_copydata, (void *)wParam, (void*)lParam);
break;
#ifdef HAVE_API_WIN32_CE
@@ -939,7 +939,7 @@ static void draw_drag(struct graphics_priv *gr, struct point *p)
static void draw_mode(struct graphics_priv *gr, enum draw_mode_num mode)
{
- dbg(lvl_warning, "set draw_mode to %x, %d\n", gr, (int)mode );
+ dbg(lvl_debug, "set draw_mode to %x, %d\n", gr, (int)mode );
if ( mode == draw_mode_begin )
{
@@ -951,7 +951,7 @@ static void draw_mode(struct graphics_priv *gr, enum draw_mode_num mode)
{
if ( gr->hMemDC )
{
- dbg(lvl_warning, "Erase dc: %x, w: %d, h: %d, bg_color: %x\n", gr, gr->width, gr->height, gr->bg_color);
+ dbg(lvl_debug, "Erase dc: %x, w: %d, h: %d, bg_color: %x\n", gr, gr->width, gr->height, gr->bg_color);
#ifdef FAST_TRANSPARENCY
if ( gr->hPrebuildDC )
{
@@ -1143,7 +1143,7 @@ pngdecode(struct graphics_priv *gr, char *name, struct graphics_image_priv *img)
BITMAPINFO pnginfo;
HDC dc;
- dbg(lvl_warning,"enter %s\n",name);
+ dbg(lvl_debug,"enter %s\n",name);
png_file=fopen(name, "rb");
if (!png_file)
{
@@ -1285,7 +1285,7 @@ pngdecode(struct graphics_priv *gr, char *name, struct graphics_image_priv *img)
g_free (row_pointers);
img->hot.x=img->width/2-1;
img->hot.y=img->height/2-1;
- dbg(lvl_warning,"ok\n");
+ dbg(lvl_debug,"ok\n");
fclose(png_file);
return TRUE;
@@ -1486,7 +1486,7 @@ static struct graphics_priv *
static void overlay_resize(struct graphics_priv *gr, struct point *p, int w, int h, int alpha, int wraparound)
{
- dbg(lvl_warning, "resize overlay: %x, x: %d, y: %d, w: %d, h: %d, alpha: %x, wraparound: %d\n", gr, p->x, p->y, w, h, alpha, wraparound);
+ dbg(lvl_debug, "resize overlay: %x, x: %d, y: %d, w: %d, h: %d, alpha: %x, wraparound: %d\n", gr, p->x, p->y, w, h, alpha, wraparound);
if ( gr->width != w || gr->height != h )
{
@@ -1504,7 +1504,7 @@ static struct graphics_priv *
overlay_new(struct graphics_priv *gr, struct graphics_methods *meth, struct point *p, int w, int h, int alpha, int wraparound)
{
struct graphics_priv *this=graphics_win32_new_helper(meth);
- dbg(lvl_warning, "overlay: %x, x: %d, y: %d, w: %d, h: %d, alpha: %x, wraparound: %d\n", this, p->x, p->y, w, h, alpha, wraparound);
+ dbg(lvl_debug, "overlay: %x, x: %d, y: %d, w: %d, h: %d, alpha: %x, wraparound: %d\n", this, p->x, p->y, w, h, alpha, wraparound);
this->width = w;
this->height = h;
this->parent = gr;
@@ -1538,7 +1538,7 @@ static struct graphics_priv *
static void overlay_disable(struct graphics_priv *gr, int disable)
{
- dbg(lvl_warning, "overlay: %x, disable: %d\n", gr, disable);
+ dbg(lvl_debug, "overlay: %x, disable: %d\n", gr, disable);
gr->disabled = disable;
}
@@ -1684,7 +1684,7 @@ event_win32_main_loop_run(void)
{
MSG msg;
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
while (GetMessage(&msg, 0, 0, 0))
{
TranslateMessage(&msg); /* Keyboard input. */
@@ -1700,7 +1700,7 @@ static void event_win32_main_loop_quit(void)
HWND hwndSip;
#endif
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
#ifdef HAVE_API_WIN32_CE
hwndTaskbar = FindWindow(L"HHTaskBar", NULL);
@@ -1716,14 +1716,14 @@ static void event_win32_main_loop_quit(void)
static struct event_watch *
event_win32_add_watch(int h, enum event_watch_cond cond, struct callback *cb)
{
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
return NULL;
}
static void
event_win32_remove_watch(struct event_watch *ev)
{
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
}
static GList *timers;
@@ -1779,7 +1779,7 @@ static struct event_timeout *
timers = g_list_prepend(timers, t);
t->cb = cb;
t->timer_id = SetTimer(NULL, 0, timeout, win32_timer_cb);
- dbg(lvl_warning, "Started timer %d for %d (multi: %d)\n", t->timer_id, timeout, multi);
+ dbg(lvl_debug, "Started timer %d for %d (multi: %d)\n", t->timer_id, timeout, multi);
return t;
}
@@ -1790,7 +1790,7 @@ event_win32_remove_timeout(struct event_timeout *to)
{
GList *l;
struct event_timeout *t=NULL;
- dbg(lvl_warning, "Try stopping timer %d\n", to->timer_id);
+ dbg(lvl_debug, "Try stopping timer %d\n", to->timer_id);
l = timers;
while (l)
{
diff --git a/navit/gui/gtk/datawindow.c b/navit/gui/gtk/datawindow.c
index ea5dc6e73..dd71ce999 100644
--- a/navit/gui/gtk/datawindow.c
+++ b/navit/gui/gtk/datawindow.c
@@ -48,7 +48,7 @@ select_row(GtkTreeView *tree, GtkTreePath *path, GtkTreeViewColumn *column, stru
GtkTreeModel *model;
int i;
- dbg(lvl_error,"win=%p\n", win);
+ dbg(lvl_debug,"win=%p\n", win);
model=gtk_tree_view_get_model(tree);
gtk_tree_model_get_iter(model, &iter, path);
diff --git a/navit/gui/gtk/destination.c b/navit/gui/gtk/destination.c
index f5bffd068..18fc58b75 100644
--- a/navit/gui/gtk/destination.c
+++ b/navit/gui/gtk/destination.c
@@ -164,7 +164,7 @@ static void row_activated(GtkWidget *widget, GtkTreePath *p1, GtkTreeViewColumn
char *str;
int column;
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
gtk_tree_view_get_cursor(GTK_TREE_VIEW(search->treeview), &path, &focus_column);
if(!path)
return;
@@ -184,11 +184,11 @@ static void row_activated(GtkWidget *widget, GtkTreePath *p1, GtkTreeViewColumn
column=4;
break;
default:
- dbg(lvl_error,"Unknown mode\n");
+ dbg(lvl_debug,"Unknown mode\n");
return;
}
gtk_tree_model_get(search->liststore2, &iter, column, &str, -1);
- dbg(lvl_error,"str=%s\n", str);
+ dbg(lvl_debug,"str=%s\n", str);
search->partial=0;
gtk_entry_set_text(GTK_ENTRY(entry_widget), str);
}
@@ -222,13 +222,13 @@ static void changed(GtkWidget *widget, struct search_param *search)
printf("changed %s partial %d\n", search->attr.u.str, search->partial);
if (widget == search->entry_country) {
gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (search->liststore2), 3, GTK_SORT_ASCENDING);
- dbg(lvl_error,"country\n");
+ dbg(lvl_debug,"country\n");
search->attr.type=attr_country_all;
set_columns(search, 0);
}
if (widget == search->entry_postal) {
gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (search->liststore2), 1, GTK_SORT_ASCENDING);
- dbg(lvl_error,"postal\n");
+ dbg(lvl_debug,"postal\n");
search->attr.type=attr_town_postal;
if (strlen(search->attr.u.str) < 2)
return;
@@ -236,14 +236,14 @@ static void changed(GtkWidget *widget, struct search_param *search)
}
if (widget == search->entry_city) {
gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (search->liststore2), 2, GTK_SORT_ASCENDING);
- dbg(lvl_error,"town\n");
+ dbg(lvl_debug,"town\n");
search->attr.type=attr_town_name;
if (strlen(search->attr.u.str) < 3)
return;
set_columns(search, 1);
}
if (widget == search->entry_street) {
- dbg(lvl_error,"street\n");
+ dbg(lvl_debug,"street\n");
search->attr.type=attr_street_name;
// Searching for a street by just its first letter generates too many hits to be useful,
// plus it causes the GUI to become unresponsive because the search is single-threaded.
diff --git a/navit/gui/gtk/gui_gtk_poi.c b/navit/gui/gtk/gui_gtk_poi.c
index fa73c5ff8..a3578243b 100644
--- a/navit/gui/gtk/gui_gtk_poi.c
+++ b/navit/gui/gtk/gui_gtk_poi.c
@@ -228,7 +228,7 @@ button_destination_clicked(GtkWidget *widget, struct gtk_poi_search *search)
dest.y=lon;
dest.pro=1;
navit_set_destination(search->nav, &dest, buffer, 1);
- dbg(lvl_warning,_("Set destination to %ld, %ld \n"),lat,lon);
+ dbg(lvl_debug,_("Set destination to %ld, %ld \n"),lat,lon);
}
/* Show the POI's position in the map. */
@@ -251,7 +251,7 @@ button_map_clicked(GtkWidget *widget, struct gtk_poi_search *search)
dest.y=lon;
dest.pro=1;
navit_set_center(search->nav, &dest,1);
- dbg(lvl_warning,_("Set map to %ld, %ld \n"),lat,lon);
+ dbg(lvl_debug,_("Set map to %ld, %ld \n"),lat,lon);
}
/** Set POI as the first "visit before". */
@@ -268,7 +268,7 @@ button_visit_clicked(GtkWidget *widget, struct gtk_poi_search *search)
if(!gtk_tree_model_get_iter(GTK_TREE_MODEL(search->store_poi_sorted), &iter, path)) return;
gtk_tree_model_get(GTK_TREE_MODEL(search->store_poi_sorted), &iter, 3, &lat, -1);
gtk_tree_model_get(GTK_TREE_MODEL(search->store_poi_sorted), &iter, 4, &lon, -1);
- dbg(lvl_warning,_("Set next visit to %ld, %ld \n"),lat,lon);
+ dbg(lvl_debug,_("Set next visit to %ld, %ld \n"),lat,lon);
struct pcoord dest;
dest.x=lat;
diff --git a/navit/gui/gtk/gui_gtk_window.c b/navit/gui/gtk/gui_gtk_window.c
index 8bca142d9..71bd26315 100644
--- a/navit/gui/gtk/gui_gtk_window.c
+++ b/navit/gui/gtk/gui_gtk_window.c
@@ -85,7 +85,7 @@ keypress(GtkWidget *widget, GdkEventKey *event, struct gui_priv *this)
struct point p;
if (event->type != GDK_KEY_PRESS)
return FALSE;
- dbg(lvl_warning,"keypress 0x%x\n", event->keyval);
+ dbg(lvl_debug,"keypress 0x%x\n", event->keyval);
transform_get_size(navit_get_trans(this->nav), &w, &h);
switch (event->keyval) {
case GDK_KP_Enter:
@@ -478,7 +478,7 @@ gui_gtk_vehicles_update(struct gui_priv *this)
char *name;
GList *curr;
struct gui_menu_info *meninfo;
- dbg(lvl_warning,"enter\n");
+ dbg(lvl_debug,"enter\n");
curr = g_list_first(this->vehicle_menuitems);
diff --git a/navit/gui/internal/gui_internal.c b/navit/gui/internal/gui_internal.c
index 7c2f35290..197f5a828 100644
--- a/navit/gui/internal/gui_internal.c
+++ b/navit/gui/internal/gui_internal.c
@@ -130,7 +130,7 @@ image_new_scaled(struct gui_priv *this, const char *name, int w, int h)
char *full_path=NULL;
full_path=graphics_icon_path(name);
ret=graphics_image_new_scaled(this->gra, full_path, w, h);
- dbg(lvl_warning,"Trying to load image '%s' (w=%d, h=%d): %s\n", name, w, h, ret ? "OK" : "NOT FOUND");
+ dbg(lvl_debug,"Trying to load image '%s' (w=%d, h=%d): %s\n", name, w, h, ret ? "OK" : "NOT FOUND");
g_free(full_path);
if (!ret) {
dbg(lvl_error,"Failed to load image for '%s' (w=%d, h=%d)\n", name, w, h);
@@ -498,7 +498,7 @@ gui_internal_apply_config(struct gui_priv *this)
{
struct gui_config_settings * current_config=0;
- dbg(lvl_warning,"w=%d h=%d\n", this->root.w, this->root.h);
+ dbg(lvl_debug,"w=%d h=%d\n", this->root.w, this->root.h);
/**
* Select default values from profile based on the screen.
*/
@@ -1624,7 +1624,7 @@ gui_internal_keypress_do(struct gui_priv *this, char *key)
}
return;
} else if (*key == NAVIT_KEY_BACKSPACE) {
- dbg(lvl_warning,"backspace\n");
+ dbg(lvl_debug,"backspace\n");
if (wi->text && wi->text[0]) {
len=g_utf8_prev_char(wi->text+strlen(wi->text))-wi->text;
wi->text[len]='\0';
@@ -1720,7 +1720,7 @@ gui_internal_set(char *remove, char *add)
int len=strlen(line);
if (len > 0 && line[len-1] == '\n')
line[len-1]='\0';
- dbg(lvl_warning,"line=%s\n",line);
+ dbg(lvl_debug,"line=%s\n",line);
if (!gui_internal_match(remove, line))
fprintf(fo,"%s\n",line);
}
@@ -1798,7 +1798,7 @@ gui_internal_cmd_map_download(struct gui_priv *this, struct widget *wm, void *da
char *search,buffer[256];
int found,sp_match=0;
- dbg(lvl_warning,"wm=%p prefix=%s\n",wm,wm->prefix);
+ dbg(lvl_debug,"wm=%p prefix=%s\n",wm,wm->prefix);
search=wm->prefix;
if (search) {
@@ -2007,7 +2007,7 @@ gui_internal_cmd_set_active_profile(struct gui_priv *this, struct
vehicle_get_attr(v, attr_name, &vehicle_name_attr, NULL);
vehicle_name = vehicle_name_attr.u.str;
- dbg(lvl_warning, "Changing vehicle %s to profile %s\n", vehicle_name,
+ dbg(lvl_debug, "Changing vehicle %s to profile %s\n", vehicle_name,
profilename);
// Change the profile name
@@ -2066,7 +2066,7 @@ gui_internal_add_vehicle_profile(struct gui_priv *this, struct widget
active_profile = profile_attr.u.str;
active = active_profile != NULL && !strcmp(name, active_profile);
- dbg(lvl_warning, "Adding vehicle profile %s, active=%s/%i\n", name,
+ dbg(lvl_debug, "Adding vehicle profile %s, active=%s/%i\n", name,
active_profile, active);
// Build a translatable label.
@@ -2213,7 +2213,7 @@ gui_internal_set_click_coord(struct gui_priv *this, struct point *p)
if (p) {
trans=navit_get_trans(this->nav);
transform_reverse(trans, p, &c);
- dbg(lvl_warning,"x=0x%x y=0x%x\n", c.x, c.y);
+ dbg(lvl_debug,"x=0x%x y=0x%x\n", c.x, c.y);
this->clickp.pro=transform_get_projection(trans);
this->clickp.x=c.x;
this->clickp.y=c.y;
@@ -2254,7 +2254,7 @@ gui_internal_enter_setup(struct gui_priv *this)
void
gui_internal_cmd_menu(struct gui_priv *this, int ignore, char *href)
{
- dbg(lvl_warning,"enter\n");
+ dbg(lvl_debug,"enter\n");
gui_internal_enter(this, ignore);
gui_internal_enter_setup(this);
// draw menu
@@ -2474,7 +2474,7 @@ gui_internal_cmd_enter_coord_do(struct gui_priv *this, struct widget *widget)
char *lat, *lng;
char *widgettext;
double latitude, longitude;
- dbg(lvl_warning,"text entered:%s\n", widget->text);
+ dbg(lvl_debug,"text entered:%s\n", widget->text);
/* possible entry can be identical to coord_format output but only space between lat and lng is allowed */
widgettext=g_ascii_strup(widget->text,-1);
@@ -2507,7 +2507,7 @@ gui_internal_cmd_enter_coord_do(struct gui_priv *this, struct widget *widget)
void
gui_internal_cmd_enter_coord_clicked(struct gui_priv *this, struct widget *widget, void *data)
{
- dbg(lvl_warning,"entered\n");
+ dbg(lvl_debug,"entered\n");
gui_internal_cmd_enter_coord_do(this, widget->data);
}
@@ -2527,18 +2527,18 @@ static void gui_internal_button(void *data, int pressed, int button, struct poin
struct gui_priv *this=data;
struct graphics *gra=this->gra;
- dbg(lvl_warning,"enter %d %d\n", pressed, button);
+ dbg(lvl_debug,"enter %d %d\n", pressed, button);
// if still on the map (not in the menu, yet):
- dbg(lvl_warning,"children=%p ignore_button=%d\n",this->root.children,this->ignore_button);
+ dbg(lvl_debug,"children=%p ignore_button=%d\n",this->root.children,this->ignore_button);
if (!this->root.children || this->ignore_button) {
this->ignore_button=0;
// check whether the position of the mouse changed during press/release OR if it is the scrollwheel
if (!navit_handle_button(this->nav, pressed, button, p, NULL)) {
- dbg(lvl_warning,"navit has handled button\n");
+ dbg(lvl_debug,"navit has handled button\n");
return;
}
- dbg(lvl_warning,"menu_on_map_click=%d\n",this->menu_on_map_click);
+ dbg(lvl_debug,"menu_on_map_click=%d\n",this->menu_on_map_click);
if (button != 1)
return;
if (this->on_map_click || this->menu_on_map_click) {
@@ -2639,7 +2639,7 @@ static void gui_internal_resize(void *data, int w, int h)
this->root.h=h;
changed=1;
}
- dbg(lvl_warning,"w=%d h=%d children=%p\n", w, h, this->root.children);
+ dbg(lvl_debug,"w=%d h=%d children=%p\n", w, h, this->root.children);
navit_handle_resize(this->nav, w, h);
if (this->root.children) {
if (changed) {
@@ -2688,7 +2688,7 @@ gui_internal_keynav_find_closest(struct widget *wi, struct point *p, int dx, int
if (dist1 < 0)
dist1=-dist1;
}
- dbg(lvl_warning,"checking %d,%d %d %d against %d,%d-%d,%d result %d,%d\n", p->x, p->y, dx, dy, wi->p.x, wi->p.y, wi->p.x+wi->w, wi->p.y+wi->h, dist1, dist2);
+ dbg(lvl_debug,"checking %d,%d %d %d against %d,%d-%d,%d result %d,%d\n", p->x, p->y, dx, dy, wi->p.x, wi->p.y, wi->p.x+wi->w, wi->p.y+wi->h, dist1, dist2);
if (dist1 >= 0) {
if (dist2 < 0)
dist1-=dist2;
@@ -2723,13 +2723,13 @@ gui_internal_keynav_highlight_next(struct gui_priv *this, int dx, int dy)
gui_internal_keynav_find_closest(menu, &p, 0, 0, &distance, &result);
if (result) {
gui_internal_keynav_point(result, dx, dy, &p);
- dbg(lvl_warning,"result origin=%p p=%d,%d\n", result, p.x, p.y);
+ dbg(lvl_debug,"result origin=%p p=%d,%d\n", result, p.x, p.y);
}
}
result=NULL;
distance=INT_MAX;
gui_internal_keynav_find_closest(menu, &p, dx, dy, &distance, &result);
- dbg(lvl_warning,"result=%p\n", result);
+ dbg(lvl_debug,"result=%p\n", result);
if (! result) {
if (dx < 0)
p.x=this->root.w;
@@ -2742,7 +2742,7 @@ gui_internal_keynav_highlight_next(struct gui_priv *this, int dx, int dy)
result=NULL;
distance=INT_MAX;
gui_internal_keynav_find_closest(menu, &p, dx, dy, &distance, &result);
- dbg(lvl_warning,"wraparound result=%p\n", result);
+ dbg(lvl_debug,"wraparound result=%p\n", result);
}
gui_internal_highlight_do(this, result);
if (result)
diff --git a/navit/gui/internal/gui_internal_bookmark.c b/navit/gui/internal/gui_internal_bookmark.c
index 64351b323..20b65d594 100644
--- a/navit/gui/internal/gui_internal_bookmark.c
+++ b/navit/gui/internal/gui_internal_bookmark.c
@@ -21,7 +21,7 @@ gui_internal_cmd_add_bookmark_do(struct gui_priv *this, struct widget *widget)
{
GList *l;
struct attr attr;
- dbg(lvl_warning,"text='%s'\n", widget->text);
+ dbg(lvl_debug,"text='%s'\n", widget->text);
if (widget->text && strlen(widget->text)){
navit_get_attr(this->nav, attr_bookmarks, &attr, NULL);
bookmarks_add_bookmark(attr.u.bookmarks, &widget->c, widget->text);
@@ -37,7 +37,7 @@ gui_internal_cmd_add_bookmark_folder_do(struct gui_priv *this, struct widget *wi
{
GList *l;
struct attr attr;
- dbg(lvl_warning,"text='%s'\n", widget->text);
+ dbg(lvl_debug,"text='%s'\n", widget->text);
if (widget->text && strlen(widget->text)){
navit_get_attr(this->nav, attr_bookmarks, &attr, NULL);
bookmarks_add_bookmark(attr.u.bookmarks, NULL, widget->text);
@@ -66,7 +66,7 @@ gui_internal_cmd_rename_bookmark_clicked(struct gui_priv *this, struct widget *w
struct widget *w=(struct widget*)widget->data;
GList *l;
struct attr attr;
- dbg(lvl_warning,"text='%s'\n", w->text);
+ dbg(lvl_debug,"text='%s'\n", w->text);
if (w->text && strlen(w->text)){
navit_get_attr(this->nav, attr_bookmarks, &attr, NULL);
bookmarks_rename_bookmark(attr.u.bookmarks, w->name, w->text);
diff --git a/navit/gui/internal/gui_internal_command.c b/navit/gui/internal/gui_internal_command.c
index 9c7b33609..2c9ac2f64 100644
--- a/navit/gui/internal/gui_internal_command.c
+++ b/navit/gui/internal/gui_internal_command.c
@@ -151,7 +151,7 @@ gui_internal_cmd_escape(struct gui_priv *this, char *function, struct attr **in,
dbg(lvl_error,"first parameter wrong type\n");
return;
}
- dbg(lvl_warning,"in %s result %s\n",in[0]->u.str,escaped.u.str);
+ dbg(lvl_debug,"in %s result %s\n",in[0]->u.str,escaped.u.str);
*out=attr_generic_add_attr(*out, attr_dup(&escaped));
g_free(escaped.u.str);
}
@@ -630,7 +630,7 @@ gui_internal_cmd2_pois(struct gui_priv *this, char *function, struct attr **in,
struct attr pro;
struct coord c;
- dbg(lvl_warning,"enter\n");
+ dbg(lvl_debug,"enter\n");
if (!in || !in[0])
return;
if (!ATTR_IS_COORD_GEO(in[0]->type))
@@ -871,7 +871,7 @@ gui_internal_cmd2_position(struct gui_priv *this, char *function, struct attr **
const char *name=_("Position");
int flags=-1;
- dbg(lvl_warning,"enter\n");
+ dbg(lvl_debug,"enter\n");
if (!in || !in[0])
return;
if (!ATTR_IS_COORD_GEO(in[0]->type))
@@ -881,7 +881,7 @@ gui_internal_cmd2_position(struct gui_priv *this, char *function, struct attr **
if (in[2] && ATTR_IS_INT(in[2]->type))
flags=in[2]->u.num;
}
- dbg(lvl_warning,"flags=0x%x\n",flags);
+ dbg(lvl_debug,"flags=0x%x\n",flags);
gui_internal_cmd_position_do(this, NULL, in[0]->u.coord_geo, NULL, name, flags);
}
@@ -908,10 +908,10 @@ gui_internal_cmd2_set(struct gui_priv *this, char *function, struct attr **in, s
return;
}
pattern=in[0]->u.str;
- dbg(lvl_warning,"pattern %s\n",pattern);
+ dbg(lvl_debug,"pattern %s\n",pattern);
if (in[1]) {
command=gui_internal_cmd_match_expand(pattern, in+1);
- dbg(lvl_warning,"expand %s\n",command);
+ dbg(lvl_debug,"expand %s\n",command);
gui_internal_set(pattern, command);
command_evaluate(&this->self, command);
g_free(command);
@@ -955,7 +955,7 @@ static void
gui_internal_cmd_write(struct gui_priv * this, char *function, struct attr **in, struct attr ***out, int *valid)
{
char *str=NULL;
- dbg(lvl_warning,"enter %s %p %p %p\n",function,in,out,valid);
+ dbg(lvl_debug,"enter %s %p %p %p\n",function,in,out,valid);
if (!in)
return;
while (*in) {
@@ -965,7 +965,7 @@ gui_internal_cmd_write(struct gui_priv * this, char *function, struct attr **in,
if (str) {
str=g_strdup_printf("<html>%s</html>\n",str);
#if 0
- dbg(lvl_error,"%s\n",str);
+ dbg(lvl_debug,"%s\n",str);
#endif
gui_internal_html_parse_text(this, str);
}
@@ -1096,7 +1096,7 @@ gui_internal_cmd_img(struct gui_priv * this, char *function, struct attr **in, s
}
g_free(onclick);
html=g_strdup_printf("<html>%s%s</html>\n",str,suffix);
- dbg(lvl_warning,"return %s",html);
+ dbg(lvl_debug,"return %s",html);
gui_internal_html_parse_text(this, html);
g_free(html);
error:
@@ -1109,16 +1109,16 @@ static void
gui_internal_cmd_debug(struct gui_priv * this, char *function, struct attr **in, struct attr ***out, int *valid)
{
char *str;
- dbg(lvl_error,"begin\n");
+ dbg(lvl_debug,"begin\n");
if (in) {
while (*in) {
str=attr_to_text(*in, NULL, 0);
- dbg(lvl_error,"%s:%s\n",attr_to_name((*in)->type),str);
+ dbg(lvl_debug,"%s:%s\n",attr_to_name((*in)->type),str);
in++;
g_free(str);
}
}
- dbg(lvl_error,"done\n");
+ dbg(lvl_debug,"done\n");
}
static void
diff --git a/navit/gui/internal/gui_internal_gesture.c b/navit/gui/internal/gui_internal_gesture.c
index d0f129b7d..d01a80f1d 100644
--- a/navit/gui/internal/gui_internal_gesture.c
+++ b/navit/gui/internal/gui_internal_gesture.c
@@ -114,7 +114,7 @@ gui_internal_gesture_do(struct gui_priv *this)
if( abs(dx) > this->icon_s*3 && abs(dy) < this->icon_s ) {
struct widget *wt;
- dbg(lvl_warning,"horizontal dx=%d dy=%d\n",dx,dy);
+ dbg(lvl_debug,"horizontal dx=%d dy=%d\n",dx,dy);
/* Prevent swiping if widget was scrolled beforehand */
if(this->pressed==2)
@@ -133,11 +133,11 @@ gui_internal_gesture_do(struct gui_priv *this)
gui_internal_table_button_prev(this,NULL,wt);
return 1;
} else if( abs(dy) > this->icon_s*3 && abs(dx) < this->icon_s ) {
- dbg(lvl_warning,"vertical dx=%d dy=%d\n",dx,dy);
+ dbg(lvl_debug,"vertical dx=%d dy=%d\n",dx,dy);
} else if (dt>300 && abs(dx) <this->icon_s && abs(dy) <this->icon_s ) {
- dbg(lvl_warning,"longtap dx=%d dy=%d\n",dx,dy);
+ dbg(lvl_debug,"longtap dx=%d dy=%d\n",dx,dy);
} else {
- dbg(lvl_warning,"none dx=%d dy=%d\n",dx,dy);
+ dbg(lvl_debug,"none dx=%d dy=%d\n",dx,dy);
}
return 0;
diff --git a/navit/gui/internal/gui_internal_html.c b/navit/gui/internal/gui_internal_html.c
index 291b1701d..aef3bdc70 100644
--- a/navit/gui/internal/gui_internal_html.c
+++ b/navit/gui/internal/gui_internal_html.c
@@ -96,7 +96,7 @@ gui_internal_html_submit(struct gui_priv *this, struct widget *w, void *data)
struct widget *menu;
GList *l;
- dbg(lvl_warning,"enter form %p %s\n",w->form,w->form->onsubmit);
+ dbg(lvl_debug,"enter form %p %s\n",w->form,w->form->onsubmit);
l=g_list_last(this->root.children);
menu=l->data;
graphics_draw_mode(this->gra, draw_mode_begin);
@@ -113,7 +113,7 @@ gui_internal_html_load_href(struct gui_priv *this, char *href, int replace)
if (replace)
gui_internal_prune_menu_count(this, 1, 0);
if (href && href[0] == '#') {
- dbg(lvl_warning,"href=%s\n",href);
+ dbg(lvl_debug,"href=%s\n",href);
g_free(this->href);
this->href=g_strdup(href);
gui_internal_html_menu(this, this->html_text, href+1);
@@ -461,7 +461,7 @@ gui_internal_html_text(xml_context *dummy, const char *text, gsize len, void *da
}
break;
case html_tag_script:
- dbg(lvl_warning,"execute %s\n",text_stripped);
+ dbg(lvl_debug,"execute %s\n",text_stripped);
gui_internal_evaluate(this,text_stripped);
break;
default:
diff --git a/navit/gui/internal/gui_internal_menu.c b/navit/gui/internal/gui_internal_menu.c
index 3777d124c..7769953b9 100644
--- a/navit/gui/internal/gui_internal_menu.c
+++ b/navit/gui/internal/gui_internal_menu.c
@@ -260,7 +260,7 @@ gui_internal_top_bar(struct gui_priv *this)
use_sep=1;
else
use_sep=0;
- dbg(lvl_warning,"%d (%s) + %d + %d + %d > %d\n", wcn->w, wc->text, width_used, w->spx, use_sep ? sep_len : 0, width);
+ dbg(lvl_debug,"%d (%s) + %d + %d + %d > %d\n", wcn->w, wc->text, width_used, w->spx, use_sep ? sep_len : 0, width);
if (wcn->w + width_used + w->spx + (use_sep ? sep_len : 0) + (g_list_previous(l) ? dots_len : 0) > width) {
incomplete=1;
gui_internal_widget_destroy(this, wcn);
diff --git a/navit/gui/internal/gui_internal_poi.c b/navit/gui/internal/gui_internal_poi.c
index 261e1646e..39ef362a0 100644
--- a/navit/gui/internal/gui_internal_poi.c
+++ b/navit/gui/internal/gui_internal_poi.c
@@ -122,7 +122,7 @@ gui_internal_poi_icon(struct gui_priv *this, struct item *item)
icon=g_strdup(el->u.icon.src);
}
char *dot=g_strrstr(icon,".");
- dbg(lvl_info,"%s %s\n", item_to_name(item->type),icon);
+ dbg(lvl_debug,"%s %s\n", item_to_name(item->type),icon);
if(dot)
*dot=0;
img=image_new_xs(this,icon);
@@ -573,7 +573,7 @@ gui_internal_cmd_pois(struct gui_priv *this, struct widget *wm, void *data)
char buffer[32];
struct poi_param *paramnew;
struct attr route;
-dbg(lvl_error,"POIs...");
+dbg(lvl_debug,"POIs...");
if(data) {
param = data;
} else {
@@ -596,7 +596,7 @@ dbg(lvl_error,"POIs...");
items= g_new0( struct item_data, maxitem);
- dbg(lvl_info, "Params: sel = %i, selnb = %i, pagenb = %i, dist = %i, filterstr = %s, AddressFilterType= %d\n",
+ dbg(lvl_debug, "Params: sel = %i, selnb = %i, pagenb = %i, dist = %i, filterstr = %s, AddressFilterType= %d\n",
param->sel, param->selnb, param->pagenb, param->dist, param->filterstr, param->AddressFilterType);
wb=gui_internal_menu(this, isel ? isel->name : _("POIs"));
@@ -614,7 +614,7 @@ dbg(lvl_error,"POIs...");
while ((m=mapset_next(h, 1))) {
selm=map_selection_dup_pro(sel, pro, map_projection(m));
mr=map_rect_new(m, selm);
- dbg(lvl_info,"mr=%p\n", mr);
+ dbg(lvl_debug,"mr=%p\n", mr);
if (mr) {
while ((item=map_rect_get_item(mr))) {
if (gui_internal_cmd_pois_item_selected(param, item) &&
@@ -685,10 +685,10 @@ dbg(lvl_error,"POIs...");
struct item_data *data = fh_extractmin(fh);
if (data == NULL)
{
- dbg(lvl_info, "Empty heap: maxitem = %i, it = %i, dist = %i\n", maxitem, it, dist);
+ dbg(lvl_debug, "Empty heap: maxitem = %i, it = %i, dist = %i\n", maxitem, it, dist);
break;
}
- dbg(lvl_info, "dist1: %i, dist2: %i\n", data->dist, (-key)>>10);
+ dbg(lvl_debug, "dist1: %i, dist2: %i\n", data->dist, (-key)>>10);
if(i==(it-pagesize*pagenb) && data->dist>prevdist)
prevdist=data->dist;
wi=gui_internal_cmd_pois_item(this, &center, &data->item, &data->c, route.u.route, data->dist, data->label);
@@ -767,13 +767,13 @@ dbg(lvl_error,"POIs...");
while(firstrow>=0) {
int currow=g_list_index(wtable->children, td->bottom_row->data) - firstrow;
if(currow<0) {
- dbg(lvl_error,"Can't find bottom row in children list. Stop paging.\n");
+ dbg(lvl_debug,"Can't find bottom row in children list. Stop paging.\n");
break;
}
if(currow>=param->count)
break;
if(!(td->scroll_buttons.next_button->state & STATE_SENSITIVE)) {
- dbg(lvl_error,"Reached last page but item %i not found. Stop paging.\n",param->count);
+ dbg(lvl_debug,"Reached last page but item %i not found. Stop paging.\n",param->count);
break;
}
gui_internal_table_button_next(this, td->scroll_buttons.next_button, NULL);
diff --git a/navit/gui/internal/gui_internal_search.c b/navit/gui/internal/gui_internal_search.c
index 9969e0edb..76be35718 100644
--- a/navit/gui/internal/gui_internal_search.c
+++ b/navit/gui/internal/gui_internal_search.c
@@ -87,7 +87,7 @@ gui_internal_search_cmp(gconstpointer _a, gconstpointer _b)
sa=removecase(a->text);
sb=removecase(b->text);
r=strcmp(sa,sb);
- dbg(lvl_warning,"%s %s %d\n",sa,sb,r);
+ dbg(lvl_debug,"%s %s %d\n",sa,sb,r);
g_free(sa);
g_free(sb);
return r;
@@ -260,7 +260,7 @@ gui_internal_get_match_quality(char *item_name, char* search_text, int is_house_
if(!exp)
continue;
if(!strcmp(exp,folded_query)) {
- dbg(lvl_warning,"exact match for the whole string %s\n", exp);
+ dbg(lvl_debug,"exact match for the whole string %s\n", exp);
match_quality=full_string_match;
g_free(exp);
break;
@@ -268,7 +268,7 @@ gui_internal_get_match_quality(char *item_name, char* search_text, int is_house_
if((p=strstr(exp,folded_query))!=NULL) {
p+=strlen(folded_query);
if(!*p||strchr(LINGUISTICS_WORD_SEPARATORS_ASCII,*p)) {
- dbg(lvl_warning,"exact matching word found inside string %s\n",exp);
+ dbg(lvl_debug,"exact matching word found inside string %s\n",exp);
match_quality=word_match;
}
}
@@ -411,13 +411,13 @@ gui_internal_search_changed(struct gui_priv *this, struct widget *wm, void *data
param=(void *)5;
if (! strcmp(wm->name,"House number"))
param=(void *)6;
- dbg(lvl_warning,"%s now '%s'\n", wm->name, wm->text);
+ dbg(lvl_debug,"%s now '%s'\n", wm->name, wm->text);
gui_internal_search_idle_end(this);
if (wm->text && g_utf8_strlen(wm->text, -1) >= minlen) {
struct attr search_attr;
- dbg(lvl_warning,"process\n");
+ dbg(lvl_debug,"process\n");
if (! strcmp(wm->name,"Country"))
search_attr.type=attr_country_all;
if (! strcmp(wm->name,"Town"))
@@ -452,7 +452,7 @@ gui_internal_search_list_set_default_country(struct gui_priv *this)
item=country_search_get_item(cs);
if (item && item_attr_get(item, attr_country_name, &country_name)) {
search_attr.type=attr_country_all;
- dbg(lvl_warning,"country %s\n", country_name.u.str);
+ dbg(lvl_debug,"country %s\n", country_name.u.str);
search_attr.u.str=country_name.u.str;
search_list_search(this->sl, &search_attr, 0);
while((res=search_list_get_result(this->sl)));
@@ -467,7 +467,7 @@ gui_internal_search_list_set_default_country(struct gui_priv *this)
} else {
dbg(lvl_error,"warning: no default country found\n");
if (this->country_iso2) {
- dbg(lvl_error,"attempting to use country '%s'\n",this->country_iso2);
+ dbg(lvl_debug,"attempting to use country '%s'\n",this->country_iso2);
search_attr.type=attr_country_iso2;
search_attr.u.str=this->country_iso2;
search_list_search(this->sl, &search_attr, 0);
diff --git a/navit/gui/internal/gui_internal_widget.c b/navit/gui/internal/gui_internal_widget.c
index d8888b12e..ebd91d200 100644
--- a/navit/gui/internal/gui_internal_widget.c
+++ b/navit/gui/internal/gui_internal_widget.c
@@ -248,7 +248,7 @@ gui_internal_highlight_do(struct gui_priv *this, struct widget *found)
this->highlighted_menu=g_list_last(this->root.children)->data;
this->highlighted->state |= STATE_HIGHLIGHTED;
gui_internal_widget_render(this, this->highlighted);
- dbg(lvl_warning,"%d,%d %dx%d\n", found->p.x, found->p.y, found->w, found->h);
+ dbg(lvl_debug,"%d,%d %dx%d\n", found->p.x, found->p.y, found->w, found->h);
}
graphics_draw_mode(this->gra, draw_mode_end);
}
@@ -550,7 +550,7 @@ static void gui_internal_box_pack(struct gui_priv *this, struct widget *w)
wc->p.x=x-wc->w;
#if 0
if (w->flags & flags_scrolly)
- dbg(lvl_error,"%d - %d vs %d - %d\n",y,y+wc->h,w->p.y,w->p.y+w->h-hb);
+ dbg(lvl_debug,"%d - %d vs %d - %d\n",y,y+wc->h,w->p.y,w->p.y+w->h-hb);
if (y+wc->h > w->p.y+w->h-hb || y+wc->h < w->p.y)
wc->state |= STATE_OFFSCREEN;
else
@@ -605,7 +605,7 @@ static void gui_internal_box_pack(struct gui_priv *this, struct widget *w)
w->scroll_buttons->button_box->p.x=w->p.x;
w->scroll_buttons->button_box->p.y=w->p.y+w->h-w->scroll_buttons->button_box->h;
gui_internal_widget_pack(this, w->scroll_buttons->button_box);
- dbg(lvl_error,"needs buttons %d vs %d\n",y,w->h);
+ dbg(lvl_debug,"needs buttons %d vs %d\n",y,w->h);
gui_internal_box_pack(this, w);
return;
}
diff --git a/navit/gui/qml/bookmarksProxy.h b/navit/gui/qml/bookmarksProxy.h
index 96ed32e8a..03cbcbc88 100644
--- a/navit/gui/qml/bookmarksProxy.h
+++ b/navit/gui/qml/bookmarksProxy.h
@@ -144,7 +144,7 @@ public slots:
if (!item_attr_get(item, attr_label, &attr)) continue;
label=QString::fromLocal8Bit(attr.u.str);
- dbg(lvl_error,"Bookmark is %s\n",bookmark.toStdString().c_str());
+ dbg(lvl_debug,"Bookmark is %s\n",bookmark.toStdString().c_str());
if (label.compare(bookmark)) continue;
item_coord_get(item, &c, 1);
if (this->object->currentPoint!=NULL) {
diff --git a/navit/gui/qml/gui_qml.cpp b/navit/gui/qml/gui_qml.cpp
index 98132c756..cee0574bd 100644
--- a/navit/gui/qml/gui_qml.cpp
+++ b/navit/gui/qml/gui_qml.cpp
@@ -161,11 +161,11 @@ static void gui_qml_button(void *data, int pressed, int button, struct point *p)
// check whether the position of the mouse changed during press/release OR if it is the scrollwheel
if (!navit_handle_button(this_->nav, pressed, button, p, NULL)) {
- dbg(lvl_warning,"navit has handled button\n");
+ dbg(lvl_debug,"navit has handled button\n");
return;
}
- dbg(lvl_warning,"enter %d %d\n", pressed, button);
+ dbg(lvl_debug,"enter %d %d\n", pressed, button);
if (this_->signal_on_map_click) {
gui_qml_dbus_signal(this_, p);
return;
diff --git a/navit/gui/qml/navitProxy.h b/navit/gui/qml/navitProxy.h
index 48197eeb5..423863b0e 100644
--- a/navit/gui/qml/navitProxy.h
+++ b/navit/gui/qml/navitProxy.h
@@ -82,7 +82,7 @@ public slots:
dropIterFunc(iter);
- dbg(lvl_error,QString::number(_itemId).toStdString().c_str());
+ dbg(lvl_debug,QString::number(_itemId).toStdString().c_str());
return retDoc.toString();
}
diff --git a/navit/gui/qml/proxy.h b/navit/gui/qml/proxy.h
index d2e00b95c..3243dc8cb 100644
--- a/navit/gui/qml/proxy.h
+++ b/navit/gui/qml/proxy.h
@@ -55,7 +55,7 @@ public slots:
struct attr attr_value;
double *helper;
- dbg(lvl_warning,"Setting %s to %s\n",attr_name.toStdString().c_str(),attr_string.toStdString().c_str());
+ dbg(lvl_debug,"Setting %s to %s\n",attr_name.toStdString().c_str(),attr_string.toStdString().c_str());
getAttrFunc(attr_from_name(attr_name.toStdString().c_str()), &attr_value, NULL);
if (ATTR_IS_INT(attr_value.type)) {
diff --git a/navit/gui/qml/routeProxy.h b/navit/gui/qml/routeProxy.h
index 2492fda23..a2fb4c793 100644
--- a/navit/gui/qml/routeProxy.h
+++ b/navit/gui/qml/routeProxy.h
@@ -30,10 +30,10 @@ public slots:
QList<struct attr> destinations=this->_routeDestinations();
for (QList<struct attr>::const_iterator iter=destinations.begin();iter!=destinations.end();iter++) {
NGQPoint helperPoint(this->object,iter->u.pcoord,MapPoint);
- dbg(lvl_error,"Added destination %s\n",helperPoint.coordString().toLocal8Bit().constData());
+ dbg(lvl_debug,"Added destination %s\n",helperPoint.coordString().toLocal8Bit().constData());
}
- //dbg(lvl_error,QString::number(_itemId).toStdString().c_str());
+ //dbg(lvl_debug,QString::number(_itemId).toStdString().c_str());
//return retDoc.toString();
return QString();
diff --git a/navit/gui/qml/searchProxy.h b/navit/gui/qml/searchProxy.h
index 49fadd5e3..579ac3dac 100644
--- a/navit/gui/qml/searchProxy.h
+++ b/navit/gui/qml/searchProxy.h
@@ -33,7 +33,7 @@ public:
item=country_search_get_item(cs);
if (item && item_attr_get(item, attr_country_name, &country_name)) {
search_attr.type=attr_country_all;
- dbg(lvl_error,"country %s\n", country_name.u.str);
+ dbg(lvl_debug,"country %s\n", country_name.u.str);
this->country_name=QString::fromLocal8Bit(country_name.u.str);
search_attr.u.str=country_name.u.str;
search_list_search(this->sl, &search_attr, 0);
@@ -46,7 +46,7 @@ public:
} else {
dbg(lvl_error,"warning: no default country found\n");
if (!this->country_iso2.isEmpty()) {
- dbg(lvl_error,"attempting to use country '%s'\n",this->country_iso2.toStdString().c_str());
+ dbg(lvl_debug,"attempting to use country '%s'\n",this->country_iso2.toStdString().c_str());
search_attr.type=attr_country_iso2;
search_attr.u.str=(char*)this->country_iso2.toStdString().c_str();
search_list_search(this->sl, &search_attr, 0);
diff --git a/navit/gui/win32/gui_win32.c b/navit/gui/win32/gui_win32.c
index 1e7c941ec..bdbdb357d 100644
--- a/navit/gui/win32/gui_win32.c
+++ b/navit/gui/win32/gui_win32.c
@@ -185,7 +185,7 @@ static void window_layout( HWND hwnd )
rcClient.top += iToolHeight;
- dbg(lvl_error, "resize gui to: %d %d %d %d \n", rcClient.left, rcClient.right, rcClient.top, rcClient.bottom );
+ dbg(lvl_debug, "resize gui to: %d %d %d %d \n", rcClient.left, rcClient.right, rcClient.top, rcClient.bottom );
hChild = GetDlgItem(hwnd, ID_CHILD_GFX);
diff --git a/navit/gui/win32/win32_gui_destination.c b/navit/gui/win32/win32_gui_destination.c
index 196bf7298..115b9058b 100644
--- a/navit/gui/win32/win32_gui_destination.c
+++ b/navit/gui/win32/win32_gui_destination.c
@@ -212,7 +212,7 @@ static void notify_textchange(struct datawindow_priv *datawindow, int param1, in
(void)ListView_InsertItem(datawindow->hwndList, &lvI);
ListView_SetItemText(datawindow->hwndList, listIndex, 1, tcharBuffer);
g_free(tcharBuffer);
- dbg(lvl_error,"%s\n", res->country->name);
+ dbg(lvl_debug,"%s\n", res->country->name);
listIndex++;
}
}
diff --git a/navit/linguistics.c b/navit/linguistics.c
index 4314b5345..549f90e17 100644
--- a/navit/linguistics.c
+++ b/navit/linguistics.c
@@ -423,7 +423,7 @@ linguistics_expand_special(const char *str, int mode)
out=new_ret+(out-ret);
ret=new_ret;
}
- dbg(lvl_warning,"found %s %s %d %s %d\n",in,spc[0],len,replace,replace_len);
+ dbg(lvl_debug,"found %s %s %d %s %d\n",in,spc[0],len,replace,replace_len);
strcpy(out, replace);
out+=replace_len;
match=1;
diff --git a/navit/log.c b/navit/log.c
index d37396ccd..2bca13425 100644
--- a/navit/log.c
+++ b/navit/log.c
@@ -349,7 +349,7 @@ log_timer(struct log *this_)
int delta;
gettimeofday(&tv, NULL);
delta=(tv.tv_sec-this_->last_flush.tv_sec)*1000+(tv.tv_usec-this_->last_flush.tv_usec)/1000;
- dbg(lvl_warning,"delta=%d flush_time=%d\n", delta, this_->flush_time);
+ dbg(lvl_debug,"delta=%d flush_time=%d\n", delta, this_->flush_time);
if (this_->flush_time && delta >= this_->flush_time*1000)
log_flush(this_,0);
#endif
@@ -386,7 +386,7 @@ log_new(struct attr * parent,struct attr **attrs)
struct file_wordexp *wexp;
char *filename, **wexp_data;
- dbg(lvl_warning,"enter\n");
+ dbg(lvl_debug,"enter\n");
ret->func=&log_func;
navit_object_ref((struct navit_object *)ret);
data=attr_search(attrs, NULL, attr_data);
@@ -418,7 +418,7 @@ log_new(struct attr * parent,struct attr **attrs)
if (flush_time)
ret->flush_time=flush_time->u.num;
if (ret->flush_time) {
- dbg(lvl_warning,"interval %d\n", ret->flush_time*1000);
+ dbg(lvl_debug,"interval %d\n", ret->flush_time*1000);
ret->timer_callback=callback_new_1(callback_cast(log_timer), ret);
ret->timer=event_add_timeout(ret->flush_time*1000, 1, ret->timer_callback);
}
@@ -492,9 +492,9 @@ log_set_trailer(struct log *this_, char *data, int len)
void
log_write(struct log *this_, char *data, int len, enum log_flags flags)
{
- dbg(lvl_warning,"enter\n");
+ dbg(lvl_debug,"enter\n");
if (log_change_required(this_)) {
- dbg(lvl_warning,"log_change");
+ dbg(lvl_debug,"log_change");
log_change(this_);
}
if (flags & log_flag_replace_buffer)
@@ -561,7 +561,7 @@ log_printf(struct log *this_, char *fmt, ...)
void
log_destroy(struct log *this_)
{
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
attr_list_free(this_->attrs);
callback_destroy(this_->timer_callback);
event_remove_timeout(this_->timer);
diff --git a/navit/map.c b/navit/map.c
index bb8a52385..51cda59be 100644
--- a/navit/map.c
+++ b/navit/map.c
@@ -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(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);
+ dbg(lvl_debug,"enter(%p,%p,%p,%d)\n", m, item, search_attr, partial);
+ dbg(lvl_debug,"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;
diff --git a/navit/map/binfile/binfile.c b/navit/map/binfile/binfile.c
index 1abc14c23..d0abd24f4 100644
--- a/navit/map/binfile/binfile.c
+++ b/navit/map/binfile/binfile.c
@@ -241,7 +241,7 @@ binfile_read_eoc(struct file *fi)
eoc=(struct zip_eoc *)file_data_read(fi,fi->size-sizeof(struct zip_eoc), sizeof(struct zip_eoc));
if (eoc) {
eoc_to_cpu(eoc);
- dbg(lvl_warning,"sig 0x%x\n", eoc->zipesig);
+ dbg(lvl_debug,"sig 0x%x\n", eoc->zipesig);
if (eoc->zipesig != zip_eoc_sig) {
dbg(lvl_error,"eoc signature check failed: 0x%x vs 0x%x\n",eoc->zipesig,zip_eoc_sig);
file_data_free(fi,(unsigned char *)eoc);
@@ -259,7 +259,7 @@ binfile_read_eoc64(struct file *fi)
eocl=(struct zip64_eocl *)file_data_read(fi,fi->size-sizeof(struct zip_eoc)-sizeof(struct zip64_eocl), sizeof(struct zip64_eocl));
if (!eocl)
return NULL;
- dbg(lvl_warning,"sig 0x%x\n", eocl->zip64lsig);
+ dbg(lvl_debug,"sig 0x%x\n", eocl->zip64lsig);
if (eocl->zip64lsig != zip64_eocl_sig) {
file_data_free(fi,(unsigned char *)eocl);
dbg(lvl_warning,"eocl wrong\n");
@@ -272,7 +272,7 @@ binfile_read_eoc64(struct file *fi)
dbg(lvl_warning,"eoc wrong\n");
eoc=NULL;
}
- dbg(lvl_warning,"eoc64 ok 0x"LONGLONG_HEX_FMT " 0x"LONGLONG_HEX_FMT "\n",eoc->zip64eofst,eoc->zip64ecsz);
+ dbg(lvl_debug,"eoc64 ok 0x"LONGLONG_HEX_FMT " 0x"LONGLONG_HEX_FMT "\n",eoc->zip64eofst,eoc->zip64ecsz);
}
file_data_free(fi,(unsigned char *)eocl);
return eoc;
@@ -297,9 +297,9 @@ binfile_read_cd(struct map_priv *m, int offset, int len)
}
cd=(struct zip_cd *)file_data_read(m->fi,cdoffset+offset, sizeof(*cd)+len);
if (cd) {
- dbg(lvl_warning,"cd at "LONGLONG_FMT" %zu bytes\n",cdoffset+offset, sizeof(*cd)+len);
+ dbg(lvl_debug,"cd at "LONGLONG_FMT" %zu bytes\n",cdoffset+offset, sizeof(*cd)+len);
cd_to_cpu(cd);
- dbg(lvl_warning,"sig 0x%x\n", cd->zipcensig);
+ dbg(lvl_debug,"sig 0x%x\n", cd->zipcensig);
if (cd->zipcensig != zip_cd_sig) {
file_data_free(m->fi,(unsigned char *)cd);
cd=NULL;
@@ -408,7 +408,7 @@ binfile_search_cd(struct map_priv *m, int offset, char *name, int partial, int s
long long cdoffset=m->eoc64?m->eoc64->zip64eofst:m->eoc->zipeofst;
struct zip_cd *cd;
#if 0
- dbg(lvl_error,"end=%d\n",end);
+ dbg(lvl_debug,"end=%d\n",end);
#endif
while (offset < end) {
cd=(struct zip_cd *)(m->search_data+offset-m->search_offset);
@@ -418,7 +418,7 @@ binfile_search_cd(struct map_priv *m, int offset, char *name, int partial, int s
offset-m->search_offset+sizeof(*cd)+cd->zipcfnl+cd->zipcxtl > m->search_size
) {
#if 0
- dbg(lvl_error,"reload %p %d %d\n", m->search_data, m->search_offset, offset);
+ dbg(lvl_debug,"reload %p %d %d\n", m->search_data, m->search_offset, offset);
#endif
if (m->search_data)
file_data_free(m->fi,m->search_data);
@@ -430,8 +430,8 @@ binfile_search_cd(struct map_priv *m, int offset, char *name, int partial, int s
cd=(struct zip_cd *)m->search_data;
}
#if 0
- dbg(lvl_error,"offset=%d search_offset=%d search_size=%d search_data=%p cd=%p\n", offset, m->search_offset, m->search_size, m->search_data, cd);
- dbg(lvl_error,"offset=%d fn='%s'\n",offset,cd->zipcfn);
+ dbg(lvl_debug,"offset=%d search_offset=%d search_size=%d search_data=%p cd=%p\n", offset, m->search_offset, m->search_size, m->search_data, cd);
+ dbg(lvl_debug,"offset=%d fn='%s'\n",offset,cd->zipcfn);
#endif
if (!skip &&
(partial || cd->zipcfnl == len) &&
@@ -447,7 +447,7 @@ binfile_search_cd(struct map_priv *m, int offset, char *name, int partial, int s
static void
map_destroy_binfile(struct map_priv *m)
{
- dbg(lvl_warning,"map_destroy_binfile\n");
+ dbg(lvl_debug,"map_destroy_binfile\n");
if (m->fi)
map_binfile_close(m);
map_binfile_destroy(m);
@@ -542,7 +542,7 @@ binfile_extract(struct map_priv *m, char *dir, char *filename, int partial)
if (full[len-2] != '/') {
lfh=binfile_read_lfh(m->fi, binfile_cd_offset(cd));
start=binfile_read_content(m, m->fi, binfile_cd_offset(cd), lfh);
- dbg(lvl_error,"fopen '%s'\n", full);
+ dbg(lvl_debug,"fopen '%s'\n", full);
f=fopen(full,"w");
fwrite(start, lfh->zipuncmp, 1, f);
fclose(f);
@@ -588,7 +588,7 @@ binfile_attr_get(void *priv_data, enum attr_type attr_type, struct attr *attr)
mr->label_attr[4]=t->pos_attr;
if (type == attr_type || attr_type == attr_any) {
if (attr_type == attr_any) {
- dbg(lvl_warning,"pos %p attr %s size %d\n", t->pos_attr-1, attr_to_name(type), size);
+ dbg(lvl_debug,"pos %p attr %s size %d\n", t->pos_attr-1, attr_to_name(type), size);
}
attr->type=type;
if (ATTR_IS_GROUP(type)) {
@@ -666,13 +666,13 @@ binfile_item_dup(struct map_priv *m, struct item *item, struct tile *t, int exte
entry->id.id_hi=item->id_hi;
entry->id.id_lo=item->id_lo;
entry->flags=1;
- dbg(lvl_error,"id 0x%x,0x%x\n",entry->id.id_hi,entry->id.id_lo);
+ dbg(lvl_debug,"id 0x%x,0x%x\n",entry->id.id_hi,entry->id.id_lo);
memcpy(ret, t->pos, (size+1)*sizeof(int));
if (!m->changes)
m->changes=g_hash_table_new_full(binfile_hash_entry_hash, binfile_hash_entry_equal, g_free, NULL);
g_hash_table_replace(m->changes, entry, entry);
- dbg(lvl_error,"ret %p\n",ret);
+ dbg(lvl_debug,"ret %p\n",ret);
return ret;
}
@@ -687,15 +687,15 @@ binfile_coord_set(void *priv_data, struct coord *c, int count, enum change_mode
{
int *i=t->pos,j=0;
- dbg(lvl_error,"Before: pos_coord=%td\n",t->pos_coord-i);
+ dbg(lvl_debug,"Before: pos_coord=%td\n",t->pos_coord-i);
while (i < t->pos_next)
- dbg(lvl_error,"%d:0x%x\n",j++,*i++);
+ dbg(lvl_debug,"%d:0x%x\n",j++,*i++);
}
aoffset=t->pos_attr-t->pos_attr_start;
coffset=t->pos_coord-t->pos_coord_start-2;
clen=t->pos_attr_start-t->pos_coord+2;
- dbg(lvl_error,"coffset=%d clen=%d\n",coffset,clen);
+ dbg(lvl_debug,"coffset=%d clen=%d\n",coffset,clen);
switch (mode) {
case change_mode_delete:
if (count*2 > clen)
@@ -732,7 +732,7 @@ binfile_coord_set(void *priv_data, struct coord *c, int count, enum change_mode
default:
return 0;
}
- dbg(lvl_error,"delta %d\n",delta);
+ dbg(lvl_debug,"delta %d\n",delta);
data=binfile_item_dup(mr->m, &mr->item, t, delta > 0 ? delta:0);
data[0]=cpu_to_le32(le32_to_cpu(data[0])+delta);
data[2]=cpu_to_le32(le32_to_cpu(data[2])+delta);
@@ -744,18 +744,18 @@ binfile_coord_set(void *priv_data, struct coord *c, int count, enum change_mode
tn=mr->t;
tn->pos_coord=tn->pos_coord_start+coffset;
tn->pos_attr=tn->pos_attr_start+aoffset;
- dbg(lvl_error,"moving %d ints from offset %td to %td\n",move_len,tn->pos_coord_start+move_offset-data,tn->pos_coord_start+move_offset+delta-data);
+ dbg(lvl_debug,"moving %d ints from offset %td to %td\n",move_len,tn->pos_coord_start+move_offset-data,tn->pos_coord_start+move_offset+delta-data);
memmove(tn->pos_coord_start+move_offset+delta, tn->pos_coord_start+move_offset, move_len*4);
{
int *i=tn->pos,j=0;
- dbg(lvl_error,"After move: pos_coord=%td\n",tn->pos_coord-i);
+ dbg(lvl_debug,"After move: pos_coord=%td\n",tn->pos_coord-i);
while (i < tn->pos_next)
- dbg(lvl_error,"%d:0x%x\n",j++,*i++);
+ dbg(lvl_debug,"%d:0x%x\n",j++,*i++);
}
if (mode != change_mode_append)
tn->pos_coord+=move_offset;
if (mode != change_mode_delete) {
- dbg(lvl_error,"writing %d ints at offset %td\n",count*2,write_offset+tn->pos_coord_start-data);
+ dbg(lvl_debug,"writing %d ints at offset %td\n",count*2,write_offset+tn->pos_coord_start-data);
for (i = 0 ; i < count ; i++) {
tn->pos_coord_start[write_offset++]=c[i].x;
tn->pos_coord_start[write_offset++]=c[i].y;
@@ -764,9 +764,9 @@ binfile_coord_set(void *priv_data, struct coord *c, int count, enum change_mode
}
{
int *i=tn->pos,j=0;
- dbg(lvl_error,"After: pos_coord=%td\n",tn->pos_coord-i);
+ dbg(lvl_debug,"After: pos_coord=%td\n",tn->pos_coord-i);
while (i < tn->pos_next)
- dbg(lvl_error,"%d:0x%x\n",j++,*i++);
+ dbg(lvl_debug,"%d:0x%x\n",j++,*i++);
}
return 1;
}
@@ -783,9 +783,9 @@ binfile_attr_set(void *priv_data, struct attr *attr, enum change_mode mode)
{
int *i=t->pos,j=0;
- dbg(lvl_error,"Before: pos_attr=%td\n",t->pos_attr-i);
+ dbg(lvl_debug,"Before: pos_attr=%td\n",t->pos_attr-i);
while (i < t->pos_next)
- dbg(lvl_error,"%d:0x%x\n",j++,*i++);
+ dbg(lvl_debug,"%d:0x%x\n",j++,*i++);
}
@@ -804,7 +804,7 @@ binfile_attr_set(void *priv_data, struct attr *attr, enum change_mode mode)
}
while (offset < naoffset) {
oattr_len=le32_to_cpu(t->pos_attr_start[offset])+1;
- dbg(lvl_error,"len %d\n",oattr_len);
+ dbg(lvl_debug,"len %d\n",oattr_len);
write_offset=offset;
offset+=oattr_len;
}
@@ -837,7 +837,7 @@ binfile_attr_set(void *priv_data, struct attr *attr, enum change_mode mode)
delta=nattr_len-oattr_len;
else
delta=nattr_len;
- dbg(lvl_error,"delta %d oattr_len %d nattr_len %d\n",delta,oattr_len, nattr_len);
+ dbg(lvl_debug,"delta %d oattr_len %d nattr_len %d\n",delta,oattr_len, nattr_len);
data=binfile_item_dup(mr->m, &mr->item, t, delta > 0 ? delta:0);
data[0]=cpu_to_le32(le32_to_cpu(data[0])+delta);
new.pos=new.start=data;
@@ -848,20 +848,20 @@ binfile_attr_set(void *priv_data, struct attr *attr, enum change_mode mode)
tn=mr->t;
tn->pos_coord=tn->pos_coord_start+coffset;
tn->pos_attr=tn->pos_attr_start+offset;
- dbg(lvl_error,"attr start %td offset %d\n",tn->pos_attr_start-data,offset);
- dbg(lvl_error,"moving %d ints from offset %td to %td\n",move_len,tn->pos_attr_start+move_offset-data,tn->pos_attr_start+move_offset+delta-data);
+ dbg(lvl_debug,"attr start %td offset %d\n",tn->pos_attr_start-data,offset);
+ dbg(lvl_debug,"moving %d ints from offset %td to %td\n",move_len,tn->pos_attr_start+move_offset-data,tn->pos_attr_start+move_offset+delta-data);
memmove(tn->pos_attr_start+move_offset+delta, tn->pos_attr_start+move_offset, move_len*4);
if (mode != change_mode_append)
tn->pos_attr+=delta;
{
int *i=tn->pos,j=0;
- dbg(lvl_error,"After move: pos_attr=%td\n",tn->pos_attr-i);
+ dbg(lvl_debug,"After move: pos_attr=%td\n",tn->pos_attr-i);
while (i < tn->pos_next)
- dbg(lvl_error,"%d:0x%x\n",j++,*i++);
+ dbg(lvl_debug,"%d:0x%x\n",j++,*i++);
}
if (nattr_len) {
int *nattr=tn->pos_attr_start+write_offset;
- dbg(lvl_error,"writing %d ints at %td\n",nattr_len,nattr-data);
+ dbg(lvl_debug,"writing %d ints at %td\n",nattr_len,nattr-data);
nattr[0]=cpu_to_le32(nattr_len-1);
nattr[1]=cpu_to_le32(attr->type);
memcpy(nattr+2, attr_data_get(attr), nattr_size);
@@ -869,11 +869,11 @@ binfile_attr_set(void *priv_data, struct attr *attr, enum change_mode mode)
}
{
int *i=tn->pos,j=0;
- dbg(lvl_error,"After: pos_attr=%td\n",tn->pos_attr-i);
+ dbg(lvl_debug,"After: pos_attr=%td\n",tn->pos_attr-i);
while (i < tn->pos_next)
- dbg(lvl_error,"After: pos_attr=%td\n",tn->pos_attr-i);
+ dbg(lvl_debug,"After: pos_attr=%td\n",tn->pos_attr-i);
while (i < tn->pos_next)
- dbg(lvl_error,"%d:0x%x\n",j++,*i++);
+ dbg(lvl_debug,"%d:0x%x\n",j++,*i++);
}
return 1;
}
@@ -910,7 +910,7 @@ pop_tile(struct map_rect_priv *mr)
file_data_free(mr->m->fi, (unsigned char *)(mr->t->start));
#ifdef DEBUG_SIZE
#if DEBUG_SIZE > 0
- dbg(lvl_error,"leave %d\n",mr->t->zipfile_num);
+ dbg(lvl_debug,"leave %d\n",mr->t->zipfile_num);
#endif
#endif
mr->t=&mr->tiles[--mr->tile_depth-1];
@@ -925,8 +925,8 @@ zipfile_to_tile(struct map_priv *m, struct zip_cd *cd, struct tile *t)
struct zip_lfh *lfh;
char *zipfn;
struct file *fi;
- dbg(lvl_warning,"enter %p %p %p\n", m, cd, t);
- dbg(lvl_warning,"cd->zipofst=0x"LONGLONG_HEX_FMT "\n", binfile_cd_offset(cd));
+ dbg(lvl_debug,"enter %p %p %p\n", m, cd, t);
+ dbg(lvl_debug,"cd->zipofst=0x"LONGLONG_HEX_FMT "\n", binfile_cd_offset(cd));
t->start=NULL;
t->mode=1;
if (m->fis)
@@ -957,7 +957,7 @@ map_binfile_handle_redirect(struct map_priv *m)
if (m->redirect)
return 0;
m->redirect=1;
- dbg(lvl_error,"redirected from %s to %s\n",m->url,location);
+ dbg(lvl_debug,"redirected from %s to %s\n",m->url,location);
g_free(m->url);
m->url=g_strdup(location);
file_destroy(m->http);
@@ -1006,7 +1006,7 @@ map_binfile_download_size(struct map_priv *m)
} while (map_binfile_handle_redirect(m));
ret=file_size(m->http);
- dbg(lvl_warning,"file size "LONGLONG_FMT"\n",ret);
+ dbg(lvl_debug,"file size "LONGLONG_FMT"\n",ret);
return ret;
}
@@ -1052,7 +1052,7 @@ map_binfile_download_range(struct map_priv *m, long long offset, int size)
ret=file_data_read_special(http, size, &size_ret);
if (size_ret != size) {
- dbg(lvl_error,"size %d vs %d\n",size,size_ret);
+ dbg(lvl_debug,"size %d vs %d\n",size,size_ret);
g_free(ret);
return NULL;
}
@@ -1066,7 +1066,7 @@ download_cd(struct map_download *download)
struct zip64_eoc *zip64_eoc=(struct zip64_eoc *)file_data_read(m->fi, 0, sizeof(*zip64_eoc));
struct zip_cd *cd=(struct zip_cd *)map_binfile_download_range(m, zip64_eoc->zip64eofst+download->zipfile*m->cde_size,m->cde_size);
file_data_free(m->fi, (unsigned char *)zip64_eoc);
- dbg(lvl_error,"needed cd, result %p\n",cd);
+ dbg(lvl_debug,"needed cd, result %p\n",cd);
return cd;
}
@@ -1099,7 +1099,7 @@ download_request(struct map_download *download)
attrs[3]=NULL;
download->dl_size=size;
}
- dbg(lvl_error,"encountered missing tile %d %s(%s), Downloading %d bytes at "LONGLONG_FMT"\n",download->zipfile, url.u.str,(char *)(download->cd_copy+1), download->dl_size, download->offset);
+ dbg(lvl_debug,"encountered missing tile %d %s(%s), Downloading %d bytes at "LONGLONG_FMT"\n",download->zipfile, url.u.str,(char *)(download->cd_copy+1), download->dl_size, download->offset);
map_binfile_http_request(download->m, attrs);
g_free(url.u.str);
download->http=download->m->http;
@@ -1147,7 +1147,7 @@ download_download(struct map_download *download)
return 0;
}
- dbg(lvl_warning,"got %d bytes writing at offset "LONGLONG_FMT"\n",size_ret,download->offset);
+ dbg(lvl_debug,"got %d bytes writing at offset "LONGLONG_FMT"\n",size_ret,download->offset);
if (size_ret <= 0) {
g_free(data);
return 1;
@@ -1189,7 +1189,7 @@ download_finish(struct map_download *download)
g_free(download->cd_copy);
download->cd=(struct zip_cd *)(file_data_read(download->file, download->m->eoc->zipeofst + download->zipfile*download->m->cde_size, download->m->cde_size));
cd_to_cpu(download->cd);
- dbg(lvl_warning,"Offset %d\n",download->cd->zipofst);
+ dbg(lvl_debug,"Offset %d\n",download->cd->zipofst);
return 1;
}
@@ -1197,7 +1197,7 @@ static int
download_planet_size(struct map_download *download)
{
download->size=map_binfile_download_size(download->m);
- dbg(lvl_error,"Planet size "LONGLONG_FMT"\n",download->size);
+ dbg(lvl_debug,"Planet size "LONGLONG_FMT"\n",download->size);
if (!download->size)
return 0;
return 1;
@@ -1240,7 +1240,7 @@ download_directory_do(struct map_download *download)
struct zip_cd *cd;
cd=(struct zip_cd *)file_data_read_special(download->http, sizeof(*cd), &size_ret);
cd->zipcunc=0;
- dbg(lvl_warning,"size_ret=%d\n",size_ret);
+ dbg(lvl_debug,"size_ret=%d\n",size_ret);
if (!size_ret)
return 0;
if (size_ret != sizeof(*cd) || cd->zipcensig != zip_cd_sig) {
@@ -1297,14 +1297,14 @@ push_zipfile_tile_do(struct map_rect_priv *mr, struct zip_cd *cd, int zipfile, i
struct map_priv *m=mr->m;
struct file *f=m->fi;
- dbg(lvl_warning,"enter %p %d\n", mr, zipfile);
+ dbg(lvl_debug,"enter %p %d\n", mr, zipfile);
#ifdef DEBUG_SIZE
#if DEBUG_SIZE > 0
{
char filename[cd->zipcfnl+1];
memcpy(filename, cd+1, cd->zipcfnl);
filename[cd->zipcfnl]='\0';
- dbg(lvl_error,"enter %d (%s) %d\n",zipfile, filename, cd->zipcunc);
+ dbg(lvl_debug,"enter %d (%s) %d\n",zipfile, filename, cd->zipcunc);
}
#endif
mr->size+=cd->zipcunc;
@@ -1360,7 +1360,7 @@ download(struct map_priv *m, struct map_rect_priv *mr, struct zip_cd *cd, int zi
return NULL;
}
for (;;) {
- dbg(lvl_error,"state=%d\n",download->state);
+ dbg(lvl_debug,"state=%d\n",download->state);
switch (download->state) {
case 0:
dbg(lvl_error,"error\n");
@@ -1462,7 +1462,7 @@ push_zipfile_tile(struct map_rect_priv *mr, int zipfile, int offset, int length,
struct file *f=m->fi;
long long cdoffset=m->eoc64?m->eoc64->zip64eofst:m->eoc->zipeofst;
struct zip_cd *cd=(struct zip_cd *)(file_data_read(f, cdoffset + zipfile*m->cde_size, m->cde_size));
- dbg(lvl_warning,"read from "LONGLONG_FMT" %d bytes\n",cdoffset + zipfile*m->cde_size, m->cde_size);
+ dbg(lvl_debug,"read from "LONGLONG_FMT" %d bytes\n",cdoffset + zipfile*m->cde_size, m->cde_size);
cd_to_cpu(cd);
if (!cd->zipcunc && m->url) {
cd=download(m, mr, cd, zipfile, offset, length, async);
@@ -1479,7 +1479,7 @@ map_rect_new_binfile_int(struct map_priv *map, struct map_selection *sel)
struct map_rect_priv *mr;
binfile_check_version(map);
- dbg(lvl_warning,"map_rect_new_binfile\n");
+ dbg(lvl_debug,"map_rect_new_binfile\n");
if (!map->fi && !map->url)
return NULL;
map_binfile_http_close(map);
@@ -1567,7 +1567,7 @@ map_rect_new_binfile(struct map_priv *map, struct map_selection *sel)
{
struct map_rect_priv *mr=map_rect_new_binfile_int(map, sel);
struct tile t;
- dbg(lvl_warning,"zip_members=%d\n", map->zip_members);
+ dbg(lvl_debug,"zip_members=%d\n", map->zip_members);
if (map->url && map->fi && sel && sel->order == 255) {
map_download_selection(map, mr, sel);
}
@@ -1599,7 +1599,7 @@ write_changes_do(gpointer key, gpointer value, gpointer user_data)
if (entry->flags) {
entry->flags=0;
fwrite(entry, sizeof(*entry)+(le32_to_cpu(entry->data[0])+1)*4, 1, out);
- dbg(lvl_error,"yes\n");
+ dbg(lvl_debug,"yes\n");
}
}
@@ -1652,7 +1652,7 @@ map_rect_destroy_binfile(struct map_rect_priv *mr)
write_changes(mr->m);
while (pop_tile(mr));
#ifdef DEBUG_SIZE
- dbg(lvl_error,"size=%d kb\n",mr->size/1024);
+ dbg(lvl_debug,"size=%d kb\n",mr->size/1024);
#endif
if (mr->tiles[0].fi && mr->tiles[0].start)
file_data_free(mr->tiles[0].fi, (unsigned char *)(mr->tiles[0].start));
@@ -1668,11 +1668,11 @@ setup_pos(struct map_rect_priv *mr)
struct tile *t=mr->t;
size=le32_to_cpu(t->pos[0]);
if (size > 1024*1024 || size < 0) {
- dbg(lvl_error,"size=0x%x\n", size);
+ dbg(lvl_debug,"size=0x%x\n", size);
#if 0
fprintf(stderr,"offset=%d\n", (unsigned char *)(mr->pos)-mr->m->f->begin);
#endif
- dbg(lvl_error,"size error\n");
+ dbg(lvl_debug,"size error\n");
}
t->pos_next=t->pos+size+1;
mr->item.type=le32_to_cpu(t->pos[1]);
@@ -1690,7 +1690,7 @@ selection_contains(struct map_selection *sel, struct coord_rect *r, struct range
while (sel) {
if (coord_rect_overlap(r, &sel->u.c_rect)) {
order=sel->order;
- dbg(lvl_warning,"min %d max %d order %d\n", mima->min, mima->max, order);
+ dbg(lvl_debug,"min %d max %d order %d\n", mima->min, mima->max, order);
if (!mima->min && !mima->max)
return 1;
if (order >= mima->min && order <= mima->max)
@@ -1722,13 +1722,13 @@ map_parse_country_binfile(struct map_rect_priv *mr)
struct attr af, al;
if(binfile_attr_get(mr->item.priv_data, attr_first_key, &af)) {
if(linguistics_compare(af.u.str,search->u.str,linguistics_cmp_partial)>0) {
- dbg(lvl_warning,"Skipping index item with first_key='%s'\n", af.u.str);
+ dbg(lvl_debug,"Skipping index item with first_key='%s'\n", af.u.str);
return;
}
}
if(binfile_attr_get(mr->item.priv_data, attr_last_key, &al)) {
if(linguistics_compare(al.u.str,search->u.str,linguistics_cmp_partial)<0) {
- dbg(lvl_warning,"Skipping index item with first_key='%s', last_key='%s'\n", af.u.str, al.u.str);
+ dbg(lvl_debug,"Skipping index item with first_key='%s', last_key='%s'\n", af.u.str, al.u.str);
return;
}
}
@@ -1763,7 +1763,7 @@ map_parse_submap(struct map_rect_priv *mr, int async)
return 0;
if (!binfile_attr_get(mr->item.priv_data, attr_zipfile_ref, &at))
return 0;
- dbg(lvl_warning,"pushing zipfile %ld from %d\n", at.u.num, mr->t->zipfile_num);
+ dbg(lvl_debug,"pushing zipfile %ld from %d\n", at.u.num, mr->t->zipfile_num);
return push_zipfile_tile(mr, at.u.num, 0, 0, async);
}
@@ -2108,7 +2108,7 @@ binmap_search_new(struct map_priv *map, struct item *item, struct attr *search,
map_rect_destroy_binfile(map_rec);
break;
case attr_house_number:
- dbg(lvl_warning,"case house_number");
+ dbg(lvl_debug,"case house_number");
if (! item->map)
break;
if (!map_priv_is(item->map, map))
@@ -2131,12 +2131,12 @@ binmap_search_new(struct map_priv *map, struct item *item, struct attr *search,
msp->mr = binmap_search_street_by_place(map, town, &c, &msp->ms, &msp->boundaries);
map_rect_destroy_binfile(map_rec);
if (msp->boundaries)
- dbg(lvl_error, "using map town boundaries\n");
+ dbg(lvl_debug, "using map town boundaries\n");
if (!msp->boundaries && town)
{
binmap_get_estimated_boundaries(town, &msp->boundaries);
if (msp->boundaries)
- dbg(lvl_error, "using estimated boundaries\n");
+ dbg(lvl_debug, "using estimated boundaries\n");
}
/* start searching in area around the street segment even if town boundaries are available */
msp->mr=binmap_search_housenumber_by_estimate(map, &c, &msp->ms);
@@ -2144,7 +2144,7 @@ binmap_search_new(struct map_priv *map, struct item *item, struct attr *search,
msp->rect_new=msp->ms.u.c_rect;
if(item_attr_get(msp->item, attr_street_name, &attr))
msp->parent_name=g_strdup(attr.u.str);
- dbg(lvl_error,"pn=%s\n",msp->parent_name);
+ dbg(lvl_debug,"pn=%s\n",msp->parent_name);
}
}
if (idx != 3) {
@@ -2432,7 +2432,7 @@ binmap_search_get_item(struct map_search_priv *map_search)
map_search->ms.u.c_rect=map_search->rect_new;
map_rect_destroy_binfile(map_search->mr);
map_search->mr=map_rect_new_binfile(map_search->map, &map_search->ms);
- dbg(lvl_error,"Extended house number search region to %d x %d, restarting...\n",map_search->ms.u.c_rect.rl.x - map_search->ms.u.c_rect.lu.x, map_search->ms.u.c_rect.lu.y-map_search->ms.u.c_rect.rl.y);
+ dbg(lvl_debug,"Extended house number search region to %d x %d, restarting...\n",map_search->ms.u.c_rect.rl.x - map_search->ms.u.c_rect.lu.x, map_search->ms.u.c_rect.lu.y-map_search->ms.u.c_rect.rl.y);
continue;
}
}
@@ -2580,7 +2580,7 @@ map_binfile_zip_setup(struct map_priv *m, char *filename, int mmap)
m->fis[m->eoc->zipedsk-1]=m->fi;
g_free(tmpfilename);
}
- dbg(lvl_warning,"num_disk %d\n",m->eoc->zipedsk);
+ dbg(lvl_debug,"num_disk %d\n",m->eoc->zipedsk);
m->eoc64=binfile_read_eoc64(m->fi);
if (!binfile_get_index(m)) {
dbg(lvl_error,"no index found\n");
@@ -2592,8 +2592,8 @@ map_binfile_zip_setup(struct map_priv *m, char *filename, int mmap)
}
m->cde_size=sizeof(struct zip_cd)+first_cd->zipcfnl+first_cd->zipcxtl;
m->zip_members=m->index_offset/m->cde_size+1;
- dbg(lvl_warning,"cde_size %d\n", m->cde_size);
- dbg(lvl_warning,"members %d\n",m->zip_members);
+ dbg(lvl_debug,"cde_size %d\n", m->cde_size);
+ dbg(lvl_debug,"members %d\n",m->zip_members);
file_data_free(m->fi, (unsigned char *)first_cd);
if (mmap)
file_mmap(m->fi);
@@ -2692,7 +2692,7 @@ map_binfile_open(struct map_priv *m)
struct attr readwrite={attr_readwrite, {(void *)1}};
struct attr *attrs[]={&readwrite, NULL};
- dbg(lvl_warning,"file_create %s\n", m->filename);
+ dbg(lvl_debug,"file_create %s\n", m->filename);
m->fi=file_create(m->filename, m->url?attrs:NULL);
if (! m->fi && m->url)
return 0;
@@ -2735,7 +2735,7 @@ map_binfile_open(struct map_priv *m)
if (binfile_attr_get(item->priv_data, attr_map_release, &attr))
m->map_release=g_strdup(attr.u.str);
if (m->url && binfile_attr_get(item->priv_data, attr_url, &attr)) {
- dbg(lvl_error,"url config %s map %s\n",m->url,attr.u.str);
+ dbg(lvl_debug,"url config %s map %s\n",m->url,attr.u.str);
if (strcmp(m->url, attr.u.str))
m->update_available=1;
g_free(m->url);
@@ -2807,7 +2807,7 @@ map_new_binfile(struct map_methods *meth, struct attr **attrs, struct callback_l
wexp=file_wordexp_new(data->u.str);
wexp_data=file_wordexp_get_array(wexp);
- dbg(lvl_warning,"map_new_binfile %s\n", data->u.str);
+ dbg(lvl_debug,"map_new_binfile %s\n", data->u.str);
*meth=map_methods_binfile;
m=g_new0(struct map_priv, 1);
@@ -2843,7 +2843,7 @@ map_new_binfile(struct map_methods *meth, struct attr **attrs, struct callback_l
void
plugin_init(void)
{
- dbg(lvl_warning,"binfile: plugin_init\n");
+ dbg(lvl_debug,"binfile: plugin_init\n");
if (sizeof(struct zip_cd) != 46) {
dbg(lvl_error,"error: sizeof(struct zip_cd)=%zu\n",sizeof(struct zip_cd));
}
diff --git a/navit/map/csv/csv.c b/navit/map/csv/csv.c
index 8cb677839..ea36432d1 100644
--- a/navit/map/csv/csv.c
+++ b/navit/map/csv/csv.c
@@ -130,7 +130,7 @@ save_map_csv(struct map_priv *m)
tmpstr=g_strdup("");
}
} else {
- dbg(lvl_error,"No value defined for the atribute %s, assuming empty string\n",attr_to_name(*at));
+ dbg(lvl_debug,"No value defined for the atribute %s, assuming empty string\n",attr_to_name(*at));
tmpstr=g_strdup("");
}
}
@@ -181,7 +181,7 @@ static const int zoom_max = 18;
static void
map_destroy_csv(struct map_priv *m)
{
- dbg(lvl_warning,"map_destroy_csv\n");
+ dbg(lvl_debug,"map_destroy_csv\n");
/*save if changed */
save_map_csv(m);
g_hash_table_destroy(m->qitem_hash);
@@ -355,10 +355,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_warning,"Enter %d\n", type);
+ dbg(lvl_debug,"Enter %d\n", type);
if(!mr || !mr->qitem) {
- dbg(lvl_warning,"Nothing to do\n");
+ dbg(lvl_debug,"Nothing to do\n");
return 0;
}
@@ -366,7 +366,7 @@ csv_type_set(void *priv_data, enum item_type type)
return 0;
mr->qitem->deleted=1;
- dbg(lvl_warning,"Item %p is deleted\n",mr->qitem);
+ dbg(lvl_debug,"Item %p is deleted\n",mr->qitem);
return 1;
}
@@ -395,7 +395,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_warning,"Set coordinates %d %d\n", c->x, c->y);
+ dbg(lvl_debug,"Set coordinates %d %d\n", c->x, c->y);
/* for now we only support coord modification only */
if( ! change_mode_modify) {
@@ -430,7 +430,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_warning,"Set coordinates %f %f\n", cg.lng, cg.lat);
+ dbg(lvl_debug,"Set coordinates %f %f\n", cg.lng, cg.lat);
m->new_items = g_list_remove_link(m->new_items,new_it);
m->dirty=1;
save_map_csv(m);
@@ -518,7 +518,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_warning,"map_rect_new_csv\n");
+ dbg(lvl_debug,"map_rect_new_csv\n");
if(debug_level_get("map_csv")>2) {
map_csv_debug_dump(map);
}
@@ -725,7 +725,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_warning,"charset:%s\n",charset->u.str);
+ dbg(lvl_debug,"charset:%s\n",charset->u.str);
m->charset=g_strdup(charset->u.str);
} else {
m->charset=g_strdup(map_methods_csv.charset);
@@ -757,7 +757,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_warning,"map_new_csv %s\n", data->u.str);
+ dbg(lvl_debug,"map_new_csv %s\n", data->u.str);
m->filename=g_strdup(wexp_data[0]);
file_wordexp_destroy(wexp);
@@ -847,7 +847,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_warning,"%s\n",line);
+ dbg(lvl_debug,"%s\n",line);
}
else {
g_free(curr_item);
@@ -867,7 +867,7 @@ map_new_csv(struct map_methods *meth, struct attr **attrs, struct callback_list
dbg(lvl_error,"Error opening csv map file %s, starting with empty map\n", m->filename);
}
} else {
- dbg(lvl_warning,"No data attribute, starting with in-memory map\n");
+ dbg(lvl_debug,"No data attribute, starting with in-memory map\n");
}
dbg(lvl_info,"%p\n",tree_root);
@@ -877,7 +877,7 @@ map_new_csv(struct map_methods *meth, struct attr **attrs, struct callback_list
void
plugin_init(void)
{
- dbg(lvl_warning,"csv: plugin_init\n");
+ dbg(lvl_debug,"csv: plugin_init\n");
plugin_register_map_type("csv", map_new_csv);
}
diff --git a/navit/map/csv/quadtree.c b/navit/map/csv/quadtree.c
index f7b3fdc30..ca6068541 100644
--- a/navit/map/csv/quadtree.c
+++ b/navit/map/csv/quadtree.c
@@ -379,7 +379,7 @@ void quadtree_node_drop_garbage(struct quadtree_node* node, struct quadtree_iter
{
int i,j;
int node_num=node->node_num;
- dbg(lvl_warning,"Processing unreferenced subnode children...\n");
+ dbg(lvl_debug,"Processing unreferenced subnode children...\n");
for(i=0,j=0;i<node_num;i++) {
if(node->items[i]->deleted && !node->items[i]->ref_count) {
if(iter->item_free) {
@@ -561,7 +561,7 @@ struct quadtree_iter *quadtree_query(struct quadtree_node *this_, double dXMin,
ret->xmax=dXMax;
ret->ymin=dYMin;
ret->ymax=dYMax;
- dbg(lvl_warning,"%f %f %f %f\n",dXMin,dXMax,dYMin,dYMax)
+ dbg(lvl_debug,"%f %f %f %f\n",dXMin,dXMax,dYMin,dYMax)
ret->item_free=item_free;
ret->item_free_context=item_free_context;
n->node=this_;
@@ -577,7 +577,7 @@ struct quadtree_iter *quadtree_query(struct quadtree_node *this_, double dXMin,
}
this_->ref_count++;
- dbg(lvl_warning,"Query %p \n",this_)
+ dbg(lvl_debug,"Query %p \n",this_)
return ret;
}
@@ -627,16 +627,16 @@ struct quadtree_item * quadtree_item_next(struct quadtree_iter *iter)
if(iter_node->is_leaf) {
/* Try to find undeleted item in the current node */
- dbg(lvl_warning,"find item %p %p ...\n",iter->iter_nodes,iter->iter_nodes->data);
+ dbg(lvl_debug,"find item %p %p ...\n",iter->iter_nodes,iter->iter_nodes->data);
while(iter_node->item<iter_node->node_num) {
- dbg(lvl_warning,"%d %d\n",iter_node->item,iter_node->items[iter_node->item]->deleted);
+ dbg(lvl_debug,"%d %d\n",iter_node->item,iter_node->items[iter_node->item]->deleted);
if(iter_node->items[iter_node->item]->deleted) {
iter_node->item++;
continue;
}
iter->item=iter_node->items[iter_node->item];
iter_node->item++;
- dbg(lvl_warning,"Returning %p\n",iter->item);
+ dbg(lvl_debug,"Returning %p\n",iter->item);
iter->item->ref_count++;
return iter->item;
}
@@ -654,13 +654,13 @@ struct quadtree_item * quadtree_item_next(struct quadtree_iter *iter)
i=iter_node->subnode;
if(!nodes[i] || !rects_overlap(nodes[i]->xmin, nodes[i]->ymin, nodes[i]->xmax, nodes[i]->ymax, iter->xmin, iter->ymin, iter->xmax, iter->ymax))
continue;
- dbg(lvl_warning,"%f %f %f %f\n",nodes[i]->xmin, nodes[i]->xmax, nodes[i]->ymin, nodes[i]->ymax)
+ dbg(lvl_debug,"%f %f %f %f\n",nodes[i]->xmin, nodes[i]->xmax, nodes[i]->ymin, nodes[i]->ymax)
subnode=nodes[i];
}
if(subnode) {
/* Go one level deeper */
- dbg(lvl_warning,"Go one level deeper...\n");
+ dbg(lvl_debug,"Go one level deeper...\n");
iter_node=g_new0(struct quadtree_iter_node, 1);
iter_node->node=subnode;
iter_node->is_leaf=subnode->is_leaf;
@@ -692,7 +692,7 @@ struct quadtree_item * quadtree_item_next(struct quadtree_iter *iter)
/* 2. remove empty leaf subnode if it's unreferenced */
if(!subnode->ref_count && !subnode->node_num && subnode->is_leaf ) {
- dbg(lvl_warning,"Going to delete an empty unreferenced leaf subnode...\n");
+ dbg(lvl_debug,"Going to delete an empty unreferenced leaf subnode...\n");
if(subnode->parent) {
if(subnode->parent->aa==subnode) {
@@ -711,7 +711,7 @@ struct quadtree_item * quadtree_item_next(struct quadtree_iter *iter)
subnode->parent->is_leaf=1;
g_free(subnode);
} else
- dbg(lvl_warning,"Quadtree is empty. NOT deleting the root subnode...\n");
+ dbg(lvl_debug,"Quadtree is empty. NOT deleting the root subnode...\n");
}
diff --git a/navit/map/filter/filter.c b/navit/map/filter/filter.c
index cf083c85a..63817ecc7 100644
--- a/navit/map/filter/filter.c
+++ b/navit/map/filter/filter.c
@@ -319,7 +319,7 @@ map_filter_rect_get_item(struct map_rect_priv *mr)
static struct item *
map_filter_rect_get_item_byid(struct map_rect_priv *mr, int id_hi, int id_lo)
{
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
mr->parent_item=map_rect_get_item_byid(mr->parent, id_hi, id_lo);
if (!mr->parent_item)
return NULL;
@@ -332,21 +332,21 @@ map_filter_rect_get_item_byid(struct map_rect_priv *mr, int id_hi, int id_lo)
static struct map_search_priv *
map_filter_search_new(struct map_priv *map, struct item *item, struct attr *search, int partial)
{
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
return NULL;
}
static struct item *
map_filter_search_get_item(struct map_search_priv *map_search)
{
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
return NULL;
}
static void
map_filter_search_destroy(struct map_search_priv *ms)
{
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
}
static void
@@ -429,7 +429,7 @@ map_filter_new(struct map_methods *meth, struct attr **attrs, struct callback_li
void
plugin_init(void)
{
- dbg(lvl_warning,"filter: plugin_init\n");
+ dbg(lvl_debug,"filter: plugin_init\n");
plugin_register_map_type("filter", map_filter_new);
}
diff --git a/navit/map/mg/block.c b/navit/map/mg/block.c
index f18e77863..b2bb64ac0 100644
--- a/navit/map/mg/block.c
+++ b/navit/map/mg/block.c
@@ -77,7 +77,7 @@ block_get_byid(struct file *file, int id, unsigned char **p_ret)
int
block_get_byindex(struct file *file, int idx, struct block_priv *blk)
{
- dbg(lvl_warning,"idx=%d\n", idx);
+ dbg(lvl_debug,"idx=%d\n", idx);
blk->b=block_get_byid(file, idx, &blk->p);
blk->block_start=(unsigned char *)(blk->b);
blk->p_start=blk->p;
@@ -177,7 +177,7 @@ block_next_lin(struct map_rect_priv *mr)
else
mr->b.p=mr->b.block_start+block_get_blocks(mr->b.b)*512;
if (mr->b.p >= mr->file->end) {
- dbg(lvl_warning,"end of blocks %p vs %p\n", mr->b.p, mr->file->end);
+ dbg(lvl_debug,"end of blocks %p vs %p\n", mr->b.p, mr->file->end);
return 0;
}
mr->b.block_start=mr->b.p;
@@ -192,7 +192,7 @@ block_next_lin(struct map_rect_priv *mr)
if (!mr->cur_sel || coord_rect_overlap(&mr->cur_sel->u.c_rect, &r)) {
block_active_count++;
block_active_mem+=block_get_blocks(mr->b.b)*512-sizeof(struct block *);
- dbg(lvl_warning,"block ok\n");
+ dbg(lvl_debug,"block ok\n");
return 1;
}
dbg(lvl_info,"block not in cur_sel\n");
@@ -210,14 +210,14 @@ block_next(struct map_rect_priv *mr)
return block_next_lin(mr);
for (;;) {
if (! bt->p) {
- dbg(lvl_warning,"block 0x%x\n", bt->next);
+ dbg(lvl_debug,"block 0x%x\n", bt->next);
if (bt->next == -1)
return 0;
bt->b=block_get_byid(mr->file, bt->next, &bt->p);
bt->end=(unsigned char *)mr->b.bt.b+block_get_size(mr->b.bt.b);
bt->next=block_get_next(bt->b);
bt->order=0;
- dbg(lvl_warning,"size 0x%x next 0x%x\n", block_get_size(bt->b), block_get_next(bt->b));
+ dbg(lvl_debug,"size 0x%x next 0x%x\n", block_get_size(bt->b), block_get_next(bt->b));
if (! mr->b.bt.block_count) {
#if 0
if (debug) {
@@ -238,8 +238,8 @@ block_next(struct map_rect_priv *mr)
blk_num=get_u32(&mr->b.bt.p);
coord=get_u32(&mr->b.bt.p);
block_mem+=8;
- dbg(lvl_warning,"%p vs %p coord 0x%x ", mr->b.bt.end, mr->b.bt.p, coord);
- dbg(lvl_warning,"block 0x%x", blk_num);
+ dbg(lvl_debug,"%p vs %p coord 0x%x ", mr->b.bt.end, mr->b.bt.p, coord);
+ dbg(lvl_debug,"block 0x%x", blk_num);
r_w=bt->r_curr.rl.x-bt->r_curr.lu.x;
r_h=bt->r_curr.lu.y-bt->r_curr.rl.y;
diff --git a/navit/map/mg/map.c b/navit/map/mg/map.c
index b5a67fd09..9b0805e2d 100644
--- a/navit/map/mg/map.c
+++ b/navit/map/mg/map.c
@@ -289,7 +289,7 @@ map_rect_get_item_mg(struct map_rect_priv *mr)
}
if (file_next(mr))
continue;
- dbg(lvl_warning,"lin_count %d idx_count %d active_count %d %d kB (%d kB)\n", block_lin_count, block_idx_count, block_active_count, (block_mem+block_active_mem)/1024, block_active_mem/1024);
+ dbg(lvl_debug,"lin_count %d idx_count %d active_count %d %d kB (%d kB)\n", block_lin_count, block_idx_count, block_active_count, (block_mem+block_active_mem)/1024, block_active_mem/1024);
return NULL;
}
}
@@ -361,7 +361,7 @@ map_search_mg_convert_special(char *str)
*c++='u';
break;
default:
- dbg(lvl_warning,"0x%x\n", *str);
+ dbg(lvl_debug,"0x%x\n", *str);
*c++=*str;
break;
}
@@ -375,7 +375,7 @@ static int
map_search_setup(struct map_rect_priv *mr)
{
char *prefix;
- dbg(lvl_warning,"%s\n", attr_to_name(mr->search_type));
+ dbg(lvl_debug,"%s\n", attr_to_name(mr->search_type));
switch (mr->search_type) {
case attr_town_postal:
if (mr->search_item.type != type_country_label) {
@@ -388,7 +388,7 @@ map_search_setup(struct map_rect_priv *mr)
tree_search_init(mr->m->dirname, "town.b1", &mr->ts, 0);
mr->current_file=file_town_twn;
mr->search_str=g_strdup_printf("%s%s",prefix,mr->search_attr->u.str);
- dbg(lvl_error,"search_str='%s'\n",mr->search_str);
+ dbg(lvl_debug,"search_str='%s'\n",mr->search_str);
mr->search_country=mg_country_from_isonum(mr->search_item.id_lo);
break;
case attr_town_name:
@@ -438,7 +438,7 @@ map_search_setup(struct map_rect_priv *mr)
return 0;
}
}
- dbg(lvl_warning,"street_assoc=0x%x\n", mr->search_item.id_lo);
+ dbg(lvl_debug,"street_assoc=0x%x\n", mr->search_item.id_lo);
tree_search_init(mr->m->dirname, "strname.b1", &mr->ts, 0);
mr->current_file=file_strname_stn;
mr->search_str=g_strdup(mr->search_attr->u.str);
@@ -467,9 +467,9 @@ static struct map_search_priv *
map_search_new_mg(struct map_priv *map, struct item *item, struct attr *search, int partial)
{
struct map_rect_priv *mr=g_new0(struct map_rect_priv, 1);
- dbg(lvl_warning,"searching for %s '%s'\n", attr_to_name(search->type), search->u.str);
- dbg(lvl_warning,"id_lo=0x%x\n", item->id_lo);
- dbg(lvl_warning,"search=%s\n", search->u.str);
+ dbg(lvl_debug,"searching for %s '%s'\n", attr_to_name(search->type), search->u.str);
+ dbg(lvl_debug,"id_lo=0x%x\n", item->id_lo);
+ dbg(lvl_debug,"search=%s\n", search->u.str);
mr->m=map;
mr->search_attr=attr_dup(search);
mr->search_type=search->type;
@@ -507,7 +507,7 @@ map_search_destroy_mg(struct map_search_priv *ms)
{
struct map_rect_priv *mr=(struct map_rect_priv *)ms;
- dbg(lvl_warning,"mr=%p\n", mr);
+ dbg(lvl_debug,"mr=%p\n", mr);
if (! mr)
return;
map_search_cleanup(mr);
diff --git a/navit/map/mg/poly.c b/navit/map/mg/poly.c
index 43256a295..7c73d4587 100644
--- a/navit/map/mg/poly.c
+++ b/navit/map/mg/poly.c
@@ -235,10 +235,10 @@ poly_get(struct map_rect_priv *mr, struct poly_priv *poly, struct item *item)
}
} else
mr->b.p=poly->subpoly_next;
- dbg(lvl_warning,"%d %d %s\n", poly->subpoly_num_all, mr->b.block_num, poly->name);
+ dbg(lvl_debug,"%d %d %s\n", poly->subpoly_num_all, mr->b.block_num, poly->name);
item->id_lo=poly->subpoly_num_all | (mr->b.block_num << 16);
item->id_hi=(mr->current_file << 16);
- dbg(lvl_warning,"0x%x 0x%x\n", item->id_lo, item->id_hi);
+ dbg(lvl_debug,"0x%x 0x%x\n", item->id_lo, item->id_hi);
poly->subpoly_next=mr->b.p+L(poly->count[poly->subpoly_num])*sizeof(struct coord);
poly->subpoly_num++;
poly->subpoly_num_all++;
diff --git a/navit/map/mg/street.c b/navit/map/mg/street.c
index 9a43ca14a..6aad6e5a0 100644
--- a/navit/map/mg/street.c
+++ b/navit/map/mg/street.c
@@ -208,7 +208,7 @@ static int street_get_coord(unsigned char **pos, int bytes, struct coord_rect *r
if (f) {
f->x=ref->lu.x+x;
f->y=ref->rl.y+y;
- dbg(lvl_warning,"0x%x,0x%x + 0x%x,0x%x = 0x%x,0x%x\n", x, y, ref->lu.x, ref->rl.y, f->x, f->y);
+ dbg(lvl_debug,"0x%x,0x%x + 0x%x,0x%x = 0x%x,0x%x\n", x, y, ref->lu.x, ref->rl.y, f->x, f->y);
}
*pos=p;
return flags;
@@ -282,14 +282,14 @@ street_coord_get(void *priv_data, struct coord *c, int count)
if (segid == 0x15)
debug=1;
if (debug) {
- dbg(lvl_error,"enter 0x%x\n",segid);
+ dbg(lvl_debug,"enter 0x%x\n",segid);
}
#endif
while (count > 0) {
if (street_coord_get_helper(street, c)) {
#ifdef DEBUG_COORD_GET
if (debug) {
- dbg(lvl_error,"0x%x,0x%x\n", c->x, c->y);
+ dbg(lvl_debug,"0x%x,0x%x\n", c->x, c->y);
}
#endif
c++;
@@ -316,7 +316,7 @@ street_attr_get(void *priv_data, enum attr_type attr_type, struct attr *attr)
struct street_priv *street=priv_data;
int nameid;
- dbg(lvl_warning,"segid 0x%x\n", street_str_get_segid(street->str));
+ dbg(lvl_debug,"segid 0x%x\n", street_str_get_segid(street->str));
attr->type=attr_type;
switch (attr_type) {
case attr_any:
@@ -557,12 +557,12 @@ street_get_byid(struct map_rect_priv *mr, struct street_priv *street, int id_hi,
int country=id_hi & 0xffff;
int res;
struct coord_rect r;
- dbg(lvl_warning,"enter(%p,%p,0x%x,0x%x,%p)\n", mr, street, id_hi, id_lo, item);
+ dbg(lvl_debug,"enter(%p,%p,0x%x,0x%x,%p)\n", mr, street, id_hi, id_lo, item);
if (! country)
return 0;
if (! tree_search_hv(mr->m->dirname, "street", (id_lo >> 8) | (country << 24), id_lo & 0xff, &res))
return 0;
- dbg(lvl_warning,"res=0x%x (blk=0x%x)\n", res, res >> 12);
+ dbg(lvl_debug,"res=0x%x (blk=0x%x)\n", res, res >> 12);
block_get_byindex(mr->m->file[mr->current_file], res >> 12, &mr->b);
street_get_data(street, &mr->b.p);
street->name_file=mr->m->file[file_strname_stn];
@@ -578,7 +578,7 @@ street_get_byid(struct map_rect_priv *mr, struct street_priv *street, int id_hi,
item->meth=&street_meth;
item->priv_data=street;
street->str+=(res & 0xfff)-1;
- dbg(lvl_warning,"segid 0x%x\n", street_str_get_segid(&street->str[1]));
+ dbg(lvl_debug,"segid 0x%x\n", street_str_get_segid(&street->str[1]));
return street_get(mr, street, item);
#if 0
mr->b.p=mr->b.block_start+(res & 0xffff);
@@ -620,7 +620,7 @@ latin1_tolower_ascii(unsigned char c)
return 'u';
default:
if (ret >= 0x80)
- dbg(lvl_warning,"ret=0x%x\n",c);
+ dbg(lvl_debug,"ret=0x%x\n",c);
return ret;
}
}
@@ -662,27 +662,27 @@ street_search_compare_do(struct map_rect_priv *mr, int country, int town_assoc,
{
int d,len;
- dbg(lvl_warning,"enter");
- dbg(lvl_warning,"country 0x%x town_assoc 0x%x name '%s'\n", country, town_assoc, name);
+ dbg(lvl_debug,"enter");
+ dbg(lvl_debug,"country 0x%x town_assoc 0x%x name '%s'\n", country, town_assoc, name);
d=(mr->search_item.id_hi & 0xffff)-country;
- dbg(lvl_warning,"country %d (%d vs %d)\n", d, mr->search_item.id_hi & 0xffff, country);
+ dbg(lvl_debug,"country %d (%d vs %d)\n", d, mr->search_item.id_hi & 0xffff, country);
if (!d) {
if (mr->search_item.id_lo == town_assoc ) {
- dbg(lvl_warning,"town_assoc match (0x%x)\n", town_assoc);
+ dbg(lvl_debug,"town_assoc match (0x%x)\n", town_assoc);
len=mr->search_partial ? strlen(mr->search_str):INT_MAX;
d=strncasecmp_latin1(mr->search_str, name, len);
if (!strncasecmp_latin1_ascii(mr->search_str, name, len))
d=0;
- dbg(lvl_warning,"string %d\n", d);
+ dbg(lvl_debug,"string %d\n", d);
} else {
if (town_assoc < mr->search_item.id_lo)
d=1;
else
d=-1;
- dbg(lvl_warning,"assoc %d 0x%x-0x%x\n",d, mr->search_item.id_lo, town_assoc);
+ dbg(lvl_debug,"assoc %d 0x%x-0x%x\n",d, mr->search_item.id_lo, town_assoc);
}
}
- dbg(lvl_warning,"d=%d\n", d);
+ dbg(lvl_debug,"d=%d\n", d);
return d;
}
@@ -692,11 +692,11 @@ street_search_compare(unsigned char **p, struct map_rect_priv *mr)
struct street_name_index *i;
int ret;
- dbg(lvl_warning,"enter\n");
+ dbg(lvl_debug,"enter\n");
i=(struct street_name_index *)(*p);
*p+=sizeof(*i)+strlen(i->name)+1;
- dbg(lvl_warning,"block 0x%x\n", i->block);
+ dbg(lvl_debug,"block 0x%x\n", i->block);
ret=street_search_compare_do(mr, i->country, i->town_assoc, i->name);
if (ret <= 0)
@@ -725,7 +725,7 @@ street_name_coord_get(void *priv_data, struct coord *c, int count)
struct street_name_numbers snns;
unsigned char *p=mr->street.name.aux_data;
- dbg(lvl_warning,"aux_data=%p\n", p);
+ dbg(lvl_debug,"aux_data=%p\n", p);
if (count) {
street_name_numbers_get(&snns, &p);
street_name_numbers_get_coord(&snns, c);
@@ -830,7 +830,7 @@ street_name_get_byid(struct map_rect_priv *mr, struct street_priv *street, int i
item->map=NULL;
item->priv_data=mr;
mr->b.p=street->name_file->begin+item->id_lo;
- dbg(lvl_warning,"last %p map %p file %d begin %p\n", mr->b.p, mr->m, mr->current_file, mr->m->file[mr->current_file]->begin);
+ dbg(lvl_debug,"last %p map %p file %d begin %p\n", mr->b.p, mr->m, mr->current_file, mr->m->file[mr->current_file]->begin);
street_name_get(&street->name, &mr->b.p);
return 1;
}
@@ -841,30 +841,30 @@ street_search_get_item_street_name(struct map_rect_priv *mr)
int dir=1,leaf;
unsigned char *last;
- dbg(lvl_warning,"enter\n");
+ dbg(lvl_debug,"enter\n");
if (! mr->search_blk_count) {
- dbg(lvl_warning,"partial 0x%x '%s' ***\n", mr->town.street_assoc, mr->search_str);
+ dbg(lvl_debug,"partial 0x%x '%s' ***\n", mr->town.street_assoc, mr->search_str);
if (mr->search_linear)
return NULL;
- dbg(lvl_warning,"tree_search_next\n");
+ dbg(lvl_debug,"tree_search_next\n");
mr->search_block=-1;
while ((leaf=tree_search_next(&mr->ts, &mr->search_p, dir)) != -1) {
dir=street_search_compare(&mr->search_p, mr);
}
- dbg(lvl_warning,"dir=%d mr->search_block=0x%x\n", dir, mr->search_block);
+ dbg(lvl_debug,"dir=%d mr->search_block=0x%x\n", dir, mr->search_block);
if (mr->search_block == -1)
return NULL;
mr->search_blk_count=1;
block_get_byindex(mr->m->file[file_strname_stn], mr->search_block, &mr->b);
mr->b.p=mr->b.block_start+12;
}
- dbg(lvl_warning,"name id %td\n", mr->b.p-mr->m->file[file_strname_stn]->begin);
+ dbg(lvl_debug,"name id %td\n", mr->b.p-mr->m->file[file_strname_stn]->begin);
if (! mr->search_blk_count)
return NULL;
for (;;) {
if (mr->b.p >= mr->b.end) {
if (!block_next_lin(mr)) {
- dbg(lvl_warning,"end of blocks in %p, %p\n", mr->m->file[file_strname_stn]->begin, mr->m->file[file_strname_stn]->end);
+ dbg(lvl_debug,"end of blocks in %p, %p\n", mr->m->file[file_strname_stn]->begin, mr->m->file[file_strname_stn]->end);
return NULL;
}
mr->b.p=mr->b.block_start+12;
@@ -873,23 +873,23 @@ street_search_get_item_street_name(struct map_rect_priv *mr)
last=mr->b.p;
street_name_get(&mr->street.name, &mr->b.p);
dir=street_search_compare_do(mr, mr->street.name.country, mr->street.name.townassoc, mr->street.name.name2);
- dbg(lvl_warning,"country 0x%x assoc 0x%x name1 '%s' name2 '%s' dir=%d\n", mr->street.name.country, mr->street.name.townassoc, mr->street.name.name1, mr->street.name.name2, dir);
+ dbg(lvl_debug,"country 0x%x assoc 0x%x name1 '%s' name2 '%s' dir=%d\n", mr->street.name.country, mr->street.name.townassoc, mr->street.name.name1, mr->street.name.name2, dir);
if (dir < 0) {
- dbg(lvl_warning,"end of data\n");
+ dbg(lvl_debug,"end of data\n");
mr->search_blk_count=0;
return NULL;
}
if (!dir) {
- dbg(lvl_warning,"result country 0x%x assoc 0x%x name1 '%s' name2 '%s' dir=%d aux_data=%p len=0x%x\n", mr->street.name.country, mr->street.name.townassoc, mr->street.name.name1, mr->street.name.name2, dir, mr->street.name.aux_data, mr->street.name.aux_len);
+ dbg(lvl_debug,"result country 0x%x assoc 0x%x name1 '%s' name2 '%s' dir=%d aux_data=%p len=0x%x\n", mr->street.name.country, mr->street.name.townassoc, mr->street.name.name1, mr->street.name.name2, dir, mr->street.name.aux_data, mr->street.name.aux_len);
mr->item.type = type_street_name;
mr->item.id_hi=(file_strname_stn << 16);
mr->item.id_lo=last-mr->m->file[file_strname_stn]->begin;
- dbg(lvl_warning,"id 0x%x 0x%x last %p map %p file %d begin %p\n", mr->item.id_hi, mr->item.id_lo, last, mr->m, mr->current_file, mr->m->file[mr->current_file]->begin);
+ dbg(lvl_debug,"id 0x%x 0x%x last %p map %p file %d begin %p\n", mr->item.id_hi, mr->item.id_lo, last, mr->m, mr->current_file, mr->m->file[mr->current_file]->begin);
mr->item.meth=&street_name_meth;
mr->item.map=NULL;
mr->item.priv_data=mr;
/* debug(mr); */
- dbg(lvl_warning,"last %p\n",last);
+ dbg(lvl_debug,"last %p\n",last);
return &mr->item;
}
}
@@ -920,7 +920,7 @@ street_name_numbers_next(struct map_rect_priv *mr)
{
if (street_name_eod(&mr->street.name))
return 0;
- dbg(lvl_warning,"%p vs %p\n",mr->street.name.tmp_data, mr->street.name.aux_data);
+ dbg(lvl_debug,"%p vs %p\n",mr->street.name.tmp_data, mr->street.name.aux_data);
street_name_numbers_get(&mr->street.name_numbers, &mr->street.name.tmp_data);
return 1;
}
@@ -991,20 +991,20 @@ static struct item_methods housenumber_meth = {
int
housenumber_search_setup(struct map_rect_priv *mr)
{
- dbg(lvl_warning,"enter (0x%x,0x%x)\n",mr->search_item.id_hi,mr->search_item.id_lo);
+ dbg(lvl_debug,"enter (0x%x,0x%x)\n",mr->search_item.id_hi,mr->search_item.id_lo);
int id=mr->search_item.id_hi & 0xff;
mr->current_file=file_strname_stn;
mr->street.name_file=mr->m->file[mr->current_file];
mr->b.p=mr->street.name_file->begin+mr->search_item.id_lo;
mr->search_str=g_strdup(mr->search_attr->u.str);
- dbg(lvl_warning,"last %p\n",mr->b.p);
+ dbg(lvl_debug,"last %p\n",mr->b.p);
street_name_get(&mr->street.name, &mr->b.p);
#if 0
debug(mr);
#endif
while (id > 0) {
id--;
- dbg(lvl_warning,"loop\n");
+ dbg(lvl_debug,"loop\n");
if (!street_name_numbers_next(mr))
return 0;
}
@@ -1015,10 +1015,10 @@ housenumber_search_setup(struct map_rect_priv *mr)
if (!id)
mr->item.id_hi+=1;
mr->item.id_lo=mr->search_item.id_lo;
- dbg(lvl_warning,"getting name_number %p vs %p + %d\n",mr->street.name_numbers.tmp_data,mr->street.name_numbers.aux_data, mr->street.name_numbers.aux_len);
+ dbg(lvl_debug,"getting name_number %p vs %p + %d\n",mr->street.name_numbers.tmp_data,mr->street.name_numbers.aux_data, mr->street.name_numbers.aux_len);
if (!street_name_number_next(mr))
return 0;
- dbg(lvl_warning,"enter\n");
+ dbg(lvl_debug,"enter\n");
// debug(mr);
return 1;
}
@@ -1055,7 +1055,7 @@ struct item *
housenumber_search_get_item(struct map_rect_priv *mr)
{
int d;
- dbg(lvl_warning,"enter %s %s\n",mr->street.first_number,mr->street.last_number);
+ dbg(lvl_debug,"enter %s %s\n",mr->street.first_number,mr->street.last_number);
for (;;) {
if (!house_number_next(mr->street.current_number, mr->street.first_number, mr->street.last_number, 0, NULL)) {
if (!street_name_number_next(mr))
diff --git a/navit/map/mg/town.c b/navit/map/mg/town.c
index ab7a19786..0fd19be0d 100644
--- a/navit/map/mg/town.c
+++ b/navit/map/mg/town.c
@@ -222,12 +222,12 @@ town_search_compare(unsigned char **p, struct map_rect_priv *mr)
d=0;
} else {
country=get_u16_unal(p);
- dbg(lvl_warning,"country 0x%x ", country);
+ dbg(lvl_debug,"country 0x%x ", country);
name=get_string(p);
- dbg(lvl_warning,"name '%s' ",name);
+ dbg(lvl_debug,"name '%s' ",name);
mr->search_blk_count=get_u32_unal(p);
mr->search_blk_off=(struct block_offset *)(*p);
- dbg(lvl_warning,"len %d ", mr->search_blk_count);
+ dbg(lvl_debug,"len %d ", mr->search_blk_count);
(*p)+=mr->search_blk_count*4;
d=mr->search_country-country;
}
@@ -237,7 +237,7 @@ town_search_compare(unsigned char **p, struct map_rect_priv *mr)
else
d=strcasecmp(mr->search_str, name);
}
- dbg(lvl_warning,"%d \n",d);
+ dbg(lvl_debug,"%d \n",d);
return d;
}
@@ -250,7 +250,7 @@ town_search_get_item(struct map_rect_priv *mr)
int dir=1,leaf;
if (! mr->search_blk_count) {
- dbg(lvl_warning,"partial %d 0x%x '%s' ***\n", mr->search_partial, mr->search_country, mr->search_str);
+ dbg(lvl_debug,"partial %d 0x%x '%s' ***\n", mr->search_partial, mr->search_country, mr->search_str);
if (! mr->search_linear) {
while ((leaf=tree_search_next(&mr->ts, &mr->search_p, dir)) != -1) {
dir=town_search_compare(&mr->search_p, mr);
@@ -266,18 +266,18 @@ town_search_get_item(struct map_rect_priv *mr)
}
}
if (! tree_search_next_lin(&mr->ts, &mr->search_p)) {
- dbg(lvl_warning,"linear not found\n");
+ dbg(lvl_debug,"linear not found\n");
return NULL;
}
if (town_search_compare(&mr->search_p, mr)) {
- dbg(lvl_warning,"no match\n");
+ dbg(lvl_debug,"no match\n");
return NULL;
}
- dbg(lvl_warning,"found %d blocks\n",mr->search_blk_count);
+ dbg(lvl_debug,"found %d blocks\n",mr->search_blk_count);
}
if (! mr->search_blk_count)
return NULL;
- dbg(lvl_warning,"block 0x%x offset 0x%x\n", block_offset_get_block(mr->search_blk_off), block_offset_get_offset(mr->search_blk_off));
+ dbg(lvl_debug,"block 0x%x offset 0x%x\n", block_offset_get_block(mr->search_blk_off), block_offset_get_offset(mr->search_blk_off));
block_get_byindex(mr->m->file[mr->current_file], block_offset_get_block(mr->search_blk_off), &mr->b);
mr->b.p=mr->b.block_start+block_offset_get_offset(mr->search_blk_off);
town_get(mr, &mr->town, &mr->item);
diff --git a/navit/map/mg/tree.c b/navit/map/mg/tree.c
index 27100007c..e456ca87c 100644
--- a/navit/map/mg/tree.c
+++ b/navit/map/mg/tree.c
@@ -78,22 +78,22 @@ tree_search_h(struct file *file, unsigned int search)
struct tree_hdr_h *thdr;
struct tree_leaf_h *tleaf;
- dbg(lvl_warning,"enter\n");
+ dbg(lvl_debug,"enter\n");
while (i++ < 1000) {
thdr=(struct tree_hdr_h *)p;
p+=sizeof(*thdr);
end=p+tree_hdr_h_get_size(thdr);
- dbg(lvl_warning,"@%td\n", p-file->begin);
+ dbg(lvl_debug,"@%td\n", p-file->begin);
last=0;
while (p < end) {
tleaf=(struct tree_leaf_h *)p;
p+=sizeof(*tleaf);
- dbg(lvl_warning,"low:0x%x high:0x%x match:0x%x val:0x%x search:0x%x\n", tree_leaf_h_get_lower(tleaf), tree_leaf_h_get_higher(tleaf), tree_leaf_h_get_match(tleaf), tree_leaf_h_get_value(tleaf), search);
+ dbg(lvl_debug,"low:0x%x high:0x%x match:0x%x val:0x%x search:0x%x\n", tree_leaf_h_get_lower(tleaf), tree_leaf_h_get_higher(tleaf), tree_leaf_h_get_match(tleaf), tree_leaf_h_get_value(tleaf), search);
value=tree_leaf_h_get_value(tleaf);
if (value == search)
return tree_leaf_h_get_match(tleaf);
if (value > search) {
- dbg(lvl_warning,"lower\n");
+ dbg(lvl_debug,"lower\n");
lower=tree_leaf_h_get_lower(tleaf);
if (lower)
last=lower;
@@ -119,11 +119,11 @@ tree_search_v(struct file *file, int offset, int search)
thdr=(struct tree_hdr_v *)p;
p+=sizeof(*thdr);
count=tree_hdr_v_get_count(thdr);
- dbg(lvl_warning,"offset=%td count=0x%x\n", p-file->begin, count);
+ dbg(lvl_debug,"offset=%td count=0x%x\n", p-file->begin, count);
while (count--) {
tleaf=(struct tree_leaf_v *)p;
p+=sizeof(*tleaf);
- dbg(lvl_warning,"0x%x 0x%x\n", tleaf->key, search);
+ dbg(lvl_debug,"0x%x 0x%x\n", tleaf->key, search);
if (tleaf->key == search)
return tree_leaf_v_get_value(tleaf);
}
@@ -142,32 +142,32 @@ tree_search_hv(char *dirname, char *filename, unsigned int search_h, unsigned in
char buffer[4096];
int h,v;
- dbg(lvl_warning,"enter(%s, %s, 0x%x, 0x%x, %p)\n",dirname, filename, search_h, search_v, result);
+ dbg(lvl_debug,"enter(%s, %s, 0x%x, 0x%x, %p)\n",dirname, filename, search_h, search_v, result);
sprintf(buffer, "%s/%s.h1", dirname, filename);
f_idx_h=file_create_caseinsensitive(buffer, 0);
if ((!f_idx_h) || (!file_mmap(f_idx_h)))
return 0;
sprintf(buffer, "%s/%s.v1", dirname, filename);
f_idx_v=file_create_caseinsensitive(buffer, 0);
- dbg(lvl_warning,"%p %p\n", f_idx_h, f_idx_v);
+ dbg(lvl_debug,"%p %p\n", f_idx_h, f_idx_v);
if ((!f_idx_v) || (!file_mmap(f_idx_v))) {
file_destroy(f_idx_h);
return 0;
}
if ((h=tree_search_h(f_idx_h, search_h))) {
- dbg(lvl_warning,"h=0x%x\n", h);
+ dbg(lvl_debug,"h=0x%x\n", h);
if ((v=tree_search_v(f_idx_v, h, search_v))) {
- dbg(lvl_warning,"v=0x%x\n", v);
+ dbg(lvl_debug,"v=0x%x\n", v);
*result=v;
file_destroy(f_idx_v);
file_destroy(f_idx_h);
- dbg(lvl_warning,"return 1\n");
+ dbg(lvl_debug,"return 1\n");
return 1;
}
}
file_destroy(f_idx_v);
file_destroy(f_idx_h);
- dbg(lvl_warning,"return 0\n");
+ dbg(lvl_debug,"return 0\n");
return 0;
}
@@ -183,7 +183,7 @@ tree_search_enter(struct tree_search *ts, int offset)
tsn->end=p+tree_hdr_get_size(tsn->hdr);
tsn->low=tree_hdr_get_low(tsn->hdr);
tsn->high=tree_hdr_get_low(tsn->hdr);
- dbg(lvl_warning,"pos %td addr 0x%ux size 0x%ux low 0x%ux end %tu\n", p-ts->f->begin, tree_hdr_get_addr(tsn->hdr), tree_hdr_get_size(tsn->hdr), tree_hdr_get_low(tsn->hdr), tsn->end-ts->f->begin);
+ dbg(lvl_debug,"pos %td addr 0x%ux size 0x%ux low 0x%ux end %tu\n", p-ts->f->begin, tree_hdr_get_addr(tsn->hdr), tree_hdr_get_size(tsn->hdr), tree_hdr_get_low(tsn->hdr), tsn->end-ts->f->begin);
return tsn;
}
@@ -193,17 +193,17 @@ int tree_search_next(struct tree_search *ts, unsigned char **p, int dir)
if (! *p)
*p=tsn->p;
- dbg(lvl_warning,"next *p=%p dir=%d\n", *p, dir);
- dbg(lvl_warning,"low1=0x%x high1=0x%x\n", tsn->low, tsn->high);
+ dbg(lvl_debug,"next *p=%p dir=%d\n", *p, dir);
+ dbg(lvl_debug,"low1=0x%x high1=0x%x\n", tsn->low, tsn->high);
if (dir <= 0) {
- dbg(lvl_warning,"down 0x%x\n", tsn->low);
+ dbg(lvl_debug,"down 0x%x\n", tsn->low);
if (tsn->low != 0xffffffff) {
tsn=tree_search_enter(ts, tsn->low);
*p=tsn->p;
tsn->high=get_u32(p);
ts->last_node=ts->curr_node;
- dbg(lvl_warning,"saving last2 %d %td\n", ts->curr_node, tsn->last-ts->f->begin);
- dbg(lvl_warning,"high2=0x%x\n", tsn->high);
+ dbg(lvl_debug,"saving last2 %d %td\n", ts->curr_node, tsn->last-ts->f->begin);
+ dbg(lvl_debug,"high2=0x%x\n", tsn->high);
return 0;
}
return -1;
@@ -211,18 +211,18 @@ int tree_search_next(struct tree_search *ts, unsigned char **p, int dir)
tsn->low=tsn->high;
tsn->last=*p;
tsn->high=get_u32_unal(p);
- dbg(lvl_warning,"saving last3 %d %p\n", ts->curr_node, tsn->last);
+ dbg(lvl_debug,"saving last3 %d %p\n", ts->curr_node, tsn->last);
if (*p < tsn->end)
return (tsn->low == 0xffffffff ? 1 : 0);
- dbg(lvl_warning,"end reached high=0x%x\n",tsn->high);
+ dbg(lvl_debug,"end reached high=0x%x\n",tsn->high);
if (tsn->low != 0xffffffff) {
- dbg(lvl_warning,"low 0x%x\n", tsn->low);
+ dbg(lvl_debug,"low 0x%x\n", tsn->low);
tsn=tree_search_enter(ts, tsn->low);
*p=tsn->p;
tsn->high=get_u32_unal(p);
ts->last_node=ts->curr_node;
- dbg(lvl_warning,"saving last4 %d %td\n", ts->curr_node, tsn->last-ts->f->begin);
- dbg(lvl_warning,"high4=0x%x\n", tsn->high);
+ dbg(lvl_debug,"saving last4 %d %td\n", ts->curr_node, tsn->last-ts->f->begin);
+ dbg(lvl_debug,"high4=0x%x\n", tsn->high);
return 0;
}
return -1;
@@ -233,7 +233,7 @@ int tree_search_next_lin(struct tree_search *ts, unsigned char **p)
struct tree_search_node *tsn=&ts->nodes[ts->curr_node];
int high;
- dbg(lvl_warning,"pos=%d %td\n", ts->curr_node, *p-ts->f->begin);
+ dbg(lvl_debug,"pos=%d %td\n", ts->curr_node, *p-ts->f->begin);
if (*p)
ts->nodes[ts->last_node].last=*p;
*p=tsn->last;
@@ -243,12 +243,12 @@ int tree_search_next_lin(struct tree_search *ts, unsigned char **p)
ts->last_node=ts->curr_node;
while (high != 0xffffffff) {
tsn=tree_search_enter(ts, high);
- dbg(lvl_warning,"reload %d\n",ts->curr_node);
+ dbg(lvl_debug,"reload %d\n",ts->curr_node);
high=tsn->low;
}
return 1;
}
- dbg(lvl_warning,"eon %d %td %td\n", ts->curr_node, *p-ts->f->begin, tsn->end-ts->f->begin);
+ dbg(lvl_debug,"eon %d %td %td\n", ts->curr_node, *p-ts->f->begin, tsn->end-ts->f->begin);
if (! ts->curr_node)
break;
ts->curr_node--;
diff --git a/navit/map/shapefile/shapefile.c b/navit/map/shapefile/shapefile.c
index f311d514e..e67aaafee 100644
--- a/navit/map/shapefile/shapefile.c
+++ b/navit/map/shapefile/shapefile.c
@@ -76,7 +76,7 @@ struct map_rect_priv {
static void
map_destroy_shapefile(struct map_priv *m)
{
- dbg(lvl_warning,"map_destroy_shapefile\n");
+ dbg(lvl_debug,"map_destroy_shapefile\n");
g_free(m);
}
@@ -328,7 +328,7 @@ build_match(struct longest_match *lm, struct longest_match_list *lml, char *line
{
struct longest_match_list_item *lmli;
char *kvl=NULL,*i=NULL,*p,*kv;
- dbg(lvl_warning,"line=%s\n",line);
+ dbg(lvl_debug,"line=%s\n",line);
kvl=line;
p=strchr(line,'\t');
if (p) {
@@ -424,7 +424,7 @@ attr_resolve(struct map_rect_priv *mr, enum attr_type attr_type, struct attr *at
}
if (!value[0])
return -1;
- dbg(lvl_warning,"name=%s value=%s\n",name,value);
+ dbg(lvl_debug,"name=%s value=%s\n",name,value);
attr_free(mr->attr);
mr->attr=attr_new_from_text(name,value);
if (mr->attr) {
@@ -531,7 +531,7 @@ map_rect_new_shapefile(struct map_priv *map, struct map_selection *sel)
map->dbfmap_data=NULL;
}
}
- dbg(lvl_warning,"%s changed %d old %p\n",dbfmapfile,changed,map->dbfmap_data);
+ dbg(lvl_debug,"%s changed %d old %p\n",dbfmapfile,changed,map->dbfmap_data);
if (changed) {
longest_match_destroy(map->lm,1);
map->lm=NULL;
@@ -539,7 +539,7 @@ map_rect_new_shapefile(struct map_priv *map, struct map_selection *sel)
build_matches(map,map->dbfmap_data);
}
}
- dbg(lvl_warning,"map_rect_new_shapefile\n");
+ dbg(lvl_debug,"map_rect_new_shapefile\n");
mr=g_new0(struct map_rect_priv, 1);
mr->m=map;
mr->idx=0;
@@ -595,12 +595,12 @@ map_rect_get_item_shapefile(struct map_rect_priv *mr)
if (count) {
mr->line=lines[0];
if (attr_from_line(mr->line,"type",NULL,type,NULL)) {
- dbg(lvl_warning,"type='%s'\n", type);
+ dbg(lvl_debug,"type='%s'\n", type);
mr->item.type=item_from_name(type);
if (mr->item.type == type_none && strcmp(type,"none"))
dbg(lvl_error,"Warning: type '%s' unknown\n", type);
} else {
- dbg(lvl_error,"failed to get attribute type\n");
+ dbg(lvl_debug,"failed to get attribute type\n");
}
} else
mr->line=NULL;
@@ -649,7 +649,7 @@ map_new_shapefile(struct map_methods *meth, struct attr **attrs, struct callback
char *shapefile,*dbffile;
if (! data)
return NULL;
- dbg(lvl_warning,"map_new_shapefile %s\n", data->u.str);
+ dbg(lvl_debug,"map_new_shapefile %s\n", data->u.str);
wdata=g_strdup(data->u.str);
wexp=file_wordexp_new(wdata);
wexp_data=file_wordexp_get_array(wexp);
@@ -665,7 +665,7 @@ map_new_shapefile(struct map_methods *meth, struct attr **attrs, struct callback
m->hDBF=DBFOpen(dbffile, "rb");
m->nFields=DBFGetFieldCount(m->hDBF);
g_free(dbffile);
- dbg(lvl_warning,"map_new_shapefile %s %s\n", m->filename, wdata);
+ dbg(lvl_debug,"map_new_shapefile %s %s\n", m->filename, wdata);
if (charset) {
m->charset=g_strdup(charset->u.str);
meth->charset=m->charset;
@@ -681,7 +681,7 @@ map_new_shapefile(struct map_methods *meth, struct attr **attrs, struct callback
void
plugin_init(void)
{
- dbg(lvl_warning,"shapefile: plugin_init\n");
+ dbg(lvl_debug,"shapefile: plugin_init\n");
plugin_register_map_type("shapefile", map_new_shapefile);
}
diff --git a/navit/map/textfile/textfile.c b/navit/map/textfile/textfile.c
index 558c86219..d70f989f9 100644
--- a/navit/map/textfile/textfile.c
+++ b/navit/map/textfile/textfile.c
@@ -54,7 +54,7 @@ get_line(struct map_rect_priv *mr)
else
mr->pos+=mr->lastlen;
fgets(mr->line, TEXTFILE_LINE_SIZE, mr->f);
- dbg(lvl_warning,"read textfile line: %s\n", mr->line);
+ dbg(lvl_debug,"read textfile line: %s\n", mr->line);
remove_comment_line(mr->line);
mr->lastlen=strlen(mr->line)+1;
if (strlen(mr->line) >= TEXTFILE_LINE_SIZE-1)
@@ -99,7 +99,7 @@ textfile_coord_get(void *priv_data, struct coord *c, int count)
if (mr->f && !feof(mr->f) && (!mr->item.id_hi || !mr->eoc) && parse_line(mr, mr->item.id_hi)) {
if (c){
*c=mr->c;
- dbg(lvl_warning,"c=0x%x,0x%x\n", c->x, c->y);
+ dbg(lvl_debug,"c=0x%x,0x%x\n", c->x, c->y);
c++;
}
ret++;
@@ -136,31 +136,31 @@ textfile_attr_get(void *priv_data, enum attr_type attr_type, struct attr *attr)
{
struct map_rect_priv *mr=priv_data;
char *str=NULL;
- dbg(lvl_warning,"mr=%p attrs='%s' ", mr, mr->attrs);
+ dbg(lvl_debug,"mr=%p attrs='%s' ", mr, mr->attrs);
if (attr_type != mr->attr_last) {
- dbg(lvl_warning,"reset attr_pos\n");
+ dbg(lvl_debug,"reset attr_pos\n");
mr->attr_pos=0;
mr->attr_last=attr_type;
}
if (attr_type == attr_any) {
- dbg(lvl_warning,"attr_any");
+ dbg(lvl_debug,"attr_any");
if (attr_from_line(mr->attrs,NULL,&mr->attr_pos,mr->attr, mr->attr_name)) {
attr_type=attr_from_name(mr->attr_name);
- dbg(lvl_warning,"found attr '%s' 0x%x\n", mr->attr_name, attr_type);
+ dbg(lvl_debug,"found attr '%s' 0x%x\n", mr->attr_name, attr_type);
attr->type=attr_type;
textfile_encode_attr(mr->attr, attr_type, attr);
return 1;
}
} else {
str=attr_to_name(attr_type);
- dbg(lvl_warning,"attr='%s' ",str);
+ dbg(lvl_debug,"attr='%s' ",str);
if (attr_from_line(mr->attrs,str,&mr->attr_pos,mr->attr, NULL)) {
textfile_encode_attr(mr->attr, attr_type, attr);
- dbg(lvl_warning,"found\n");
+ dbg(lvl_debug,"found\n");
return 1;
}
}
- dbg(lvl_warning,"not found\n");
+ dbg(lvl_debug,"not found\n");
return 0;
}
@@ -176,7 +176,7 @@ map_rect_new_textfile(struct map_priv *map, struct map_selection *sel)
{
struct map_rect_priv *mr;
- dbg(lvl_warning,"enter\n");
+ dbg(lvl_debug,"enter\n");
mr=g_new0(struct map_rect_priv, 1);
mr->m=map;
mr->sel=sel;
@@ -204,7 +204,7 @@ map_rect_new_textfile(struct map_priv *map, struct map_selection *sel)
}
sel=sel->next;
}
- dbg(lvl_warning,"popen args %s\n", args);
+ dbg(lvl_debug,"popen args %s\n", args);
mr->args=args;
mr->f=popen(mr->args, "r");
mr->pos=0;
@@ -245,7 +245,7 @@ static struct item *
map_rect_get_item_textfile(struct map_rect_priv *mr)
{
char *p,type[TEXTFILE_LINE_SIZE];
- dbg(lvl_warning,"map_rect_get_item_textfile id_hi=%d line=%s", mr->item.id_hi, mr->line);
+ dbg(lvl_debug,"map_rect_get_item_textfile id_hi=%d line=%s", mr->item.id_hi, mr->line);
if (!mr->f) {
return NULL;
}
@@ -255,7 +255,7 @@ map_rect_get_item_textfile(struct map_rect_priv *mr)
}
for(;;) {
if (feof(mr->f)) {
- dbg(lvl_warning,"map_rect_get_item_textfile: eof %d\n",mr->item.id_hi);
+ dbg(lvl_debug,"map_rect_get_item_textfile: eof %d\n",mr->item.id_hi);
if (mr->m->flags & 1) {
if (!mr->item.id_hi)
return NULL;
@@ -286,7 +286,7 @@ map_rect_get_item_textfile(struct map_rect_priv *mr)
get_line(mr);
continue;
}
- dbg(lvl_warning,"map_rect_get_item_textfile: point found\n");
+ dbg(lvl_debug,"map_rect_get_item_textfile: point found\n");
mr->eoc=0;
mr->item.id_lo=mr->pos;
} else {
@@ -294,7 +294,7 @@ map_rect_get_item_textfile(struct map_rect_priv *mr)
get_line(mr);
continue;
}
- dbg(lvl_warning,"map_rect_get_item_textfile: line found\n");
+ dbg(lvl_debug,"map_rect_get_item_textfile: line found\n");
if (! mr->line[0]) {
get_line(mr);
continue;
@@ -302,11 +302,11 @@ map_rect_get_item_textfile(struct map_rect_priv *mr)
mr->item.id_lo=mr->pos;
strcpy(mr->attrs, mr->line);
get_line(mr);
- dbg(lvl_warning,"mr=%p attrs=%s\n", mr, mr->attrs);
+ dbg(lvl_debug,"mr=%p attrs=%s\n", mr, mr->attrs);
}
- dbg(lvl_warning,"get_attrs %s\n", mr->attrs);
+ dbg(lvl_debug,"get_attrs %s\n", mr->attrs);
if (attr_from_line(mr->attrs,"type",NULL,type,NULL)) {
- dbg(lvl_warning,"type='%s'\n", type);
+ dbg(lvl_debug,"type='%s'\n", type);
mr->item.type=item_from_name(type);
if (mr->item.type == type_none)
dbg(lvl_error, "Warning: type '%s' unknown\n", type);
@@ -316,7 +316,7 @@ map_rect_get_item_textfile(struct map_rect_priv *mr)
}
mr->attr_last=attr_none;
mr->more=1;
- dbg(lvl_warning,"return attr='%s'\n", mr->attrs);
+ dbg(lvl_debug,"return attr='%s'\n", mr->attrs);
return &mr->item;
}
}
@@ -362,7 +362,7 @@ map_new_textfile(struct map_methods *meth, struct attr **attrs, struct callback_
char **wexp_data;
if (! data)
return NULL;
- dbg(lvl_warning,"map_new_textfile %s\n", data->u.str);
+ dbg(lvl_debug,"map_new_textfile %s\n", data->u.str);
wdata=g_strdup(data->u.str);
len=strlen(wdata);
if (len && wdata[len-1] == '|') {
@@ -380,7 +380,7 @@ map_new_textfile(struct map_methods *meth, struct attr **attrs, struct callback_
m->no_warning_if_map_file_missing=(no_warn!=NULL) && (no_warn->u.num);
if (flags)
m->flags=flags->u.num;
- dbg(lvl_warning,"map_new_textfile %s %s\n", m->filename, wdata);
+ dbg(lvl_debug,"map_new_textfile %s %s\n", m->filename, wdata);
if (charset) {
m->charset=g_strdup(charset->u.str);
meth->charset=m->charset;
@@ -393,7 +393,7 @@ map_new_textfile(struct map_methods *meth, struct attr **attrs, struct callback_
void
plugin_init(void)
{
- dbg(lvl_warning,"textfile: plugin_init\n");
+ dbg(lvl_debug,"textfile: plugin_init\n");
plugin_register_map_type("textfile", map_new_textfile);
}
diff --git a/navit/maps.c b/navit/maps.c
index fa5b5e24d..628713dd2 100644
--- a/navit/maps.c
+++ b/navit/maps.c
@@ -39,7 +39,7 @@ maps_new(struct attr *parent, struct attr **attrs)
dbg(lvl_error,"Parent must be mapset\n");
return NULL;
}
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
attrs_dup=attr_list_dup(attrs);
data=attr_search(attrs_dup, NULL, attr_data);
if (data) {
diff --git a/navit/mapset.c b/navit/mapset.c
index 7033745dc..6c3d0b5d1 100644
--- a/navit/mapset.c
+++ b/navit/mapset.c
@@ -310,7 +310,7 @@ struct mapset_search *
mapset_search_new(struct mapset *ms, struct item *item, struct attr *search_attr, int partial)
{
struct mapset_search *this;
- dbg(lvl_warning,"enter(%p,%p,%p,%d)\n", ms, item, search_attr, partial);
+ dbg(lvl_debug,"enter(%p,%p,%p,%d)\n", ms, item, search_attr, partial);
this=g_new0(struct mapset_search,1);
if(this != NULL && ms!=NULL )
{
diff --git a/navit/maptool/ch.c b/navit/maptool/ch.c
index dffee3058..b1b0b1bf6 100644
--- a/navit/maptool/ch.c
+++ b/navit/maptool/ch.c
@@ -252,7 +252,7 @@ ch_process_node(FILE *out, int node, int resolve)
item_bin=init_item(type_ch_node);
oldnode=GPOINTER_TO_INT(g_hash_table_lookup(newnode_hash, GINT_TO_POINTER(node)));
#if 0
- dbg(lvl_error,"0x%x,0x%x\n",node_index[oldnode].x,node_index[oldnode].y);
+ dbg(lvl_debug,"0x%x,0x%x\n",node_index[oldnode].x,node_index[oldnode].y);
#endif
item_bin_add_coord(item_bin, &node_index[oldnode], 1);
fwd.first=oldnode;
@@ -279,7 +279,7 @@ ch_process_node(FILE *out, int node, int resolve)
} else {
ch_edge.middle=*id;
#if 0
- dbg(lvl_error,"middle street id for is "ITEM_ID_FMT"\n",ITEM_ID_ARGS(*id));
+ dbg(lvl_debug,"middle street id for is "ITEM_ID_FMT"\n",ITEM_ID_ARGS(*id));
#endif
}
} else {
@@ -288,12 +288,12 @@ ch_process_node(FILE *out, int node, int resolve)
dbg_assert(id != NULL);
ch_edge.middle=*id;
#if 0
- dbg(lvl_error,"middle node id for is "ITEM_ID_FMT"\n",ITEM_ID_ARGS(*id));
+ dbg(lvl_debug,"middle node id for is "ITEM_ID_FMT"\n",ITEM_ID_ARGS(*id));
#endif
}
id=g_hash_table_lookup(sgr_nodes_hash, GINT_TO_POINTER((int)edge->target));
#if 0
- dbg(lvl_error,"id for %d is "ITEM_ID_FMT"\n",edge->target,ITEM_ID_ARGS(*id));
+ dbg(lvl_debug,"id for %d is "ITEM_ID_FMT"\n",edge->target,ITEM_ID_ARGS(*id));
#endif
if (id == NULL) {
fprintf(stderr,"Failed to look up target %d\n",edge->target);
@@ -511,7 +511,7 @@ ch_assemble_map(char *map_suffix, char *suffix, struct zip_info *zip_info)
struct item_id *id2=g_slice_new(struct item_id);
*id2=id;
#if 0
- dbg(lvl_error,"%d is "ITEM_ID_FMT"\n",nodeid,ITEM_ID_ARGS(*id2));
+ dbg(lvl_debug,"%d is "ITEM_ID_FMT"\n",nodeid,ITEM_ID_ARGS(*id2));
#endif
g_hash_table_insert(sgr_nodes_hash, GINT_TO_POINTER(nodeid), id2);
nodeid++;
diff --git a/navit/maptool/coastline.c b/navit/maptool/coastline.c
index 74c07aa90..4e17fd652 100644
--- a/navit/maptool/coastline.c
+++ b/navit/maptool/coastline.c
@@ -52,11 +52,11 @@ find_next(struct rect *bbox, GList *segments, struct coord *c, int exclude, stru
for (i = 0 ; i < 2 ; i++) {
curr=segments;
- dbg(lvl_warning,"search distance %d\n",search);
+ dbg(lvl_debug,"search distance %d\n",search);
while (curr) {
struct geom_poly_segment *seg=curr->data;
int dist=distance_from_ll(seg->first, bbox);
- dbg(lvl_warning,"0x%x 0x%x dist %d\n",seg->first->x,seg->first->y,dist);
+ dbg(lvl_debug,"0x%x 0x%x dist %d\n",seg->first->x,seg->first->y,dist);
if (dist != -1 && seg->first != seg->last && dist < min && (dist >= search)) {
min=dist;
ci[0]=*seg->first;
@@ -255,7 +255,7 @@ tile_collector_process_tile(char *tile, int *tile_data, struct coastline_tile_da
for (;;) {
search++;
// item_bin_write_debug_point_to_sink(out, &end, "Search %d",search);
- dbg(lvl_warning,"searching next polygon from 0x%x 0x%x\n",end.x,end.y);
+ dbg(lvl_debug,"searching next polygon from 0x%x 0x%x\n",end.x,end.y);
first=find_next(&bbox, sorted_segments, &end, exclude, cn);
exclude=1;
if (!first)
@@ -265,7 +265,7 @@ tile_collector_process_tile(char *tile, int *tile_data, struct coastline_tile_da
tile_start_valid=1;
} else {
if (cn[0].x == tile_start.x && cn[0].y == tile_start.y) {
- dbg(lvl_warning,"end of tile reached\n");
+ dbg(lvl_debug,"end of tile reached\n");
break;
}
}
@@ -274,7 +274,7 @@ tile_collector_process_tile(char *tile, int *tile_data, struct coastline_tile_da
continue;
}
poly_start_valid=0;
- dbg(lvl_warning,"start of polygon 0x%x 0x%x\n",cn[0].x,cn[0].y);
+ dbg(lvl_debug,"start of polygon 0x%x 0x%x\n",cn[0].x,cn[0].y);
for (;;) {
if (!poly_start_valid) {
poly_start=cn[0];
@@ -283,7 +283,7 @@ tile_collector_process_tile(char *tile, int *tile_data, struct coastline_tile_da
} else {
close_polygon(ib, &end, &cn[0], 1, &bbox, &edges);
if (cn[0].x == poly_start.x && cn[0].y == poly_start.y) {
- dbg(lvl_warning,"poly end reached\n");
+ dbg(lvl_debug,"poly end reached\n");
item_bin_add_attr_longlong(ib, attr_osm_wayid, ct->wayid);
item_bin_write_to_sink(ib, out, NULL);
end=cn[0];
@@ -296,11 +296,11 @@ tile_collector_process_tile(char *tile, int *tile_data, struct coastline_tile_da
first->type=geom_poly_segment_type_none;
end=cn[1];
if (distance_from_ll(&end, &bbox) == -1) {
- dbg(lvl_warning,"incomplete\n");
+ dbg(lvl_debug,"incomplete\n");
break;
}
first=find_next(&bbox, sorted_segments, &end, 1, cn);
- dbg(lvl_warning,"next segment of polygon 0x%x 0x%x\n",cn[0].x,cn[0].y);
+ dbg(lvl_debug,"next segment of polygon 0x%x 0x%x\n",cn[0].x,cn[0].y);
}
if (search > 55)
break;
diff --git a/navit/navigation.c b/navit/navigation.c
index 6876cd9b9..b1c5a28bf 100644
--- a/navit/navigation.c
+++ b/navit/navigation.c
@@ -144,7 +144,7 @@ navigation_get_attr(struct navigation *this_, enum attr_type type, struct attr *
{
struct map_rect *mr;
struct item *item;
- dbg(lvl_warning,"enter %s\n", attr_to_name(type));
+ dbg(lvl_debug,"enter %s\n", attr_to_name(type));
switch (type) {
case attr_map:
attr->u.map=this_->map;
@@ -242,7 +242,7 @@ navigation_set_announce(struct navigation *this_, enum item_type type, int *leve
{
int i;
if (type < route_item_first || type > route_item_last) {
- dbg(lvl_error,"street type %d out of range [%d,%d]", type, route_item_first, route_item_last);
+ dbg(lvl_debug,"street type %d out of range [%d,%d]", type, route_item_first, route_item_last);
return 0;
}
for (i = 0 ; i < 3 ; i++)
@@ -313,7 +313,7 @@ static int
road_angle(struct coord *c1, struct coord *c2, int dir)
{
int ret=transform_get_angle_delta(c1, c2, dir);
- dbg(lvl_warning, "road_angle(0x%x,0x%x - 0x%x,0x%x)=%d\n", c1->x, c1->y, c2->x, c2->y, ret);
+ dbg(lvl_debug, "road_angle(0x%x,0x%x - 0x%x,0x%x)=%d\n", c1->x, c1->y, c2->x, c2->y, ret);
return ret;
}
@@ -414,7 +414,7 @@ round_for_vocabulary(int vocabulary, int dist, int factor)
break;
i++;
}
- dbg(lvl_error,"converted %d to %d with factor %d\n",dist,distances[m],factor);
+ dbg(lvl_debug,"converted %d to %d with factor %d\n",dist,distances[m],factor);
dist=distances[m];
}
return dist*factor;
@@ -762,7 +762,7 @@ navigation_itm_update(struct navigation_itm *itm, struct item *ritem)
return;
}
- dbg(lvl_warning,"length=%ld time=%ld speed=%ld\n", length.u.num, time.u.num, speed.u.num);
+ dbg(lvl_debug,"length=%ld time=%ld speed=%ld\n", length.u.num, time.u.num, speed.u.num);
itm->length=length.u.num;
itm->time=time.u.num;
itm->speed=speed.u.num;
@@ -865,7 +865,7 @@ navigation_itm_new(struct navigation *this_, struct item *ritem)
navigation_itm_update(ret, ritem);
while (item_coord_get(ritem, &c[i], 1)) {
- dbg(lvl_warning, "coord %d 0x%x 0x%x\n", i, c[i].x ,c[i].y);
+ dbg(lvl_debug, "coord %d 0x%x 0x%x\n", i, c[i].x ,c[i].y);
if (i < 4)
i++;
@@ -874,7 +874,7 @@ navigation_itm_new(struct navigation *this_, struct item *ritem)
c[3]=c[4];
}
}
- dbg(lvl_warning,"count=%d\n", i);
+ dbg(lvl_debug,"count=%d\n", i);
i--;
ret->way.angle2=road_angle(&c[0], &c[1], 0);
@@ -889,7 +889,7 @@ navigation_itm_new(struct navigation *this_, struct item *ritem)
ret->way.flags |= AF_ROUNDABOUT;
}
- dbg(lvl_warning,"i=%d start %d end %d '%s' '%s'\n", i, ret->way.angle2, ret->angle_end, ret->way.name1, ret->way.name2);
+ dbg(lvl_debug,"i=%d start %d end %d '%s' '%s'\n", i, ret->way.angle2, ret->angle_end, ret->way.name1, ret->way.name2);
map_rect_destroy(mr);
} else {
if (this_->last)
@@ -904,7 +904,7 @@ navigation_itm_new(struct navigation *this_, struct item *ritem)
navigation_itm_ways_update(ret,graph_map);
}
}
- dbg(lvl_warning,"ret=%p\n", ret);
+ dbg(lvl_debug,"ret=%p\n", ret);
this_->last=ret;
return ret;
}
@@ -975,7 +975,7 @@ calculate_dest_distance(struct navigation *this_, int incr)
{
int len=0, time=0, count=0;
struct navigation_itm *next,*itm=this_->last;
- dbg(lvl_warning, "enter this_=%p, incr=%d\n", this_, incr);
+ dbg(lvl_debug, "enter this_=%p, incr=%d\n", this_, incr);
if (incr) {
if (itm) {
dbg(lvl_info, "old values: (%p) time=%d lenght=%d\n", itm, itm->dest_length, itm->dest_time);
@@ -1000,7 +1000,7 @@ calculate_dest_distance(struct navigation *this_, int incr)
itm->dest_count=count++;
itm=itm->prev;
}
- dbg(lvl_warning,"len %d time %d\n", len, time);
+ dbg(lvl_debug,"len %d time %d\n", len, time);
}
/**
@@ -1018,14 +1018,14 @@ static int
is_same_street2(char *old_name1, char *old_name2, char *new_name1, char *new_name2)
{
if (old_name1 && new_name1 && !strcmp(old_name1, new_name1)) {
- dbg(lvl_warning,"is_same_street: '%s' '%s' vs '%s' '%s' yes (1.)\n", old_name2, new_name2, old_name1, new_name1);
+ dbg(lvl_debug,"is_same_street: '%s' '%s' vs '%s' '%s' yes (1.)\n", old_name2, new_name2, old_name1, new_name1);
return 1;
}
if (old_name2 && new_name2 && !strcmp(old_name2, new_name2)) {
- dbg(lvl_warning,"is_same_street: '%s' '%s' vs '%s' '%s' yes (2.)\n", old_name2, new_name2, old_name1, new_name1);
+ dbg(lvl_debug,"is_same_street: '%s' '%s' vs '%s' '%s' yes (2.)\n", old_name2, new_name2, old_name1, new_name1);
return 1;
}
- dbg(lvl_warning,"is_same_street: '%s' '%s' vs '%s' '%s' no\n", old_name2, new_name2, old_name1, new_name1);
+ dbg(lvl_debug,"is_same_street: '%s' '%s' vs '%s' '%s' no\n", old_name2, new_name2, old_name1, new_name1);
return 0;
}
@@ -1094,10 +1094,10 @@ maneuver_straight(struct navigation_itm *new, int diff)
struct navigation_way *w;
w = new->way.next;
- dbg(lvl_warning,"diff=%d\n", diff);
+ dbg(lvl_debug,"diff=%d\n", diff);
while (w) {
curr_diff=abs(angle_delta(new->prev->angle_end, w->angle2));
- dbg(lvl_warning,"curr_diff=%d\n", curr_diff);
+ dbg(lvl_debug,"curr_diff=%d\n", curr_diff);
if (curr_diff < diff) {
return 0;
}
@@ -1214,7 +1214,7 @@ maneuver_required2(struct navigation *nav, struct navigation_itm *old, struct na
int num_new_motorways = 0; /* number of motorway-like ways */
int num_other = 0; /* number of ways which are neither motorway-like nor ramps */
- dbg(lvl_warning,"enter %p %p %p\n",old, new, delta);
+ dbg(lvl_debug,"enter %p %p %p\n",old, new, delta);
d=angle_delta(old->angle_end, new->way.angle2);
if (!new->way.next) {
/* No announcement necessary */
@@ -1407,9 +1407,9 @@ maneuver_required2(struct navigation *nav, struct navigation_itm *old, struct na
if (left < -dlim && right > dlim)
is_unambiguous=1;
if (dc != d) {
- dbg(lvl_warning,"d %d vs dc %d\n",d,dc);
+ dbg(lvl_debug,"d %d vs dc %d\n",d,dc);
d-=(dc+d+1)/2;
- dbg(lvl_warning,"result %d\n",d);
+ dbg(lvl_debug,"result %d\n",d);
is_unambiguous=0;
}
if (!is_same_street && is_unambiguous < 1) {
@@ -1433,7 +1433,7 @@ maneuver_required2(struct navigation *nav, struct navigation_itm *old, struct na
if (new->item.type == old->item.type || (new->item.type != type_ramp && old->item.type != type_ramp)) {
if (is_same_street2(old, new)) {
if (! entering_straight(new, abs(*delta))) {
- dbg(lvl_warning, "maneuver_required: Not driving straight: yes\n");
+ dbg(lvl_debug, "maneuver_required: Not driving straight: yes\n");
if (reason)
*reason="yes: Not driving straight";
return 1;
@@ -1449,17 +1449,17 @@ maneuver_required2(struct navigation *nav, struct navigation_itm *old, struct na
*reason="yes: delta > ext_limit for same name";
return 1;
} else {
- dbg(lvl_warning, "maneuver_required: Staying on the same street: no\n");
+ dbg(lvl_debug, "maneuver_required: Staying on the same street: no\n");
if (reason)
*reason="no: Staying on same street";
return 0;
}
}
} else
- dbg(lvl_warning, "maneuver_required: old or new is ramp\n");
+ dbg(lvl_debug, "maneuver_required: old or new is ramp\n");
#if 0
if (old->item.type == type_ramp && (new->item.type == type_highway_city || new->item.type == type_highway_land)) {
- dbg(lvl_warning, "no_maneuver_required: old is ramp new is highway\n");
+ dbg(lvl_debug, "no_maneuver_required: old is ramp new is highway\n");
if (reason)
*reason="no: old is ramp new is highway";
return 0;
@@ -1467,13 +1467,13 @@ maneuver_required2(struct navigation *nav, struct navigation_itm *old, struct na
#endif
#if 0
if (old->crossings_end == 2) {
- dbg(lvl_warning, "maneuver_required: only 2 connections: no\n");
+ dbg(lvl_debug, "maneuver_required: only 2 connections: no\n");
return 0;
}
#endif
- dbg(lvl_warning,"delta=%d-%d=%d\n", new->way.angle2, old->angle_end, *delta);
+ dbg(lvl_debug,"delta=%d-%d=%d\n", new->way.angle2, old->angle_end, *delta);
if ((new->item.type == type_highway_land || new->item.type == type_highway_city || old->item.type == type_highway_land || old->item.type == type_highway_city) && (!is_same_street_systematic(old, new) || (old->name2 != NULL && new->name2 == NULL))) {
- dbg(lvl_warning, "maneuver_required: highway changed name\n");
+ dbg(lvl_debug, "maneuver_required: highway changed name\n");
if (reason)
*reason="yes: highway changed name";
return 1;
@@ -1482,11 +1482,11 @@ maneuver_required2(struct navigation *nav, struct navigation_itm *old, struct na
if (! entering_straight(new,abs(*delta))) {
if (reason)
*reason="yes: not straight";
- dbg(lvl_warning, "maneuver_required: not driving straight: yes\n");
+ dbg(lvl_debug, "maneuver_required: not driving straight: yes\n");
return 1;
}
- dbg(lvl_warning, "maneuver_required: delta(%d) < %d: no\n", *delta, straight_limit);
+ dbg(lvl_debug, "maneuver_required: delta(%d) < %d: no\n", *delta, straight_limit);
if (reason)
*reason="no: delta < limit";
return 0;
@@ -1500,13 +1500,13 @@ maneuver_required2(struct navigation *nav, struct navigation_itm *old, struct na
}
if (! check_multiple_streets(new)) {
- dbg(lvl_warning, "maneuver_required: only one possibility: no\n");
+ dbg(lvl_debug, "maneuver_required: only one possibility: no\n");
if (reason)
*reason="no: only one possibility";
return 0;
}
- dbg(lvl_warning, "maneuver_required: delta=%d: yes\n", *delta);
+ dbg(lvl_debug, "maneuver_required: delta=%d: yes\n", *delta);
if (reason)
*reason="yes: delta >= limit";
return 1;
@@ -1517,7 +1517,7 @@ static struct navigation_command *
command_new(struct navigation *this_, struct navigation_itm *itm, int delta)
{
struct navigation_command *ret=g_new0(struct navigation_command, 1);
- dbg(lvl_warning,"enter this_=%p itm=%p delta=%d\n", this_, itm, delta);
+ dbg(lvl_debug,"enter this_=%p itm=%p delta=%d\n", this_, itm, delta);
ret->delta=delta;
ret->itm=itm;
if (itm && itm->prev && itm->way.next && itm->prev->way.next && !(itm->way.flags & AF_ROUNDABOUT) && (itm->prev->way.flags & AF_ROUNDABOUT)) {
@@ -1526,7 +1526,7 @@ command_new(struct navigation *this_, struct navigation_itm *itm, int delta)
int entry_angle;
struct navigation_itm *itm2=itm->prev;
int exit_angle=angle_median(itm->prev->angle_end, itm->way.next->angle2);
- dbg(lvl_warning,"exit %d median from %d,%d\n", exit_angle,itm->prev->angle_end, itm->way.next->angle2);
+ dbg(lvl_debug,"exit %d median from %d,%d\n", exit_angle,itm->prev->angle_end, itm->way.next->angle2);
while (itm2 && (itm2->way.flags & AF_ROUNDABOUT)) {
len+=itm2->length;
angle=itm2->angle_end;
@@ -1535,11 +1535,11 @@ command_new(struct navigation *this_, struct navigation_itm *itm, int delta)
if (itm2 && itm2->next && itm2->next->way.next) {
itm2=itm2->next;
entry_angle=angle_median(angle_opposite(itm2->way.angle2), itm2->way.next->angle2);
- dbg(lvl_warning,"entry %d median from %d(%d),%d\n", entry_angle,angle_opposite(itm2->way.angle2), itm2->way.angle2, itm2->way.next->angle2);
+ dbg(lvl_debug,"entry %d median from %d(%d),%d\n", entry_angle,angle_opposite(itm2->way.angle2), itm2->way.angle2, itm2->way.next->angle2);
} else {
entry_angle=angle_opposite(angle);
}
- dbg(lvl_error,"entry %d exit %d\n", entry_angle, exit_angle);
+ dbg(lvl_debug,"entry %d exit %d\n", entry_angle, exit_angle);
ret->roundabout_delta=angle_delta(entry_angle, exit_angle);
ret->length=len+roundabout_extra_length;
}
@@ -1622,7 +1622,7 @@ navigation_item_destination(struct navigation *nav, struct navigation_itm *itm,
if (!vocabulary2)
n2=NULL;
if(!n1 && !n2 && itm->way.item.type == type_ramp && vocabulary2) {
- dbg(lvl_warning,">> Next is ramp %x current is %x \n", itm->way.item.type, next->way.item.type);
+ dbg(lvl_debug,">> Next is ramp %x current is %x \n", itm->way.item.type, next->way.item.type);
if(next->way.item.type == type_ramp)
return NULL;
@@ -1755,7 +1755,7 @@ show_maneuver(struct navigation *nav, struct navigation_itm *itm, struct navigat
/* TRANSLATORS: Don't forget the ending space */
strength=_("really strongly ");
} else {
- dbg(lvl_warning,"delta=%d\n", delta);
+ dbg(lvl_debug,"delta=%d\n", delta);
/* TRANSLATORS: Don't forget the ending space */
strength=_("unknown ");
}
@@ -1771,7 +1771,7 @@ show_maneuver(struct navigation *nav, struct navigation_itm *itm, struct navigat
if (!connect) {
level=navigation_get_announce_level_cmd(nav, itm, cmd, distance-cmd->length);
}
- dbg(lvl_warning,"distance=%d level=%d type=0x%x\n", distance, level, itm->way.item.type);
+ dbg(lvl_debug,"distance=%d level=%d type=0x%x\n", distance, level, itm->way.item.type);
}
if (cmd->itm->prev->way.flags & AF_ROUNDABOUT) {
@@ -1986,10 +1986,10 @@ navigation_call_callbacks(struct navigation *this_, int force_speech)
if (!this_->cmd_first)
return;
callback_list_call(this_->callback, 1, &p);
- dbg(lvl_warning,"force_speech=%d turn_around=%d turn_around_limit=%d\n", force_speech, this_->turn_around, this_->turn_around_limit);
+ dbg(lvl_debug,"force_speech=%d turn_around=%d turn_around_limit=%d\n", force_speech, this_->turn_around, this_->turn_around_limit);
distance=round_distance(this_->first->dest_length-this_->cmd_first->itm->dest_length);
if (this_->turn_around_limit && this_->turn_around == this_->turn_around_limit) {
- dbg(lvl_warning,"distance=%d distance_turn=%d\n", distance, this_->distance_turn);
+ dbg(lvl_debug,"distance=%d distance_turn=%d\n", distance, this_->distance_turn);
while (distance > this_->distance_turn) {
this_->level_last=4;
level=4;
@@ -2007,8 +2007,8 @@ navigation_call_callbacks(struct navigation *this_, int force_speech)
/* only tell if the level is valid for more than 3 seconds */
int speed_distance=this_->first->speed*30/36;
if (distance < speed_distance || navigation_get_announce_level_cmd(this_, this_->first, this_->cmd_first, distance-speed_distance) == level) {
- dbg(lvl_warning,"distance %d speed_distance %d\n",distance,speed_distance);
- dbg(lvl_warning,"level %d < %d\n", level, this_->level_last);
+ dbg(lvl_debug,"distance %d speed_distance %d\n",distance,speed_distance);
+ dbg(lvl_debug,"level %d < %d\n", level, this_->level_last);
this_->level_last=level;
force_speech=3;
}
@@ -2030,7 +2030,7 @@ navigation_call_callbacks(struct navigation *this_, int force_speech)
if (force_speech) {
this_->level_last=level;
this_->curr_delay=0;
- dbg(lvl_warning,"force_speech=%d distance=%d level=%d type=0x%x\n", force_speech, distance, level, this_->first->way.item.type);
+ dbg(lvl_debug,"force_speech=%d distance=%d level=%d type=0x%x\n", force_speech, distance, level, this_->first->way.item.type);
callback_list_call(this_->callback_speech, 1, &p);
}
}
@@ -2049,7 +2049,7 @@ navigation_update(struct navigation *this_, struct route *route, struct attr *at
if (attr->type != attr_route_status)
return;
- dbg(lvl_warning,"enter %d\n", mode);
+ dbg(lvl_debug,"enter %d\n", mode);
if (attr->u.num == route_status_no_destination || attr->u.num == route_status_not_found || attr->u.num == route_status_path_done_new)
navigation_flush(this_);
if (attr->u.num != route_status_path_done_new && attr->u.num != route_status_path_done_incremental)
@@ -2067,7 +2067,7 @@ navigation_update(struct navigation *this_, struct route *route, struct attr *at
this_->vehicleprofile=vehicleprofile.u.vehicleprofile;
else
this_->vehicleprofile=NULL;
- dbg(lvl_warning,"enter\n");
+ dbg(lvl_debug,"enter\n");
while ((ritem=map_rect_get_item(mr))) {
if (ritem->type == type_route_start && this_->turn_around > -this_->turn_around_limit+1)
this_->turn_around--;
@@ -2080,7 +2080,7 @@ navigation_update(struct navigation *this_, struct route *route, struct attr *at
if (!item_attr_get(ritem, attr_direction, &street_direction))
street_direction.u.num=0;
sitem=street_item.u.item;
- dbg(lvl_warning,"sitem=%p\n", sitem);
+ dbg(lvl_debug,"sitem=%p\n", sitem);
itm=item_hash_lookup(this_->hash, sitem);
dbg(lvl_info,"itm for item with id (0x%x,0x%x) is %p\n", sitem->id_hi, sitem->id_lo, itm);
if (itm && itm->way.dir != street_direction.u.num) {
@@ -2092,7 +2092,7 @@ navigation_update(struct navigation *this_, struct route *route, struct attr *at
navigation_itm_update(itm, ritem);
break;
}
- dbg(lvl_warning,"not on track\n");
+ dbg(lvl_debug,"not on track\n");
}
navigation_itm_new(this_, ritem);
}
@@ -2486,7 +2486,7 @@ navigation_map_get_item(struct map_rect_priv *priv)
l=type_nav_roundabout_l8;
break;
}
- dbg(lvl_warning,"delta %d\n",priv->cmd->delta);
+ dbg(lvl_debug,"delta %d\n",priv->cmd->delta);
if (priv->cmd->delta < 0)
ret->type=l;
else
@@ -2520,7 +2520,7 @@ navigation_map_get_item(struct map_rect_priv *priv)
navigation_map_item_attr_rewind(priv);
ret->id_lo=priv->itm->dest_count;
- dbg(lvl_warning,"type=%d\n", ret->type);
+ dbg(lvl_debug,"type=%d\n", ret->type);
return ret;
}
diff --git a/navit/navit.c b/navit/navit.c
index c2fade753..f1db926bf 100644
--- a/navit/navit.c
+++ b/navit/navit.c
@@ -229,7 +229,7 @@ navit_get_user_data_directory(int create) {
char *dir;
dir = getenv("NAVIT_USER_DATADIR");
if (create && !file_exists(dir)) {
- dbg(lvl_error,"creating dir %s\n", dir);
+ dbg(lvl_debug,"creating dir %s\n", dir);
if (file_mkdir(dir,0)) {
dbg(lvl_error,"failed creating dir %s\n", dir);
return NULL;
@@ -421,7 +421,7 @@ update_transformation(struct transformation *tr, struct point *old, struct point
center_new.x=center_old->x+coord_old.x-coord_new.x;
center_new.y=center_old->y+coord_old.y-coord_new.y;
navit_restrict_map_center_to_world_boundingbox(tr, &center_new);
- dbg(lvl_warning,"change center from 0x%x,0x%x to 0x%x,0x%x\n", center_old->x, center_old->y, center_new.x, center_new.y);
+ dbg(lvl_debug,"change center from 0x%x,0x%x to 0x%x,0x%x\n", center_old->x, center_old->y, center_new.x, center_new.y);
transform_set_center(tr, &center_new);
}
@@ -439,7 +439,7 @@ navit_handle_button(struct navit *this_, int pressed, int button, struct point *
{
int border=16;
- dbg(lvl_warning,"button %d %s (ignore: %d)\n",button,pressed?"pressed":"released",this_->ignore_button);
+ dbg(lvl_debug,"button %d %s (ignore: %d)\n",button,pressed?"pressed":"released",this_->ignore_button);
callback_list_call_attr_4(this_->attr_cbl, attr_button, this_, GINT_TO_POINTER(pressed), GINT_TO_POINTER(button), p);
if (this_->ignore_button) {
this_->ignore_button=0;
@@ -483,7 +483,7 @@ navit_handle_button(struct navit *this_, int pressed, int button, struct point *
this_->motion_timeout=NULL;
}
if (this_->moved) {
- dbg(lvl_warning, "mouse drag (%d, %d)->(%d, %d)\n", this_->pressed.x, this_->pressed.y, p->x, p->y);
+ dbg(lvl_debug, "mouse drag (%d, %d)->(%d, %d)\n", this_->pressed.x, this_->pressed.y, p->x, p->y);
update_transformation(this_->trans, &this_->pressed, p);
graphics_draw_drag(this_->gra, NULL);
transform_copy(this_->trans, this_->trans_cursor);
@@ -501,7 +501,7 @@ static void
navit_button(void *data, int pressed, int button, struct point *p)
{
struct navit *this=data;
- dbg(lvl_warning,"enter %d %d ignore %d\n",pressed,button,this->ignore_graphics_events);
+ dbg(lvl_debug,"enter %d %d ignore %d\n",pressed,button,this->ignore_graphics_events);
if (!this->ignore_graphics_events) {
if (! this->popup_callback)
this->popup_callback=callback_new_1(callback_cast(navit_popup), this);
@@ -1308,7 +1308,7 @@ navit_cmd_spawn(struct navit *this, char *function, struct attr **in, struct att
if(in[i]->type!=attr_none ) {
argv[j++]=attr_to_text(in[i],NULL,1);
} else {
- dbg(lvl_error,"Parameter #%i is attr_none - skipping\n",i);
+ dbg(lvl_debug,"Parameter #%i is attr_none - skipping\n",i);
}
}
argv[j]=NULL;
@@ -1317,15 +1317,15 @@ navit_cmd_spawn(struct navit *this, char *function, struct attr **in, struct att
// spawn_process() testing suite - uncomment following code to test.
//sleep(3);
// example of non-blocking wait
- //int st=spawn_process_check_status(pi,0);dbg(lvl_error,"status %i\n",st);
+ //int st=spawn_process_check_status(pi,0);dbg(lvl_debug,"status %i\n",st);
// example of blocking wait
- //st=spawn_process_check_status(pi,1);dbg(lvl_error,"status %i\n",st);
+ //st=spawn_process_check_status(pi,1);dbg(lvl_debug,"status %i\n",st);
// example of wait after process is finished and status is
// already tested
- //st=spawn_process_check_status(pi,1);dbg(lvl_error,"status %i\n",st);
+ //st=spawn_process_check_status(pi,1);dbg(lvl_debug,"status %i\n",st);
// example of wait after process is finished and status is
// already tested - unblocked
- //st=spawn_process_check_status(pi,0);dbg(lvl_error,"status %i\n",st);
+ //st=spawn_process_check_status(pi,0);dbg(lvl_debug,"status %i\n",st);
// End testing suite
spawn_process_info_free(pi);
@@ -1424,7 +1424,7 @@ navit_new(struct attr *parent, struct attr **attrs)
this_->messages = messagelist_new(attrs);
- dbg(lvl_warning,"return %p\n",this_);
+ dbg(lvl_debug,"return %p\n",this_);
return this_;
}
@@ -1537,7 +1537,7 @@ navit_set_destination(struct navit *this_, struct pcoord *c, const char *descrip
this_->destination=*c;
this_->destination_valid=1;
- dbg(lvl_warning, "c=(%i,%i)\n", c->x,c->y);
+ dbg(lvl_debug, "c=(%i,%i)\n", c->x,c->y);
bookmarks_append_destinations(this_->former_destination, destination_file, c, 1, type_former_destination, description, this_->recentdest_count);
} else {
this_->destination_valid=0;
@@ -1822,7 +1822,7 @@ navit_say(struct navit *this_, const char *text)
if(this_->speech) {
if (!speech_get_attr(this_->speech, attr_active, &attr, NULL))
attr.u.num = 1;
- dbg(lvl_warning, "this_.speech->active %ld\n", attr.u.num);
+ dbg(lvl_debug, "this_.speech->active %ld\n", attr.u.num);
if(attr.u.num)
speech_say(this_->speech, text);
}
@@ -1869,7 +1869,7 @@ navit_speak(struct navit *this_)
if (!speech_get_attr(this_->speech, attr_active, &attr, NULL))
attr.u.num = 1;
- dbg(lvl_warning, "this_.speech->active %ld\n", attr.u.num);
+ dbg(lvl_debug, "this_.speech->active %ld\n", attr.u.num);
if(!attr.u.num)
return;
@@ -1899,17 +1899,17 @@ navit_window_roadbook_update(struct navit *this_)
struct param_list param[5];
int secs;
- dbg(lvl_warning,"enter\n");
+ dbg(lvl_debug,"enter\n");
datawindow_mode(this_->roadbook_window, 1);
if (nav)
map=navigation_get_map(nav);
if (map)
mr=map_rect_new(map, NULL);
- dbg(lvl_error,"nav=%p map=%p mr=%p\n", nav, map, mr);
+ dbg(lvl_debug,"nav=%p map=%p mr=%p\n", nav, map, mr);
if (mr) {
- dbg(lvl_error,"while loop\n");
+ dbg(lvl_debug,"while loop\n");
while ((item=map_rect_get_item(mr))) {
- dbg(lvl_error,"item=%p\n", item);
+ dbg(lvl_debug,"item=%p\n", item);
attr.u.str=NULL;
if (item->type != type_nav_position) {
item_attr_get(item, attr_navigation_long, &attr);
@@ -1982,7 +1982,7 @@ navit_window_roadbook_update(struct navit *this_)
void
navit_window_roadbook_destroy(struct navit *this_)
{
- dbg(lvl_error, "enter\n");
+ dbg(lvl_debug, "enter\n");
navigation_unregister_callback(this_->navigation, attr_navigation_long, this_->roadbook_callback);
callback_destroy(this_->roadbook_callback);
this_->roadbook_window=NULL;
@@ -2162,15 +2162,15 @@ navit_zoom_to_rect(struct navit *this_, struct coord_rect *r)
c.y=(r->rl.y+r->lu.y)/2;
transform_set_center(this_->trans, &c);
transform_get_size(this_->trans, &w, &h);
- dbg(lvl_error,"center 0x%x,0x%x w %d h %d\n",c.x,c.y,w,h);
- dbg(lvl_error,"%x,%x-%x,%x\n", r->lu.x,r->lu.y,r->rl.x,r->rl.y);
+ dbg(lvl_debug,"center 0x%x,0x%x w %d h %d\n",c.x,c.y,w,h);
+ dbg(lvl_debug,"%x,%x-%x,%x\n", r->lu.x,r->lu.y,r->rl.x,r->rl.y);
while (scale < 1<<20) {
struct point p1,p2;
transform_set_scale(this_->trans, scale);
transform_setup_source_rect(this_->trans);
transform(this_->trans, transform_get_projection(this_->trans), &r->lu, &p1, 1, 0, 0, NULL);
transform(this_->trans, transform_get_projection(this_->trans), &r->rl, &p2, 1, 0, 0, NULL);
- dbg(lvl_error,"%d,%d-%d,%d\n",p1.x,p1.y,p2.x,p2.y);
+ dbg(lvl_debug,"%d,%d-%d,%d\n",p1.x,p1.y,p2.x,p2.y);
if (p1.x < 0 || p2.x < 0 || p1.x > w || p2.x > w ||
p1.y < 0 || p2.y < 0 || p1.y > h || p2.y > h)
scale*=2;
@@ -2178,7 +2178,7 @@ navit_zoom_to_rect(struct navit *this_, struct coord_rect *r)
break;
}
- dbg(lvl_error,"scale=%d (0x%x) of %d (0x%x)\n",scale,scale,1<<20,1<<20);
+ dbg(lvl_debug,"scale=%d (0x%x) of %d (0x%x)\n",scale,scale,1<<20,1<<20);
if (this_->ready == 3)
navit_draw_async(this_,0);
}
@@ -2194,17 +2194,17 @@ navit_zoom_to_route(struct navit *this_, int orientation)
int count=0;
if (! this_->route)
return;
- dbg(lvl_warning,"enter\n");
+ dbg(lvl_debug,"enter\n");
map=route_get_map(this_->route);
- dbg(lvl_warning,"map=%p\n",map);
+ dbg(lvl_debug,"map=%p\n",map);
if (map)
mr=map_rect_new(map, NULL);
- dbg(lvl_warning,"mr=%p\n",mr);
+ dbg(lvl_debug,"mr=%p\n",mr);
if (mr) {
while ((item=map_rect_get_item(mr))) {
- dbg(lvl_warning,"item=%s\n", item_to_name(item->type));
+ dbg(lvl_debug,"item=%s\n", item_to_name(item->type));
while (item_coord_get(item, &c, 1)) {
- dbg(lvl_warning,"coord\n");
+ dbg(lvl_debug,"coord\n");
if (!count)
r.lu=r.rl=c;
else
@@ -2440,7 +2440,7 @@ navit_set_attr_do(struct navit *this_, struct attr *attr, int init)
break;
case attr_center:
transform_from_geo(transform_get_projection(this_->trans), attr->u.coord_geo, &co);
- dbg(lvl_warning,"0x%x,0x%x\n",co.x,co.y);
+ dbg(lvl_debug,"0x%x,0x%x\n",co.x,co.y);
transform_set_center(this_->trans, &co);
break;
case attr_drag_bitmap:
@@ -2516,7 +2516,7 @@ navit_set_attr_do(struct navit *this_, struct attr *attr, int init)
}
break;
case attr_osd_configuration:
- dbg(lvl_error,"setting osd_configuration to %ld (was %d)\n", attr->u.num, this_->osd_configuration);
+ dbg(lvl_debug,"setting osd_configuration to %ld (was %d)\n", attr->u.num, this_->osd_configuration);
attr_updated=(this_->osd_configuration != attr->u.num);
this_->osd_configuration=attr->u.num;
break;
@@ -3335,7 +3335,7 @@ navit_layout_switch(struct navit *n)
//Check that we aren't calculating too fast
if (vehicle_get_attr(n->vehicle->vehicle, attr_position_time_iso8601,&iso8601_attr,NULL)==1) {
currTs=iso8601_to_secs(iso8601_attr.u.str);
- dbg(lvl_warning,"currTs: %u:%u\n",currTs%86400/3600,((currTs%86400)%3600)/60);
+ dbg(lvl_debug,"currTs: %u:%u\n",currTs%86400/3600,((currTs%86400)%3600)/60);
}
if (currTs-(n->prevTs)<60) {
//We've have to wait a little
@@ -3360,7 +3360,7 @@ navit_layout_switch(struct navit *n)
}
trise_actual=trise;
- dbg(lvl_warning,"trise: %u:%u\n",HOURS(trise),MINUTES(trise));
+ dbg(lvl_debug,"trise: %u:%u\n",HOURS(trise),MINUTES(trise));
if (l->dayname) {
if ((HOURS(trise)*60+MINUTES(trise)==(currTs%86400)/60) ||
@@ -3378,7 +3378,7 @@ navit_layout_switch(struct navit *n)
n->prevTs=currTs;
return;
}
- dbg(lvl_warning,"tset: %u:%u\n",HOURS(tset),MINUTES(tset));
+ dbg(lvl_debug,"tset: %u:%u\n",HOURS(tset),MINUTES(tset));
if (HOURS(tset)*60+MINUTES(tset)==((currTs%86400)/60)
|| (n->prevTs==0 && (((HOURS(tset)*60+MINUTES(tset)<(currTs%86400)/60)) ||
((HOURS(trise_actual)*60+MINUTES(trise_actual)>(currTs%86400)/60))))) {
@@ -3483,7 +3483,7 @@ int navit_get_blocked(struct navit *this_)
void
navit_destroy(struct navit *this_)
{
- dbg(lvl_error,"enter %p\n",this_);
+ dbg(lvl_debug,"enter %p\n",this_);
graphics_draw_cancel(this_->gra, this_->displaylist);
callback_list_call_attr_1(this_->attr_cbl, attr_destroy, this_);
attr_list_free(this_->attrs);
diff --git a/navit/osd.c b/navit/osd.c
index a01cc0c70..d47653dc1 100644
--- a/navit/osd.c
+++ b/navit/osd.c
@@ -128,7 +128,7 @@ osd_evaluate_command(struct osd_item *this, struct navit *nav)
struct attr navit;
navit.type=attr_navit;
navit.u.navit=nav;
- dbg(lvl_warning, "calling command '%s'\n", this->command);
+ dbg(lvl_debug, "calling command '%s'\n", this->command);
command_evaluate(&navit, this->command);
}
@@ -222,12 +222,12 @@ osd_std_keypress(struct osd_item *item, struct navit *nav, char *key)
{
#if 0
int i;
- dbg(lvl_error,"key=%s\n",key);
+ dbg(lvl_debug,"key=%s\n",key);
for (i = 0 ; i < strlen(key) ; i++) {
- dbg(lvl_error,"key:0x%02x\n",key[i]);
+ dbg(lvl_debug,"key:0x%02x\n",key[i]);
}
for (i = 0 ; i < strlen(item->accesskey) ; i++) {
- dbg(lvl_error,"accesskey:0x%02x\n",item->accesskey[i]);
+ dbg(lvl_debug,"accesskey:0x%02x\n",item->accesskey[i]);
}
#endif
if ( ! graphics_is_disabled(item->gr) && item->accesskey && key && !strcmp(key, item->accesskey))
@@ -350,7 +350,7 @@ void
osd_std_config(struct osd_item *item, struct navit *navit)
{
struct attr attr;
- dbg(lvl_warning,"enter\n");
+ dbg(lvl_debug,"enter\n");
if (item->enable_cs) {
item->reconfig_cb = callback_new_1(callback_cast(osd_std_reconfigure), item);
command_saved_set_cb(item->enable_cs, item->reconfig_cb);
diff --git a/navit/osd/core/osd_core.c b/navit/osd/core/osd_core.c
index bc38282ec..2351b9c90 100644
--- a/navit/osd/core/osd_core.c
+++ b/navit/osd/core/osd_core.c
@@ -1479,7 +1479,7 @@ osd_button_init(struct osd_priv_common *opc, struct navit *nav)
struct osd_button *this = (struct osd_button *)opc->data;
struct graphics *gra = navit_get_graphics(nav);
- dbg(lvl_warning, "enter\n");
+ dbg(lvl_debug, "enter\n");
this->img = graphics_image_new(gra, this->src);
if (!this->img) {
dbg(lvl_warning, "failed to load '%s'\n", this->src);
@@ -1617,7 +1617,7 @@ osd_image_init(struct osd_priv_common *opc, struct navit *nav)
struct osd_button *this = (struct osd_button *)opc->data;
struct graphics *gra = navit_get_graphics(nav);
- dbg(lvl_warning, "enter\n");
+ dbg(lvl_debug, "enter\n");
this->img = graphics_image_new(gra, this->src);
if (!this->img) {
dbg(lvl_warning, "failed to load '%s'\n", this->src);
@@ -1719,7 +1719,7 @@ osd_nav_next_turn_draw(struct osd_priv_common *opc, struct navit *navit,
&& (item->type == type_nav_position || item->type == type_nav_none || level-- > 0));
if (item) {
name = item_to_name(item->type);
- dbg(lvl_warning, "name=%s\n", name);
+ dbg(lvl_debug, "name=%s\n", name);
if (this->active != 1 || this->last_name != name) {
this->active = 1;
this->last_name = name;
@@ -1738,7 +1738,7 @@ osd_nav_next_turn_draw(struct osd_priv_common *opc, struct navit *navit,
osd_std_draw(&opc->osd_item);
if (this->active) {
image = g_strdup_printf(this->icon_src, name);
- dbg(lvl_warning, "image=%s\n", image);
+ dbg(lvl_debug, "image=%s\n", image);
gr_image =
graphics_image_new_scaled(opc->osd_item.gr,
image, this->icon_w,
@@ -1755,7 +1755,7 @@ osd_nav_next_turn_draw(struct osd_priv_common *opc, struct navit *navit,
this->
icon_h);
}
- dbg(lvl_warning, "gr_image=%p\n", gr_image);
+ dbg(lvl_debug, "gr_image=%p\n", gr_image);
if (gr_image) {
p.x =
(opc->osd_item.w -
@@ -1888,7 +1888,7 @@ osd_nav_toggle_announcer_draw(struct osd_priv_common *opc, struct navit *navit,
gr_image = graphics_image_new_scaled(opc->osd_item.gr, path, this->icon_w, this->icon_h);
}
- dbg(lvl_warning, "gr_image=%p\n", gr_image);
+ dbg(lvl_debug, "gr_image=%p\n", gr_image);
if (gr_image)
{
@@ -2777,8 +2777,8 @@ osd_text_draw(struct osd_priv_common *opc, struct navit *navit, struct vehicle *
}
if (item) {
- dbg(lvl_warning,"name %s\n", item_to_name(item->type));
- dbg(lvl_warning,"type %s\n", attr_to_name(oti->attr_typ));
+ dbg(lvl_debug,"name %s\n", item_to_name(item->type));
+ dbg(lvl_debug,"type %s\n", attr_to_name(oti->attr_typ));
if (item_attr_get(item, oti->attr_typ, &attr))
value=osd_text_format_attr(&attr, oti->format, imperial);
}
@@ -2891,7 +2891,7 @@ osd_text_draw(struct osd_priv_common *opc, struct navit *navit, struct vehicle *
last++;
}
- dbg(lvl_warning,"this->align=%d\n", this->align);
+ dbg(lvl_debug,"this->align=%d\n", this->align);
switch (this->align & 51) {
case 1:
p.y=0;
@@ -3175,7 +3175,7 @@ osd_gps_status_draw(struct osd_priv_common *opc, struct navit *navit,
case 2:
strength=2;
if (vehicle_get_attr(vehicle_attr.u.vehicle, attr_position_sats_used, &attr, NULL)) {
- dbg(lvl_warning,"num=%ld\n", attr.u.num);
+ dbg(lvl_debug,"num=%ld\n", attr.u.num);
if (attr.u.num >= 3)
strength=attr.u.num-1;
if (strength > 5)
@@ -3490,7 +3490,7 @@ osd_scale_init(struct osd_priv_common *opc, struct navit *nav)
struct color color_white={COLOR_WHITE_};
struct color color_black={COLOR_BLACK_};
struct graphics *gra = navit_get_graphics(nav);
- dbg(lvl_warning, "enter\n");
+ dbg(lvl_debug, "enter\n");
if (this->use_overlay) {
osd_set_std_graphic(nav, &opc->osd_item, (struct osd_priv *)opc);
} else {
@@ -3564,7 +3564,7 @@ osd_auxmap_draw(struct osd_priv_common *opc)
memset(&sel, 0, sizeof(sel));
sel.u.p_rect.rl.x=opc->osd_item.w;
sel.u.p_rect.rl.y=opc->osd_item.h;
- dbg(lvl_warning,"osd_auxmap_draw: sel.u.p_rect.rl=(%d, %d)\n", opc->osd_item.w, opc->osd_item.h);
+ dbg(lvl_debug,"osd_auxmap_draw: sel.u.p_rect.rl=(%d, %d)\n", opc->osd_item.w, opc->osd_item.h);
transform_set_screen_selection(this->trans, &sel);
graphics_set_rect(opc->osd_item.gr, &sel.u.p_rect);
}
diff --git a/navit/plugin.c b/navit/plugin.c
index ad3f03147..334dcde72 100644
--- a/navit/plugin.c
+++ b/navit/plugin.c
@@ -183,7 +183,7 @@ plugin_load(struct plugin *pl)
g_module_close(mod);
return 0;
} else {
- dbg(lvl_warning, "loaded module %s\n", pl->name);
+ dbg(lvl_debug, "loaded module %s\n", pl->name);
pl->mod=mod;
pl->init=init;
}
@@ -290,7 +290,7 @@ plugin_new(struct attr *parent, struct attr **attrs) {
if ( (attr=attr_search(attrs, NULL, attr_ondemand))) {
ondemand=attr->u.num;
}
- dbg(lvl_warning, "path=\"%s\", active=%d, lazy=%d, ondemand=%d\n",path_attr->u.str, active, lazy, ondemand);
+ dbg(lvl_debug, "path=\"%s\", active=%d, lazy=%d, ondemand=%d\n",path_attr->u.str, active, lazy, ondemand);
we=file_wordexp_new(path_attr->u.str);
count=file_wordexp_get_count(we);
@@ -385,7 +385,7 @@ plugin_get_type(enum plugin_type type, const char *type_name, const char *name)
struct plugin *pl;
char *mod_name, *filename=NULL, *corename=NULL;
- dbg(lvl_warning, "type=\"%s\", name=\"%s\"\n", type_name, name);
+ dbg(lvl_debug, "type=\"%s\", name=\"%s\"\n", type_name, name);
l=plugin_types[type];
while (l) {
@@ -407,7 +407,7 @@ plugin_get_type(enum plugin_type type, const char *type_name, const char *name)
mod_name=pl->name;
dbg(lvl_info,"compare '%s' with '%s'\n", mod_name, filename);
if (!g_ascii_strncasecmp(mod_name, filename, strlen(filename)) || !g_ascii_strncasecmp(mod_name, corename, strlen(corename))) {
- dbg(lvl_warning, "Loading module \"%s\"\n",pl->name) ;
+ dbg(lvl_debug, "Loading module \"%s\"\n",pl->name) ;
if (plugin_get_active(pl))
if (!plugin_load(pl))
plugin_set_active(pl, 0);
diff --git a/navit/plugin/pedestrian/pedestrian.c b/navit/plugin/pedestrian/pedestrian.c
index 72ed7e75b..02ff0d4ea 100644
--- a/navit/plugin/pedestrian/pedestrian.c
+++ b/navit/plugin/pedestrian/pedestrian.c
@@ -92,13 +92,13 @@ pedestrian_rocket_idle(struct rocket *rocket)
transform_set_hog(rocket->trans, rocket->hog);
graphics_displaylist_draw(rocket->gra, rocket->dl, rocket->trans, rocket->layout, 0);
rocket->v+=rocket->a-rocket->g;
- dbg(lvl_error,"enter v=%d\n",rocket->v);
+ dbg(lvl_debug,"enter v=%d\n",rocket->v);
if (rocket->t > 0)
rocket->t--;
else
rocket->a=0;
rocket->hog+=rocket->v/rocket->vscale;
- dbg(lvl_error,"hog=%d\n",rocket->hog);
+ dbg(lvl_debug,"hog=%d\n",rocket->hog);
if (rocket->hog < 0) {
transform_set_hog(rocket->trans, 0);
transform_set_order_base(rocket->trans, 14);
@@ -192,7 +192,7 @@ osd_rocket_init(struct navit *nav)
if (navit_get_attr(nav, attr_layout, &attr, NULL))
rocket->layout=attr.u.layout;
if (navit_get_attr(nav, attr_callback_list, &attr, NULL)) {
- dbg(lvl_error,"ok\n");
+ dbg(lvl_debug,"ok\n");
command_add_table(attr.u.callback_list, commands, sizeof(commands)/sizeof(struct command_table), rocket);
}
}
@@ -207,7 +207,7 @@ osd_marker_draw(struct marker *this, struct navit *nav)
#if 0
struct attr graphics;
struct point p;
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
if (!navit_get_attr(nav, attr_graphics, &graphics, NULL))
return;
p.x=40;
@@ -401,7 +401,7 @@ static void
map_route_occluded_check_buildings(struct coord *c0)
{
struct building *b=buildings;
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
int i,count;
struct coord *c;
#if 1
@@ -414,7 +414,7 @@ map_route_occluded_check_buildings(struct coord *c0)
count=b->sd->count;
if (c[count-1].x == c[0].x && c[count-1].y == c[0].y) {
#if 0
- dbg(lvl_error,"closed\n");
+ dbg(lvl_debug,"closed\n");
#endif
count--;
}
@@ -457,11 +457,11 @@ intersect(struct coord *p1, struct coord *p2, struct coord *p3, struct coord *p4
num=-num;
den=-den;
}
- dbg(lvl_warning,"num=%f den=%f\n", num, den);
+ dbg(lvl_debug,"num=%f den=%f\n", num, den);
if (i) {
i->x=p1->x+(num/den)*(p2->x-p1->x)+0.5;
i->y=p1->y+(num/den)*(p2->y-p1->y)+0.5;
- dbg(lvl_warning,"i=0x%x,0x%x\n", i->x, i->y);
+ dbg(lvl_debug,"i=0x%x,0x%x\n", i->x, i->y);
if (debug2)
fprintf(debug2, "0x%x 0x%x type=town_label_5e3\n", i->x, i->y);
}
@@ -489,18 +489,18 @@ is_visible_line(struct coord *c0, struct coord *c1, struct coord *c2)
struct building *b=buildings;
struct coord cn;
#ifdef DEBUG_VISIBLE
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
#endif
while (b) {
if (side(&b->left, &b->right, c1) < 0 || side(&b->left, &b->right, c2) < 0) {
#ifdef DEBUG_VISIBLE
- dbg(lvl_error,"sides left: start %d end %d right: start %d end %d\n", side(c0, &b->left, c1), side(c0, &b->left, c2), side(c0, &b->right, c1), side(c0, &b->right, c2));
+ dbg(lvl_debug,"sides left: start %d end %d right: start %d end %d\n", side(c0, &b->left, c1), side(c0, &b->left, c2), side(c0, &b->right, c1), side(c0, &b->right, c2));
#endif
for (;;) {
if (side(c0, &b->left, c1) <= 0) {
if (side(c0, &b->left, c2) > 0) {
#ifdef DEBUG_VISIBLE
- dbg(lvl_error,"visible: start is left of left corner and end is right of left corner, clipping end\n");
+ dbg(lvl_debug,"visible: start is left of left corner and end is right of left corner, clipping end\n");
#endif
res=intersect(c0, &b->left, c1, c2, &cn);
if (res < 256)
@@ -516,7 +516,7 @@ is_visible_line(struct coord *c0, struct coord *c1, struct coord *c2)
if (side(c0, &b->right, c1) >= 0) {
if (side(c0, &b->right, c2) < 0) {
#ifdef DEBUG_VISIBLE
- dbg(lvl_error,"visible: start is right of right corner and end is left of right corner, clipping end\n");
+ dbg(lvl_debug,"visible: start is right of right corner and end is left of right corner, clipping end\n");
#endif
res=intersect(c0, &b->right, c1, c2, &cn);
if (res < 256)
@@ -532,7 +532,7 @@ is_visible_line(struct coord *c0, struct coord *c1, struct coord *c2)
if (side(c0, &b->left, c2) <= 0) {
if (side(c0, &b->left, c1) > 0) {
#ifdef DEBUG_VISIBLE
- dbg(lvl_error,"visible: end is left of left corner and start is right of left corner, clipping start\n");
+ dbg(lvl_debug,"visible: end is left of left corner and start is right of left corner, clipping start\n");
#endif
res=intersect(c0, &b->left, c1, c2, &cn);
if (res < 256)
@@ -548,7 +548,7 @@ is_visible_line(struct coord *c0, struct coord *c1, struct coord *c2)
if (side(c0, &b->right, c2) >= 0) {
if (side(c0, &b->right, c1) < 0) {
#ifdef DEBUG_VISIBLE
- dbg(lvl_error,"visible: end is right of right corner and start is left of right corner, clipping start\n");
+ dbg(lvl_debug,"visible: end is right of right corner and start is left of right corner, clipping start\n");
#endif
res=intersect(c0, &b->right, c1, c2, &cn);
if (res < 256)
@@ -562,7 +562,7 @@ is_visible_line(struct coord *c0, struct coord *c1, struct coord *c2)
break;
}
#ifdef DEBUG_VISIBLE
- dbg(lvl_error,"visible: not visible\n");
+ dbg(lvl_debug,"visible: not visible\n");
#endif
return 4;
}
@@ -570,7 +570,7 @@ is_visible_line(struct coord *c0, struct coord *c1, struct coord *c2)
b=b->next;
}
#ifdef DEBUG_VISIBLE
- dbg(lvl_error,"return %d\n",ret);
+ dbg(lvl_debug,"return %d\n",ret);
#endif
return ret;
}
@@ -579,7 +579,7 @@ static void
map_route_occluded_coord_rewind(void *priv_data)
{
struct map_rect_priv *mr = priv_data;
- dbg(lvl_warning,"enter\n");
+ dbg(lvl_debug,"enter\n");
mr->idx=mr->idx_base;
mr->first=1;
mr->lseg_done=mr->lseg_done_base;
@@ -594,7 +594,7 @@ static void
map_route_occluded_attr_rewind(void *priv_data)
{
struct map_rect_priv *mr=priv_data;
- dbg(lvl_warning,"enter\n");
+ dbg(lvl_debug,"enter\n");
item_attr_rewind(mr->route_item);
}
@@ -602,7 +602,7 @@ static int
map_route_occluded_attr_get(void *priv_data, enum attr_type attr_type, struct attr *attr)
{
struct map_rect_priv *mr=priv_data;
- dbg(lvl_warning,"enter\n");
+ dbg(lvl_debug,"enter\n");
return item_attr_get(mr->route_item, attr_type, attr);
}
@@ -625,7 +625,7 @@ map_route_occluded_coord_get(void *priv_data, struct coord *c, int count)
char buffer[4096];
#ifdef DEBUG_COORD_GET
- dbg(lvl_warning,"enter\n");
+ dbg(lvl_debug,"enter\n");
#endif
dbg_assert(count >= 2);
if (! mr->checked) {
@@ -635,11 +635,11 @@ map_route_occluded_coord_get(void *priv_data, struct coord *c, int count)
}
while (ret < count && !mr->last) {
#ifdef DEBUG_COORD_GET
- dbg(lvl_warning,"coord first %d lseg_done %d\n",mr->first,mr->lseg_done);
+ dbg(lvl_debug,"coord first %d lseg_done %d\n",mr->first,mr->lseg_done);
#endif
if (mr->lseg_done) {
#ifdef DEBUG_COORD_GET
- dbg(lvl_warning,"loading %d of %d from id_lo %d\n", mr->idx, mr->sd->count, mr->sd->item.id_lo);
+ dbg(lvl_debug,"loading %d of %d from id_lo %d\n", mr->idx, mr->sd->count, mr->sd->item.id_lo);
#endif
if (!mr->idx) {
if (coord_next(mr, &mr->lseg[0])) {
@@ -663,7 +663,7 @@ map_route_occluded_coord_get(void *priv_data, struct coord *c, int count)
l0=mr->c_next;
l1=mr->lseg[1];
#ifdef DEBUG_COORD_GET
- dbg(lvl_warning,"line (0x%x,0x%x)-(0x%x,0x%x)\n", l0.x,l0.y,l1.x,l1.y);
+ dbg(lvl_debug,"line (0x%x,0x%x)-(0x%x,0x%x)\n", l0.x,l0.y,l1.x,l1.y);
#endif
vis=is_visible_line(&mr->c0, &l0, &l1);
if (debug) {
@@ -672,7 +672,7 @@ map_route_occluded_coord_get(void *priv_data, struct coord *c, int count)
fprintf(debug,"0x%x 0x%x\n", l1.x, l1.y);
}
#ifdef DEBUG_COORD_GET
- dbg(lvl_warning,"vis=%d line (0x%x,0x%x)-(0x%x,0x%x)\n", vis, l0.x,l0.y,l1.x,l1.y);
+ dbg(lvl_debug,"vis=%d line (0x%x,0x%x)-(0x%x,0x%x)\n", vis, l0.x,l0.y,l1.x,l1.y);
#endif
mr->idx_base=mr->idx;
mr->c_next_base=mr->c_next;
@@ -683,11 +683,11 @@ map_route_occluded_coord_get(void *priv_data, struct coord *c, int count)
case 0:
mr->c_next_base=mr->c_next;
#ifdef DEBUG_COORD_GET
- dbg(lvl_warning,"out 0x%x,0x%x\n", l0.x, l1.y);
+ dbg(lvl_debug,"out 0x%x,0x%x\n", l0.x, l1.y);
#endif
c[ret++]=l0;
#ifdef DEBUG_COORD_GET
- dbg(lvl_warning,"out 0x%x,0x%x\n", l1.x, l1.y);
+ dbg(lvl_debug,"out 0x%x,0x%x\n", l1.x, l1.y);
#endif
c[ret++]=l1;
mr->lseg_done_base=mr->lseg_done=1;
@@ -695,12 +695,12 @@ map_route_occluded_coord_get(void *priv_data, struct coord *c, int count)
break;
case 1:
#ifdef DEBUG_COORD_GET
- dbg(lvl_warning,"begin clipped\n");
- dbg(lvl_warning,"out 0x%x,0x%x\n", l0.x, l1.y);
+ dbg(lvl_debug,"begin clipped\n");
+ dbg(lvl_debug,"out 0x%x,0x%x\n", l0.x, l1.y);
#endif
c[ret++]=l0;
#ifdef DEBUG_COORD_GET
- dbg(lvl_warning,"out 0x%x,0x%x\n", l1.x, l1.y);
+ dbg(lvl_debug,"out 0x%x,0x%x\n", l1.x, l1.y);
#endif
c[ret++]=l1;
mr->c_next_base=mr->c_next=l1;
@@ -708,15 +708,15 @@ map_route_occluded_coord_get(void *priv_data, struct coord *c, int count)
break;
case 2:
#ifdef DEBUG_COORD_GET
- dbg(lvl_warning,"end clipped\n");
+ dbg(lvl_debug,"end clipped\n");
#endif
mr->c_next_base=mr->c_next;
#ifdef DEBUG_COORD_GET
- dbg(lvl_warning,"out 0x%x,0x%x\n", l0.x, l1.y);
+ dbg(lvl_debug,"out 0x%x,0x%x\n", l0.x, l1.y);
#endif
c[ret++]=l0;
#ifdef DEBUG_COORD_GET
- dbg(lvl_warning,"out 0x%x,0x%x\n", l1.x, l1.y);
+ dbg(lvl_debug,"out 0x%x,0x%x\n", l1.x, l1.y);
#endif
c[ret++]=l1;
mr->c_next_base=mr->c_next=l1;
@@ -724,15 +724,15 @@ map_route_occluded_coord_get(void *priv_data, struct coord *c, int count)
break;
case 3:
#ifdef DEBUG_COORD_GET
- dbg(lvl_warning,"both clipped\n");
+ dbg(lvl_debug,"both clipped\n");
#endif
mr->c_next_base=mr->c_next;
#ifdef DEBUG_COORD_GET
- dbg(lvl_warning,"out 0x%x,0x%x\n", l0.x, l1.y);
+ dbg(lvl_debug,"out 0x%x,0x%x\n", l0.x, l1.y);
#endif
c[ret++]=l0;
#ifdef DEBUG_COORD_GET
- dbg(lvl_warning,"out 0x%x,0x%x\n", l1.x, l1.y);
+ dbg(lvl_debug,"out 0x%x,0x%x\n", l1.x, l1.y);
#endif
c[ret++]=l1;
mr->c_next_base=mr->c_next=l1;
@@ -745,21 +745,21 @@ map_route_occluded_coord_get(void *priv_data, struct coord *c, int count)
#if 0
case 2:
- dbg(lvl_warning,"visible up to 0x%x,0x%x\n",l1.x,l1.y);
+ dbg(lvl_debug,"visible up to 0x%x,0x%x\n",l1.x,l1.y);
if (mr->first) {
mr->first=0;
c[ret++]=mr->c_out;
- dbg(lvl_warning,"out 0x%x,0x%x\n", mr->c_out.x, mr->c_out.y);
+ dbg(lvl_debug,"out 0x%x,0x%x\n", mr->c_out.x, mr->c_out.y);
}
c[ret++]=mr->c_out=l1;
- dbg(lvl_warning,"out 0x%x,0x%x\n", l1.x, l1.y);
+ dbg(lvl_debug,"out 0x%x,0x%x\n", l1.x, l1.y);
mr->last=1;
mr->route_item_done=1;
break;
case 1:
case 3:
case 4:
- dbg(lvl_warning,"invisible\n");
+ dbg(lvl_debug,"invisible\n");
mr->c_out=l1;
mr->idx++;
mr->last=1;
@@ -772,7 +772,7 @@ map_route_occluded_coord_get(void *priv_data, struct coord *c, int count)
}
}
#ifdef DEBUG_COORD_GET
- dbg(lvl_warning,"ret=%d last=%d\n", ret, mr->last);
+ dbg(lvl_debug,"ret=%d last=%d\n", ret, mr->last);
#endif
return ret;
}
@@ -801,16 +801,16 @@ map_route_occluded_rect_new(struct map_priv *priv, struct map_selection *sel)
struct map_rect *route_map_rect;
struct coord_rect r;
if (!navit_get_attr(priv->navit, attr_route, &route, NULL)) {
- dbg(lvl_error,"no route in navit\n");
+ dbg(lvl_debug,"no route in navit\n");
return NULL;
}
if (!route_get_attr(route.u.route, attr_map, &route_map, NULL)) {
- dbg(lvl_error,"no map in route\n");
+ dbg(lvl_debug,"no map in route\n");
return NULL;
}
route_map_rect=map_rect_new(route_map.u.map, sel);
if (!route_map_rect) {
- dbg(lvl_error,"no route map rect\n");
+ dbg(lvl_debug,"no route map rect\n");
return NULL;
}
map_dump_file(route_map.u.map, "route.txt");
@@ -865,17 +865,17 @@ map_route_occluded_rect_destroy(struct map_rect_priv *mr)
static struct item *
map_route_occluded_get_item(struct map_rect_priv *mr)
{
- dbg(lvl_warning,"enter last=%d\n",mr->last);
+ dbg(lvl_debug,"enter last=%d\n",mr->last);
while (!mr->last) {
struct coord c[128];
map_route_occluded_coord_get(mr, c, 128);
}
if (mr->route_item_done) {
- dbg(lvl_warning,"next route item\n");
+ dbg(lvl_debug,"next route item\n");
do {
mr->route_item=map_rect_get_item(mr->route_map_rect);
} while (mr->route_item && mr->route_item->type != type_street_route);
- dbg(lvl_warning,"item %p\n", mr->route_item);
+ dbg(lvl_debug,"item %p\n", mr->route_item);
if (!mr->route_item)
return NULL;
mr->item.type=type_street_route_occluded;
@@ -889,7 +889,7 @@ map_route_occluded_get_item(struct map_rect_priv *mr)
return NULL;
#endif
map_route_occluded_coord_rewind(mr);
- dbg(lvl_warning,"type %s\n", item_to_name(mr->route_item->type));
+ dbg(lvl_debug,"type %s\n", item_to_name(mr->route_item->type));
return &mr->item;
}
@@ -921,14 +921,14 @@ map_route_occluded_new(struct map_methods *meth, struct attr **attrs)
{
struct map_priv *ret;
struct attr *navit;
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
navit=attr_search(attrs, NULL, attr_navit);
if (! navit)
return NULL;
ret=g_new0(struct map_priv, 1);
*meth=map_route_occluded_methods;
ret->navit=navit->u.navit;
- dbg(lvl_error,"m=%p navit=%p\n", ret, ret->navit);
+ dbg(lvl_debug,"m=%p navit=%p\n", ret, ret->navit);
return ret;
}
@@ -977,16 +977,16 @@ pedestrian_draw_arrows(struct graphics *gra)
if (orientation == 2)
return;
if (!navit_get_attr(pedestrian_data.nav, attr_route, &route, NULL)) {
- dbg(lvl_error,"no route in navit\n");
+ dbg(lvl_debug,"no route in navit\n");
return;
}
if (!route_get_attr(route.u.route, attr_map, &route_map, NULL)) {
- dbg(lvl_error,"no map in route\n");
+ dbg(lvl_debug,"no map in route\n");
return;
}
route_map_rect=map_rect_new(route_map.u.map, NULL);
if (!route_map_rect) {
- dbg(lvl_error,"no route map rect\n");
+ dbg(lvl_debug,"no route map rect\n");
return;
}
while ((item=map_rect_get_item(route_map_rect))) {
@@ -1042,7 +1042,7 @@ pedestrian_write_tilt(int fd, int axis)
ret=write(fd, buffer+axis, 1);
if (ret != 2) {
- dbg(lvl_error,"ret=%d\n",ret);
+ dbg(lvl_debug,"ret=%d\n",ret);
}
}
@@ -1062,7 +1062,7 @@ pedestrian_read_tilt(int fd, struct navit *nav, struct tilt_data *data)
data->len=0;
if (navit_get_attr(nav, attr_transformation, &attr, NULL)) {
struct transformation *trans=attr.u.transformation;
- dbg(lvl_error,"ok axis=%d val=0x%x\n", data->axis, val);
+ dbg(lvl_debug,"ok axis=%d val=0x%x\n", data->axis, val);
if (data->axis != 1) {
transform_set_pitch(trans, 90+(val-0x80));
} else {
@@ -1126,7 +1126,7 @@ android_sensors(struct navit *nav, int sensor, float *x, float *y, float *z)
sensors[sensor-1][2]=*z;
if (sensors_locked)
return;
- dbg(lvl_warning,"enter %d %f %f %f\n",sensor,*x,*y,*z);
+ dbg(lvl_debug,"enter %d %f %f %f\n",sensor,*x,*y,*z);
if (sensor == 1) {
if (*x > 7.5)
orientation=1; /* landscape */
@@ -1134,7 +1134,7 @@ android_sensors(struct navit *nav, int sensor, float *x, float *y, float *z)
orientation=0; /* portrait */
if (*z > 7.5)
orientation=2; /* flat */
- dbg(lvl_warning,"orientation=%d\n",orientation);
+ dbg(lvl_debug,"orientation=%d\n",orientation);
}
if ((orientation_old == 2) != (orientation == 2)) {
struct attr attr, flags_graphics, osd_configuration;
@@ -1179,7 +1179,7 @@ android_sensors(struct navit *nav, int sensor, float *x, float *y, float *z)
if (orientation != 2)
pitch+=2.0;
transform_set_pitch(trans, (int)pitch);
- dbg(lvl_warning,"pich %d %f\n",orientation,pitch);
+ dbg(lvl_debug,"pich %d %f\n",orientation,pitch);
} else {
struct attr attr;
attr.type=attr_orientation;
@@ -1188,7 +1188,7 @@ android_sensors(struct navit *nav, int sensor, float *x, float *y, float *z)
attr.u.num+=360;
pedestrian_data.yaw=attr.u.num;
navit_set_attr(nav, &attr);
- dbg(lvl_warning,"yaw %d %f\n",orientation,yaw);
+ dbg(lvl_debug,"yaw %d %f\n",orientation,yaw);
if (orientation == 2)
navit_set_center_cursor(nav, 1, 0);
}
@@ -1220,7 +1220,7 @@ vehicle_changed(struct vehicle *v, struct transformation *trans)
struct attr attr;
if (vehicle_get_attr(v, attr_position_direction, &attr, NULL)) {
int dir=(int)(*attr.u.numd);
- dbg(lvl_error,"enter %d\n",dir);
+ dbg(lvl_debug,"enter %d\n",dir);
transform_set_pitch(trans, 90);
transform_set_yaw(trans, dir);
}
@@ -1245,15 +1245,15 @@ pedestrian_navit_init(struct navit *nav)
jmethodID cid;
jobject navitsensors;
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
if (android_find_class_global("org/navitproject/navit/NavitSensors", &navitsensorsclass)) {
- dbg(lvl_error,"class found\n");
+ dbg(lvl_debug,"class found\n");
cid = (*jnienv)->GetMethodID(jnienv, navitsensorsclass, "<init>", "(Landroid/content/Context;I)V");
- dbg(lvl_error,"cid=%p\n",cid);
+ dbg(lvl_debug,"cid=%p\n",cid);
if (cid) {
cb=callback_new_1(callback_cast(android_sensors), nav);
navitsensors=(*jnienv)->NewObject(jnienv, navitsensorsclass, cid, android_activity, cb);
- dbg(lvl_error,"object=%p\n",navitsensors);
+ dbg(lvl_debug,"object=%p\n",navitsensors);
if (navitsensors)
navitsensors = (*jnienv)->NewGlobalRef(jnienv, navitsensors);
}
@@ -1288,14 +1288,14 @@ pedestrian_navit_init(struct navit *nav)
return;
if (!route_get_attr(route.u.route, attr_map, &route_map, NULL))
return;
- dbg(lvl_error,"enter 1\n");
+ dbg(lvl_debug,"enter 1\n");
#if 0
struct attr active;
active.type=attr_active;
active.u.num=0;
if (!map_set_attr(route_map.u.map, &active))
return;
- dbg(lvl_error,"enter 2\n");
+ dbg(lvl_debug,"enter 2\n");
#endif
if (!navit_get_attr(nav, attr_mapset, &mapset, NULL))
return;
@@ -1318,7 +1318,7 @@ pedestrian_navit_init(struct navit *nav)
iter=navit_attr_iter_new();
while(navit_get_attr(nav, attr_layout, &attr, iter)) {
if (!strcmp(attr.u.layout->name, "Route")) {
- dbg(lvl_error,"found %s\n",attr_to_name(attr.type));
+ dbg(lvl_debug,"found %s\n",attr_to_name(attr.type));
main_layout=attr;
#if 1
navit_set_attr(nav, &attr);
@@ -1344,7 +1344,7 @@ pedestrian_navit_init(struct navit *nav)
static void
pedestrian_navit(struct navit *nav, int add)
{
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
struct attr callback;
if (add) {
callback.type=attr_callback;
diff --git a/navit/popup.c b/navit/popup.c
index 38824912e..71b82b1d9 100644
--- a/navit/popup.c
+++ b/navit/popup.c
@@ -99,7 +99,7 @@ popup_traffic_distortion(struct item *item, char *attr)
static void
popup_traffic_distortion_blocked(struct item *item)
{
- dbg(lvl_error,"item=%p\n",item);
+ dbg(lvl_debug,"item=%p\n",item);
popup_traffic_distortion(item, "maxspeed=0");
}
@@ -180,7 +180,7 @@ extern void *vehicle;
static void
popup_set_position(struct navit *nav, struct pcoord *pc)
{
- dbg(lvl_warning,"%p %p\n", nav, pc);
+ dbg(lvl_debug,"%p %p\n", nav, pc);
navit_set_position(nav, pc);
}
@@ -214,7 +214,7 @@ popup_printf_cb(void *menu, enum menu_type type, struct callback *cb, const char
va_start(ap, fmt);
str=g_strdup_vprintf(fmt, ap);
- dbg(lvl_error,"%s\n", str);
+ dbg(lvl_debug,"%s\n", str);
us=str;
while (*us) {
if (*us == '_')
@@ -310,7 +310,7 @@ popup_item_dump(struct item *item)
struct map_rect *mr;
mr=map_rect_new(item->map,NULL);
item=map_rect_get_item_byid(mr, item->id_hi, item->id_lo);
- dbg(lvl_error,"item=%p\n",item);
+ dbg(lvl_debug,"item=%p\n",item);
item_dump_filedesc(item,item->map,stdout);
map_rect_destroy(mr);
}
@@ -349,7 +349,7 @@ popup_show_item(struct navit *nav, void *popup, struct displayitem *di)
if (diitem->map) {
mr=map_rect_new(diitem->map,NULL);
item=map_rect_get_item_byid(mr, diitem->id_hi, diitem->id_lo);
- dbg(lvl_warning,"item=%p\n", item);
+ dbg(lvl_debug,"item=%p\n", item);
if (item) {
popup_show_attrs(item->map, menu_item, item);
popup_printf_cb(menu_item, menu_type_menu, callback_new_1(callback_cast(popup_item_dump), diitem), "Dump");
@@ -425,7 +425,7 @@ popup(struct navit *nav, int button, struct point *p)
coord_format(g.lat,g.lng,DEGREES_MINUTES_SECONDS,buffer,sizeof(buffer));
popup_printf(men, menu_type_menu, "%s", buffer);
popup_printf(men, menu_type_menu, "%f %f", g.lat, g.lng);
- dbg(lvl_warning,"%p %p\n", nav, &c);
+ dbg(lvl_debug,"%p %p\n", nav, &c);
c.pro = transform_get_projection(navit_get_trans(nav));
c.x = co.x;
c.y = co.y;
diff --git a/navit/profile.c b/navit/profile.c
index bb85fd470..a79103132 100644
--- a/navit/profile.c
+++ b/navit/profile.c
@@ -52,7 +52,7 @@ profile_timer(int level, const char *module, const char *function, const char *f
va_start(ap, fmt);
debug_vprintf(1, buffer, strlen(buffer), function, strlen(function), 1, fmt, ap);
va_end(ap);
- debug_printf(lvl_warning, buffer, strlen(buffer), function, strlen(function), 0, " %7.1f ms\n", msec);
+ debug_printf(lvl_debug, buffer, strlen(buffer), function, strlen(function), 0, " %7.1f ms\n", msec);
gettimeofday(&last[level], NULL);
} else {
gettimeofday(&curr, NULL);
diff --git a/navit/profile_option.c b/navit/profile_option.c
index cf77fbd9f..8a1049068 100644
--- a/navit/profile_option.c
+++ b/navit/profile_option.c
@@ -34,7 +34,7 @@ profile_option_new(struct attr *parent, struct attr **attrs)
po->func=&profile_option_func;
navit_object_ref((struct navit_object *)po);
po->attrs=attr_list_dup(attrs);
- dbg(lvl_error,"return %p\n",po);
+ dbg(lvl_debug,"return %p\n",po);
return po;
}
diff --git a/navit/projection.c b/navit/projection.c
index 976af28ed..d916689ee 100644
--- a/navit/projection.c
+++ b/navit/projection.c
@@ -81,16 +81,16 @@ projection_from_name(const char *name, struct coord *utm_offset)
return projection_none;
}
i-=12;
- dbg(lvl_warning,"zone_field %d\n",i);
+ dbg(lvl_debug,"zone_field %d\n",i);
baserow=i*887.6/100;
utm_offset->x=zone*1000000;
i=utmref_letter(square_x);
utm_offset->x+=((i%8)+1)*100000;
i=utmref_letter(square_y);
- dbg(lvl_warning,"baserow %d\n",baserow);
+ dbg(lvl_debug,"baserow %d\n",baserow);
if (!(zone % 2))
i-=5;
- dbg(lvl_warning,"i=%d\n",i);
+ dbg(lvl_debug,"i=%d\n",i);
i=(i-baserow+100)%20+baserow;
utm_offset->y=i*100000;
return projection_utm;
diff --git a/navit/route.c b/navit/route.c
index 2985f7101..271b5fa3e 100644
--- a/navit/route.c
+++ b/navit/route.c
@@ -795,7 +795,7 @@ route_path_update_done(struct route *this, int new_graph)
/* FIXME */
int seg_time=route_time_seg(this->vehicleprofile, seg->data, NULL);
if (seg_time == INT_MAX) {
- dbg(lvl_warning,"error\n");
+ dbg(lvl_debug,"error\n");
} else
path_time+=seg_time;
path_len+=seg->data->len;
@@ -834,9 +834,9 @@ route_path_update_done(struct route *this, int new_graph)
static void
route_path_update_flags(struct route *this, enum route_path_flags flags)
{
- dbg(lvl_warning,"enter %d\n", flags);
+ dbg(lvl_debug,"enter %d\n", flags);
if (! this->pos || ! this->destinations) {
- dbg(lvl_warning,"destroy\n");
+ dbg(lvl_debug,"destroy\n");
route_path_destroy(this->path2,1);
this->path2 = NULL;
return;
@@ -848,21 +848,21 @@ route_path_update_flags(struct route *this, enum route_path_flags flags)
/* the graph is destroyed when setting the destination */
if (this->graph) {
if (this->graph->busy) {
- dbg(lvl_warning,"busy building graph\n");
+ dbg(lvl_debug,"busy building graph\n");
return;
}
// we can try to update
- dbg(lvl_warning,"try update\n");
+ dbg(lvl_debug,"try update\n");
route_path_update_done(this, 0);
} else {
route_path_destroy(this->path2,1);
this->path2 = NULL;
}
if (!this->graph || (!this->path2 && !(flags & route_path_flag_no_rebuild))) {
- dbg(lvl_error,"rebuild graph %p %p\n",this->graph,this->path2);
+ dbg(lvl_debug,"rebuild graph %p %p\n",this->graph,this->path2);
if (! this->route_graph_flood_done_cb)
this->route_graph_flood_done_cb=callback_new_2(callback_cast(route_path_update_done), this, (long)1);
- dbg(lvl_warning,"route_graph_update\n");
+ dbg(lvl_debug,"route_graph_update\n");
route_graph_update(this, this->route_graph_flood_done_cb, !!(flags & route_path_flag_async));
}
}
@@ -919,7 +919,7 @@ route_set_position_flags(struct route *this, struct pcoord *pos, enum route_path
if (!this->pos) return 0;
this->pos->street_direction=0;
- dbg(lvl_warning,"this->pos=%p\n", this->pos);
+ dbg(lvl_debug,"this->pos=%p\n", this->pos);
route_info_distances(this->pos, pos->pro);
route_path_update_flags(this, flags);
return 1;
@@ -999,7 +999,7 @@ route_rect(int order, struct coord *c1, struct coord *c2, int rel, int abs)
sel->order=order;
sel->range.min=route_item_first;
sel->range.max=route_item_last;
- dbg(lvl_warning,"%p %p\n", c1, c2);
+ dbg(lvl_debug,"%p %p\n", c1, c2);
dx=c1->x-c2->x;
dy=c1->y-c2->y;
if (dx < 0) {
@@ -1730,7 +1730,7 @@ route_path_add_line(struct route_path *this, struct coord *start, struct coord *
struct route_path_segment *segment;
int seg_size,seg_dat_size;
- dbg(lvl_warning,"line from 0x%x,0x%x-0x%x,0x%x\n", start->x, start->y, end->x, end->y);
+ dbg(lvl_debug,"line from 0x%x,0x%x-0x%x,0x%x\n", start->x, start->y, end->x, end->y);
seg_size=sizeof(*segment) + sizeof(struct coord) * ccnt;
seg_dat_size=sizeof(struct route_segment_data);
segment=g_malloc0(seg_size + seg_dat_size);
@@ -1775,7 +1775,7 @@ route_path_add_item_from_graph(struct route_path *this, struct route_path *oldpa
if (rgs->data.flags & AF_SEGMENTED)
offset=RSD_OFFSET(&rgs->data);
- dbg(lvl_warning,"enter (0x%x,0x%x) dir=%d pos=%p dst=%p\n", rgs->data.item.id_hi, rgs->data.item.id_lo, dir, pos, dst);
+ dbg(lvl_debug,"enter (0x%x,0x%x) dir=%d pos=%p dst=%p\n", rgs->data.item.id_hi, rgs->data.item.id_lo, dir, pos, dst);
if (oldpath) {
segment=item_hash_lookup(oldpath->path_hash, &rgs->data.item);
if (segment && segment->direction == dir) {
@@ -1805,9 +1805,9 @@ route_path_add_item_from_graph(struct route_path *this, struct route_path *oldpa
}
} else {
extra=1;
- dbg(lvl_warning,"pos dir=%d\n", dir);
- dbg(lvl_warning,"pos pos=%d\n", pos->pos);
- dbg(lvl_warning,"pos count=%d\n", pos->street->count);
+ dbg(lvl_debug,"pos dir=%d\n", dir);
+ dbg(lvl_debug,"pos pos=%d\n", pos->pos);
+ dbg(lvl_debug,"pos count=%d\n", pos->street->count);
if (dir > 0) {
c=pos->street->c+pos->pos+1;
ccnt=pos->street->count-pos->pos-1;
@@ -1821,8 +1821,8 @@ route_path_add_item_from_graph(struct route_path *this, struct route_path *oldpa
pos->dir=dir;
} else if (dst) {
extra=1;
- dbg(lvl_warning,"dst dir=%d\n", dir);
- dbg(lvl_warning,"dst pos=%d\n", dst->pos);
+ dbg(lvl_debug,"dst dir=%d\n", dir);
+ dbg(lvl_debug,"dst pos=%d\n", dst->pos);
if (dir > 0) {
c=dst->street->c;
ccnt=dst->pos+1;
@@ -2035,7 +2035,7 @@ route_value_seg(struct vehicleprofile *profile, struct route_graph_point *from,
int ret;
struct route_traffic_distortion dist,*distp=NULL;
#if 0
- dbg(lvl_error,"flags 0x%x mask 0x%x flags 0x%x\n", over->flags, dir >= 0 ? profile->flags_forward_mask : profile->flags_reverse_mask, profile->flags);
+ dbg(lvl_debug,"flags 0x%x mask 0x%x flags 0x%x\n", over->flags, dir >= 0 ? profile->flags_forward_mask : profile->flags_reverse_mask, profile->flags);
#endif
if ((over->data.flags & (dir >= 0 ? profile->flags_forward_mask : profile->flags_reverse_mask)) != profile->flags)
return INT_MAX;
@@ -2150,14 +2150,14 @@ route_process_turn_restriction(struct route_graph *this, struct item *item)
count=item_coord_get(item, c, 5);
if (count != 3 && count != 4) {
- dbg(lvl_error,"wrong count %d\n",count);
+ dbg(lvl_debug,"wrong count %d\n",count);
return;
}
if (count == 4)
return;
for (i = 0 ; i < count ; i++)
pnt[i]=route_graph_add_point(this,&c[i]);
- dbg(lvl_warning,"%s: (0x%x,0x%x)-(0x%x,0x%x)-(0x%x,0x%x) %p-%p-%p\n",item_to_name(item->type),c[0].x,c[0].y,c[1].x,c[1].y,c[2].x,c[2].y,pnt[0],pnt[1],pnt[2]);
+ dbg(lvl_debug,"%s: (0x%x,0x%x)-(0x%x,0x%x)-(0x%x,0x%x) %p-%p-%p\n",item_to_name(item->type),c[0].x,c[0].y,c[1].x,c[1].y,c[2].x,c[2].y,pnt[0],pnt[1],pnt[2]);
data.item=item;
data.flags=0;
data.len=0;
@@ -2433,7 +2433,7 @@ route_graph_flood(struct route_graph *this, struct route_info *dst, struct vehic
}
fh_deleteheap(heap);
callback_call_0(cb);
- dbg(lvl_warning,"return\n");
+ dbg(lvl_debug,"return\n");
}
/**
@@ -2554,12 +2554,12 @@ route_path_new(struct route_graph *this, struct route_path *oldpath, struct rout
val=route_value_seg(profile, NULL, s, 2);
if (val != INT_MAX && s->end->value != INT_MAX) {
val=val*(100-pos->percent)/100;
- dbg(lvl_warning,"val1 %d\n",val);
+ dbg(lvl_debug,"val1 %d\n",val);
if (route_graph_segment_match(s,this->avoid_seg) && pos->street_direction < 0)
val+=profile->turn_around_penalty;
- dbg(lvl_warning,"val1 %d\n",val);
+ dbg(lvl_debug,"val1 %d\n",val);
val1_new=s->end->value+val;
- dbg(lvl_warning,"val1 +%d=%d\n",s->end->value,val1_new);
+ dbg(lvl_debug,"val1 +%d=%d\n",s->end->value,val1_new);
if (val1_new < val1) {
val1=val1_new;
s1=s;
@@ -2568,12 +2568,12 @@ route_path_new(struct route_graph *this, struct route_path *oldpath, struct rout
val=route_value_seg(profile, NULL, s, -2);
if (val != INT_MAX && s->start->value != INT_MAX) {
val=val*pos->percent/100;
- dbg(lvl_warning,"val2 %d\n",val);
+ dbg(lvl_debug,"val2 %d\n",val);
if (route_graph_segment_match(s,this->avoid_seg) && pos->street_direction > 0)
val+=profile->turn_around_penalty;
- dbg(lvl_warning,"val2 %d\n",val);
+ dbg(lvl_debug,"val2 %d\n",val);
val2_new=s->start->value+val;
- dbg(lvl_warning,"val2 +%d=%d\n",s->start->value,val2_new);
+ dbg(lvl_debug,"val2 +%d=%d\n",s->start->value,val2_new);
if (val2_new < val2) {
val2=val2_new;
s2=s;
@@ -2599,7 +2599,7 @@ route_path_new(struct route_graph *this, struct route_path *oldpath, struct rout
}
if (pos->street_direction && dir != pos->street_direction && profile->turn_around_penalty) {
if (!route_graph_segment_match(this->avoid_seg,s)) {
- dbg(lvl_error,"avoid current segment\n");
+ dbg(lvl_debug,"avoid current segment\n");
if (this->avoid_seg)
route_graph_set_traffic_distortion(this, this->avoid_seg, 0);
this->avoid_seg=s;
@@ -2640,7 +2640,7 @@ route_path_new(struct route_graph *this, struct route_path *oldpath, struct rout
}
if (dst->lenextra)
route_path_add_line(ret, &dst->lp, &dst->c, dst->lenextra);
- dbg(lvl_warning, "%d segments\n", segs);
+ dbg(lvl_debug, "%d segments\n", segs);
return ret;
}
@@ -2680,29 +2680,29 @@ is_turn_allowed(struct route_graph_point *p, struct route_graph_segment *from, s
(tmp1->data.item.type == type_street_turn_restriction_no ||
tmp1->data.item.type == type_street_turn_restriction_only)) {
tmp2=p->start;
- dbg(lvl_warning,"found %s (0x%x,0x%x) (0x%x,0x%x)-(0x%x,0x%x) %p-%p\n",item_to_name(tmp1->data.item.type),tmp1->data.item.id_hi,tmp1->data.item.id_lo,tmp1->start->c.x,tmp1->start->c.y,tmp1->end->c.x,tmp1->end->c.y,tmp1->start,tmp1->end);
+ dbg(lvl_debug,"found %s (0x%x,0x%x) (0x%x,0x%x)-(0x%x,0x%x) %p-%p\n",item_to_name(tmp1->data.item.type),tmp1->data.item.id_hi,tmp1->data.item.id_lo,tmp1->start->c.x,tmp1->start->c.y,tmp1->end->c.x,tmp1->end->c.y,tmp1->start,tmp1->end);
while (tmp2) {
- dbg(lvl_warning,"compare %s (0x%x,0x%x) (0x%x,0x%x)-(0x%x,0x%x) %p-%p\n",item_to_name(tmp2->data.item.type),tmp2->data.item.id_hi,tmp2->data.item.id_lo,tmp2->start->c.x,tmp2->start->c.y,tmp2->end->c.x,tmp2->end->c.y,tmp2->start,tmp2->end);
+ dbg(lvl_debug,"compare %s (0x%x,0x%x) (0x%x,0x%x)-(0x%x,0x%x) %p-%p\n",item_to_name(tmp2->data.item.type),tmp2->data.item.id_hi,tmp2->data.item.id_lo,tmp2->start->c.x,tmp2->start->c.y,tmp2->end->c.x,tmp2->end->c.y,tmp2->start,tmp2->end);
if (item_is_equal(tmp1->data.item, tmp2->data.item))
break;
tmp2=tmp2->start_next;
}
- dbg(lvl_warning,"tmp2=%p\n",tmp2);
+ dbg(lvl_debug,"tmp2=%p\n",tmp2);
if (tmp2) {
- dbg(lvl_warning,"%s tmp2->end=%p next=%p\n",item_to_name(tmp1->data.item.type),tmp2->end,next);
+ dbg(lvl_debug,"%s tmp2->end=%p next=%p\n",item_to_name(tmp1->data.item.type),tmp2->end,next);
}
if (tmp1->data.item.type == type_street_turn_restriction_no && tmp2 && tmp2->end->c.x == next->c.x && tmp2->end->c.y == next->c.y) {
- dbg(lvl_warning,"from 0x%x,0x%x over 0x%x,0x%x to 0x%x,0x%x not allowed (no)\n",prev->c.x,prev->c.y,p->c.x,p->c.y,next->c.x,next->c.y);
+ dbg(lvl_debug,"from 0x%x,0x%x over 0x%x,0x%x to 0x%x,0x%x not allowed (no)\n",prev->c.x,prev->c.y,p->c.x,p->c.y,next->c.x,next->c.y);
return 0;
}
if (tmp1->data.item.type == type_street_turn_restriction_only && tmp2 && (tmp2->end->c.x != next->c.x || tmp2->end->c.y != next->c.y)) {
- dbg(lvl_warning,"from 0x%x,0x%x over 0x%x,0x%x to 0x%x,0x%x not allowed (only)\n",prev->c.x,prev->c.y,p->c.x,p->c.y,next->c.x,next->c.y);
+ dbg(lvl_debug,"from 0x%x,0x%x over 0x%x,0x%x to 0x%x,0x%x not allowed (only)\n",prev->c.x,prev->c.y,p->c.x,p->c.y,next->c.x,next->c.y);
return 0;
}
}
tmp1=tmp1->end_next;
}
- dbg(lvl_warning,"from 0x%x,0x%x over 0x%x,0x%x to 0x%x,0x%x allowed\n",prev->c.x,prev->c.y,p->c.x,p->c.y,next->c.x,next->c.y);
+ dbg(lvl_debug,"from 0x%x,0x%x over 0x%x,0x%x to 0x%x,0x%x allowed\n",prev->c.x,prev->c.y,p->c.x,p->c.y,next->c.x,next->c.y);
return 1;
}
@@ -2719,7 +2719,7 @@ route_graph_clone_segment(struct route_graph *this, struct route_graph_segment *
data.maxspeed=RSD_MAXSPEED(&s->data);
if (s->data.flags & AF_SEGMENTED)
data.offset=RSD_OFFSET(&s->data);
- dbg(lvl_warning,"cloning segment from %p (0x%x,0x%x) to %p (0x%x,0x%x)\n",start,start->c.x,start->c.y, end, end->c.x, end->c.y);
+ dbg(lvl_debug,"cloning segment from %p (0x%x,0x%x) to %p (0x%x,0x%x)\n",start,start->c.x,start->c.y, end, end->c.x, end->c.y);
route_graph_add_segment(this, start, end, &data);
}
@@ -2733,19 +2733,19 @@ route_graph_process_restriction_segment(struct route_graph *this, struct route_g
int dy=0;
c.x+=dx;
c.y+=dy;
- dbg(lvl_warning,"From %s %d,%d\n",item_to_name(s->data.item.type),dx,dy);
+ dbg(lvl_debug,"From %s %d,%d\n",item_to_name(s->data.item.type),dx,dy);
pn=route_graph_point_new(this, &c);
if (dir > 0) { /* going away */
- dbg(lvl_warning,"other 0x%x,0x%x\n",s->end->c.x,s->end->c.y);
+ dbg(lvl_debug,"other 0x%x,0x%x\n",s->end->c.x,s->end->c.y);
if (s->data.flags & AF_ONEWAY) {
- dbg(lvl_warning,"Not possible\n");
+ dbg(lvl_debug,"Not possible\n");
return;
}
route_graph_clone_segment(this, s, pn, s->end, AF_ONEWAYREV);
} else { /* coming in */
- dbg(lvl_warning,"other 0x%x,0x%x\n",s->start->c.x,s->start->c.y);
+ dbg(lvl_debug,"other 0x%x,0x%x\n",s->start->c.x,s->start->c.y);
if (s->data.flags & AF_ONEWAYREV) {
- dbg(lvl_warning,"Not possible\n");
+ dbg(lvl_debug,"Not possible\n");
return;
}
route_graph_clone_segment(this, s, s->start, pn, AF_ONEWAY);
@@ -2756,7 +2756,7 @@ route_graph_process_restriction_segment(struct route_graph *this, struct route_g
tmp->data.item.type != type_street_turn_restriction_only &&
!(tmp->data.flags & AF_ONEWAYREV) && is_turn_allowed(p, s, tmp)) {
route_graph_clone_segment(this, tmp, pn, tmp->end, AF_ONEWAY);
- dbg(lvl_warning,"To start %s\n",item_to_name(tmp->data.item.type));
+ dbg(lvl_debug,"To start %s\n",item_to_name(tmp->data.item.type));
}
tmp=tmp->start_next;
}
@@ -2766,7 +2766,7 @@ route_graph_process_restriction_segment(struct route_graph *this, struct route_g
tmp->data.item.type != type_street_turn_restriction_only &&
!(tmp->data.flags & AF_ONEWAY) && is_turn_allowed(p, s, tmp)) {
route_graph_clone_segment(this, tmp, tmp->start, pn, AF_ONEWAYREV);
- dbg(lvl_warning,"To end %s\n",item_to_name(tmp->data.item.type));
+ dbg(lvl_debug,"To end %s\n",item_to_name(tmp->data.item.type));
}
tmp=tmp->end_next;
}
@@ -2777,7 +2777,7 @@ route_graph_process_restriction_point(struct route_graph *this, struct route_gra
{
struct route_graph_segment *tmp;
tmp=p->start;
- dbg(lvl_warning,"node 0x%x,0x%x\n",p->c.x,p->c.y);
+ dbg(lvl_debug,"node 0x%x,0x%x\n",p->c.x,p->c.y);
while (tmp) {
if (tmp->data.item.type != type_street_turn_restriction_no &&
tmp->data.item.type != type_street_turn_restriction_only)
@@ -2799,7 +2799,7 @@ route_graph_process_restrictions(struct route_graph *this)
{
struct route_graph_point *curr;
int i;
- dbg(lvl_warning,"enter\n");
+ dbg(lvl_debug,"enter\n");
for (i = 0 ; i < HASH_SIZE ; i++) {
curr=this->hash[i];
while (curr) {
@@ -2813,7 +2813,7 @@ route_graph_process_restrictions(struct route_graph *this)
static void
route_graph_build_done(struct route_graph *rg, int cancel)
{
- dbg(lvl_warning,"cancel=%d\n",cancel);
+ dbg(lvl_debug,"cancel=%d\n",cancel);
if (rg->idle_ev)
event_remove_idle(rg->idle_ev);
if (rg->idle_cb)
@@ -2880,7 +2880,7 @@ route_graph_build(struct mapset *ms, struct coord *c, int count, struct callback
{
struct route_graph *ret=g_new0(struct route_graph, 1);
- dbg(lvl_warning,"enter\n");
+ dbg(lvl_debug,"enter\n");
ret->sel=route_calc_selection(c, count, profile);
ret->h=mapset_open(ms);
@@ -3083,7 +3083,7 @@ route_find_nearest_street(struct vehicleprofile *vehicleprofile, struct mapset *
ret->lp=lp;
ret->pos=pos;
ret->street=sd;
- dbg(lvl_warning,"dist=%d id 0x%x 0x%x pos=%d\n", dist, item->id_hi, item->id_lo, pos);
+ dbg(lvl_debug,"dist=%d id 0x%x 0x%x pos=%d\n", dist, item->id_hi, item->id_lo, pos);
} else {
street_data_free(sd);
}
@@ -3097,7 +3097,7 @@ route_find_nearest_street(struct vehicleprofile *vehicleprofile, struct mapset *
if (!ret->street || mindist > max_dist*max_dist) {
if (ret->street) {
street_data_free(ret->street);
- dbg(lvl_warning,"Much too far %d > %d\n", mindist, max_dist);
+ dbg(lvl_debug,"Much too far %d > %d\n", mindist, max_dist);
}
g_free(ret);
ret = NULL;
@@ -3318,7 +3318,7 @@ rm_coord_get(void *priv_data, struct coord *c, int count)
c[i] = seg->c[mr->last_coord++];
rc++;
}
- dbg(lvl_warning,"return %d\n",rc);
+ dbg(lvl_debug,"return %d\n",rc);
return rc;
}
@@ -3348,7 +3348,7 @@ rp_attr_get(void *priv_data, enum attr_type attr_type, struct attr *attr)
switch (attr_type) {
case attr_any: // works only with rg_points for now
while (mr->attr_next != attr_none) {
- dbg(lvl_error,"querying %s\n", attr_to_name(mr->attr_next));
+ dbg(lvl_debug,"querying %s\n", attr_to_name(mr->attr_next));
if (rp_attr_get(priv_data, mr->attr_next, attr))
return 1;
}
@@ -3543,7 +3543,7 @@ static struct map_rect_priv *
rm_rect_new(struct map_priv *priv, struct map_selection *sel)
{
struct map_rect_priv * mr;
- dbg(lvl_warning,"enter\n");
+ dbg(lvl_debug,"enter\n");
#if 0
if (! route_get_pos(priv->route))
return NULL;
@@ -3587,7 +3587,7 @@ rp_rect_new(struct map_priv *priv, struct map_selection *sel)
{
struct map_rect_priv * mr;
- dbg(lvl_warning,"enter\n");
+ dbg(lvl_debug,"enter\n");
if (! priv->route->graph)
return NULL;
mr=g_new0(struct map_rect_priv, 1);
@@ -3956,7 +3956,7 @@ route_add_attr(struct route *this_, struct attr *attr)
int
route_remove_attr(struct route *this_, struct attr *attr)
{
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
switch (attr->type) {
case attr_callback:
callback_list_remove(this_->cbl2, attr->u.callback);
@@ -4004,7 +4004,7 @@ route_get_attr(struct route *this_, enum attr_type type, struct attr *attr, stru
case attr_vehicle:
attr->u.vehicle=this_->v;
ret=(this_->v != NULL);
- dbg(lvl_error,"get vehicle %p\n",this_->v);
+ dbg(lvl_debug,"get vehicle %p\n",this_->v);
break;
case attr_vehicleprofile:
attr->u.vehicleprofile=this_->vehicleprofile;
@@ -4021,7 +4021,7 @@ route_get_attr(struct route *this_, enum attr_type type, struct attr *attr, stru
attr->u.num+=path->path_time;
path=path->next;
}
- dbg(lvl_warning,"path_time %ld\n",attr->u.num);
+ dbg(lvl_debug,"path_time %ld\n",attr->u.num);
} else
ret=0;
break;
diff --git a/navit/routech.c b/navit/routech.c
index b5afc0961..853b89b0e 100644
--- a/navit/routech.c
+++ b/navit/routech.c
@@ -447,17 +447,17 @@ routech_find_edge(struct map_rect *mr, struct item_id *from, struct item_id *to,
struct item *item=map_rect_get_item_byid(mr, from->id_hi, from->id_lo);
struct attr edge_attr;
dbg_assert(item->type == type_ch_node);
- dbg(lvl_warning,"type %s\n",item_to_name(item->type));
- dbg(lvl_warning,"segment item=%p\n",item);
+ dbg(lvl_debug,"type %s\n",item_to_name(item->type));
+ dbg(lvl_debug,"segment item=%p\n",item);
while (item_attr_get(item, attr_ch_edge, &edge_attr)) {
struct ch_edge *edge=edge_attr.u.data;
- dbg(lvl_warning,"flags=%d\n",edge->flags);
+ dbg(lvl_debug,"flags=%d\n",edge->flags);
if (edge->target.id_hi == to->id_hi && edge->target.id_lo == to->id_lo) {
*middle=edge->middle;
return edge->flags;
}
}
- dbg(lvl_error,"** not found\n");
+ dbg(lvl_debug,"** not found\n");
return 0;
}
@@ -470,7 +470,7 @@ routech_resolve(struct map_rect *mr, struct item_id *from, struct item_id *to, i
res=routech_find_edge(mr, to, from, &middle_node);
else
res=routech_find_edge(mr, from, to, &middle_node);
- dbg(lvl_warning,"res=%d\n",res);
+ dbg(lvl_debug,"res=%d\n",res);
if (res & 4) {
routech_resolve(mr, from, &middle_node, 1);
routech_resolve(mr, &middle_node, to, 0);
@@ -483,7 +483,7 @@ routech_find_path(struct map_rect *mr, struct routech_search *search)
{
struct item_id *curr_node=search->via;
GList *i,*n,*list=NULL;
- dbg(lvl_warning,"node %p\n",curr_node);
+ dbg(lvl_debug,"node %p\n",curr_node);
for (;;) {
int element=GPOINTER_TO_INT(g_hash_table_lookup(search->hash, curr_node));
struct item_id *next_node=pq_get_parent_node_id(search->pq,element);
@@ -491,8 +491,8 @@ routech_find_path(struct map_rect *mr, struct routech_search *search)
list=g_list_append(list, curr_node);
else
list=g_list_prepend(list, curr_node);
- dbg(lvl_warning,"element %d\n",element);
- dbg(lvl_warning,"next node %p\n",next_node);
+ dbg(lvl_debug,"element %d\n",element);
+ dbg(lvl_debug,"next node %p\n",next_node);
if (!next_node)
break;
curr_node=next_node;
@@ -551,16 +551,16 @@ routech_test(struct navit *navit)
curr=search[search_id];
opposite=search[1-search_id];
if (pq_is_empty(curr->pq)) {
- dbg(lvl_error,"empty\n");
+ dbg(lvl_debug,"empty\n");
break;
}
routech_relax(mr, curr, opposite);
if (pq_min(curr->pq) > curr->upper) {
- dbg(lvl_error,"min %d upper %d\n",pq_min(curr->pq), curr->upper);
+ dbg(lvl_debug,"min %d upper %d\n",pq_min(curr->pq), curr->upper);
curr->finished=1;
}
if (curr->finished && opposite->finished) {
- dbg(lvl_error,"finished\n");
+ dbg(lvl_debug,"finished\n");
break;
}
}
diff --git a/navit/script.c b/navit/script.c
index 92abda500..2c6719cdc 100644
--- a/navit/script.c
+++ b/navit/script.c
@@ -43,7 +43,7 @@ script_run(struct script *scr)
dbg(lvl_error,"no text\n");
return;
}
- dbg(lvl_error,"running '%s'\n",xml_text->u.str);
+ dbg(lvl_debug,"running '%s'\n",xml_text->u.str);
command_evaluate_to_void(&scr->parent, xml_text->u.str, &error);
}
@@ -52,7 +52,7 @@ script_set_attr_int(struct script *scr, struct attr *attr)
{
switch (attr->type) {
case attr_refresh_cond:
- dbg(lvl_error,"refresh_cond\n");
+ dbg(lvl_debug,"refresh_cond\n");
if (scr->cs)
command_saved_destroy(scr->cs);
scr->cs=command_saved_attr_new(attr->u.str, &scr->parent, scr->cb, 0);
@@ -79,14 +79,14 @@ script_new(struct attr *parent, struct attr **attrs)
scr->parent=*parent;
while (attrs && *attrs)
script_set_attr_int(scr, *attrs++);
- dbg(lvl_error,"return %p\n",scr);
+ dbg(lvl_debug,"return %p\n",scr);
return scr;
}
static void
script_destroy(struct script *scr)
{
- dbg(lvl_error,"enter %p\n",scr);
+ dbg(lvl_debug,"enter %p\n",scr);
if (scr->timeout)
event_remove_timeout(scr->timeout);
if (scr->cs)
diff --git a/navit/search.c b/navit/search.c
index 17418b167..139feef58 100644
--- a/navit/search.c
+++ b/navit/search.c
@@ -225,10 +225,10 @@ search_phrase_used(struct phrase *p, GList *used_phrases)
{
while (used_phrases) {
struct phrase *pu=used_phrases->data;
- dbg(lvl_warning,"'%s'-'%s' vs '%s'-'%s'\n",p->start,p->end,pu->start,pu->end);
+ dbg(lvl_debug,"'%s'-'%s' vs '%s'-'%s'\n",p->start,p->end,pu->start,pu->end);
if (p->start < pu->end && p->end > pu->start)
return 1;
- dbg(lvl_warning,"unused\n");
+ dbg(lvl_debug,"unused\n");
used_phrases=g_list_next(used_phrases);
}
return 0;
@@ -255,7 +255,7 @@ search_by_address_attr(GList *results, struct search_list *sl, GList *phrases, G
int count=0,wordcount_all=wordcount+p->wordcount;
struct search_list_result *slr;
attr.u.str=search_phrase_str(p);
- dbg(lvl_warning,"%s phrase '%s'\n",attr_to_name(attr_type),attr.u.str);
+ dbg(lvl_debug,"%s phrase '%s'\n",attr_to_name(attr_type),attr.u.str);
search_list_search(sl, &attr, 0);
while ((slr=search_list_get_result(sl))) {
if (attr_type != attr_country_all) {
@@ -265,7 +265,7 @@ search_by_address_attr(GList *results, struct search_list *sl, GList *phrases, G
}
count++;
}
- dbg(lvl_warning,"%d results wordcount %d\n",count,wordcount_all);
+ dbg(lvl_debug,"%d results wordcount %d\n",count,wordcount_all);
if (count) {
GList *used=g_list_prepend(g_list_copy(exclude), tmp->data);
enum attr_type new_attr_type=attr_none;
@@ -392,7 +392,7 @@ search_list_select(struct search_list *this_, enum attr_type attr_type, int id,
curr=le->list;
if (mode > 0 || !id)
le->selected=mode;
- //dbg(lvl_error,"enter level=%d %d %d %p\n", level, id, mode, curr);
+ //dbg(lvl_debug,"enter level=%d %d %d %p\n", level, id, mode, curr);
num = 0;
while (curr) {
num++;
@@ -401,13 +401,13 @@ search_list_select(struct search_list *this_, enum attr_type attr_type, int id,
slc->selected=mode;
if (id) {
le->last=curr;
- //dbg(lvl_error,"found\n");
+ //dbg(lvl_debug,"found\n");
return slc;
}
}
curr=g_list_next(curr);
}
- //dbg(lvl_error,"not found\n");
+ //dbg(lvl_debug,"not found\n");
return NULL;
}
@@ -566,7 +566,7 @@ search_list_town_new(struct item *item)
ret->itemt=*item;
ret->common.item=ret->common.unique=*item;
if (item_attr_get(item, attr_town_streets_item, &attr)) {
- dbg(lvl_warning,"town_assoc 0x%x 0x%x\n", attr.u.item->id_hi, attr.u.item->id_lo);
+ dbg(lvl_debug,"town_assoc 0x%x 0x%x\n", attr.u.item->id_hi, attr.u.item->id_lo);
ret->common.unique=*attr.u.item;
}
search_list_common_new(item, &ret->common);
@@ -760,7 +760,7 @@ search_postal_merge(char *mask, char *new)
{
int i;
char *ret=NULL;
- dbg(lvl_warning,"enter %s %s\n", mask, new);
+ dbg(lvl_debug,"enter %s %s\n", mask, new);
if (!new)
return NULL;
if (!mask)
@@ -777,7 +777,7 @@ search_postal_merge(char *mask, char *new)
while (mask[i])
ret[i++]='.';
}
- dbg(lvl_warning,"merged %s with %s as %s\n", mask, new, ret);
+ dbg(lvl_debug,"merged %s with %s as %s\n", mask, new, ret);
return ret;
}
@@ -861,24 +861,24 @@ search_list_get_result(struct search_list *this_)
return ret;
}
- //dbg(lvl_error,"enter\n");
+ //dbg(lvl_debug,"enter\n");
le=&this_->levels[level];
- //dbg(lvl_error,"le=%p\n", le);
+ //dbg(lvl_debug,"le=%p\n", le);
for (;;)
{
- //dbg(lvl_error,"le->search=%p\n", le->search);
+ //dbg(lvl_debug,"le->search=%p\n", le->search);
if (! le->search)
{
- //dbg(lvl_error,"partial=%d level=%d\n", le->partial, level);
+ //dbg(lvl_debug,"partial=%d level=%d\n", le->partial, level);
if (! level)
le->parent=NULL;
else
{
leu=&this_->levels[level-1];
- //dbg(lvl_error,"leu->curr=%p\n", leu->curr);
+ //dbg(lvl_debug,"leu->curr=%p\n", leu->curr);
for (;;)
{
- //dbg(lvl_error,"*********########");
+ //dbg(lvl_debug,"*********########");
struct search_list_common *slc;
if (! leu->curr)
@@ -897,23 +897,23 @@ search_list_get_result(struct search_list *this_)
}
if (le->parent)
{
- //dbg(lvl_error,"mapset_search_new with item(%d,%d)\n", le->parent->item.id_hi, le->parent->item.id_lo);
+ //dbg(lvl_debug,"mapset_search_new with item(%d,%d)\n", le->parent->item.id_hi, le->parent->item.id_lo);
}
- //dbg(lvl_error,"############## attr=%s\n", attr_to_name(le->attr->type));
+ //dbg(lvl_debug,"############## attr=%s\n", attr_to_name(le->attr->type));
le->search=mapset_search_new(this_->ms, &le->parent->item, le->attr, le->partial);
le->hash=g_hash_table_new(search_item_hash_hash, search_item_hash_equal);
}
- //dbg(lvl_error,"le->search=%p\n", le->search);
+ //dbg(lvl_debug,"le->search=%p\n", le->search);
if (!this_->item)
{
- //dbg(lvl_error,"sssss 1");
+ //dbg(lvl_debug,"sssss 1");
this_->item=mapset_search_get_item(le->search);
- //dbg(lvl_error,"sssss 1 %p\n",this_->item);
+ //dbg(lvl_debug,"sssss 1 %p\n",this_->item);
}
if (this_->item)
{
void *p=NULL;
- //dbg(lvl_error,"id_hi=%d id_lo=%d\n", this_->item->id_hi, this_->item->id_lo);
+ //dbg(lvl_debug,"id_hi=%d id_lo=%d\n", this_->item->id_hi, this_->item->id_lo);
if (this_->postal)
{
struct attr postal;
@@ -929,11 +929,11 @@ search_list_get_result(struct search_list *this_)
this_->result.town=NULL;
this_->result.street=NULL;
this_->result.c=NULL;
- //dbg(lvl_error,"case x LEVEL start %d\n",level);
+ //dbg(lvl_debug,"case x LEVEL start %d\n",level);
switch (level)
{
case 0:
- //dbg(lvl_error,"case 0 COUNTRY");
+ //dbg(lvl_debug,"case 0 COUNTRY");
p=search_list_country_new(this_->item);
this_->result.country=p;
this_->result.country->common.parent=NULL;
@@ -943,7 +943,7 @@ search_list_get_result(struct search_list *this_)
this_->item=NULL;
break;
case 1:
- //dbg(lvl_error,"case 1 TOWN");
+ //dbg(lvl_debug,"case 1 TOWN");
p=search_list_town_new(this_->item);
this_->result.town=p;
this_->result.town->common.parent=this_->levels[0].last->data;
@@ -954,7 +954,7 @@ search_list_get_result(struct search_list *this_)
this_->item=NULL;
break;
case 2:
- //dbg(lvl_error,"case 2 STREET");
+ //dbg(lvl_debug,"case 2 STREET");
p=search_list_street_new(this_->item);
this_->result.street=p;
this_->result.street->common.parent=this_->levels[1].last->data;
@@ -965,13 +965,13 @@ search_list_get_result(struct search_list *this_)
this_->item=NULL;
break;
case 3:
- dbg(lvl_warning,"case 3 HOUSENUMBER\n");
+ dbg(lvl_debug,"case 3 HOUSENUMBER\n");
has_street_name=0;
// if this housenumber has a streetname tag, set the name now
if (item_attr_get(this_->item, attr_street_name, &attr2))
{
- dbg(lvl_warning,"streetname: %s\n",attr2.u.str);
+ dbg(lvl_debug,"streetname: %s\n",attr2.u.str);
has_street_name=1;
}
@@ -988,7 +988,7 @@ search_list_get_result(struct search_list *this_)
{
this_->item=NULL;
} else {
- dbg(lvl_error,"interpolation!\n");
+ dbg(lvl_debug,"interpolation!\n");
}
if(le->parent && has_street_name) {
diff --git a/navit/search_houseno_interpol.c b/navit/search_houseno_interpol.c
index 0cfb044e3..604fcf93c 100644
--- a/navit/search_houseno_interpol.c
+++ b/navit/search_houseno_interpol.c
@@ -79,7 +79,7 @@ house_number_interpolation_clear_all(struct house_number_interpolation *inter)
static char *
search_next_house_number_curr_interpol_with_ends(struct house_number_interpolation *inter)
{
- dbg(lvl_warning,"interpolate %s-%s %s\n",inter->first,inter->last,inter->curr);
+ dbg(lvl_debug,"interpolate %s-%s %s\n",inter->first,inter->last,inter->curr);
if (!inter->first || !inter->last)
return NULL;
if (!inter->curr)
@@ -97,7 +97,7 @@ search_next_house_number_curr_interpol_with_ends(struct house_number_interpolati
inter->curr=NULL;
}
}
- dbg(lvl_warning,"interpolate result %s\n",inter->curr);
+ dbg(lvl_debug,"interpolate result %s\n",inter->curr);
return inter->curr;
}
@@ -141,7 +141,7 @@ search_house_number_interpolation_split(char *str, struct house_number_interpola
strncpy(first, str, len);
first[len]='\0';
last=g_strdup(pos+1);
- dbg(lvl_warning,"%s = %s - %s\n",str, first, last);
+ dbg(lvl_debug,"%s = %s - %s\n",str, first, last);
if (atoi(first) > atoi(last)) {
inter->first=last;
inter->last=first;
@@ -158,7 +158,7 @@ search_house_number_coordinate(struct item *item, struct house_number_interpolat
{
struct pcoord *ret=g_new(struct pcoord, 1);
ret->pro = map_projection(item->map);
- dbg(lvl_warning,"%s\n",item_to_name(item->type));
+ dbg(lvl_debug,"%s\n",item_to_name(item->type));
if (!inter) {
struct coord c;
if (item_coord_get(item, &c, 1)) {
@@ -183,7 +183,7 @@ search_house_number_coordinate(struct item *item, struct house_number_interpolat
if (count) {
int i,distance_sum=0,hn_distance;
int *distances=g_alloca(sizeof(int)*(count-1));
- dbg(lvl_warning,"count=%d hn_length=%d hn_pos=%d (%s of %s-%s)\n",count,hn_length,hn_pos,inter->curr,inter->first,inter->last);
+ dbg(lvl_debug,"count=%d hn_length=%d hn_pos=%d (%s of %s-%s)\n",count,hn_length,hn_pos,inter->curr,inter->first,inter->last);
if (!hn_length) {
hn_length=2;
hn_pos=1;
@@ -193,19 +193,19 @@ search_house_number_coordinate(struct item *item, struct house_number_interpolat
for (i = 0 ; i < count-1 ; i++) {
distances[i]=navit_sqrt(transform_distance_sq(&c[i],&c[i+1]));
distance_sum+=distances[i];
- dbg(lvl_warning,"distance[%d]=%d\n",i,distances[i]);
+ dbg(lvl_debug,"distance[%d]=%d\n",i,distances[i]);
}
- dbg(lvl_warning,"sum=%d\n",distance_sum);
+ dbg(lvl_debug,"sum=%d\n",distance_sum);
#if 0
hn_distance=distance_sum*hn_pos/hn_length;
#else
hn_distance=(distance_sum*hn_pos+distance_sum*inter_increment/2)/(hn_length+inter_increment);
#endif
- dbg(lvl_warning,"hn_distance=%d\n",hn_distance);
+ dbg(lvl_debug,"hn_distance=%d\n",hn_distance);
i=0;
while (i < count-1 && hn_distance > distances[i])
hn_distance-=distances[i++];
- dbg(lvl_warning,"remaining distance=%d from %d\n",hn_distance,distances[i]);
+ dbg(lvl_debug,"remaining distance=%d from %d\n",hn_distance,distances[i]);
ret->x=(c[i+1].x-c[i].x)*hn_distance/distances[i]+c[i].x;
ret->y=(c[i+1].y-c[i].y)*hn_distance/distances[i]+c[i].y;
}
diff --git a/navit/speech.c b/navit/speech.c
index 159203b87..d3b09ae3a 100644
--- a/navit/speech.c
+++ b/navit/speech.c
@@ -44,22 +44,22 @@ speech_new(struct attr *parent, struct attr **attrs)
dbg(lvl_error,"type missing\n");
return NULL;
}
- dbg(lvl_warning,"type='%s'\n", attr->u.str);
+ dbg(lvl_debug,"type='%s'\n", attr->u.str);
speech_new=plugin_get_speech_type(attr->u.str);
- dbg(lvl_warning,"new=%p\n", speech_new);
+ dbg(lvl_debug,"new=%p\n", speech_new);
if (! speech_new) {
dbg(lvl_error,"wrong type '%s'\n", attr->u.str);
return NULL;
}
this_=(struct speech *)navit_object_new(attrs, &speech_func, sizeof(struct speech));
this_->priv=speech_new(&this_->meth, this_->attrs, parent);
- dbg(lvl_warning, "say=%p\n", this_->meth.say);
- dbg(lvl_warning,"priv=%p\n", this_->priv);
+ dbg(lvl_debug, "say=%p\n", this_->meth.say);
+ dbg(lvl_debug,"priv=%p\n", this_->priv);
if (! this_->priv) {
speech_destroy(this_);
return NULL;
}
- dbg(lvl_warning,"return %p\n", this_);
+ dbg(lvl_debug,"return %p\n", this_);
return this_;
}
@@ -75,7 +75,7 @@ speech_destroy(struct speech *this_)
int
speech_say(struct speech *this_, const char *text)
{
- dbg(lvl_warning, "this_=%p text='%s' calling %p\n", this_, text, this_->meth.say);
+ dbg(lvl_debug, "this_=%p text='%s' calling %p\n", this_, text, this_->meth.say);
return (this_->meth.say)(this_->priv, text);
}
diff --git a/navit/speech/android/speech_android.c b/navit/speech/android/speech_android.c
index e5a7f6130..3323245aa 100644
--- a/navit/speech/android/speech_android.c
+++ b/navit/speech/android/speech_android.c
@@ -73,7 +73,7 @@ speech_android_say(struct speech_priv *this, const char *text)
}
}
string = (*jnienv)->NewStringUTF(jnienv, str);
- dbg(lvl_error,"enter %s\n",str);
+ dbg(lvl_debug,"enter %s\n",str);
(*jnienv)->CallVoidMethod(jnienv, this->NavitSpeech, this->NavitSpeech_say, string);
(*jnienv)->DeleteLocalRef(jnienv, string);
g_free(str);
@@ -104,7 +104,7 @@ speech_android_init(struct speech_priv *ret)
dbg(lvl_error,"No class found\n");
return 0;
}
- dbg(lvl_error,"at 3\n");
+ dbg(lvl_debug,"at 3\n");
cid = (*jnienv)->GetMethodID(jnienv, ret->NavitSpeechClass, "<init>", "(Lorg/navitproject/navit/Navit;)V");
if (cid == NULL) {
dbg(lvl_error,"no method found\n");
@@ -112,9 +112,9 @@ speech_android_init(struct speech_priv *ret)
}
if (!android_find_method(ret->NavitSpeechClass, "say", "(Ljava/lang/String;)V", &ret->NavitSpeech_say))
return 0;
- dbg(lvl_error,"at 4 android_activity=%p\n",android_activity);
+ dbg(lvl_debug,"at 4 android_activity=%p\n",android_activity);
ret->NavitSpeech=(*jnienv)->NewObject(jnienv, ret->NavitSpeechClass, cid, android_activity);
- dbg(lvl_error,"result=%p\n",ret->NavitSpeech);
+ dbg(lvl_debug,"result=%p\n",ret->NavitSpeech);
if (!ret->NavitSpeech)
return 0;
if (ret->NavitSpeech)
diff --git a/navit/speech/cmdline/speech_cmdline.c b/navit/speech/cmdline/speech_cmdline.c
index 9a334d020..08a1abe03 100644
--- a/navit/speech/cmdline/speech_cmdline.c
+++ b/navit/speech/cmdline/speech_cmdline.c
@@ -63,7 +63,7 @@ speech_cmdline_search(GList *samples, int suffix_len, const char *text, int deco
{
GList *loop_samples=samples,*result=NULL,*recursion_result;
int shortest_result_length=INT_MAX;
- dbg(lvl_warning,"searching samples for text: '%s'\n",text);
+ dbg(lvl_debug,"searching samples for text: '%s'\n",text);
while (loop_samples) {
char *sample_name=loop_samples->data;
int sample_name_len;
@@ -77,7 +77,7 @@ speech_cmdline_search(GList *samples, int suffix_len, const char *text, int deco
const char *remaining_text=text+sample_name_len;
while (*remaining_text == ' ' || *remaining_text == ',')
remaining_text++;
- dbg(lvl_warning,"sample '%s' matched; remaining text: '%s'\n",sample_name,remaining_text);
+ dbg(lvl_debug,"sample '%s' matched; remaining text: '%s'\n",sample_name,remaining_text);
if (*remaining_text) {
recursion_result=speech_cmdline_search(samples, suffix_len, remaining_text, decode);
if (recursion_result && g_list_length(recursion_result) < shortest_result_length) {
@@ -86,7 +86,7 @@ speech_cmdline_search(GList *samples, int suffix_len, const char *text, int deco
result=g_list_prepend(result, loop_samples->data);
shortest_result_length=g_list_length(result);
} else {
- dbg(lvl_warning,"no (shorter) result found for remaining text '%s', "
+ dbg(lvl_debug,"no (shorter) result found for remaining text '%s', "
"trying next sample\n", remaining_text);
g_list_free(recursion_result);
}
@@ -141,7 +141,7 @@ speechd_say(struct speech_priv *this, const char *text)
argl=speech_cmdline_search(this->samples, strlen(this->sample_suffix), text, !!(this->flags & 1));
samplesmode=1;
listlen=g_list_length(argl);
- dbg(lvl_warning,"For text: '%s', found %d samples.\n",text,listlen);
+ dbg(lvl_debug,"For text: '%s', found %d samples.\n",text,listlen);
if (!listlen){
dbg(lvl_error,"No matching samples found. Cannot speak text: '%s'\n",text);
}
@@ -149,7 +149,7 @@ speechd_say(struct speech_priv *this, const char *text)
listlen=1;
}
if(listlen>0) {
- dbg(lvl_warning,"Speaking text '%s'\n",text);
+ dbg(lvl_debug,"Speaking text '%s'\n",text);
int argc;
char**argv;
int j;
@@ -168,7 +168,7 @@ speechd_say(struct speech_priv *this, const char *text)
while(l) {
char *new_arg;
new_arg=g_strdup_printf("%s/%s",this->sample_dir,(char *)l->data);
- dbg(lvl_warning,"new_arg %s\n",new_arg);
+ dbg(lvl_debug,"new_arg %s\n",new_arg);
argv[j++]=g_strdup_printf(cmdv[i],new_arg);
g_free(new_arg);
l=g_list_next(l);
@@ -242,7 +242,7 @@ speechd_new(struct speech_methods *meth, struct attr **attrs, struct attr *paren
int len=strlen(name);
if (len > suffix_len) {
if (!strcmp(name+len-suffix_len, this->sample_suffix)) {
- dbg(lvl_warning,"found %s\n",name);
+ dbg(lvl_debug,"found %s\n",name);
this->samples=g_list_prepend(this->samples, g_strdup(name));
}
}
diff --git a/navit/speech/espeak/speak.c b/navit/speech/espeak/speak.c
index 58813590a..523679b38 100644
--- a/navit/speech/espeak/speak.c
+++ b/navit/speech/espeak/speak.c
@@ -214,7 +214,7 @@ static void start_speaking(struct speech_priv* sp_priv)
static LRESULT CALLBACK speech_message_handler( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
{
- dbg(lvl_warning, "message_handler called\n");
+ dbg(lvl_debug, "message_handler called\n");
switch (uMsg)
{
@@ -387,7 +387,7 @@ static int
espeak_say(struct speech_priv *this, const char *text)
{
char *phrase = g_strdup(text);
- dbg(lvl_warning, "Speak: '%s'\n", text);
+ dbg(lvl_debug, "Speak: '%s'\n", text);
if (!PostMessage(this->h_queue, msg_say, (WPARAM)this, (LPARAM)phrase))
{
@@ -440,7 +440,7 @@ espeak_new(struct speech_methods *meth, struct attr **attrs, struct attr *parent
strcpy(path_home,path->u.str);
else
sprintf(path_home,"%s/espeak-data",getenv("NAVIT_SHAREDIR"));
- dbg(lvl_error,"path_home set to %s\n",path_home);
+ dbg(lvl_debug,"path_home set to %s\n",path_home);
if ( !initialise() )
{
@@ -467,12 +467,12 @@ espeak_new(struct speech_methods *meth, struct attr **attrs, struct attr *parent
}
file1=g_strdup_printf("%s/voices/%s",path_home,lang_full);
file2=g_strdup_printf("%s/voices/%s/%s",path_home,lang,lang_full);
- dbg(lvl_error,"Testing %s and %s\n",file1,file2);
+ dbg(lvl_debug,"Testing %s and %s\n",file1,file2);
if (file_exists(file1) || file_exists(file2))
lang_str=g_strdup(lang_full);
else
lang_str=g_strdup(lang);
- dbg(lvl_error,"Language full %s lang %s result %s\n",lang_full,lang,lang_str);
+ dbg(lvl_debug,"Language full %s lang %s result %s\n",lang_full,lang,lang_str);
g_free(lang_full);
g_free(lang);
g_free(file1);
diff --git a/navit/start_real.c b/navit/start_real.c
index ee1b93ec1..fbbd5a2ea 100644
--- a/navit/start_real.c
+++ b/navit/start_real.c
@@ -190,7 +190,7 @@ int main_real(int argc, char * const* argv)
}
// Try the next config file possibility from the list
config_file = li->data;
- dbg(lvl_warning,"trying %s\n",config_file);
+ dbg(lvl_debug,"trying %s\n",config_file);
if (file_exists(config_file)) {
break;
}
@@ -198,11 +198,11 @@ int main_real(int argc, char * const* argv)
li = g_list_next(li);
}
- dbg(lvl_error,"Loading %s\n",config_file);
+ dbg(lvl_debug,"Loading %s\n",config_file);
if (!config_load(config_file, &error)) {
dbg(lvl_error, _("Error parsing config file '%s': %s\n"), config_file, error ? error->message : "");
} else {
- dbg(lvl_error, _("Using config file '%s'\n"), config_file);
+ dbg(lvl_info, _("Using config file '%s'\n"), config_file);
}
if (! config) {
dbg(lvl_error, _("Error: No configuration found in config file '%s'\n"), config_file);
diff --git a/navit/support/libc/stat.c b/navit/support/libc/stat.c
index 393b9f7cf..586dcf714 100644
--- a/navit/support/libc/stat.c
+++ b/navit/support/libc/stat.c
@@ -120,9 +120,9 @@ _stat (const char *path, struct _stat *st)
size_t len;
int exec;
- dbg(lvl_error,"path=%s\n",path);
+ dbg(lvl_debug,"path=%s\n",path);
mbstowcs (pathw, path, MAX_PATH);
- dbg(lvl_error,"wide path=%S\n",pathw);
+ dbg(lvl_debug,"wide path=%S\n",pathw);
if((h = FindFirstFileW (pathw, &fd)) == INVALID_HANDLE_VALUE)
{
DWORD dwError = GetLastError ();
@@ -139,7 +139,7 @@ _stat (const char *path, struct _stat *st)
exec = (len >= 4
&& strcasecmp (path + len - 4, ".exe") == 0);
ret = __stat_by_file_info (&sfi, st, exec);
- dbg(lvl_error,"ret=%d\n",ret);
+ dbg(lvl_debug,"ret=%d\n",ret);
FindClose (h);
return ret;
}
diff --git a/navit/support/win32/serial_io.c b/navit/support/win32/serial_io.c
index c2461949b..2eba8ece1 100644
--- a/navit/support/win32/serial_io.c
+++ b/navit/support/win32/serial_io.c
@@ -72,7 +72,7 @@ int serial_io_init( const char* port, const char* strsettings )
SetCommTimeouts(hCom, &sCT);
- dbg(lvl_warning, "serial_io_init return (fd) : '%d'\n", (int)hCom);
+ dbg(lvl_debug, "serial_io_init return (fd) : '%d'\n", (int)hCom);
return (int)hCom;
}
@@ -94,12 +94,12 @@ int serial_io_init( const char* port, const char* strsettings )
int serial_io_read( int fd, char * buffer, int buffer_size )
{
DWORD dwBytesIn = 0;
- dbg(lvl_warning, "serial_io_read fd = %d buffer_size = %d\n", fd, buffer_size);
+ dbg(lvl_debug, "serial_io_read fd = %d buffer_size = %d\n", fd, buffer_size);
if (fd <= 0)
{
- dbg(lvl_error, "serial_io_read return (dwBytesIn) : '0'\n");
+ dbg(lvl_debug, "serial_io_read return (dwBytesIn) : '0'\n");
*buffer = 0;
return 0;
}
@@ -117,7 +117,7 @@ int serial_io_read( int fd, char * buffer, int buffer_size )
}
if (dwBytesIn > 0)
{
- dbg(lvl_warning,"GPS < %s\n",buffer );
+ dbg(lvl_debug,"GPS < %s\n",buffer );
}
buffer[buffer_size - 1] = 0;
@@ -139,7 +139,7 @@ int serial_io_read( int fd, char * buffer, int buffer_size )
int serial_io_write(int fd, const char * buffer)
{
DWORD dwBytesOut = 0;
- dbg(lvl_warning, "serial_io_write fd = %d buffer = '%s'\n",fd, buffer);
+ dbg(lvl_debug, "serial_io_write fd = %d buffer = '%s'\n",fd, buffer);
WriteFile((HANDLE)fd, buffer, strlen(buffer), &dwBytesOut, NULL);
@@ -157,7 +157,7 @@ int serial_io_write(int fd, const char * buffer)
**/
void serial_io_shutdown(int fd )
{
- dbg(lvl_warning, "serial_io_shutdown fd = %d\n",fd);
+ dbg(lvl_debug, "serial_io_shutdown fd = %d\n",fd);
if (fd > 0)
{
diff --git a/navit/support/wordexp/glob.c b/navit/support/wordexp/glob.c
index d6282c4a5..8337367dd 100644
--- a/navit/support/wordexp/glob.c
+++ b/navit/support/wordexp/glob.c
@@ -130,7 +130,7 @@ glob_recursive(const char *path1, const char *path2, const char *pattern, int fl
strcat(path, "/");
strcat(path, path2);
if (!strlen(pattern)) {
- dbg(lvl_warning,"found %s\n",path);
+ dbg(lvl_debug,"found %s\n",path);
pglob->gl_pathv=realloc(pglob->gl_pathv, (pglob->gl_pathc+1)*sizeof(char *));
if (!pglob->gl_pathv) {
pglob->gl_pathc=0;
@@ -139,7 +139,7 @@ glob_recursive(const char *path1, const char *path2, const char *pattern, int fl
pglob->gl_pathv[pglob->gl_pathc++]=path;
return 0;
}
- dbg(lvl_warning,"searching for %s in %s\n",pattern,path);
+ dbg(lvl_debug,"searching for %s in %s\n",pattern,path);
flen=strcspn(pattern,"/");
next=pattern+flen;
if (*next == '/')
@@ -150,7 +150,7 @@ glob_recursive(const char *path1, const char *path2, const char *pattern, int fl
if (glob_requires_match(fname, 0)) {
DIR *dh;
struct dirent *de;
- dbg(lvl_warning,"in dir %s search for %s\n",path,fname);
+ dbg(lvl_debug,"in dir %s search for %s\n",path,fname);
dh=opendir(path);
if (dh) {
while ((de=readdir(dh))) {
diff --git a/navit/track.c b/navit/track.c
index 7b73f29fb..3d74aa82c 100644
--- a/navit/track.c
+++ b/navit/track.c
@@ -338,7 +338,7 @@ tracking_get_attr(struct tracking *_this, enum attr_type type, struct attr *attr
struct tracking_line *tl;
int result=0;
- dbg(lvl_warning,"enter %s\n",attr_to_name(type));
+ dbg(lvl_debug,"enter %s\n",attr_to_name(type));
if (_this->attr) {
attr_free(_this->attr);
_this->attr=NULL;
@@ -471,7 +471,7 @@ tracking_doupdate_lines(struct tracking *tr, struct coord *pc, enum projection p
struct coord_geo g;
struct coord cc;
- dbg(lvl_warning,"enter\n");
+ dbg(lvl_debug,"enter\n");
h=mapset_open(tr->ms);
while ((m=mapset_next(h,2))) {
cc.x = pc->x;
@@ -501,7 +501,7 @@ tracking_doupdate_lines(struct tracking *tr, struct coord *pc, enum projection p
map_rect_destroy(mr);
}
mapset_close(h);
- dbg(lvl_warning, "exit\n");
+ dbg(lvl_debug, "exit\n");
}
@@ -509,7 +509,7 @@ void
tracking_flush(struct tracking *tr)
{
struct tracking_line *tl=tr->lines,*next;
- dbg(lvl_warning,"enter(tr=%p)\n", tr);
+ dbg(lvl_debug,"enter(tr=%p)\n", tr);
while (tl) {
next=tl->next;
@@ -685,7 +685,7 @@ tracking_update(struct tracking *tr, struct vehicle *v, struct vehicleprofile *v
if (!vehicleprofile_get_attr(vehicleprofile,attr_static_speed,&static_speed,NULL) || !vehicleprofile_get_attr(vehicleprofile,attr_static_distance,&static_distance,NULL)) {
static_speed.u.num=3;
static_distance.u.num=10;
- dbg(lvl_warning,"Using defaults for static position detection\n");
+ dbg(lvl_debug,"Using defaults for static position detection\n");
}
dbg(lvl_info,"Static speed: %ld, static distance: %ld\n",static_speed.u.num, static_distance.u.num);
time=iso8601_to_secs(time_attr.u.str);
@@ -694,36 +694,36 @@ tracking_update(struct tracking *tr, struct vehicle *v, struct vehicleprofile *v
tr->valid=attr_position_valid_valid;
transform_from_geo(pro, coord_geo.u.coord_geo, &tr->curr_in);
if ((speed < static_speed.u.num && transform_distance(pro, &tr->last_in, &tr->curr_in) < static_distance.u.num )) {
- dbg(lvl_warning,"static speed %f coord 0x%x,0x%x vs 0x%x,0x%x\n",speed,tr->last_in.x,tr->last_in.y, tr->curr_in.x, tr->curr_in.y);
+ dbg(lvl_debug,"static speed %f coord 0x%x,0x%x vs 0x%x,0x%x\n",speed,tr->last_in.x,tr->last_in.y, tr->curr_in.x, tr->curr_in.y);
tr->valid=attr_position_valid_static;
tr->speed=0;
return;
}
if (tr->tunnel) {
tr->curr_in=tr->curr_out;
- dbg(lvl_error,"tunnel extrapolation speed %f dir %f\n",tr->speed,tr->direction);
- dbg(lvl_error,"old 0x%x,0x%x\n",tr->curr_in.x, tr->curr_in.y);
+ dbg(lvl_debug,"tunnel extrapolation speed %f dir %f\n",tr->speed,tr->direction);
+ dbg(lvl_debug,"old 0x%x,0x%x\n",tr->curr_in.x, tr->curr_in.y);
speed=tr->speed;
direction=tr->curr_line->angle[tr->pos];
transform_project(pro, &tr->curr_in, tr->speed*tr->tunnel_extrapolation/36, tr->direction, &tr->curr_in);
- dbg(lvl_error,"new 0x%x,0x%x\n",tr->curr_in.x, tr->curr_in.y);
+ dbg(lvl_debug,"new 0x%x,0x%x\n",tr->curr_in.x, tr->curr_in.y);
} else if (vehicle_get_attr(tr->vehicle, attr_lag, &lag, NULL) && lag.u.num > 0) {
double espeed;
int edirection;
if (time-tr->time == 1) {
- dbg(lvl_warning,"extrapolating speed from %f and %f (%f)\n",tr->speed, speed, speed-tr->speed);
+ dbg(lvl_debug,"extrapolating speed from %f and %f (%f)\n",tr->speed, speed, speed-tr->speed);
espeed=speed+(speed-tr->speed)*lag.u.num/10;
- dbg(lvl_warning,"extrapolating angle from %f and %f (%d)\n",tr->direction, direction, tracking_angle_diff(direction,tr->direction,360));
+ dbg(lvl_debug,"extrapolating angle from %f and %f (%d)\n",tr->direction, direction, tracking_angle_diff(direction,tr->direction,360));
edirection=direction+tracking_angle_diff(direction,tr->direction,360)*lag.u.num/10;
} else {
- dbg(lvl_warning,"no speed and direction extrapolation\n");
+ dbg(lvl_debug,"no speed and direction extrapolation\n");
espeed=speed;
edirection=direction;
}
- dbg(lvl_warning,"lag %ld speed %f direction %d\n",lag.u.num,espeed,edirection);
- dbg(lvl_warning,"old 0x%x,0x%x\n",tr->curr_in.x, tr->curr_in.y);
+ dbg(lvl_debug,"lag %ld speed %f direction %d\n",lag.u.num,espeed,edirection);
+ dbg(lvl_debug,"old 0x%x,0x%x\n",tr->curr_in.x, tr->curr_in.y);
transform_project(pro, &tr->curr_in, espeed*lag.u.num/36, edirection, &tr->curr_in);
- dbg(lvl_warning,"new 0x%x,0x%x\n",tr->curr_in.x, tr->curr_in.y);
+ dbg(lvl_debug,"new 0x%x,0x%x\n",tr->curr_in.x, tr->curr_in.y);
}
tr->time=time;
tr->pro=pro;
@@ -738,11 +738,11 @@ tracking_update(struct tracking *tr, struct vehicle *v, struct vehicleprofile *v
tr->last[0]=tr->curr[0];
tr->last[1]=tr->curr[1];
if (!tr->lines || transform_distance(pro, &tr->last_updated, &tr->curr_in) > 500) {
- dbg(lvl_warning, "update\n");
+ dbg(lvl_debug, "update\n");
tracking_flush(tr);
tracking_doupdate_lines(tr, &tr->curr_in, pro);
tr->last_updated=tr->curr_in;
- dbg(lvl_warning,"update end\n");
+ dbg(lvl_debug,"update end\n");
}
tr->street_direction=0;
@@ -761,7 +761,7 @@ tracking_update(struct tracking *tr, struct vehicle *v, struct vehicleprofile *v
tr->curr[0]=sd->c[i];
tr->curr[1]=sd->c[i+1];
tr->direction_matched=t->angle[i];
- dbg(lvl_warning,"lpnt.x=0x%x,lpnt.y=0x%x pos=%d %d+%d+%d+%d=%d\n", lpnt.x, lpnt.y, i,
+ dbg(lvl_debug,"lpnt.x=0x%x,lpnt.y=0x%x pos=%d %d+%d+%d+%d=%d\n", lpnt.x, lpnt.y, i,
transform_distance_line_sq(&sd->c[i], &sd->c[i+1], &cin, &lpnt_tmp),
tracking_angle_delta(tr, tr->curr_angle, t->angle[i], 0)*tr->angle_pref,
tracking_is_connected(tr, tr->last, &sd->c[i]) ? tr->connected_pref : 0,
@@ -782,7 +782,7 @@ tracking_update(struct tracking *tr, struct vehicle *v, struct vehicleprofile *v
}
t=t->next;
}
- dbg(lvl_warning,"tr->curr_line=%p min=%d\n", tr->curr_line, min);
+ dbg(lvl_debug,"tr->curr_line=%p min=%d\n", tr->curr_line, min);
if (!tr->curr_line || min > tr->offroad_limit_pref) {
tr->curr_out=tr->curr_in;
tr->coord_geo_valid=0;
@@ -794,7 +794,7 @@ tracking_update(struct tracking *tr, struct vehicle *v, struct vehicleprofile *v
} else if (tr->tunnel) {
tr->speed=0;
}
- dbg(lvl_warning,"found 0x%x,0x%x\n", tr->curr_out.x, tr->curr_out.y);
+ dbg(lvl_debug,"found 0x%x,0x%x\n", tr->curr_out.x, tr->curr_out.y);
callback_list_call_attr_0(tr->callback_list, attr_position_coord_geo);
}
@@ -981,7 +981,7 @@ tracking_map_item_coord_get(void *priv_data, struct coord *c, int count)
struct map_rect_priv *this=priv_data;
enum projection pro;
int ret=0;
- dbg(lvl_warning,"enter\n");
+ dbg(lvl_debug,"enter\n");
while (this->ccount < 2 && count > 0) {
pro = map_projection(this->curr->street->item.map);
if (projection_mg != pro) {
@@ -990,7 +990,7 @@ tracking_map_item_coord_get(void *priv_data, struct coord *c, int count)
c ,projection_mg);
} else
*c=this->curr->street->c[this->ccount+this->coord];
- dbg(lvl_warning,"coord %d 0x%x,0x%x\n",this->ccount,c->x,c->y);
+ dbg(lvl_debug,"coord %d 0x%x,0x%x\n",this->ccount,c->x,c->y);
this->ccount++;
ret++;
c++;
@@ -1168,7 +1168,7 @@ tracking_map_get_item(struct map_rect_priv *priv)
priv->item.type=type_tracking_10;
else
priv->item.type=type_tracking_0;
- dbg(lvl_warning,"item %d %d points\n", priv->coord, priv->curr->street->count);
+ dbg(lvl_debug,"item %d %d points\n", priv->coord, priv->curr->street->count);
tracking_map_item_coord_rewind(priv);
tracking_map_item_attr_rewind(priv);
return ret;
diff --git a/navit/transform.c b/navit/transform.c
index a266b9e09..c708fc42b 100644
--- a/navit/transform.c
+++ b/navit/transform.c
@@ -104,7 +104,7 @@ transform_setup_matrix(struct transformation *t)
int scale=t->scale;
int order_dir=-1;
- dbg(lvl_warning,"yaw=%d pitch=%d center=0x%x,0x%x\n", t->yaw, t->pitch, t->map_center.x, t->map_center.y);
+ dbg(lvl_debug,"yaw=%d pitch=%d center=0x%x,0x%x\n", t->yaw, t->pitch, t->map_center.x, t->map_center.y);
t->znear=1 << POST_SHIFT;
t->zfar=300*t->znear;
t->scale_shift=0;
@@ -122,7 +122,7 @@ transform_setup_matrix(struct transformation *t)
scale >>= 1;
}
fac=(1 << POST_SHIFT) * (1 << t->scale_shift) / t->scale;
- dbg(lvl_warning,"scale_shift=%d order=%d scale=%f fac=%f\n", t->scale_shift, t->order,t->scale,fac);
+ dbg(lvl_debug,"scale_shift=%d order=%d scale=%f fac=%f\n", t->scale_shift, t->order,t->scale,fac);
t->m00=rollc*yawc*fac;
t->m01=rollc*yaws*fac;
@@ -139,7 +139,7 @@ transform_setup_matrix(struct transformation *t)
if (t->pitch) {
t->ddd=1;
t->offz=t->screen_dist;
- dbg(lvl_warning,"near %d far %d\n",t->znear,t->zfar);
+ dbg(lvl_debug,"near %d far %d\n",t->znear,t->zfar);
t->xscale=t->xscale3d;
t->yscale=t->yscale3d;
t->wscale=t->wscale3d;
@@ -473,7 +473,7 @@ transform_project_onto_view_plane(struct transformation *t, struct coord_3d c)
{
struct point result;
#if 0
- dbg(lvl_error,"z=%d\n",c.z);
+ dbg(lvl_debug,"z=%d\n",c.z);
#endif
result.x = (long long)c.x*t->xscale/c.z;
result.y = (long long)c.y*t->yscale/c.z;
@@ -628,7 +628,7 @@ static int
transform_reverse_near_far(struct transformation *t, struct point *p, struct coord *c, int near, int far)
{
double xc,yc;
- dbg(lvl_warning,"%d,%d\n",p->x,p->y);
+ dbg(lvl_debug,"%d,%d\n",p->x,p->y);
if (t->ddd) {
struct coord_geo_cart nearc,farc,nears,fars,intersection;
transform_screen_to_3d(t, p, near, &nearc);
@@ -727,12 +727,12 @@ transform_get_selection(struct transformation *this_, enum projection pro, int o
if (this_->pro != pro) {
transform_to_geo(this_->pro, &curri->u.c_rect.lu, &g);
transform_from_geo(pro, &g, &curro->u.c_rect.lu);
- dbg(lvl_warning,"%f,%f", g.lat, g.lng);
+ dbg(lvl_debug,"%f,%f", g.lat, g.lng);
transform_to_geo(this_->pro, &curri->u.c_rect.rl, &g);
transform_from_geo(pro, &g, &curro->u.c_rect.rl);
- dbg(lvl_warning,": - %f,%f\n", g.lat, g.lng);
+ dbg(lvl_debug,": - %f,%f\n", g.lat, g.lng);
}
- dbg(lvl_warning,"transform rect for %d is %d,%d - %d,%d\n", pro, curro->u.c_rect.lu.x, curro->u.c_rect.lu.y, curro->u.c_rect.rl.x, curro->u.c_rect.rl.y);
+ dbg(lvl_debug,"transform rect for %d is %d,%d - %d,%d\n", pro, curro->u.c_rect.lu.x, curro->u.c_rect.lu.y, curro->u.c_rect.rl.x, curro->u.c_rect.rl.y);
curro->order+=order;
#if 0
curro->u.c_rect.lu.x-=500;
@@ -920,7 +920,7 @@ transform_setup_source_rect(struct transformation *t)
if (transform_zplane_intersection(&cg[edgenodes[i*2]], &cg[edgenodes[i*2+1]], HOG(*t), &tmp) == 1) {
c.x=tmp.x*(1 << t->scale_shift)+t->map_center.x;
c.y=tmp.y*(1 << t->scale_shift)+t->map_center.y;
- dbg(lvl_warning,"intersection with edge %d at 0x%x,0x%x\n",i,c.x,c.y);
+ dbg(lvl_debug,"intersection with edge %d at 0x%x,0x%x\n",i,c.x,c.y);
if (valid)
coord_rect_extend(&msm->u.c_rect, &c);
else {
@@ -928,20 +928,20 @@ transform_setup_source_rect(struct transformation *t)
msm->u.c_rect.rl=c;
valid=1;
}
- dbg(lvl_warning,"rect 0x%x,0x%x - 0x%x,0x%x\n",msm->u.c_rect.lu.x,msm->u.c_rect.lu.y,msm->u.c_rect.rl.x,msm->u.c_rect.rl.y);
+ dbg(lvl_debug,"rect 0x%x,0x%x - 0x%x,0x%x\n",msm->u.c_rect.lu.x,msm->u.c_rect.lu.y,msm->u.c_rect.rl.x,msm->u.c_rect.rl.y);
}
}
} else {
for (i = 0 ; i < 4 ; i++) {
transform_reverse(t, &screen_pnt[i], &screen[i]);
- dbg(lvl_warning,"map(%d) %d,%d=0x%x,0x%x\n", i,screen_pnt[i].x, screen_pnt[i].y, screen[i].x, screen[i].y);
+ dbg(lvl_debug,"map(%d) %d,%d=0x%x,0x%x\n", i,screen_pnt[i].x, screen_pnt[i].y, screen[i].x, screen[i].y);
}
msm->u.c_rect.lu.x=min4(screen[0].x,screen[1].x,screen[2].x,screen[3].x);
msm->u.c_rect.rl.x=max4(screen[0].x,screen[1].x,screen[2].x,screen[3].x);
msm->u.c_rect.rl.y=min4(screen[0].y,screen[1].y,screen[2].y,screen[3].y);
msm->u.c_rect.lu.y=max4(screen[0].y,screen[1].y,screen[2].y,screen[3].y);
}
- dbg(lvl_warning,"%dx%d\n", msm->u.c_rect.rl.x-msm->u.c_rect.lu.x,
+ dbg(lvl_debug,"%dx%d\n", msm->u.c_rect.rl.x-msm->u.c_rect.lu.x,
msm->u.c_rect.lu.y-msm->u.c_rect.rl.y);
*msm_last=msm;
msm_last=&msm->next;
@@ -966,7 +966,7 @@ transform_set_scale(struct transformation *t, long scale)
int
transform_get_order(struct transformation *t)
{
- dbg(lvl_warning,"order %d\n", t->order);
+ dbg(lvl_debug,"order %d\n", t->order);
return t->order;
}
diff --git a/navit/util.c b/navit/util.c
index a51c804b5..2cceae460 100644
--- a/navit/util.c
+++ b/navit/util.c
@@ -509,7 +509,7 @@ spawn_process(char **argv)
pid_t pid;
sigset_t set, old;
- dbg(lvl_warning,"spawning process for '%s'\n", argv[0]);
+ dbg(lvl_debug,"spawning process for '%s'\n", argv[0]);
sigemptyset(&set);
sigaddset(&set,SIGCHLD);
spawn_process_sigmask(SIG_BLOCK,&set,&old);
@@ -550,7 +550,7 @@ spawn_process(char **argv)
args=newSysString(cmdline);
cmd = newSysString(argv[0]);
dwRet=CreateProcess(cmd, args, NULL, NULL, 0, 0, NULL, NULL, NULL, &(r->pr));
- dbg(lvl_error, "CreateProcess(%s,%s), PID=%i\n",argv[0],cmdline,r->pr.dwProcessId);
+ dbg(lvl_debug, "CreateProcess(%s,%s), PID=%i\n",argv[0],cmdline,r->pr.dwProcessId);
g_free(cmd);
#else
TCHAR* args;
@@ -560,7 +560,7 @@ spawn_process(char **argv)
cmdline=spawn_process_compose_cmdline(argv);
args=newSysString(cmdline);
dwRet=CreateProcess(NULL, args, NULL, NULL, 0, 0, NULL, NULL, &startupInfo, &(r->pr));
- dbg(lvl_error, "CreateProcess(%s), PID=%i\n",cmdline,r->pr.dwProcessId);
+ dbg(lvl_debug, "CreateProcess(%s), PID=%i\n",cmdline,r->pr.dwProcessId);
#endif
g_free(cmdline);
g_free(args);
@@ -633,9 +633,9 @@ int spawn_process_check_status(struct spawn_process_info *pi, int block)
pi->status=WEXITSTATUS(status);
return pi->status;
if(WIFSTOPPED(status)) {
- dbg(lvl_error,"child is stopped by %i signal\n",WSTOPSIG(status));
+ dbg(lvl_debug,"child is stopped by %i signal\n",WSTOPSIG(status));
} else if (WIFSIGNALED(status)) {
- dbg(lvl_error,"child terminated by signal %i\n",WEXITSTATUS(status));
+ dbg(lvl_debug,"child terminated by signal %i\n",WEXITSTATUS(status));
pi->status=255;
return 255;
}
diff --git a/navit/vehicle.c b/navit/vehicle.c
index 19ad1020e..c8ad5a84e 100644
--- a/navit/vehicle.c
+++ b/navit/vehicle.c
@@ -109,7 +109,7 @@ vehicle_new(struct attr *parent, struct attr **attrs)
char *type, *colon;
struct pcoord center;
- dbg(lvl_warning, "enter\n");
+ dbg(lvl_debug, "enter\n");
source = attr_search(attrs, NULL, attr_source);
if (!source) {
dbg(lvl_error, "incomplete vehicle definition: missing attribute 'source'\n");
@@ -120,7 +120,7 @@ vehicle_new(struct attr *parent, struct attr **attrs)
colon = strchr(type, ':');
if (colon)
*colon = '\0';
- dbg(lvl_warning, "source='%s' type='%s'\n", source->u.str, type);
+ dbg(lvl_debug, "source='%s' type='%s'\n", source->u.str, type);
vehicletype_new = plugin_get_vehicle_type(type);
if (!vehicletype_new) {
@@ -148,7 +148,7 @@ vehicle_new(struct attr *parent, struct attr **attrs)
this_->trans=transform_new(&center, 16, 0);
vehicle_set_default_name(this_);
- dbg(lvl_warning, "leave\n");
+ dbg(lvl_debug, "leave\n");
this_->log_to_cb=g_hash_table_new(NULL,NULL);
return this_;
}
@@ -161,7 +161,7 @@ vehicle_new(struct attr *parent, struct attr **attrs)
void
vehicle_destroy(struct vehicle *this_)
{
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
if (this_->animate_callback) {
callback_destroy(this_->animate_callback);
event_remove_timeout(this_->animate_timer);
@@ -373,8 +373,8 @@ vehicle_draw(struct vehicle *this_, struct graphics *gra, struct point *pnt, int
{
if (angle < 0)
angle+=360;
- dbg(lvl_warning,"enter this=%p gra=%p pnt=%p lazy=%d dir=%d speed=%d\n", this_, gra, pnt, lazy, angle, speed);
- dbg(lvl_warning,"point %d,%d\n", pnt->x, pnt->y);
+ dbg(lvl_debug,"enter this=%p gra=%p pnt=%p lazy=%d dir=%d speed=%d\n", this_, gra, pnt, lazy, angle, speed);
+ dbg(lvl_debug,"point %d,%d\n", pnt->x, pnt->y);
this_->cursor_pnt=*pnt;
this_->angle=angle;
this_->speed=speed;
@@ -448,7 +448,7 @@ vehicle_draw_do(struct vehicle *this_, int lazy)
while (*attr) {
if ((*attr)->type == attr_itemgra) {
struct itemgra *itm=(*attr)->u.itemgra;
- dbg(lvl_warning,"speed %d-%d %d\n", itm->speed_range.min, itm->speed_range.max, speed);
+ dbg(lvl_debug,"speed %d-%d %d\n", itm->speed_range.min, itm->speed_range.max, speed);
if (speed >= itm->speed_range.min && speed <= itm->speed_range.max &&
angle >= itm->angle_range.min && angle <= itm->angle_range.max &&
sequence >= itm->sequence_range.min && sequence <= itm->sequence_range.max) {
@@ -669,7 +669,7 @@ vehicle_log_binfile(struct vehicle *this_, struct log *log)
buffer_new=g_malloc((buffer[0]+3)*sizeof(int));
memcpy(buffer_new, buffer, (buffer[0]+1)*sizeof(int));
}
- dbg(lvl_warning,"c=0x%x,0x%x\n",c.x,c.y);
+ dbg(lvl_debug,"c=0x%x,0x%x\n",c.x,c.y);
buffer_new[buffer_new[0]+1]=c.x;
buffer_new[buffer_new[0]+2]=c.y;
buffer_new[0]+=2;
diff --git a/navit/vehicle/android/vehicle_android.c b/navit/vehicle/android/vehicle_android.c
index 31f130315..03ac56649 100644
--- a/navit/vehicle/android/vehicle_android.c
+++ b/navit/vehicle/android/vehicle_android.c
@@ -67,7 +67,7 @@ struct vehicle_priv {
static void
vehicle_android_destroy(struct vehicle_priv *priv)
{
- dbg(lvl_error,"enter\n");
+ dbg(lvl_debug,"enter\n");
g_free(priv);
}
@@ -83,7 +83,7 @@ static int
vehicle_android_position_attr_get(struct vehicle_priv *priv,
enum attr_type type, struct attr *attr)
{
- dbg(lvl_warning,"enter %s\n",attr_to_name(type));
+ dbg(lvl_debug,"enter %s\n",attr_to_name(type));
switch (type) {
case attr_position_fix_type:
attr->u.num = priv->fix_type;
@@ -120,7 +120,7 @@ vehicle_android_position_attr_get(struct vehicle_priv *priv,
default:
return 0;
}
- dbg(lvl_warning,"ok\n");
+ dbg(lvl_debug,"ok\n");
attr->type = type;
return 1;
}
@@ -142,7 +142,7 @@ static void
vehicle_android_position_callback(struct vehicle_priv *v, jobject location) {
time_t tnow;
struct tm *tm;
- dbg(lvl_warning,"enter\n");
+ dbg(lvl_debug,"enter\n");
v->geo.lat = (*jnienv)->CallDoubleMethod(jnienv, location, v->Location_getLatitude);
v->geo.lng = (*jnienv)->CallDoubleMethod(jnienv, location, v->Location_getLongitude);
@@ -153,7 +153,7 @@ vehicle_android_position_callback(struct vehicle_priv *v, jobject location) {
tnow=(*jnienv)->CallLongMethod(jnienv, location, v->Location_getTime)/1000;
tm = gmtime(&tnow);
strftime(v->fixiso8601, sizeof(v->fixiso8601), "%Y-%m-%dT%TZ", tm);
- dbg(lvl_warning,"lat %f lon %f time %s\n",v->geo.lat,v->geo.lng,v->fixiso8601);
+ dbg(lvl_debug,"lat %f lon %f time %s\n",v->geo.lat,v->geo.lng,v->fixiso8601);
if (v->valid != attr_position_valid_valid) {
v->valid = attr_position_valid_valid;
callback_list_call_attr_0(v->cbl, attr_position_valid);
@@ -236,6 +236,7 @@ vehicle_android_init(struct vehicle_priv *ret)
if (!android_find_class_global("org/navitproject/navit/NavitVehicle", &ret->NavitVehicleClass))
return 0;
<<<<<<< HEAD
+<<<<<<< HEAD
dbg(0,"at 3\n");
cid = (*jnienv)->GetMethodID(jnienv, ret->NavitVehicleClass, "<init>", "(Landroid/content/Context;III)V");
||||||| merged common ancestors
@@ -243,6 +244,11 @@ vehicle_android_init(struct vehicle_priv *ret)
cid = (*jnienv)->GetMethodID(jnienv, ret->NavitVehicleClass, "<init>", "(Landroid/content/Context;I)V");
=======
dbg(lvl_error,"at 3\n");
+||||||| merged common ancestors
+ dbg(lvl_error,"at 3\n");
+=======
+ dbg(lvl_debug,"at 3\n");
+>>>>>>> Fix:core:Change all logging at lvl_error/warning to lvl_debug, unless it looks like an error message.|#1269, part 5
cid = (*jnienv)->GetMethodID(jnienv, ret->NavitVehicleClass, "<init>", "(Landroid/content/Context;I)V");
>>>>>>> Refactor:core:Introduce enum for debug levels, and use it everywhere.|First part of #1269.
if (cid == NULL) {
@@ -250,6 +256,7 @@ vehicle_android_init(struct vehicle_priv *ret)
return 0; /* exception thrown */
}
<<<<<<< HEAD
+<<<<<<< HEAD
dbg(0,"at 4 android_activity=%p\n",android_activity);
ret->NavitVehicle=(*jnienv)->NewObject(jnienv, ret->NavitVehicleClass, cid, android_activity, (int) ret->pcb, (int) ret->scb, (int) ret->fcb);
dbg(0,"result=%p\n",ret->NavitVehicle);
@@ -259,9 +266,20 @@ vehicle_android_init(struct vehicle_priv *ret)
dbg(0,"result=%p\n",ret->NavitVehicle);
=======
dbg(lvl_error,"at 4 android_activity=%p\n",android_activity);
+||||||| merged common ancestors
+ dbg(lvl_error,"at 4 android_activity=%p\n",android_activity);
+=======
+ dbg(lvl_debug,"at 4 android_activity=%p\n",android_activity);
+>>>>>>> Fix:core:Change all logging at lvl_error/warning to lvl_debug, unless it looks like an error message.|#1269, part 5
ret->NavitVehicle=(*jnienv)->NewObject(jnienv, ret->NavitVehicleClass, cid, android_activity, (int) ret->cb);
+<<<<<<< HEAD
dbg(lvl_error,"result=%p\n",ret->NavitVehicle);
>>>>>>> Refactor:core:Introduce enum for debug levels, and use it everywhere.|First part of #1269.
+||||||| merged common ancestors
+ dbg(lvl_error,"result=%p\n",ret->NavitVehicle);
+=======
+ dbg(lvl_debug,"result=%p\n",ret->NavitVehicle);
+>>>>>>> Fix:core:Change all logging at lvl_error/warning to lvl_debug, unless it looks like an error message.|#1269, part 5
if (!ret->NavitVehicle)
return 0;
if (ret->NavitVehicle)
@@ -285,7 +303,7 @@ vehicle_android_new_android(struct vehicle_methods *meth,
{
struct vehicle_priv *ret;
- dbg(lvl_error, "enter\n");
+ dbg(lvl_debug, "enter\n");
ret = g_new0(struct vehicle_priv, 1);
ret->cbl = cbl;
ret->pcb = callback_new_1(callback_cast(vehicle_android_position_callback), ret);
@@ -296,7 +314,7 @@ vehicle_android_new_android(struct vehicle_methods *meth,
ret->sats_used = 0;
*meth = vehicle_android_methods;
vehicle_android_init(ret);
- dbg(lvl_error, "return\n");
+ dbg(lvl_debug, "return\n");
return ret;
}
@@ -308,6 +326,6 @@ vehicle_android_new_android(struct vehicle_methods *meth,
void
plugin_init(void)
{
- dbg(lvl_error, "enter\n");
+ dbg(lvl_debug, "enter\n");
plugin_register_vehicle_type("android", vehicle_android_new_android);
}
diff --git a/navit/vehicle/demo/vehicle_demo.c b/navit/vehicle/demo/vehicle_demo.c
index f25918524..c5cf7e045 100644
--- a/navit/vehicle/demo/vehicle_demo.c
+++ b/navit/vehicle/demo/vehicle_demo.c
@@ -163,7 +163,7 @@ vehicle_demo_set_attr_do(struct vehicle_priv *priv, struct attr *attr)
callback_list_call_attr_0(priv->cbl, attr_position_valid);
}
priv->position_set=1;
- dbg(lvl_warning,"position_set %f %f\n", priv->geo.lat, priv->geo.lng);
+ dbg(lvl_debug,"position_set %f %f\n", priv->geo.lat, priv->geo.lng);
break;
case attr_profilename:
case attr_source:
@@ -200,7 +200,7 @@ vehicle_demo_timer(struct vehicle_priv *priv)
struct item *item=NULL;
len = (priv->config_speed * priv->interval / 1000)/ 3.6;
- dbg(lvl_warning, "###### Entering simulation loop\n");
+ dbg(lvl_debug, "###### Entering simulation loop\n");
if (!priv->config_speed)
return;
if (priv->route)
@@ -219,8 +219,8 @@ vehicle_demo_timer(struct vehicle_priv *priv)
item=map_rect_get_item(mr);
if (item && item_coord_get(item, &pos, 1)) {
priv->position_set=0;
- dbg(lvl_warning, "current pos=0x%x,0x%x\n", pos.x, pos.y);
- dbg(lvl_warning, "last pos=0x%x,0x%x\n", priv->last.x, priv->last.y);
+ dbg(lvl_debug, "current pos=0x%x,0x%x\n", pos.x, pos.y);
+ dbg(lvl_debug, "last pos=0x%x,0x%x\n", priv->last.x, priv->last.y);
if (priv->last.x == pos.x && priv->last.y == pos.y) {
dbg(lvl_warning, "endless loop\n");
}
@@ -230,9 +230,9 @@ vehicle_demo_timer(struct vehicle_priv *priv)
item=map_rect_get_item(mr);
continue;
}
- dbg(lvl_warning, "next pos=0x%x,0x%x\n", c.x, c.y);
+ dbg(lvl_debug, "next pos=0x%x,0x%x\n", c.x, c.y);
slen = transform_distance(projection_mg, &pos, &c);
- dbg(lvl_warning, "len=%d slen=%d\n", len, slen);
+ dbg(lvl_debug, "len=%d slen=%d\n", len, slen);
if (slen < len) {
len -= slen;
pos = c;
@@ -249,9 +249,9 @@ vehicle_demo_timer(struct vehicle_priv *priv)
ci.x = pos.x;
ci.y = pos.y;
priv->speed=0;
- dbg(lvl_error,"destination reached\n");
+ dbg(lvl_debug,"destination reached\n");
}
- dbg(lvl_warning, "ci=0x%x,0x%x\n", ci.x, ci.y);
+ dbg(lvl_debug, "ci=0x%x,0x%x\n", ci.x, ci.y);
transform_to_geo(projection_mg, &ci,
&priv->geo);
if (priv->valid != attr_position_valid_valid) {
@@ -279,7 +279,7 @@ vehicle_demo_new(struct vehicle_methods
{
struct vehicle_priv *ret;
- dbg(lvl_warning, "enter\n");
+ dbg(lvl_debug, "enter\n");
ret = g_new0(struct vehicle_priv, 1);
ret->cbl = cbl;
ret->interval=1000;
@@ -297,6 +297,6 @@ vehicle_demo_new(struct vehicle_methods
void
plugin_init(void)
{
- dbg(lvl_warning, "enter\n");
+ dbg(lvl_debug, "enter\n");
plugin_register_vehicle_type("demo", vehicle_demo_new);
}
diff --git a/navit/vehicle/file/vehicle_file.c b/navit/vehicle/file/vehicle_file.c
index f82e33fd5..f7a0024b9 100644
--- a/navit/vehicle/file/vehicle_file.c
+++ b/navit/vehicle/file/vehicle_file.c
@@ -148,7 +148,7 @@ static int vehicle_win32_serial_track(struct vehicle_priv *priv)
int rc = 0;
int dwBytes;
- dbg(lvl_warning, "enter, *priv='%x', priv->source='%s'\n", priv, priv->source);
+ dbg(lvl_debug, "enter, *priv='%x', priv->source='%s'\n", priv, priv->source);
if ( priv->no_data_count > 5 )
{
@@ -329,7 +329,7 @@ vehicle_file_open(struct vehicle_priv *priv)
static void
vehicle_file_close(struct vehicle_priv *priv)
{
- dbg(lvl_warning, "enter, priv->fd='%d'\n", priv->fd);
+ dbg(lvl_debug, "enter, priv->fd='%d'\n", priv->fd);
vehicle_file_disable_watch(priv);
#ifdef _WIN32
if(priv->file_type == file_type_serial)
@@ -369,7 +369,7 @@ vehicle_file_close(struct vehicle_priv *priv)
static int
vehicle_file_enable_watch_timer(struct vehicle_priv *priv)
{
- dbg(lvl_warning, "enter\n");
+ dbg(lvl_debug, "enter\n");
vehicle_file_enable_watch(priv);
return FALSE;
@@ -603,7 +603,7 @@ vehicle_file_parse(struct vehicle_priv *priv, char *buffer)
*/
if (item[1]) {
priv->magnetic_direction = g_ascii_strtod( item[1], NULL );
- dbg(lvl_warning,"magnetic %d\n", priv->magnetic_direction);
+ dbg(lvl_debug,"magnetic %d\n", priv->magnetic_direction);
}
}
return ret;
@@ -624,7 +624,7 @@ vehicle_file_io(struct vehicle_priv *priv)
{
int size, rc = 0;
char *str, *tok;
- dbg(lvl_warning, "vehicle_file_io : enter\n");
+ dbg(lvl_debug, "vehicle_file_io : enter\n");
if (priv->process_statefile) {
unsigned char *data;
@@ -657,12 +657,12 @@ vehicle_file_io(struct vehicle_priv *priv)
}
priv->buffer_pos += size;
priv->buffer[priv->buffer_pos] = '\0';
- dbg(lvl_warning, "size=%d pos=%d buffer='%s'\n", size,
+ dbg(lvl_debug, "size=%d pos=%d buffer='%s'\n", size,
priv->buffer_pos, priv->buffer);
str = priv->buffer;
while ((tok = strchr(str, '\n'))) {
*tok++ = '\0';
- dbg(lvl_warning, "line='%s'\n", str);
+ dbg(lvl_debug, "line='%s'\n", str);
rc +=vehicle_file_parse(priv, str);
str = tok;
if (priv->file_type == file_type_file && rc)
@@ -673,10 +673,10 @@ vehicle_file_io(struct vehicle_priv *priv)
size = priv->buffer + priv->buffer_pos - str;
memmove(priv->buffer, str, size + 1);
priv->buffer_pos = size;
- dbg(lvl_warning, "now pos=%d buffer='%s'\n",
+ dbg(lvl_debug, "now pos=%d buffer='%s'\n",
priv->buffer_pos, priv->buffer);
} else if (priv->buffer_pos == buffer_size - 1) {
- dbg(lvl_error,
+ dbg(lvl_debug,
"Overflow. Most likely wrong baud rate or no nmea protocol\n");
priv->buffer_pos = 0;
}
@@ -695,7 +695,7 @@ vehicle_file_io(struct vehicle_priv *priv)
static void
vehicle_file_enable_watch(struct vehicle_priv *priv)
{
- dbg(lvl_warning, "enter\n");
+ dbg(lvl_debug, "enter\n");
#ifdef _WIN32
// add an event : don't use glib timers and g_timeout_add
if (priv->file_type == file_type_serial)
@@ -723,7 +723,7 @@ vehicle_file_enable_watch(struct vehicle_priv *priv)
static void
vehicle_file_disable_watch(struct vehicle_priv *priv)
{
- dbg(lvl_warning, "vehicle_file_disable_watch : enter\n");
+ dbg(lvl_debug, "vehicle_file_disable_watch : enter\n");
#ifdef _WIN32
if(priv->file_type == file_type_serial)
{
@@ -844,7 +844,7 @@ vehicle_file_position_attr_get(struct vehicle_priv *priv,
attr->u.str=priv->fixiso8601;
break;
case attr_position_sat_item:
- dbg(lvl_error,"at here\n");
+ dbg(lvl_debug,"at here\n");
priv->sat_item.id_lo++;
if (priv->sat_item.id_lo > priv->current_count) {
priv->sat_item.id_lo=0;
@@ -951,7 +951,7 @@ vehicle_file_new_file(struct vehicle_methods
struct attr *checksum_ignore;
struct attr *state_file;
- dbg(lvl_warning, "enter\n");
+ dbg(lvl_debug, "enter\n");
source = attr_search(attrs, NULL, attr_source);
if(source == NULL){
@@ -1009,7 +1009,7 @@ vehicle_file_new_file(struct vehicle_methods
ret->on_eof=1;
if (on_eof && !g_ascii_strcasecmp(on_eof->u.str, "exit"))
ret->on_eof=2;
- dbg(lvl_error,"on_eof=%d\n", ret->on_eof);
+ dbg(lvl_debug,"on_eof=%d\n", ret->on_eof);
*meth = vehicle_file_methods;
ret->cb=callback_new_1(callback_cast(vehicle_file_io), ret);
ret->cbt=callback_new_1(callback_cast(vehicle_file_enable_watch_timer), ret);
@@ -1025,7 +1025,7 @@ vehicle_file_new_file(struct vehicle_methods
ret->no_data_count = 0;
#endif
- dbg(lvl_warning, "vehicle_file_new_file:open\n");
+ dbg(lvl_debug, "vehicle_file_new_file:open\n");
if (!vehicle_file_open(ret)) {
dbg(lvl_error, "Failed to open '%s'\n", ret->source);
}
@@ -1033,7 +1033,7 @@ vehicle_file_new_file(struct vehicle_methods
vehicle_file_enable_watch(ret);
// vehicle_file_destroy(ret);
// return NULL;
- dbg(lvl_warning, "leave\n");
+ dbg(lvl_debug, "leave\n");
return ret;
}
@@ -1045,7 +1045,7 @@ vehicle_file_new_file(struct vehicle_methods
**/
void plugin_init(void)
{
- dbg(lvl_warning, "vehicle_file:plugin_init:enter\n");
+ dbg(lvl_debug, "vehicle_file:plugin_init:enter\n");
plugin_register_vehicle_type("file", vehicle_file_new_file);
plugin_register_vehicle_type("pipe", vehicle_file_new_file);
plugin_register_vehicle_type("socket", vehicle_file_new_file);
diff --git a/navit/vehicle/gpsd/vehicle_gpsd.c b/navit/vehicle/gpsd/vehicle_gpsd.c
index a871cb074..aa3b62eec 100644
--- a/navit/vehicle/gpsd/vehicle_gpsd.c
+++ b/navit/vehicle/gpsd/vehicle_gpsd.c
@@ -101,7 +101,7 @@ vehicle_gpsd_callback(struct gps_data_t *data, const char *buf, size_t len,
}
}
}
- dbg(lvl_warning,"data->set="LONGLONG_HEX_FMT"\n", data->set);
+ dbg(lvl_debug,"data->set="LONGLONG_HEX_FMT"\n", data->set);
if (data->set & SPEED_SET) {
priv->speed = data->fix.speed * 3.6;
if(!isnan(data->fix.speed))
@@ -164,12 +164,12 @@ vehicle_gpsd_callback(struct gps_data_t *data, const char *buf, size_t len,
}
#ifdef HAVE_LIBGPS19
if (data->set & DOP_SET) {
- dbg(lvl_warning, "pdop : %g\n", data->dop.pdop);
+ dbg(lvl_debug, "pdop : %g\n", data->dop.pdop);
priv->hdop = data->dop.pdop;
data->set &= ~DOP_SET;
#else
if (data->set & PDOP_SET) {
- dbg(lvl_warning, "pdop : %g\n", data->pdop);
+ dbg(lvl_debug, "pdop : %g\n", data->pdop);
priv->hdop = data->hdop;
data->set &= ~PDOP_SET;
#endif
@@ -177,7 +177,7 @@ vehicle_gpsd_callback(struct gps_data_t *data, const char *buf, size_t len,
if (data->set & LATLON_SET) {
priv->geo.lat = data->fix.latitude;
priv->geo.lng = data->fix.longitude;
- dbg(lvl_warning,"lat=%f lng=%f\n", priv->geo.lat, priv->geo.lng);
+ dbg(lvl_debug,"lat=%f lng=%f\n", priv->geo.lat, priv->geo.lng);
g_free(priv->nmea_data);
priv->nmea_data=priv->nmea_data_buf;
priv->nmea_data_buf=NULL;
@@ -205,7 +205,7 @@ vehicle_gpsd_try_open(struct vehicle_priv *priv)
*colon = '\0';
port=colon+1;
}
- dbg(lvl_error,"Trying to connect to %s:%s\n",source+7,port?port:"default");
+ dbg(lvl_debug,"Trying to connect to %s:%s\n",source+7,port?port:"default");
#if GPSD_API_MAJOR_VERSION >= 5
/* gps_open returns 0 on success */
@@ -238,7 +238,7 @@ vehicle_gpsd_try_open(struct vehicle_priv *priv)
if (!priv->gps->gps_fd) {
dbg(lvl_error,"Warning: gps_fd is 0, most likely you have used a gps.h incompatible to libgps");
}
- dbg(lvl_error,"Connected to gpsd fd=%d evwatch=%p\n", priv->gps->gps_fd, priv->evwatch);
+ dbg(lvl_debug,"Connected to gpsd fd=%d evwatch=%p\n", priv->gps->gps_fd, priv->evwatch);
event_remove_timeout(priv->retry_timer2);
priv->retry_timer2=NULL;
return FALSE;
@@ -261,7 +261,7 @@ vehicle_gpsd_open(struct vehicle_priv *priv)
errno, strerror(errno), errstr);
}
sleep(1); /* give gpsd time to start */
- dbg(lvl_warning,"gpsbt_start: completed\n");
+ dbg(lvl_debug,"gpsbt_start: completed\n");
#endif
priv->retry_timer2=NULL;
if (vehicle_gpsd_try_open(priv))
@@ -303,14 +303,14 @@ vehicle_gpsd_close(struct vehicle_priv *priv)
if (err < 0) {
dbg(lvl_error,"Error %d while gpsbt_stop", err);
}
- dbg(lvl_warning,"gpsbt_stop: completed, (%d)",err);
+ dbg(lvl_debug,"gpsbt_stop: completed, (%d)",err);
#endif
}
static void
vehicle_gpsd_io(struct vehicle_priv *priv)
{
- dbg(lvl_warning, "enter\n");
+ dbg(lvl_debug, "enter\n");
if (priv->gps) {
vehicle_last = priv;
#if GPSD_API_MAJOR_VERSION >= 5
@@ -427,7 +427,7 @@ vehicle_gpsd_new_gpsd(struct vehicle_methods
struct vehicle_priv *ret;
struct attr *source, *query, *retry_int;
- dbg(lvl_warning, "enter\n");
+ dbg(lvl_debug, "enter\n");
source = attr_search(attrs, NULL, attr_source);
ret = g_new0(struct vehicle_priv, 1);
#if GPSD_API_MAJOR_VERSION >= 5
@@ -440,7 +440,7 @@ vehicle_gpsd_new_gpsd(struct vehicle_methods
} else {
ret->gpsd_query = g_strdup("w+x\n");
}
- dbg(lvl_warning,"Format string for gpsd_query: %s\n",ret->gpsd_query);
+ dbg(lvl_debug,"Format string for gpsd_query: %s\n",ret->gpsd_query);
retry_int = attr_search(attrs, NULL, attr_retry_interval);
if (retry_int) {
ret->retry_interval = retry_int->u.num;
@@ -449,7 +449,7 @@ vehicle_gpsd_new_gpsd(struct vehicle_methods
ret->retry_interval = MIN_RETRY_INTERVAL;
}
} else {
- dbg(lvl_warning, "Retry interval not defined, setting to %d\n", DEFAULT_RETRY_INTERVAL);
+ dbg(lvl_debug, "Retry interval not defined, setting to %d\n", DEFAULT_RETRY_INTERVAL);
ret->retry_interval = DEFAULT_RETRY_INTERVAL;
}
ret->cbl = cbl;
@@ -462,6 +462,6 @@ vehicle_gpsd_new_gpsd(struct vehicle_methods
void
plugin_init(void)
{
- dbg(lvl_warning, "enter\n");
+ dbg(lvl_debug, "enter\n");
plugin_register_vehicle_type("gpsd", vehicle_gpsd_new_gpsd);
}
diff --git a/navit/vehicle/gpsd_dbus/vehicle_gpsd_dbus.c b/navit/vehicle/gpsd_dbus/vehicle_gpsd_dbus.c
index c599d3cc4..dda774e35 100644
--- a/navit/vehicle/gpsd_dbus/vehicle_gpsd_dbus.c
+++ b/navit/vehicle/gpsd_dbus/vehicle_gpsd_dbus.c
@@ -243,6 +243,6 @@ vehicle_gpsd_dbus_new(struct vehicle_methods
void
plugin_init(void)
{
- dbg(lvl_warning, "enter\n");
+ dbg(lvl_debug, "enter\n");
plugin_register_vehicle_type("gpsd_dbus", vehicle_gpsd_dbus_new);
}
diff --git a/navit/vehicle/gypsy/vehicle_gypsy.c b/navit/vehicle/gypsy/vehicle_gypsy.c
index f63312bda..2ff9389f7 100644
--- a/navit/vehicle/gypsy/vehicle_gypsy.c
+++ b/navit/vehicle/gypsy/vehicle_gypsy.c
@@ -286,7 +286,7 @@ vehicle_gypsy_try_open(gpointer *data)
}
vehicle_last = priv;
- dbg(lvl_error,"gypsy connected to %d\n", source+8);
+ dbg(lvl_debug,"gypsy connected to %d\n", source+8);
g_free(source);
return FALSE;
}
@@ -461,7 +461,7 @@ vehicle_gypsy_new_gypsy(struct vehicle_methods *meth,
}
}
#endif
- dbg(lvl_warning, "enter\n");
+ dbg(lvl_debug, "enter\n");
source = attr_search(attrs, NULL, attr_source);
ret = g_new0(struct vehicle_priv, 1);
ret->have_cords = 0;
@@ -492,6 +492,6 @@ vehicle_gypsy_new_gypsy(struct vehicle_methods *meth,
void
plugin_init(void)
{
- dbg(lvl_warning, "enter\n");
+ dbg(lvl_debug, "enter\n");
plugin_register_vehicle_type("gypsy", vehicle_gypsy_new_gypsy);
}
diff --git a/navit/vehicle/iphone/vehicle_iphone.c b/navit/vehicle/iphone/vehicle_iphone.c
index ad5fd6ea1..4c25c0235 100644
--- a/navit/vehicle/iphone/vehicle_iphone.c
+++ b/navit/vehicle/iphone/vehicle_iphone.c
@@ -119,7 +119,7 @@ vehicle_iphone_update(void *arg,
strcpy(priv->str_time, str_time);
priv->radius = radius;
- dbg(lvl_error,"position_get lat:%f lng:%f (spd:%f dir:%f time:%s)\n", priv->geo.lat, priv->geo.lng, priv->speed, priv->direction, priv->str_time);
+ dbg(lvl_debug,"position_get lat:%f lng:%f (spd:%f dir:%f time:%s)\n", priv->geo.lat, priv->geo.lng, priv->speed, priv->direction, priv->str_time);
callback_list_call_attr_0(priv->cbl, attr_position_coord_geo);
}
@@ -133,7 +133,7 @@ vehicle_iphone_new(struct vehicle_methods
struct vehicle_priv *ret;
struct attr *interval,*speed,*position_coord_geo;
- dbg(lvl_warning, "enter\n");
+ dbg(lvl_debug, "enter\n");
ret = g_new0(struct vehicle_priv, 1);
ret->cbl = cbl;
ret->interval=1000;
@@ -146,7 +146,7 @@ vehicle_iphone_new(struct vehicle_methods
if ((position_coord_geo=attr_search(attrs, NULL, attr_position_coord_geo))) {
ret->geo=*(position_coord_geo->u.coord_geo);
ret->position_set=1;
- dbg(lvl_error,"position_set %f %f\n", ret->geo.lat, ret->geo.lng);
+ dbg(lvl_debug,"position_set %f %f\n", ret->geo.lat, ret->geo.lng);
}
*meth = vehicle_iphone_methods;
ret->str_time[0] = '\0';
@@ -160,6 +160,6 @@ vehicle_iphone_new(struct vehicle_methods
void
plugin_init(void)
{
- dbg(lvl_warning, "enter\n");
+ dbg(lvl_debug, "enter\n");
plugin_register_vehicle_type("iphone", vehicle_iphone_new);
}
diff --git a/navit/vehicle/maemo/vehicle_maemo.c b/navit/vehicle/maemo/vehicle_maemo.c
index 67a311862..661202d67 100644
--- a/navit/vehicle/maemo/vehicle_maemo.c
+++ b/navit/vehicle/maemo/vehicle_maemo.c
@@ -67,7 +67,7 @@ static void vehicle_maemo_callback(LocationGPSDevice *device, gpointer user_data
priv->sats_used=device->satellites_in_use;
callback_list_call_attr_0(priv->cbl, attr_position_sats);
- dbg(lvl_warning,"Got update with %u/%u satellites\n",priv->sats_used,priv->sats);
+ dbg(lvl_debug,"Got update with %u/%u satellites\n",priv->sats_used,priv->sats);
if (device->fix) {
switch(device->fix->mode) {
@@ -86,28 +86,28 @@ static void vehicle_maemo_callback(LocationGPSDevice *device, gpointer user_data
priv->geo.lng=device->fix->longitude;
priv->hdop=device->fix->eph/100;
callback_list_call_attr_0(priv->cbl, attr_position_coord_geo);
- dbg(lvl_warning,"Position: %f %f with error %f meters\n",priv->geo.lat,priv->geo.lng,priv->hdop);
+ dbg(lvl_debug,"Position: %f %f with error %f meters\n",priv->geo.lat,priv->geo.lng,priv->hdop);
}
if (device->fix->fields & LOCATION_GPS_DEVICE_SPEED_SET) {
priv->speed=device->fix->speed;
callback_list_call_attr_0(priv->cbl, attr_position_speed);
- dbg(lvl_warning,"Speed: %f\n ",priv->speed);
+ dbg(lvl_debug,"Speed: %f\n ",priv->speed);
}
if (device->fix->fields & LOCATION_GPS_DEVICE_TRACK_SET) {
priv->direction=device->fix->track;
- dbg(lvl_warning,"Direction: %f\n",priv->direction);
+ dbg(lvl_debug,"Direction: %f\n",priv->direction);
}
if (device->fix->fields & LOCATION_GPS_DEVICE_TIME_SET) {
priv->fix_time=device->fix->time;
- dbg(lvl_warning,"Time: %f\n",priv->fix_time);
+ dbg(lvl_debug,"Time: %f\n",priv->fix_time);
}
if (device->fix->fields & LOCATION_GPS_DEVICE_ALTITUDE_SET) {
priv->height=device->fix->altitude;
- dbg(lvl_warning,"Elevation: %f\n",priv->height);
+ dbg(lvl_debug,"Elevation: %f\n",priv->height);
}
}
@@ -148,54 +148,54 @@ vehicle_maemo_open(struct vehicle_priv *priv)
if (!strcasecmp(priv->source+8,"cwp")) {
g_object_set(G_OBJECT(priv->control), "preferred-method", LOCATION_METHOD_CWP, NULL);
- dbg(lvl_warning,"Method set: CWP\n");
+ dbg(lvl_debug,"Method set: CWP\n");
} else if (!strcasecmp(priv->source+8,"acwp")) {
g_object_set(G_OBJECT(priv->control), "preferred-method", LOCATION_METHOD_ACWP, NULL);
- dbg(lvl_warning,"Method set: ACWP\n");
+ dbg(lvl_debug,"Method set: ACWP\n");
} else if (!strcasecmp(priv->source+8,"gnss")) {
g_object_set(G_OBJECT(priv->control), "preferred-method", LOCATION_METHOD_GNSS, NULL);
- dbg(lvl_warning,"Method set: GNSS\n");
+ dbg(lvl_debug,"Method set: GNSS\n");
} else if (!strcasecmp(priv->source+8,"agnss")) {
g_object_set(G_OBJECT(priv->control), "preferred-method", LOCATION_METHOD_AGNSS, NULL);
- dbg(lvl_warning,"Method set: AGNSS\n");
+ dbg(lvl_debug,"Method set: AGNSS\n");
} else {
g_object_set(G_OBJECT(priv->control), "preferred-method", LOCATION_METHOD_USER_SELECTED, NULL);
- dbg(lvl_warning,"Method set: ANY\n");
+ dbg(lvl_debug,"Method set: ANY\n");
}
switch (priv->retry_interval) {
case 2:
g_object_set(G_OBJECT(priv->control), "preferred-interval", LOCATION_INTERVAL_2S, NULL);
- dbg(lvl_warning,"Interval set: 2s\n");
+ dbg(lvl_debug,"Interval set: 2s\n");
break;
case 5:
g_object_set(G_OBJECT(priv->control), "preferred-interval", LOCATION_INTERVAL_5S, NULL);
- dbg(lvl_warning,"Interval set: 5s\n");
+ dbg(lvl_debug,"Interval set: 5s\n");
break;
case 10:
g_object_set(G_OBJECT(priv->control), "preferred-interval", LOCATION_INTERVAL_10S, NULL);
- dbg(lvl_warning,"Interval set: 10s\n");
+ dbg(lvl_debug,"Interval set: 10s\n");
break;
case 20:
g_object_set(G_OBJECT(priv->control), "preferred-interval", LOCATION_INTERVAL_20S, NULL);
- dbg(lvl_warning,"Interval set: 20s\n");
+ dbg(lvl_debug,"Interval set: 20s\n");
break;
case 30:
g_object_set(G_OBJECT(priv->control), "preferred-interval", LOCATION_INTERVAL_30S, NULL);
- dbg(lvl_warning,"Interval set: 30s\n");
+ dbg(lvl_debug,"Interval set: 30s\n");
break;
case 60:
g_object_set(G_OBJECT(priv->control), "preferred-interval", LOCATION_INTERVAL_60S, NULL);
- dbg(lvl_warning,"Interval set: 60s\n");
+ dbg(lvl_debug,"Interval set: 60s\n");
break;
case 120:
g_object_set(G_OBJECT(priv->control), "preferred-interval", LOCATION_INTERVAL_120S, NULL);
- dbg(lvl_warning,"Interval set: 120s\n");
+ dbg(lvl_debug,"Interval set: 120s\n");
break;
case 1:
default:
g_object_set(G_OBJECT(priv->control), "preferred-interval", LOCATION_INTERVAL_1S, NULL);
- dbg(lvl_warning,"Interval set: 1s\n");
+ dbg(lvl_debug,"Interval set: 1s\n");
break;
}
@@ -225,41 +225,41 @@ vehicle_maemo_position_attr_get(struct vehicle_priv *priv,
struct attr * active=NULL;
switch (type) {
case attr_position_fix_type:
- dbg(lvl_warning,"Attr requested: position_fix_type\n");
+ dbg(lvl_debug,"Attr requested: position_fix_type\n");
attr->u.num = priv->fix_type;
break;
case attr_position_height:
- dbg(lvl_warning,"Attr requested: position_height\n");
+ dbg(lvl_debug,"Attr requested: position_height\n");
attr->u.numd = &priv->height;
break;
case attr_position_speed:
- dbg(lvl_warning,"Attr requested: position_speed\n");
+ dbg(lvl_debug,"Attr requested: position_speed\n");
attr->u.numd = &priv->speed;
break;
case attr_position_direction:
- dbg(lvl_warning,"Attr requested: position_direction\n");
+ dbg(lvl_debug,"Attr requested: position_direction\n");
attr->u.numd = &priv->direction;
break;
case attr_position_hdop:
- dbg(lvl_warning,"Attr requested: position_hdop\n");
+ dbg(lvl_debug,"Attr requested: position_hdop\n");
attr->u.numd = &priv->hdop;
break;
case attr_position_sats:
- dbg(lvl_warning,"Attr requested: position_sats\n");
+ dbg(lvl_debug,"Attr requested: position_sats\n");
attr->u.num = priv->sats;
break;
case attr_position_sats_used:
- dbg(lvl_warning,"Attr requested: position_sats_used\n");
+ dbg(lvl_debug,"Attr requested: position_sats_used\n");
attr->u.num = priv->sats_used;
break;
case attr_position_coord_geo:
- dbg(lvl_warning,"Attr requested: position_coord_geo\n");
+ dbg(lvl_debug,"Attr requested: position_coord_geo\n");
attr->u.coord_geo = &priv->geo;
break;
case attr_position_time_iso8601:
{
struct tm tm;
- dbg(lvl_warning,"Attr requested: position_time_iso8601\n");
+ dbg(lvl_debug,"Attr requested: position_time_iso8601\n");
if (!priv->fix_time)
return 0;
if (gmtime_r(&priv->fix_time, &tm)) {
@@ -271,7 +271,7 @@ vehicle_maemo_position_attr_get(struct vehicle_priv *priv,
}
break;
case attr_active:
- dbg(lvl_warning,"Attr requested: position_active\n");
+ dbg(lvl_debug,"Attr requested: position_active\n");
active = attr_search(priv->attrs,NULL,attr_active);
if(active != NULL) {
attr->u.num=active->u.num;
@@ -299,7 +299,7 @@ vehicle_maemo_new_maemo(struct vehicle_methods
struct vehicle_priv *ret;
struct attr *source, *retry_int;
- dbg(lvl_warning, "enter\n");
+ dbg(lvl_debug, "enter\n");
source = attr_search(attrs, NULL, attr_source);
ret = g_new0(struct vehicle_priv, 1);
ret->source = g_strdup(source->u.str);
@@ -313,7 +313,7 @@ vehicle_maemo_new_maemo(struct vehicle_methods
} else {
ret->retry_interval = 1;
}
- dbg(lvl_warning,"source: %s, interval: %u\n",ret->source,ret->retry_interval);
+ dbg(lvl_debug,"source: %s, interval: %u\n",ret->source,ret->retry_interval);
ret->cbl = cbl;
*meth = vehicle_maemo_methods;
ret->attrs = attrs;
@@ -324,6 +324,6 @@ vehicle_maemo_new_maemo(struct vehicle_methods
void
plugin_init(void)
{
- dbg(lvl_warning, "enter\n");
+ dbg(lvl_debug, "enter\n");
plugin_register_vehicle_type("maemo", vehicle_maemo_new_maemo);
}
diff --git a/navit/vehicle/null/vehicle_null.c b/navit/vehicle/null/vehicle_null.c
index 30e9a4d97..134538cc3 100644
--- a/navit/vehicle/null/vehicle_null.c
+++ b/navit/vehicle/null/vehicle_null.c
@@ -59,7 +59,7 @@ struct vehicle_priv {
static void
vehicle_null_destroy(struct vehicle_priv *priv)
{
- dbg(lvl_warning,"enter\n");
+ dbg(lvl_debug,"enter\n");
g_free(priv);
}
@@ -75,7 +75,7 @@ static int
vehicle_null_position_attr_get(struct vehicle_priv *priv,
enum attr_type type, struct attr *attr)
{
- dbg(lvl_warning,"enter %s\n",attr_to_name(type));
+ dbg(lvl_debug,"enter %s\n",attr_to_name(type));
switch (type) {
#if 0
case attr_position_fix_type:
@@ -114,7 +114,7 @@ vehicle_null_position_attr_get(struct vehicle_priv *priv,
default:
return 0;
}
- dbg(lvl_warning,"ok\n");
+ dbg(lvl_debug,"ok\n");
attr->type = type;
return 1;
}
@@ -162,11 +162,11 @@ vehicle_null_new_null(struct vehicle_methods *meth,
{
struct vehicle_priv *ret;
- dbg(lvl_warning, "enter\n");
+ dbg(lvl_debug, "enter\n");
ret = g_new0(struct vehicle_priv, 1);
ret->cbl = cbl;
*meth = vehicle_null_methods;
- dbg(lvl_warning, "return\n");
+ dbg(lvl_debug, "return\n");
return ret;
}
@@ -178,6 +178,6 @@ vehicle_null_new_null(struct vehicle_methods *meth,
void
plugin_init(void)
{
- dbg(lvl_warning, "enter\n");
+ dbg(lvl_debug, "enter\n");
plugin_register_vehicle_type("null", vehicle_null_new_null);
}
diff --git a/navit/vehicle/webos/bluetooth.c b/navit/vehicle/webos/bluetooth.c
index 13534237d..bc66fe6c1 100644
--- a/navit/vehicle/webos/bluetooth.c
+++ b/navit/vehicle/webos/bluetooth.c
@@ -25,7 +25,7 @@ static void
mlPDL_ServiceCall_callback(struct callback_list *cbl, char *service, char *parameters/*, struct callback *fail_cb*/)
{
PDL_Err err;
- dbg(lvl_warning,"PDL_ServiceCall(%s) parameters(%s)\n",service,parameters);
+ dbg(lvl_debug,"PDL_ServiceCall(%s) parameters(%s)\n",service,parameters);
err = PDL_ServiceCall(service, parameters);
if (err != PDL_NOERROR) {
dbg(lvl_error,"PDL_ServiceCall to (%s) with (%s) failed with (%d): (%s)\n", service, parameters, err, PDL_GetError());
@@ -50,7 +50,7 @@ mlPDL_ServiceCall(const char *service, const char *parameters/*, struct callback
callback_list_add(cbl, cb);
-dbg(lvl_error,"event_call_callback(%p)\n",cbl);
+dbg(lvl_debug,"event_call_callback(%p)\n",cbl);
event_call_callback(cbl);
}
@@ -65,7 +65,7 @@ mlPDL_ServiceCallWithCallback_callback(struct callback_list *cbl,
PDL_bool removeAfterResponse)
{
PDL_Err err;
- dbg(lvl_warning,"PDL_ServiceCallWithCallback(%s) parameters(%s)\n",service,parameters);
+ dbg(lvl_debug,"PDL_ServiceCallWithCallback(%s) parameters(%s)\n",service,parameters);
err = PDL_ServiceCallWithCallback(service, parameters, callback, user, removeAfterResponse);
if (err != PDL_NOERROR) {
dbg(lvl_error,"PDL_ServiceCallWithCallback to (%s) with (%s) failed with (%d): (%s)\n", service, parameters, err, PDL_GetError());
@@ -94,7 +94,7 @@ mlPDL_ServiceCallWithCallback(const char *service,
callback_list_add(cbl, cb);
- dbg(lvl_error,"event_call_callback(%p)\n",cbl);
+ dbg(lvl_debug,"event_call_callback(%p)\n",cbl);
event_call_callback(cbl);
}
@@ -107,7 +107,7 @@ vehicle_webos_init_pdl_locationtracking_callback(struct vehicle_priv *priv, stru
priv->gps_type = param ? GPS_TYPE_INT: GPS_TYPE_NONE;
- dbg(lvl_warning,"Calling PDL_EnableLocationTracking(%i)\n",param);
+ dbg(lvl_debug,"Calling PDL_EnableLocationTracking(%i)\n",param);
err = PDL_EnableLocationTracking(param);
if (err != PDL_NOERROR) {
@@ -380,7 +380,7 @@ vehicle_webos_parse_nmea(struct vehicle_priv *priv, char *buffer)
*/
if (item[1]) {
priv->magnetic_direction = g_ascii_strtod( item[1], NULL );
- dbg(lvl_warning,"magnetic %d\n", priv->magnetic_direction);
+ dbg(lvl_debug,"magnetic %d\n", priv->magnetic_direction);
}
}
return ret;
@@ -411,12 +411,12 @@ vehicle_webos_spp_handle_read(PDL_ServiceParameters *params, void *user)
priv->buffer_pos += size;
priv->buffer[priv->buffer_pos] = '\0';
- dbg(lvl_warning, "size=%d pos=%d buffer='%s'\n", size,
+ dbg(lvl_debug, "size=%d pos=%d buffer='%s'\n", size,
priv->buffer_pos, priv->buffer);
str = priv->buffer;
while ((tok = strchr(str, '\n'))) {
*tok++ = '\0';
- dbg(lvl_warning, "line='%s'\n", str);
+ dbg(lvl_debug, "line='%s'\n", str);
rc += vehicle_webos_parse_nmea(priv, str);
str = tok;
// if (priv->file_type == file_type_file && rc)
@@ -427,7 +427,7 @@ vehicle_webos_spp_handle_read(PDL_ServiceParameters *params, void *user)
size = priv->buffer + priv->buffer_pos - str;
memmove(priv->buffer, str, size + 1);
priv->buffer_pos = size;
- dbg(lvl_warning,"now pos=%d buffer='%s'\n",
+ dbg(lvl_debug,"now pos=%d buffer='%s'\n",
priv->buffer_pos, priv->buffer);
} else if (priv->buffer_pos == buffer_size - 1) {
dbg(lvl_error,"Overflow. Most likely wrong baud rate or no nmea protocol\n");
@@ -481,7 +481,7 @@ vehicle_webos_spp_handle_open(PDL_ServiceParameters *params, void *user)
if (!priv->buffer)
priv->buffer = g_malloc(buffer_size);
- dbg(lvl_warning,"instanceId(%i)\n",priv->spp_instance_id);
+ dbg(lvl_debug,"instanceId(%i)\n",priv->spp_instance_id);
priv->gps_type = GPS_TYPE_BT;
@@ -513,7 +513,7 @@ vehicle_webos_spp_notify(PDL_ServiceParameters *params, void *user)
if(strcmp(notification,"notifnservicenames") == 0) {
int instance_id = PDL_GetParamInt(params, "instanceId");
- dbg(lvl_warning,"instanceId(%i)\n", instance_id);
+ dbg(lvl_debug,"instanceId(%i)\n", instance_id);
cJSON *root = cJSON_Parse(params_json);
if (!root) {
@@ -563,7 +563,7 @@ vehicle_webos_init_bt_gps(struct vehicle_priv *priv, char *addr)
{
char parameters[128];
- dbg(lvl_warning,"subscribeNotifications\n");
+ dbg(lvl_debug,"subscribeNotifications\n");
mlPDL_ServiceCallWithCallback("palm://com.palm.bluetooth/spp/subscribenotifications",
"{\"subscribe\":true}",
(PDL_ServiceCallbackFunc)vehicle_webos_spp_notify,
@@ -598,7 +598,7 @@ vehicle_webos_bt_gap_callback(PDL_ServiceParameters *params, void *param)
char *device_addr = NULL;
cJSON *root;
- dbg(lvl_warning,"enter\n");
+ dbg(lvl_debug,"enter\n");
PDL_Err err;
err = PDL_GetParamInt(params, "errorCode");
@@ -619,17 +619,17 @@ vehicle_webos_bt_gap_callback(PDL_ServiceParameters *params, void *param)
cJSON *trusted_devices = cJSON_GetObjectItem(root, "trusteddevices");
unsigned int i,c = cJSON_GetArraySize(trusted_devices);
- dbg(lvl_warning, "trusted_devices(%i)\n",c);
+ dbg(lvl_debug, "trusted_devices(%i)\n",c);
for(i=0; i < c && !device_addr; i++) {
cJSON *device = cJSON_GetArrayItem(trusted_devices,i);
char *name = cJSON_GetObjectItem(device, "name")->valuestring;
char *address = cJSON_GetObjectItem(device, "address")->valuestring;
char *status = cJSON_GetObjectItem(device, "status")->valuestring;
- dbg(lvl_warning,"i(%i) name(%s) address(%s) status(%s)\n",i,name,address,status);
+ dbg(lvl_debug,"i(%i) name(%s) address(%s) status(%s)\n",i,name,address,status);
if (/*strncmp(status, "connected",9) == 0 && */strstr(name, "GPS") != NULL) {
- dbg(lvl_warning,"choose name(%s) address(%s)\n",name,address);
+ dbg(lvl_debug,"choose name(%s) address(%s)\n",name,address);
device_addr = g_strdup(address);
break;
}
@@ -649,7 +649,7 @@ vehicle_webos_bt_open(struct vehicle_priv *priv)
{
// Try to connect to BT GPS, or use PDL method
- dbg(lvl_warning,"enter\n");
+ dbg(lvl_debug,"enter\n");
PDL_Err err;
err = PDL_ServiceCallWithCallback("palm://com.palm.bluetooth/gap/gettrusteddevices",
@@ -668,7 +668,7 @@ vehicle_webos_bt_open(struct vehicle_priv *priv)
void
vehicle_webos_bt_close(struct vehicle_priv *priv)
{
- dbg(lvl_error,"XXX\n");
+ dbg(lvl_debug,"XXX\n");
char parameters[128];
if (priv->spp_instance_id) {
snprintf(parameters, sizeof(parameters), "{\"instanceId\":%i}", priv->spp_instance_id);
diff --git a/navit/vehicle/webos/vehicle_webos.c b/navit/vehicle/webos/vehicle_webos.c
index f4fcb0f90..e0a849b97 100644
--- a/navit/vehicle/webos/vehicle_webos.c
+++ b/navit/vehicle/webos/vehicle_webos.c
@@ -157,7 +157,7 @@ vehicle_webos_open(struct vehicle_priv *priv)
PDL_Err err;
priv->pdk_version = PDL_GetPDKVersion();
- dbg(lvl_warning,"pdk_version(%d)\n", priv->pdk_version);
+ dbg(lvl_debug,"pdk_version(%d)\n", priv->pdk_version);
if (priv->pdk_version <= 100) {
// Use Location Service via callback interface
@@ -380,7 +380,7 @@ vehicle_webos_new(struct vehicle_methods
void
plugin_init(void)
{
- dbg(lvl_warning, "enter\n");
+ dbg(lvl_debug, "enter\n");
plugin_register_vehicle_type("webos", vehicle_webos_new);
}
diff --git a/navit/vehicle/wince/vehicle_wince.c b/navit/vehicle/wince/vehicle_wince.c
index be68cd940..8dd3e40db 100644
--- a/navit/vehicle/wince/vehicle_wince.c
+++ b/navit/vehicle/wince/vehicle_wince.c
@@ -146,7 +146,7 @@ static void initBth(struct vehicle_priv *priv)
priv->BthSetMode = (PFN_BthSetMode)GetProcAddress(priv->hBthDll, TEXT("BthSetMode") );
if( priv->BthSetMode && priv->BthSetMode(1) == ERROR_SUCCESS )
{
- dbg(lvl_warning, "bluetooth activated\n");
+ dbg(lvl_debug, "bluetooth activated\n");
succeeded = TRUE;
}
}
@@ -178,7 +178,7 @@ static int initDevice(struct vehicle_priv *priv)
if ( priv->file_type == file_type_device )
{
- dbg(lvl_error, "Init Device\n");
+ dbg(lvl_debug, "Init Device\n");
/* GPD0 is the control port for the GPS driver */
hGPS = CreateFile(L"GPD0:", GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
if (hGPS != INVALID_HANDLE_VALUE) {
@@ -199,7 +199,7 @@ static int initDevice(struct vehicle_priv *priv)
NULL, OPEN_EXISTING, 0, 0)) == INVALID_HANDLE_VALUE)
{
Sleep(1000);
- dbg(lvl_error, "Waiting to connect to %s\n", priv->source);
+ dbg(lvl_debug, "Waiting to connect to %s\n", priv->source);
}
GetCommTimeouts (priv->m_hGPSDevice, &commTiming);
commTiming.ReadIntervalTimeout = 20;
@@ -230,7 +230,7 @@ static int initDevice(struct vehicle_priv *priv)
}
else
{
- dbg(lvl_error, "Open File\n");
+ dbg(lvl_debug, "Open File\n");
priv->m_hGPSDevice = CreateFileW( A2W(priv->source),
GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, 0);
if ( priv->m_hGPSDevice == INVALID_HANDLE_VALUE) {
@@ -264,7 +264,7 @@ static DWORD WINAPI wince_reader_thread (LPVOID lParam)
DWORD bytes_read;
int waitcounter;
- dbg(lvl_error, "GPS Port:[%s]\n", priv->source);
+ dbg(lvl_debug, "GPS Port:[%s]\n", priv->source);
priv->thread_up = 1;
if ( !initDevice(priv) ) {
@@ -272,7 +272,7 @@ static DWORD WINAPI wince_reader_thread (LPVOID lParam)
}
while (priv->is_running)
{
- dbg(lvl_warning,"readfile\n");
+ dbg(lvl_debug,"readfile\n");
waitcounter = 0;
status = ReadFile(priv->m_hGPSDevice,
chunk_buffer, sizeof(chunk_buffer),
@@ -297,7 +297,7 @@ static DWORD WINAPI wince_reader_thread (LPVOID lParam)
waitcounter++;
if ( waitcounter % 8 == 0 )
{
- dbg(lvl_warning, "Remind them of the data\n");
+ dbg(lvl_debug, "Remind them of the data\n");
event_call_callback(priv->priv_cbl);
}
if(waitcounter % 200 == 0) {
@@ -307,7 +307,7 @@ static DWORD WINAPI wince_reader_thread (LPVOID lParam)
}
if(waitcounter>2)
- dbg(lvl_error,"Sent GPS data to the main thread after %d intervals delay.\n",waitcounter);
+ dbg(lvl_debug,"Sent GPS data to the main thread after %d intervals delay.\n",waitcounter);
g_mutex_lock(&priv->lock);
memcpy(priv->read_buffer + priv->read_buffer_pos , chunk_buffer, bytes_read );
@@ -348,11 +348,11 @@ vehicle_wince_available_ports(void)
regdevtype_length = sizeof(devicetype);
if ( RegQueryValueEx( hkSubResult, L"Key", NULL, NULL, (LPBYTE)devicetype, &regdevtype_length) == ERROR_SUCCESS )
{
- dbg(lvl_error, "Found device '%s' (%s)\n", W2A(devicename), W2A(devicetype));
+ dbg(lvl_debug, "Found device '%s' (%s)\n", W2A(devicename), W2A(devicetype));
}
else
{
- dbg(lvl_error, "Found device '%s'\n", W2A(devicename));
+ dbg(lvl_debug, "Found device '%s'\n", W2A(devicename));
}
}
RegCloseKey(hkSubResult);
@@ -372,7 +372,7 @@ vehicle_wince_open(struct vehicle_priv *priv)
char* strport;
char* strsettings;
- dbg(lvl_warning, "enter vehicle_wince_open, priv->source='%s'\n", priv->source);
+ dbg(lvl_debug, "enter vehicle_wince_open, priv->source='%s'\n", priv->source);
if (priv->source ) {
@@ -391,7 +391,7 @@ vehicle_wince_open(struct vehicle_priv *priv)
*strsettings = '\0';
strsettings++;
- dbg(lvl_error, "serial('%s', '%s')\n", strport, strsettings );
+ dbg(lvl_debug, "serial('%s', '%s')\n", strport, strsettings );
}
if (raw_setting_str)
g_free( raw_setting_str );
@@ -402,7 +402,7 @@ vehicle_wince_open(struct vehicle_priv *priv)
static void
vehicle_wince_close(struct vehicle_priv *priv)
{
- dbg(lvl_warning,"enter");
+ dbg(lvl_debug,"enter");
}
static int
@@ -613,7 +613,7 @@ vehicle_wince_parse(struct vehicle_priv *priv, char *buffer)
*/
if (item[1]) {
priv->magnetic_direction = g_ascii_strtod( item[1], NULL );
- dbg(lvl_warning,"magnetic %d\n", priv->magnetic_direction);
+ dbg(lvl_debug,"magnetic %d\n", priv->magnetic_direction);
}
}
return ret;
@@ -625,7 +625,7 @@ vehicle_wince_io(struct vehicle_priv *priv)
int size, rc = 0;
char *str, *tok;
- dbg(lvl_warning, "vehicle_file_io : enter\n");
+ dbg(lvl_debug, "vehicle_file_io : enter\n");
size = read_win32(priv, priv->buffer + priv->buffer_pos, buffer_size - priv->buffer_pos - 1);
@@ -646,12 +646,12 @@ vehicle_wince_io(struct vehicle_priv *priv)
}
priv->buffer_pos += size;
priv->buffer[priv->buffer_pos] = '\0';
- dbg(lvl_warning, "size=%d pos=%d buffer='%s'\n", size,
+ dbg(lvl_debug, "size=%d pos=%d buffer='%s'\n", size,
priv->buffer_pos, priv->buffer);
str = priv->buffer;
while ((tok = strchr(str, '\n'))) {
*tok++ = '\0';
- dbg(lvl_warning, "line='%s'\n", str);
+ dbg(lvl_debug, "line='%s'\n", str);
rc +=vehicle_wince_parse(priv, str);
str = tok;
if (priv->file_type == file_type_file && rc)
@@ -676,7 +676,7 @@ vehicle_wince_io(struct vehicle_priv *priv)
static void
vehicle_wince_enable_watch(struct vehicle_priv *priv)
{
- dbg(lvl_warning, "enter");
+ dbg(lvl_debug, "enter");
vehicle_wince_disable_watch(priv);
priv->is_running = 1;
@@ -697,7 +697,7 @@ vehicle_wince_disable_watch(struct vehicle_priv *priv)
{
int wait = 5000;
- dbg(lvl_warning, "enter");
+ dbg(lvl_debug, "enter");
priv->is_running = 0;
while (wait-- > 0 && priv->thread_up) {
@@ -791,7 +791,7 @@ vehicle_wince_position_attr_get(struct vehicle_priv *priv,
attr->u.str=priv->fixiso8601;
break;
case attr_position_sat_item:
- dbg(lvl_error,"at here\n");
+ dbg(lvl_debug,"at here\n");
priv->sat_item.id_lo++;
if (priv->sat_item.id_lo > priv->current_count) {
priv->sat_item.id_lo=0;
@@ -881,7 +881,7 @@ vehicle_wince_new(struct vehicle_methods
struct attr *handle_bluetooth;
char *cp;
- dbg(lvl_warning, "enter\n");
+ dbg(lvl_debug, "enter\n");
source = attr_search(attrs, NULL, attr_source);
ret = g_new0(struct vehicle_priv, 1);
ret->fd = -1;
@@ -918,7 +918,7 @@ vehicle_wince_new(struct vehicle_methods
ret->on_eof=1;
if (on_eof && !g_strcasecmp(on_eof->u.str, "exit"))
ret->on_eof=2;
- dbg(lvl_error,"on_eof=%d\n", ret->on_eof);
+ dbg(lvl_debug,"on_eof=%d\n", ret->on_eof);
*meth = vehicle_wince_methods;
ret->priv_cbl = callback_list_new();
callback_list_add(ret->priv_cbl, callback_new_1(callback_cast(vehicle_wince_io), ret));
@@ -948,7 +948,7 @@ vehicle_wince_new(struct vehicle_methods
void
plugin_init(void)
{
- dbg(lvl_warning, "enter\n");
+ dbg(lvl_debug, "enter\n");
plugin_register_vehicle_type("wince", vehicle_wince_new);
plugin_register_vehicle_type("file", vehicle_wince_new);
}
diff --git a/navit/vehicleprofile.c b/navit/vehicleprofile.c
index 9850e27bf..b48dddacb 100644
--- a/navit/vehicleprofile.c
+++ b/navit/vehicleprofile.c
@@ -30,7 +30,7 @@
static void
vehicleprofile_set_attr_do(struct vehicleprofile *this_, struct attr *attr)
{
- dbg(lvl_warning,"%s:%ld\n", attr_to_name(attr->type), attr->u.num);
+ dbg(lvl_debug,"%s:%ld\n", attr_to_name(attr->type), attr->u.num);
switch (attr->type) {
case attr_flags:
this_->flags=attr->u.num;
@@ -154,7 +154,7 @@ vehicleprofile_apply_roadprofile(struct vehicleprofile *this_, struct navit_obje
struct navit_object *newrp;
struct attr_iter *iter=rp->func->iter_new(NULL);
struct attr attr;
- dbg(lvl_warning,"patching roadprofile\n");
+ dbg(lvl_debug,"patching roadprofile\n");
newrp=oldrp->func->dup(oldrp);
while (rp->func->get_attr(rp, attr_any, &attr, iter))
newrp->func->set_attr(newrp, &attr);
@@ -177,7 +177,7 @@ vehicleprofile_apply_attrs(struct vehicleprofile *this_, struct navit_object *ob
struct attr attr;
struct attr_iter *iter=obj->func->iter_new(NULL);
while (obj->func->get_attr(obj, attr_any, &attr, iter)) {
- dbg(lvl_warning,"%s\n",attr_to_name(attr.type));
+ dbg(lvl_debug,"%s\n",attr_to_name(attr.type));
if (attr.type == attr_roadprofile)
vehicleprofile_apply_roadprofile(this_, attr.u.navit_object, is_option);
else if (attr.type != attr_profile_option)
diff --git a/navit/xmlconfig.c b/navit/xmlconfig.c
index 00ce94325..3cbe20e4a 100644
--- a/navit/xmlconfig.c
+++ b/navit/xmlconfig.c
@@ -752,7 +752,7 @@ xinclude(xml_context *context, const gchar **attribute_names, const gchar **attr
doc_new.level=doc_old->level+1;
doc_new.user_data=doc_old->user_data;
if (! href) {
- dbg(lvl_warning,"no href, using '%s'\n", doc_old->href);
+ dbg(lvl_debug,"no href, using '%s'\n", doc_old->href);
doc_new.href=doc_old->href;
if (file_exists(doc_new.href)) {
parse_file(&doc_new, error);
@@ -760,14 +760,14 @@ xinclude(xml_context *context, const gchar **attribute_names, const gchar **attr
dbg(lvl_error,"Unable to include %s\n",doc_new.href);
}
} else {
- dbg(lvl_warning,"expanding '%s'\n", href);
+ dbg(lvl_debug,"expanding '%s'\n", href);
we=file_wordexp_new(href);
we_files=file_wordexp_get_array(we);
count=file_wordexp_get_count(we);
- dbg(lvl_warning,"%d results\n", count);
+ dbg(lvl_debug,"%d results\n", count);
if (file_exists(we_files[0])) {
for (i = 0 ; i < count ; i++) {
- dbg(lvl_warning,"result[%d]='%s'\n", i, we_files[i]);
+ dbg(lvl_debug,"result[%d]='%s'\n", i, we_files[i]);
doc_new.href=we_files[i];
parse_file(&doc_new, error);
}
@@ -787,7 +787,7 @@ strncmp_len(const char *s1, int s1len, const char *s2)
char c[s1len+1];
strncpy(c, s1, s1len);
c[s1len]='\0';
- dbg(lvl_error,"'%s' vs '%s'\n", c, s2);
+ dbg(lvl_debug,"'%s' vs '%s'\n", c, s2);
#endif
ret=strncmp(s1, s2, s1len);
@@ -832,7 +832,7 @@ xpointer_test(const char *test, int len, struct xistate *elem)
strncpy(test2, test, len);
test2[len]='\0';
- dbg(lvl_error,"%s\n", test2);
+ dbg(lvl_debug,"%s\n", test2);
#endif
if (!len)
return 0;
@@ -1115,7 +1115,7 @@ parse_file(struct xmldocument *document, xmlerror **error)
gboolean result;
char *xmldir,*newxmldir,*xmlfile,*newxmlfile,*sep;
- dbg(lvl_warning,"enter filename='%s'\n", document->href);
+ dbg(lvl_debug,"enter filename='%s'\n", document->href);
#if GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 12
#define G_MARKUP_TREAT_CDATA_AS_TEXT 0
#endif
@@ -1159,7 +1159,7 @@ parse_file(struct xmldocument *document, xmlerror **error)
unsetenv("XMLFILE");
g_free(newxmldir);
g_free(newxmlfile);
- dbg(lvl_warning,"return %d\n", result);
+ dbg(lvl_debug,"return %d\n", result);
return result;
}
@@ -1219,7 +1219,7 @@ gboolean config_load(const char *filename, xmlerror **error)
item_create_hash();
initStatic();
- dbg(lvl_warning,"enter filename='%s'\n", filename);
+ dbg(lvl_debug,"enter filename='%s'\n", filename);
memset(&document, 0, sizeof(document));
document.href=filename;
document.user_data=&curr;
@@ -1230,7 +1230,7 @@ gboolean config_load(const char *filename, xmlerror **error)
}
attr_destroy_hash();
item_destroy_hash();
- dbg(lvl_warning,"return %d\n", result);
+ dbg(lvl_debug,"return %d\n", result);
return result;
}
@@ -1264,7 +1264,7 @@ struct navit_object *
navit_object_ref(struct navit_object *obj)
{
obj->refcount++;
- dbg(lvl_warning,"refcount %s %p %d\n",attr_to_name(obj->func->type),obj,obj->refcount);
+ dbg(lvl_debug,"refcount %s %p %d\n",attr_to_name(obj->func->type),obj,obj->refcount);
return obj;
}
@@ -1273,7 +1273,7 @@ navit_object_unref(struct navit_object *obj)
{
if (obj) {
obj->refcount--;
- dbg(lvl_warning,"refcount %s %p %d\n",attr_to_name(obj->func->type),obj,obj->refcount);
+ dbg(lvl_debug,"refcount %s %p %d\n",attr_to_name(obj->func->type),obj,obj->refcount);
if (obj->refcount <= 0 && obj->func && obj->func->destroy)
obj->func->destroy(obj);
}