summaryrefslogtreecommitdiff
path: root/navit/graphics
diff options
context:
space:
mode:
authorPierre Grandin <grandinp@gmail.com>2018-04-26 23:02:15 -0700
committerPierre Grandin <grandinp@gmail.com>2018-04-26 23:02:15 -0700
commit0a0b65f49a19ddac53605c8b66242a7bf4df5102 (patch)
tree631f26306aa056eb8fd165c533889dd9925c6833 /navit/graphics
parentf0b46b6bccf68ae233e1209d1854b1885cf62188 (diff)
parent221f783ea1caaaab2f5ceadc6b0fb3e720aac3df (diff)
downloadnavit-0a0b65f49a19ddac53605c8b66242a7bf4df5102.tar.gz
Merge branch 'trunk' into fix_log_replay
Diffstat (limited to 'navit/graphics')
-rw-r--r--navit/graphics/android/graphics_android.c116
-rw-r--r--navit/graphics/cocoa/graphics_cocoa.m42
-rw-r--r--navit/graphics/egl/graphics_egl.c4
-rw-r--r--navit/graphics/gd/graphics_gd.c42
-rw-r--r--navit/graphics/gtk_drawing_area/graphics_gtk_drawing_area.c30
-rw-r--r--navit/graphics/null/graphics_null.c20
-rw-r--r--navit/graphics/opengl/graphics_opengl.c32
-rw-r--r--navit/graphics/opengl/graphics_opengl_egl.c10
-rw-r--r--navit/graphics/opengl/graphics_opengl_x11.c18
-rw-r--r--navit/graphics/qt5/QNavitQuick.cpp30
-rw-r--r--navit/graphics/qt5/QNavitWidget.cpp22
-rw-r--r--navit/graphics/qt5/event_qt5.cpp26
-rw-r--r--navit/graphics/qt5/graphics_qt5.cpp102
-rw-r--r--navit/graphics/qt_qpainter/RenderArea.cpp12
-rw-r--r--navit/graphics/qt_qpainter/graphics_qt_qpainter.cpp28
-rw-r--r--navit/graphics/sdl/event.c32
-rw-r--r--navit/graphics/sdl/event_sdl.c30
-rw-r--r--navit/graphics/sdl/graphics_sdl.c108
-rw-r--r--navit/graphics/win32/graphics_win32.c68
19 files changed, 386 insertions, 386 deletions
diff --git a/navit/graphics/android/graphics_android.c b/navit/graphics/android/graphics_android.c
index 0d6aa30d2..6cc776227 100644
--- a/navit/graphics/android/graphics_android.c
+++ b/navit/graphics/android/graphics_android.c
@@ -96,7 +96,7 @@ find_class_global(char *name, jclass *ret)
{
*ret=(*jnienv)->FindClass(jnienv, name);
if (! *ret) {
- dbg(lvl_error,"Failed to get Class %s\n",name);
+ dbg(lvl_error,"Failed to get Class %s",name);
return 0;
}
*ret = (*jnienv)->NewGlobalRef(jnienv, *ret);
@@ -108,7 +108,7 @@ find_method(jclass class, char *name, char *args, jmethodID *ret)
{
*ret = (*jnienv)->GetMethodID(jnienv, class, name, args);
if (*ret == NULL) {
- dbg(lvl_error,"Failed to get Method %s with signature %s\n",name,args);
+ dbg(lvl_error,"Failed to get Method %s with signature %s",name,args);
return 0;
}
return 1;
@@ -119,7 +119,7 @@ find_static_method(jclass class, char *name, char *args, jmethodID *ret)
{
*ret = (*jnienv)->GetStaticMethodID(jnienv, class, name, args);
if (*ret == NULL) {
- dbg(lvl_error,"Failed to get static Method %s with signature %s\n",name,args);
+ dbg(lvl_error,"Failed to get static Method %s with signature %s",name,args);
return 0;
}
return 1;
@@ -227,18 +227,18 @@ image_new(struct graphics_priv *gra, struct graphics_image_methods *meth, char *
jclass localBitmap = NULL;
int id;
- dbg(lvl_debug,"enter %s\n",path);
+ dbg(lvl_debug,"enter %s",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_debug,"path_noext=%s\n",path_noext);
+ dbg(lvl_debug,"path_noext=%s",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_debug,"id=%d\n",id);
+ dbg(lvl_debug,"id=%d",id);
if (id)
localBitmap=(*jnienv)->CallStaticObjectMethod(jnienv, gra->BitmapFactoryClass, gra->BitmapFactory_decodeResource, gra->Resources, id);
(*jnienv)->DeleteLocalRef(jnienv, a);
@@ -264,13 +264,13 @@ image_new(struct graphics_priv *gra, struct graphics_image_methods *meth, char *
ret->Bitmap = (*jnienv)->NewGlobalRef(jnienv, localBitmap);
(*jnienv)->DeleteLocalRef(jnienv, localBitmap);
- dbg(lvl_debug,"w=%d h=%d for %s\n",ret->width,ret->height,path);
+ dbg(lvl_debug,"w=%d h=%d for %s",ret->width,ret->height,path);
ret->hot.x=ret->width/2;
ret->hot.y=ret->height/2;
} else {
g_free(ret);
ret=NULL;
- dbg(lvl_warning,"Failed to open %s\n",path);
+ dbg(lvl_warning,"Failed to open %s",path);
}
(*jnienv)->DeleteLocalRef(jnienv, string);
if (ret) {
@@ -361,7 +361,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_debug,"enter %s\n", text);
+ dbg(lvl_debug,"enter %s", text);
initPaint(gra, fg);
if(bg)
bgcolor=(bg->a<<24)| (bg->r<<16) | (bg->g<<8) | bg->b;
@@ -373,7 +373,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_debug,"enter %p\n",img);
+ dbg(lvl_debug,"enter %p",img);
initPaint(gra, fg);
(*jnienv)->CallVoidMethod(jnienv, gra->NavitGraphics, gra->NavitGraphics_draw_image, fg->gra->Paint, p->x, p->y, img->Bitmap);
@@ -396,7 +396,7 @@ draw_image_warp (struct graphics_priv *gr, struct graphics_gc_priv *fg, struct p
(*jnienv)->CallVoidMethod(jnienv, gr->NavitGraphics, gr->NavitGraphics_draw_image_warp, fg->gra->Paint,
count, p[0].x, p[0].y,p[1].x, p[1].y, p[2].x, p[2].y, img->Bitmap);
} else
- dbg(lvl_debug,"draw_image_warp is called with unsupported count parameter value %d\n", count);
+ dbg(lvl_debug,"draw_image_warp is called with unsupported count parameter value %d", count);
}
@@ -473,12 +473,12 @@ set_attr(struct graphics_priv *gra, struct attr *attr)
| (attr->u.color->r / 0x101) << 16
| (attr->u.color->g / 0x101) << 8
| (attr->u.color->b / 0x101);
- dbg(lvl_debug, "set attr_background_color %04x %04x %04x %04x (%08x)\n",
+ dbg(lvl_debug, "set attr_background_color %04x %04x %04x %04x (%08x)",
attr->u.color->r, attr->u.color->g, attr->u.color->b, attr->u.color->a, gra->bgcolor);
if (gra->NavitGraphics_setBackgroundColor != NULL)
(*jnienv)->CallVoidMethod(jnienv, gra->NavitGraphics, gra->NavitGraphics_setBackgroundColor, gra->bgcolor);
else
- dbg(lvl_error, "NavitGraphics.setBackgroundColor not found, cannot set background color\n");
+ dbg(lvl_error, "NavitGraphics.setBackgroundColor not found, cannot set background color");
return 1;
default:
return 0;
@@ -520,15 +520,15 @@ static struct graphics_methods graphics_methods = {
static void
resize_callback(struct graphics_priv *gra, int w, int h)
{
- dbg(lvl_debug,"w=%d h=%d ok\n",w,h);
- dbg(lvl_debug,"gra=%p, %d callbacks in list\n", gra, g_list_length(gra->cbl));
+ dbg(lvl_debug,"w=%d h=%d ok",w,h);
+ dbg(lvl_debug,"gra=%p, %d callbacks in list", gra, g_list_length(gra->cbl));
callback_list_call_attr_2(gra->cbl, attr_resize, (void *)w, (void *)h);
}
static void
padding_callback(struct graphics_priv *gra, int left, int top, int right, int bottom)
{
- dbg(lvl_debug, "win.padding left=%d top=%d right=%d bottom=%d ok\n", left, top, right, bottom);
+ dbg(lvl_debug, "win.padding left=%d top=%d right=%d bottom=%d ok", left, top, right, bottom);
gra->padding->left = left;
gra->padding->top = top;
gra->padding->right = right;
@@ -547,7 +547,7 @@ motion_callback(struct graphics_priv *gra, int x, int y)
static void
keypress_callback(struct graphics_priv *gra, char *s)
{
- dbg(lvl_debug,"enter %s\n",s);
+ dbg(lvl_debug,"enter %s",s);
callback_list_call_attr_1(gra->cbl, attr_keypress, s);
}
@@ -568,20 +568,20 @@ set_activity(jobject graphics)
jmethodID cid;
ActivityClass = (*jnienv)->GetObjectClass(jnienv, android_activity);
- dbg(lvl_debug,"at 5\n");
+ dbg(lvl_debug,"at 5");
if (ActivityClass == NULL) {
- dbg(lvl_debug,"no activity class found\n");
+ dbg(lvl_debug,"no activity class found");
return 0;
}
- dbg(lvl_debug,"at 6\n");
+ dbg(lvl_debug,"at 6");
cid = (*jnienv)->GetMethodID(jnienv, ActivityClass, "setContentView", "(Landroid/view/View;)V");
if (cid == NULL) {
- dbg(lvl_error,"no setContentView method found\n");
+ dbg(lvl_error,"no setContentView method found");
return 0;
}
- dbg(lvl_debug,"at 7\n");
+ dbg(lvl_debug,"at 7");
(*jnienv)->CallVoidMethod(jnienv, android_activity, cid, graphics);
- dbg(lvl_debug,"at 8\n");
+ dbg(lvl_debug,"at 8");
return 1;
}
@@ -604,7 +604,7 @@ graphics_android_init(struct graphics_priv *ret, struct graphics_priv *parent, s
struct callback *cb;
jmethodID cid, Context_getPackageName;
- dbg(lvl_debug,"at 2 jnienv=%p\n",jnienv);
+ dbg(lvl_debug,"at 2 jnienv=%p",jnienv);
if (parent)
ret->padding = parent->padding;
if (!find_class_global("android/graphics/Paint", &ret->PaintClass))
@@ -653,15 +653,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_debug,"at 3\n");
+ dbg(lvl_debug,"at 3");
cid = (*jnienv)->GetMethodID(jnienv, ret->NavitGraphicsClass, "<init>", "(Landroid/app/Activity;Lorg/navitproject/navit/NavitGraphics;IIIIII)V");
if (cid == NULL) {
- dbg(lvl_error,"no method found\n");
+ dbg(lvl_error,"no method found");
return 0; /* exception thrown */
}
- dbg(lvl_debug,"at 4 android_activity=%p\n",android_activity);
+ dbg(lvl_debug,"at 4 android_activity=%p",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, wraparound, use_camera);
- dbg(lvl_debug,"result=%p\n",ret->NavitGraphics);
+ dbg(lvl_debug,"result=%p",ret->NavitGraphics);
if (ret->NavitGraphics)
ret->NavitGraphics = (*jnienv)->NewGlobalRef(jnienv, ret->NavitGraphics);
@@ -670,13 +670,13 @@ 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_debug,"result=%p\n",ret->Paint);
+ dbg(lvl_debug,"result=%p",ret->Paint);
if (ret->Paint)
ret->Paint = (*jnienv)->NewGlobalRef(jnienv, ret->Paint);
cid = (*jnienv)->GetMethodID(jnienv, ret->NavitGraphicsClass, "setSizeChangedCallback", "(I)V");
if (cid == NULL) {
- dbg(lvl_error,"no SetResizeCallback method found\n");
+ dbg(lvl_error,"no SetResizeCallback method found");
return 0; /* exception thrown */
}
cb=callback_new_1(callback_cast(resize_callback), ret);
@@ -684,7 +684,7 @@ graphics_android_init(struct graphics_priv *ret, struct graphics_priv *parent, s
cid = (*jnienv)->GetMethodID(jnienv, ret->NavitGraphicsClass, "setPaddingChangedCallback", "(I)V");
if (cid == NULL) {
- dbg(lvl_error,"no SetPaddingCallback method found\n");
+ dbg(lvl_error,"no SetPaddingCallback method found");
return 0; /* exception thrown */
}
cb=callback_new_1(callback_cast(padding_callback), ret);
@@ -692,7 +692,7 @@ graphics_android_init(struct graphics_priv *ret, struct graphics_priv *parent, s
cid = (*jnienv)->GetMethodID(jnienv, ret->NavitGraphicsClass, "setButtonCallback", "(I)V");
if (cid == NULL) {
- dbg(lvl_error,"no SetButtonCallback method found\n");
+ dbg(lvl_error,"no SetButtonCallback method found");
return 0; /* exception thrown */
}
cb=callback_new_1(callback_cast(button_callback), ret);
@@ -700,7 +700,7 @@ graphics_android_init(struct graphics_priv *ret, struct graphics_priv *parent, s
cid = (*jnienv)->GetMethodID(jnienv, ret->NavitGraphicsClass, "setMotionCallback", "(I)V");
if (cid == NULL) {
- dbg(lvl_error,"no SetMotionCallback method found\n");
+ dbg(lvl_error,"no SetMotionCallback method found");
return 0; /* exception thrown */
}
cb=callback_new_1(callback_cast(motion_callback), ret);
@@ -708,7 +708,7 @@ graphics_android_init(struct graphics_priv *ret, struct graphics_priv *parent, s
cid = (*jnienv)->GetMethodID(jnienv, ret->NavitGraphicsClass, "setKeypressCallback", "(I)V");
if (cid == NULL) {
- dbg(lvl_error,"no SetKeypressCallback method found\n");
+ dbg(lvl_error,"no SetKeypressCallback method found");
return 0; /* exception thrown */
}
cb=callback_new_1(callback_cast(keypress_callback), ret);
@@ -757,7 +757,7 @@ graphics_android_fullscreen(struct window *win, int on)
static void
graphics_android_disable_suspend(struct window *win)
{
- dbg(lvl_debug,"enter\n");
+ dbg(lvl_debug,"enter");
(*jnienv)->CallVoidMethod(jnienv, android_activity, Navit_disableSuspend);
}
@@ -776,7 +776,7 @@ static void
graphics_android_cmd_runMenuItem(struct graphics_priv *this, char *function, struct attr **in, struct attr ***out, int *valid)
{
int ncmd=0;
- dbg(0,"Running %s\n",function);
+ dbg(0,"Running %s",function);
if(!strcmp(function,"map_download_dialog")) {
ncmd=3;
} else if(!strcmp(function,"backup_restore_dialog")) {
@@ -801,7 +801,7 @@ graphics_android_cmd_runMenuItem(struct graphics_priv *this, char *function, str
static void
graphics_android_cmd_menu(struct graphics_priv *this, char *function, struct attr **in, struct attr ***out, int *valid)
{
- dbg(lvl_debug, "enter\n");
+ dbg(lvl_debug, "enter");
(*jnienv)->CallVoidMethod(jnienv, android_activity, Navit_showMenu);
}
@@ -838,7 +838,7 @@ graphics_android_new(struct navit *nav, struct graphics_methods *meth, struct at
jmethodID cid;
jint android_bgcolor;
- dbg(lvl_debug, "enter\n");
+ dbg(lvl_debug, "enter");
if (!event_request_system("android","graphics_android"))
return NULL;
ret=g_new0(struct graphics_priv, 1);
@@ -859,7 +859,7 @@ graphics_android_new(struct navit *nav, struct graphics_methods *meth, struct at
| (attr->u.color->r / 0x101) << 16
| (attr->u.color->g / 0x101) << 8
| (attr->u.color->b / 0x101);
- dbg(lvl_debug, "attr_background_color %04x %04x %04x %04x (%08x)\n",
+ dbg(lvl_debug, "attr_background_color %04x %04x %04x %04x (%08x)",
attr->u.color->r, attr->u.color->g, attr->u.color->b, attr->u.color->a, ret->bgcolor);
} else {
/* default is the same as for OSD */
@@ -886,14 +886,14 @@ graphics_android_new(struct navit *nav, struct graphics_methods *meth, struct at
* the navit object (as the fact that graphics also handles input devices is not immedately obvious).
*/
navit_object_set_attr((struct navit_object *) nav, attr);
- dbg(lvl_debug, "attr_has_menu_button=%d\n", attr->u.num);
+ dbg(lvl_debug, "attr_has_menu_button=%d", attr->u.num);
g_free(attr);
}
ret->NavitGraphics_setBackgroundColor = (*jnienv)->GetMethodID(jnienv, ret->NavitGraphicsClass, "setBackgroundColor", "(I)V");
if (ret->NavitGraphics_setBackgroundColor != NULL) {
(*jnienv)->CallVoidMethod(jnienv, ret->NavitGraphics, ret->NavitGraphics_setBackgroundColor, ret->bgcolor);
}
- dbg(lvl_debug,"returning %p\n",ret);
+ dbg(lvl_debug,"returning %p",ret);
return ret;
} else {
g_free(ret);
@@ -922,7 +922,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, wraparound, 0)) {
- dbg(lvl_debug,"returning %p\n",ret);
+ dbg(lvl_debug,"returning %p",ret);
return ret;
} else {
g_free(ret);
@@ -934,12 +934,12 @@ overlay_new(struct graphics_priv *gr, struct graphics_methods *meth, struct poin
static void
event_android_main_loop_run(void)
{
- dbg(lvl_debug,"enter\n");
+ dbg(lvl_debug,"enter");
}
static void event_android_main_loop_quit(void)
{
- dbg(lvl_debug,"enter\n");
+ dbg(lvl_debug,"enter");
(*jnienv)->CallVoidMethod(jnienv, android_activity, Navit_exit);
}
@@ -961,7 +961,7 @@ static void do_poll(JNIEnv *env, int fd, int cond)
{
struct pollfd pfd;
pfd.fd=fd;
- dbg(lvl_debug,"%p poll called for %d %d\n", fd, cond);
+ dbg(lvl_debug,"%p poll called for %d %d", fd, cond);
switch ((enum event_watch_cond)cond) {
case event_watch_cond_read:
pfd.events=POLLIN;
@@ -984,7 +984,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_debug,"result for %d,%d,%p=%p\n",h,cond,cb,ret);
+ dbg(lvl_debug,"result for %d,%d,%p=%p",h,cond,cb,ret);
if (ret)
ret = (*jnienv)->NewGlobalRef(jnienv, ret);
return (struct event_watch *)ret;
@@ -993,7 +993,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_debug,"enter %p\n",ev);
+ dbg(lvl_debug,"enter %p",ev);
if (ev) {
jobject obj=(jobject )ev;
(*jnienv)->CallVoidMethod(jnienv, obj, NavitWatch_remove);
@@ -1045,9 +1045,9 @@ event_android_add_idle(int priority, struct callback *cb)
{
#if 0
jobject ret;
- dbg(lvl_debug,"enter\n");
+ dbg(lvl_debug,"enter");
ret=(*jnienv)->NewObject(jnienv, NavitIdleClass, NavitIdle_init, (int)cb);
- dbg(lvl_debug,"result for %p=%p\n",cb,ret);
+ dbg(lvl_debug,"result for %p=%p",cb,ret);
if (ret)
ret = (*jnienv)->NewGlobalRef(jnienv, ret);
return (struct event_idle *)ret;
@@ -1059,7 +1059,7 @@ static void
event_android_remove_idle(struct event_idle *ev)
{
#if 0
- dbg(lvl_debug,"enter %p\n",ev);
+ dbg(lvl_debug,"enter %p",ev);
if (ev) {
jobject obj=(jobject )ev;
(*jnienv)->CallVoidMethod(jnienv, obj, NavitIdle_remove);
@@ -1072,7 +1072,7 @@ event_android_remove_idle(struct event_idle *ev)
static void
event_android_call_callback(struct callback_list *cb)
{
- dbg(lvl_debug,"enter\n");
+ dbg(lvl_debug,"enter");
}
static struct event_methods event_android_methods = {
@@ -1090,7 +1090,7 @@ static struct event_methods event_android_methods = {
static struct event_priv *
event_android_new(struct event_methods *meth)
{
- dbg(lvl_debug,"enter\n");
+ dbg(lvl_debug,"enter");
if (!find_class_global("org/navitproject/navit/NavitTimeout", &NavitTimeoutClass))
return NULL;
NavitTimeout_init = (*jnienv)->GetMethodID(jnienv, NavitTimeoutClass, "<init>", "(IZI)V");
@@ -1139,7 +1139,7 @@ event_android_new(struct event_methods *meth)
Navit_showNativeKeyboard = (*jnienv)->GetMethodID(jnienv, NavitClass, "showNativeKeyboard", "()I");
Navit_hideNativeKeyboard = (*jnienv)->GetMethodID(jnienv, NavitClass, "hideNativeKeyboard", "()V");
- dbg(lvl_debug,"ok\n");
+ dbg(lvl_debug,"ok");
*meth=event_android_methods;
return NULL;
}
@@ -1166,12 +1166,12 @@ event_android_new(struct event_methods *meth)
int show_native_keyboard (struct graphics_keyboard *kbd) {
kbd->w = -1;
if (Navit_showNativeKeyboard == NULL) {
- dbg(lvl_error, "method Navit.showNativeKeyboard() not found, cannot display keyboard\n");
+ dbg(lvl_error, "method Navit.showNativeKeyboard() not found, cannot display keyboard");
return 0;
}
kbd->h = (*jnienv)->CallIntMethod(jnienv, android_activity, Navit_showNativeKeyboard);
- dbg(lvl_error, "keyboard size is %d x %d px\n", kbd->w, kbd->h);
- dbg(lvl_error, "return\n");
+ dbg(lvl_error, "keyboard size is %d x %d px", kbd->w, kbd->h);
+ dbg(lvl_error, "return");
/* zero height means we're not showing a keyboard, therefore normalize height to boolean */
return !!(kbd->h);
}
@@ -1186,7 +1186,7 @@ int show_native_keyboard (struct graphics_keyboard *kbd) {
*/
void hide_native_keyboard (struct graphics_keyboard *kbd) {
if (Navit_hideNativeKeyboard == NULL) {
- dbg(lvl_error, "method Navit.hideNativeKeyboard() not found, cannot dismiss keyboard\n");
+ dbg(lvl_error, "method Navit.hideNativeKeyboard() not found, cannot dismiss keyboard");
return;
}
(*jnienv)->CallVoidMethod(jnienv, android_activity, Navit_hideNativeKeyboard);
@@ -1197,7 +1197,7 @@ void hide_native_keyboard (struct graphics_keyboard *kbd) {
void
plugin_init(void)
{
- dbg(lvl_debug,"enter\n");
+ dbg(lvl_debug,"enter");
plugin_register_category_graphics("android", graphics_android_new);
plugin_register_category_event("android", event_android_new);
}
diff --git a/navit/graphics/cocoa/graphics_cocoa.m b/navit/graphics/cocoa/graphics_cocoa.m
index 16c879bd7..8612469ac 100644
--- a/navit/graphics/cocoa/graphics_cocoa.m
+++ b/navit/graphics/cocoa/graphics_cocoa.m
@@ -112,7 +112,7 @@ struct graphics_font_priv {
#if REVERSE_Y
pc.y=graphics->h-pc.y-gr->h;
#endif
- dbg(1,"draw %dx%d at %f,%f\n",gr->w,gr->h,pc.x,pc.y);
+ dbg(1,"draw %dx%d at %f,%f",gr->w,gr->h,pc.x,pc.y);
CGContextDrawLayerAtPoint(X, pc, gr->layer);
}
gr=gr->next;
@@ -128,7 +128,7 @@ struct graphics_font_priv {
struct point p;
p.x=pc.x;
p.y=pc.y;
- dbg(1,"Enter count=%d %d %d\n",touches.count,p.x,p.y);
+ dbg(1,"Enter count=%d %d %d",touches.count,p.x,p.y);
callback_list_call_attr_3(graphics->cbl, attr_button, GINT_TO_POINTER(1), GINT_TO_POINTER(1), (void *)&p);
}
@@ -141,7 +141,7 @@ struct graphics_font_priv {
struct point p;
p.x=pc.x;
p.y=pc.y;
- dbg(1,"Enter count=%d %d %d\n",touches.count,p.x,p.y);
+ dbg(1,"Enter count=%d %d %d",touches.count,p.x,p.y);
callback_list_call_attr_3(graphics->cbl, attr_button, GINT_TO_POINTER(0), GINT_TO_POINTER(1), (void *)&p);
}
@@ -153,7 +153,7 @@ struct graphics_font_priv {
struct point p;
p.x=pc.x;
p.y=pc.y;
- dbg(1,"Enter count=%d %d %d\n",touches.count,p.x,p.y);
+ dbg(1,"Enter count=%d %d %d",touches.count,p.x,p.y);
callback_list_call_attr_3(graphics->cbl, attr_button, GINT_TO_POINTER(0), GINT_TO_POINTER(1), (void *)&p);
}
@@ -165,7 +165,7 @@ struct graphics_font_priv {
struct point p;
p.x=pc.x;
p.y=pc.y;
- dbg(1,"Enter count=%d %d %d\n",touches.count,p.x,p.y);
+ dbg(1,"Enter count=%d %d %d",touches.count,p.x,p.y);
callback_list_call_attr_1(graphics->cbl, attr_motion, (void *)&p);
}
@@ -176,7 +176,7 @@ struct graphics_font_priv {
p.x=theEvent.locationInWindow.x;
p.y=graphics->h-theEvent.locationInWindow.y;
- dbg(1,"Enter %d %d\n",p.x,p.y);
+ dbg(1,"Enter %d %d",p.x,p.y);
callback_list_call_attr_3(graphics->cbl, attr_button, GINT_TO_POINTER(1), GINT_TO_POINTER(1), (void *)&p);
}
@@ -186,7 +186,7 @@ struct graphics_font_priv {
p.x=theEvent.locationInWindow.x;
p.y=graphics->h-theEvent.locationInWindow.y;
- dbg(1,"Enter %d %d\n",p.x,p.y);
+ dbg(1,"Enter %d %d",p.x,p.y);
callback_list_call_attr_3(graphics->cbl, attr_button, GINT_TO_POINTER(0), GINT_TO_POINTER(1), (void *)&p);
}
@@ -196,7 +196,7 @@ struct graphics_font_priv {
p.x=theEvent.locationInWindow.x;
p.y=graphics->h-theEvent.locationInWindow.y;
- dbg(1,"Enter %d %d\n",p.x,p.y);
+ dbg(1,"Enter %d %d",p.x,p.y);
callback_list_call_attr_1(graphics->cbl, attr_motion, (void *)&p);
}
#endif
@@ -280,7 +280,7 @@ setup_graphics(struct graphics_priv *gr)
}
- (void)didReceiveMemoryWarning {
- dbg(0,"enter\n");
+ dbg(0,"enter");
}
- (void)viewDidUnload {
@@ -378,7 +378,7 @@ static void
draw_mode(struct graphics_priv *gr, enum draw_mode_num mode)
{
if (mode == draw_mode_end) {
- dbg(1,"end %p\n",gr);
+ dbg(1,"end %p",gr);
if (!gr->parent) {
#if USE_UIKIT
[gr->view setNeedsDisplay];
@@ -427,7 +427,7 @@ draw_rectangle(struct graphics_priv *gr, struct graphics_gc_priv *gc, struct poi
{
CGRect lr=CGRectMake(p->x, p->y, w, h);
if (p->x <= 0 && p->y <= 0 && p->x+w+1 >= gr->w && p->y+h+1 >= gr->h) {
- dbg(1,"clear %p %dx%d\n",gr,w,h);
+ dbg(1,"clear %p %dx%d",gr,w,h);
free_graphics(gr);
setup_graphics(gr);
}
@@ -571,7 +571,7 @@ image_new(struct graphics_priv *gra, struct graphics_image_methods *meth, char *
CGImageRef image = CGImageCreateWithPNGDataProvider(imgDataProvider, NULL, true, kCGRenderingIntentDefault);
CGDataProviderRelease(imgDataProvider);
- dbg(1,"size %dx%d\n",CGImageGetWidth(image),CGImageGetHeight(image));
+ dbg(1,"size %dx%d",CGImageGetWidth(image),CGImageGetHeight(image));
if (w)
*w=CGImageGetWidth(image);
if (h)
@@ -586,7 +586,7 @@ image_new(struct graphics_priv *gra, struct graphics_image_methods *meth, char *
static void *
get_data(struct graphics_priv *this, const char *type)
{
- dbg(0,"enter\n");
+ dbg(0,"enter");
if (strcmp(type,"window"))
return NULL;
return &this->win;
@@ -670,7 +670,7 @@ graphics_cocoa_new(struct navit *nav, struct graphics_methods *meth, struct attr
{
struct graphics_priv *ret;
*meth=graphics_methods;
- dbg(0,"enter\n");
+ dbg(0,"enter");
if(!event_request_system("cocoa","graphics_cocoa"))
return NULL;
ret=g_new0(struct graphics_priv, 1);
@@ -683,7 +683,7 @@ static void
event_cocoa_main_loop_run(void)
{
- dbg(0,"enter\n");
+ dbg(0,"enter");
#if 0
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
@@ -693,9 +693,9 @@ event_cocoa_main_loop_run(void)
#endif
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
#if USE_UIKIT
- dbg(0,"calling main\n");
+ dbg(0,"calling main");
int retval = UIApplicationMain(main_argc, main_argv, nil, @"NavitAppDelegate");
- dbg(0,"retval=%d\n",retval);
+ dbg(0,"retval=%d",retval);
#else
NavitAppDelegate * delegate = [[NavitAppDelegate alloc] init];
NSApplication * application = [NSApplication sharedApplication];
@@ -739,7 +739,7 @@ event_cocoa_add_timeout(int timeout, int multi, struct callback *cb)
NavitTimer *ret=[[NavitTimer alloc]init];
ret->cb=cb;
ret->timer=[NSTimer scheduledTimerWithTimeInterval:(timeout/1000.0) target:ret selector:@selector(onTimer:) userInfo:nil repeats:multi?YES:NO];
- dbg(1,"timer=%p\n",ret->timer);
+ dbg(1,"timer=%p",ret->timer);
return (struct event_timeout *)ret;
}
@@ -761,7 +761,7 @@ event_cocoa_add_idle(int priority, struct callback *cb)
ret->cb=cb;
ret->timer=[NSTimer scheduledTimerWithTimeInterval:(0.0) target:ret selector:@selector(onTimer:) userInfo:nil repeats:YES];
- dbg(1,"timer=%p\n",ret->timer);
+ dbg(1,"timer=%p",ret->timer);
return (struct event_idle *)ret;
}
@@ -790,7 +790,7 @@ static struct event_methods event_cocoa_methods = {
static struct event_priv *
event_cocoa_new(struct event_methods *meth)
{
- dbg(0,"enter\n");
+ dbg(0,"enter");
*meth=event_cocoa_methods;
return NULL;
}
@@ -799,7 +799,7 @@ event_cocoa_new(struct event_methods *meth)
void
plugin_init(void)
{
- dbg(0,"enter\n");
+ dbg(0,"enter");
plugin_register_category_graphics("cocoa", graphics_cocoa_new);
plugin_register_category_event("cocoa", event_cocoa_new);
}
diff --git a/navit/graphics/egl/graphics_egl.c b/navit/graphics/egl/graphics_egl.c
index 4d7780ff4..8a500a00e 100644
--- a/navit/graphics/egl/graphics_egl.c
+++ b/navit/graphics/egl/graphics_egl.c
@@ -492,7 +492,7 @@ image_new(struct graphics_priv *gr, struct graphics_image_methods *meth, char *n
else
{
/* TODO: debug "colour parse errors" on xpm */
- dbg(lvl_error,"image_new on '%s' failed: %s\n", name, IMG_GetError());
+ dbg(lvl_error,"image_new on '%s' failed: %s", name, IMG_GetError());
g_free(gi);
gi = NULL;
g_hash_table_insert(hImageData,
@@ -829,7 +829,7 @@ draw_text(struct graphics_priv *gr, struct graphics_gc_priv *fg,
int color = 1;
if (!font) {
- dbg(lvl_error, "no font, returning\n");
+ dbg(lvl_error, "no font, returning");
return;
}
graphics_priv_root->dirty = 1;
diff --git a/navit/graphics/gd/graphics_gd.c b/navit/graphics/gd/graphics_gd.c
index 3ef6c520b..c2d09ae46 100644
--- a/navit/graphics/gd/graphics_gd.c
+++ b/navit/graphics/gd/graphics_gd.c
@@ -511,7 +511,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_debug,"next flag is %d\n",next->flag);
+ dbg(lvl_debug,"next flag is %d",next->flag);
if (!next->flag) {
gr->shm_header=next;
image_setup(gr);
@@ -526,15 +526,15 @@ draw_mode(struct graphics_priv *gr, enum draw_mode_num mode)
while (sockets) {
int fd=socket(PF_INET, SOCK_STREAM, 0);
if (fd < 0) {
- dbg(lvl_error,"socket failed\n");
+ dbg(lvl_error,"socket failed");
} else {
if (connect(fd, (struct sockaddr *)sockets->data, sizeof(struct sockaddr_in)) < 0) {
- dbg(lvl_error,"connect failed\n");
+ dbg(lvl_error,"connect failed");
} else {
size_written=write(fd, data, size);
- dbg(lvl_debug,"size %d vs %d\n",size, size_written);
+ dbg(lvl_debug,"size %d vs %d",size, size_written);
if (shutdown(fd, SHUT_RDWR) < 0)
- dbg(lvl_error,"shutdown failed\n");
+ dbg(lvl_error,"shutdown failed");
}
close(fd);
}
@@ -586,7 +586,7 @@ get_data(struct graphics_priv *this, char *type)
int b;
struct point p;
gdImagePtr im = this->im;
- dbg(lvl_debug,"type=%s\n",type);
+ dbg(lvl_debug,"type=%s",type);
if (!strcmp(type,"window"))
return &this->window;
if (!strcmp(type,"image_png")) {
@@ -608,11 +608,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_debug,"click %d %d %d\n",p.x,p.y,b);
+ dbg(lvl_debug,"click %d %d %d",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_debug,"move %d %d\n",p.x,p.y);
+ dbg(lvl_debug,"move %d %d",p.x,p.y);
callback_list_call_attr_1(this->cbl, attr_motion, (void *)&p);
}
return NULL;
@@ -629,13 +629,13 @@ image_free(struct graphics_priv *gr, struct graphics_image_priv *priv)
static void
overlay_disable(struct graphics_priv *gr, int disable)
{
- dbg(lvl_debug,"enter\n");
+ dbg(lvl_debug,"enter");
}
static void
overlay_resize(struct graphics_priv *gr, struct point *p, int w, int h, int wraparound)
{
- dbg(lvl_debug,"enter\n");
+ dbg(lvl_debug,"enter");
}
struct shmem_header *
@@ -643,10 +643,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_debug,"wraparound\n");
+ dbg(lvl_debug,"wraparound");
return gr->shm;
}
- dbg(lvl_debug,"next 0x%x (offset 0x%x)\n",next-(char *)gr->shm,gr->shmoffset);
+ dbg(lvl_debug,"next 0x%x (offset 0x%x)",next-(char *)gr->shm,gr->shmoffset);
return (struct shmem_header *)next;
}
@@ -667,17 +667,17 @@ image_setup(struct graphics_priv *gr)
static void
image_create(struct graphics_priv *gr)
{
- dbg(lvl_debug,"shmkey %d\n",gr->shmkey);
+ dbg(lvl_debug,"shmkey %d",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_debug,"shmid for key 0x%x is 0x%x\n",gr->shmkey, shmid);
+ dbg(lvl_debug,"shmid for key 0x%x is 0x%x",gr->shmkey, shmid);
if (shmid < 0)
- dbg(lvl_debug,"shmget\n");
+ dbg(lvl_debug,"shmget");
gr->shm=shmat(shmid, NULL, 0);
if (!gr->shm)
- dbg(lvl_debug,"shmat\n");
+ dbg(lvl_debug,"shmat");
gr->shm_header=gr->shm;
gr->im=g_new0(gdImage,1);
gr->im->tpixels=g_new(int *,gr->h);
@@ -754,7 +754,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_debug,"s=%s\n",s);
+ dbg(lvl_debug,"s=%s",s);
while (c) {
n=strchr(c,',');
if (n)
@@ -768,12 +768,12 @@ set_attr_do(struct graphics_priv *gr, struct attr *attr, int init)
if (inet_aton(c, &sin->sin_addr)) {
gr->sockets=g_list_append(gr->sockets, sin);
} else {
- dbg(lvl_error,"error in %s\n",c);
+ dbg(lvl_error,"error in %s",c);
g_free(sin);
}
- dbg(lvl_debug,"host=%s port=%s\n",c,p);
+ dbg(lvl_debug,"host=%s port=%s",c,p);
} else
- dbg(lvl_error,"error in format: %s\n",p);
+ dbg(lvl_error,"error in format: %s",p);
c=n;
}
g_free(s);
@@ -823,7 +823,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_debug,"enter\n");
+ dbg(lvl_debug,"enter");
ret=g_new0(struct graphics_priv, 1);
*meth=graphics_methods;
font_freetype_new=plugin_get_category_font("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 dbb18310a..0eb147fce 100644
--- a/navit/graphics/gtk_drawing_area/graphics_gtk_drawing_area.c
+++ b/navit/graphics/gtk_drawing_area/graphics_gtk_drawing_area.c
@@ -112,13 +112,13 @@ struct graphics_image_priv {
static void
graphics_destroy(struct graphics_priv *gr)
{
- dbg(lvl_debug,"enter parent %p\n",gr->parent);
+ dbg(lvl_debug,"enter parent %p",gr->parent);
gr->freetype_methods.destroy();
if (!gr->parent) {
- dbg(lvl_debug,"enter win %p\n",gr->win);
+ dbg(lvl_debug,"enter win %p",gr->win);
if (gr->win)
gtk_widget_destroy(gr->win);
- dbg(lvl_debug,"widget %p\n",gr->widget);
+ dbg(lvl_debug,"widget %p",gr->widget);
if (gr->widget)
gtk_widget_destroy(gr->widget);
g_free(gr->window_title);
@@ -401,7 +401,7 @@ draw_text(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct graphics
if (! font)
{
- dbg(lvl_error,"no font, returning\n");
+ dbg(lvl_error,"no font, returning");
return;
}
#if 0 /* Temporarily disabled because it destroys text rendering of overlays and in gui internal in some places */
@@ -458,7 +458,7 @@ draw_image_warp(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct po
unsigned char* intermediate_buffer_aligned;
Imlib_Image intermediate_image;
size_t stride;
- dbg(lvl_debug,"draw_image_warp data=%p\n", img);
+ dbg(lvl_debug,"draw_image_warp data=%p", img);
w = img->w;
h = img->h;
if (!img->image) {
@@ -466,7 +466,7 @@ draw_image_warp(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct po
img->image=imlib_create_image(w, h);
imlib_context_set_image(img->image);
if (gdk_pixbuf_get_colorspace(img->pixbuf) != GDK_COLORSPACE_RGB || gdk_pixbuf_get_bits_per_sample(img->pixbuf) != 8) {
- dbg(lvl_error,"implement me\n");
+ dbg(lvl_error,"implement me");
} else if (gdk_pixbuf_get_has_alpha(img->pixbuf) && gdk_pixbuf_get_n_channels(img->pixbuf) == 4) {
for (y=0 ; y < h ; y++) {
unsigned int *dst=imlib_image_get_data()+y*w;
@@ -486,7 +486,7 @@ draw_image_warp(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct po
}
}
} else {
- dbg(lvl_error,"implement me\n");
+ dbg(lvl_error,"implement me");
}
}
@@ -601,7 +601,7 @@ configure(GtkWidget * widget, GdkEventConfigure * event, gpointer user_data)
if (! gra->visible)
return TRUE;
#ifndef _WIN32
- dbg(lvl_debug,"window=%lu\n", GDK_WINDOW_XID(widget->window));
+ dbg(lvl_debug,"window=%lu", GDK_WINDOW_XID(widget->window));
#endif
gra->width=widget->allocation.width;
gra->height=widget->allocation.height;
@@ -750,7 +750,7 @@ static gint
delete(GtkWidget *widget, GdkEventKey *event, gpointer user_data)
{
struct graphics_priv *this=user_data;
- dbg(lvl_debug,"enter this->win=%p\n",this->win);
+ dbg(lvl_debug,"enter this->win=%p",this->win);
if (this->delay & 2) {
if (this->win)
this->win=NULL;
@@ -834,7 +834,7 @@ keypress(GtkWidget *widget, GdkEventKey *event, gpointer user_data)
if (key[0])
callback_list_call_attr_1(this->cbl, attr_keypress, (void *)key);
else
- dbg(lvl_debug,"keyval 0x%x\n", event->keyval);
+ dbg(lvl_debug,"keyval 0x%x", event->keyval);
return FALSE;
}
@@ -916,7 +916,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_debug,"h= %i, w= %i\n",this->win_h, this->win_w);
+ dbg(lvl_debug,"h= %i, w= %i",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);
@@ -935,7 +935,7 @@ get_data_window(struct graphics_priv *this, unsigned int xid)
static int
set_attr(struct graphics_priv *gr, struct attr *attr)
{
- dbg(lvl_debug,"enter\n");
+ dbg(lvl_debug,"enter");
switch (attr->type) {
case attr_windowid:
get_data_window(gr, attr->u.num);
@@ -1010,7 +1010,7 @@ graphics_gtk_drawing_area_disable_suspend(struct window *w)
if (gr->pid)
kill(gr->pid, SIGWINCH);
#else
- dbg(lvl_warning, "failed to kill() under Windows\n");
+ dbg(lvl_warning, "failed to kill() under Windows");
#endif
}
@@ -1041,9 +1041,9 @@ get_data(struct graphics_priv *this, char const *type)
int fscanf_result;
fscanf_result = fscanf(f,"%d",&this->pid);
if ((fscanf_result == EOF) || (fscanf_result == 0)){
- dbg(lvl_warning, "Failed to open iPaq sleep file. Error-Code: %d\n" , errno);
+ dbg(lvl_warning, "Failed to open iPaq sleep file. Error-Code: %d" , errno);
}
- dbg(lvl_debug,"ipaq_sleep pid=%d\n", this->pid);
+ dbg(lvl_debug,"ipaq_sleep pid=%d", this->pid);
pclose(f);
}
#endif
diff --git a/navit/graphics/null/graphics_null.c b/navit/graphics/null/graphics_null.c
index ecac7d528..3b527800f 100644
--- a/navit/graphics/null/graphics_null.c
+++ b/navit/graphics/null/graphics_null.c
@@ -257,7 +257,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_debug, "event_system is %s\n", event_loop_system->u.str);
+ dbg(lvl_debug, "event_system is %s", event_loop_system->u.str);
if (!event_request_system(event_loop_system->u.str, "graphics_null"))
return NULL;
} else {
@@ -273,7 +273,7 @@ static void
event_null_main_loop_run(void)
{
- dbg(lvl_debug,"enter\n");
+ dbg(lvl_debug,"enter");
for (;;)
sleep(1);
@@ -281,54 +281,54 @@ event_null_main_loop_run(void)
static void event_null_main_loop_quit(void)
{
- dbg(lvl_debug,"enter\n");
+ dbg(lvl_debug,"enter");
}
static struct event_watch *
event_null_add_watch(int h, enum event_watch_cond cond, struct callback *cb)
{
- dbg(lvl_debug,"enter\n");
+ dbg(lvl_debug,"enter");
return NULL;
}
static void
event_null_remove_watch(struct event_watch *ev)
{
- dbg(lvl_debug,"enter\n");
+ dbg(lvl_debug,"enter");
}
static struct event_timeout *
event_null_add_timeout(int timeout, int multi, struct callback *cb)
{
- dbg(lvl_debug,"enter\n");
+ dbg(lvl_debug,"enter");
return NULL;
}
static void
event_null_remove_timeout(struct event_timeout *to)
{
- dbg(lvl_debug,"enter\n");
+ dbg(lvl_debug,"enter");
}
static struct event_idle *
event_null_add_idle(int priority, struct callback *cb)
{
- dbg(lvl_debug,"enter\n");
+ dbg(lvl_debug,"enter");
return NULL;
}
static void
event_null_remove_idle(struct event_idle *ev)
{
- dbg(lvl_debug,"enter\n");
+ dbg(lvl_debug,"enter");
}
static void
event_null_call_callback(struct callback_list *cb)
{
- dbg(lvl_debug,"enter\n");
+ dbg(lvl_debug,"enter");
}
static struct event_methods event_null_methods = {
diff --git a/navit/graphics/opengl/graphics_opengl.c b/navit/graphics/opengl/graphics_opengl.c
index a0c2be2fe..c23d57204 100644
--- a/navit/graphics/opengl/graphics_opengl.c
+++ b/navit/graphics/opengl/graphics_opengl.c
@@ -527,7 +527,7 @@ image_new(struct graphics_priv *gr, struct graphics_image_methods *meth,
return gi;
}
#else
- dbg(lvl_error,"FreeImage not available - cannot load any images.\n");
+ dbg(lvl_error,"FreeImage not available - cannot load any images.");
return NULL;
#endif
}
@@ -748,7 +748,7 @@ getPrimitiveType(GLenum type)
void APIENTRY
tessBeginCB(GLenum which)
{
- dbg(lvl_debug, "glBegin( %s );\n", getPrimitiveType(which));
+ dbg(lvl_debug, "glBegin( %s );", getPrimitiveType(which));
tess_type=which;
tess_count=0;
}
@@ -758,7 +758,7 @@ tessBeginCB(GLenum which)
void APIENTRY
tessEndCB(void)
{
- dbg(lvl_debug, "glEnd();\n");
+ dbg(lvl_debug, "glEnd();");
draw_array(graphics_priv_root, tess_array, tess_count, tess_type);
}
@@ -769,14 +769,14 @@ tessVertexCB(const GLvoid * data)
{
// cast back to double type
const GLdouble *ptr = (const GLdouble *) data;
- dbg(lvl_debug, " glVertex3d();\n");
+ dbg(lvl_debug, " glVertex3d();");
tess_array[tess_count].x=ptr[0];
tess_array[tess_count].y=ptr[1];
if (tess_count < 511)
tess_count++;
else
- dbg(lvl_error,"overflow\n");
+ dbg(lvl_error,"overflow");
}
void APIENTRY
@@ -1031,7 +1031,7 @@ draw_text(struct graphics_priv *gr, struct graphics_gc_priv *fg,
int color = 1;
if (!font) {
- dbg(lvl_error, "no font, returning\n");
+ dbg(lvl_error, "no font, returning");
return;
}
@@ -1494,7 +1494,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_debug,"enter state %d button %d\n",state,button);
+ dbg(lvl_debug,"enter state %d button %d",state,button);
callback_list_call_attr_3(priv->cbl, attr_button, (void *) state, (void *)button, (void *) &p);
}
#endif
@@ -1738,61 +1738,61 @@ graphics_opengl_new(struct navit *nav, struct graphics_methods *meth,
static void
event_opengl_main_loop_run(void)
{
- dbg(lvl_info, "enter\n");
+ dbg(lvl_info, "enter");
}
static void
event_opengl_main_loop_quit(void)
{
- dbg(lvl_debug, "enter\n");
+ dbg(lvl_debug, "enter");
}
static struct event_watch *
event_opengl_add_watch(int fd, enum event_watch_cond cond,
struct callback *cb)
{
- dbg(lvl_debug, "enter\n");
+ dbg(lvl_debug, "enter");
return NULL;
}
static void
event_opengl_remove_watch(struct event_watch *ev)
{
- dbg(lvl_debug, "enter\n");
+ dbg(lvl_debug, "enter");
}
static struct event_timeout *
event_opengl_add_timeout(int timeout, int multi, struct callback *cb)
{
- dbg(lvl_debug, "enter\n");
+ dbg(lvl_debug, "enter");
return NULL;
}
static void
event_opengl_remove_timeout(struct event_timeout *to)
{
- dbg(lvl_debug, "enter\n");
+ dbg(lvl_debug, "enter");
}
static struct event_idle *
event_opengl_add_idle(int priority, struct callback *cb)
{
- dbg(lvl_debug, "enter\n");
+ dbg(lvl_debug, "enter");
return NULL;
}
static void
event_opengl_remove_idle(struct event_idle *ev)
{
- dbg(lvl_debug, "enter\n");
+ dbg(lvl_debug, "enter");
}
static void
event_opengl_call_callback(struct callback_list *cb)
{
- dbg(lvl_debug, "enter\n");
+ dbg(lvl_debug, "enter");
}
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 cb91ac88e..64e85e700 100644
--- a/navit/graphics/opengl/graphics_opengl_egl.c
+++ b/navit/graphics/opengl/graphics_opengl_egl.c
@@ -61,21 +61,21 @@ graphics_opengl_egl_new(void *display, void *window, struct graphics_opengl_plat
*methods=&graphics_opengl_egl_methods;
ret->egldisplay = eglGetDisplay((EGLNativeDisplayType)display);
if (!ret->egldisplay) {
- dbg(lvl_error, "can't get display\n");
+ dbg(lvl_error, "can't get display");
goto error;
}
if (!eglInitialize(ret->egldisplay, &major, &minor)) {
- dbg(lvl_error, "eglInitialize failed\n");
+ dbg(lvl_error, "eglInitialize failed");
goto error;
}
- dbg(lvl_debug,"eglInitialize ok with version %d.%d\n",major,minor);
+ dbg(lvl_debug,"eglInitialize ok with version %d.%d",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");
+ dbg(lvl_error, "eglChooseConfig failed");
goto error;
}
if (nconfig != 1) {
- dbg(lvl_error, "unexpected number of configs %d\n",nconfig);
+ dbg(lvl_error, "unexpected number of configs %d",nconfig);
goto error;
}
ret->eglwindow = eglCreateWindowSurface(ret->egldisplay, ret->config[0], (NativeWindowType) window, NULL);
diff --git a/navit/graphics/opengl/graphics_opengl_x11.c b/navit/graphics/opengl/graphics_opengl_x11.c
index 8f4b02eaf..a52192406 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_debug,"ConfigureNotify\n");
+ dbg(lvl_debug,"ConfigureNotify");
break;
case Expose:
- dbg(lvl_debug,"Expose\n");
+ dbg(lvl_debug,"Expose");
break;
case KeyPress:
- dbg(lvl_debug,"KeyPress\n");
+ dbg(lvl_debug,"KeyPress");
break;
case KeyRelease:
- dbg(lvl_debug,"KeyRelease\n");
+ dbg(lvl_debug,"KeyRelease");
break;
case MapNotify:
- dbg(lvl_debug,"MapNotify\n");
+ dbg(lvl_debug,"MapNotify");
break;
case MotionNotify:
if (x11->motion)
x11->motion(x11->data,event.xmotion.x,event.xmotion.y);
break;
case ReparentNotify:
- dbg(lvl_debug,"ReparentNotify\n");
+ dbg(lvl_debug,"ReparentNotify");
break;
default:
- dbg(lvl_debug,"type %d\n",event.type);
+ dbg(lvl_debug,"type %d",event.type);
}
}
}
@@ -126,14 +126,14 @@ graphics_opengl_x11_new(void *displayname, int w, int h, int depth, struct graph
*methods=&graphics_opengl_x11_methods;
ret->display=XOpenDisplay(displayname);
if (!ret->display) {
- dbg(lvl_error,"failed to open display\n");
+ dbg(lvl_error,"failed to open display");
goto error;
}
ret->watch=event_add_watch(ConnectionNumber(ret->display), event_watch_cond_read, ret->cb);
ret->screen=XDefaultScreen(ret->display);
ret->root_window=RootWindow(ret->display, ret->screen);
if (!XMatchVisualInfo(ret->display, ret->screen, depth, TrueColor, &ret->visual)) {
- dbg(lvl_error,"failed to find visual\n");
+ dbg(lvl_error,"failed to find visual");
goto error;
}
ret->colormap=XCreateColormap(ret->display, ret->root_window, ret->visual.visual, AllocNone);
diff --git a/navit/graphics/qt5/QNavitQuick.cpp b/navit/graphics/qt5/QNavitQuick.cpp
index 7df3e0073..ffc7a56b0 100644
--- a/navit/graphics/qt5/QNavitQuick.cpp
+++ b/navit/graphics/qt5/QNavitQuick.cpp
@@ -54,7 +54,7 @@ QNavitQuick::QNavitQuick(QQuickItem* parent)
void QNavitQuick::setGraphicContext(GraphicsPriv* gp)
{
- dbg(lvl_debug, "enter\n");
+ dbg(lvl_debug, "enter");
graphics_priv = gp->gp;
QObject::connect(gp, SIGNAL(update()), this, SLOT(update()));
}
@@ -68,7 +68,7 @@ static void paintOverlays(QPainter* painter, struct graphics_priv* gp, QPaintEve
if (!value->disable) {
QRect rr(value->x, value->y, value->pixmap->width(), value->pixmap->height());
if (event->rect().intersects(rr)) {
- dbg(lvl_debug, "draw overlay (%d, %d, %d, %d)\n", value->x + value->scroll_x, value->y + value->scroll_y, value->pixmap->width(), value->pixmap->height());
+ dbg(lvl_debug, "draw overlay (%d, %d, %d, %d)", value->x + value->scroll_x, value->y + value->scroll_y, value->pixmap->width(), value->pixmap->height());
painter->drawPixmap(value->x, value->y, *value->pixmap);
/* draw overlays of overlay if any by recursive calling */
paintOverlays(painter, value, event);
@@ -81,7 +81,7 @@ void QNavitQuick::paint(QPainter* painter)
{
QPaintEvent event = QPaintEvent(QRect(boundingRect().x(), boundingRect().y(), boundingRect().width(), boundingRect().height()));
- dbg(lvl_debug, "enter (%f, %f, %f, %f)\n", boundingRect().x(), boundingRect().y(), boundingRect().width(), boundingRect().height());
+ dbg(lvl_debug, "enter (%f, %f, %f, %f)", boundingRect().x(), boundingRect().y(), boundingRect().width(), boundingRect().height());
/* color background if any */
if (graphics_priv->background_graphics_gc_priv != NULL) {
@@ -97,7 +97,7 @@ void QNavitQuick::paint(QPainter* painter)
void QNavitQuick::keyPressEvent(QKeyEvent* event)
{
- dbg(lvl_debug, "enter\n");
+ dbg(lvl_debug, "enter");
char key[2];
int keycode;
char* text = NULL;
@@ -157,21 +157,21 @@ void QNavitQuick::keyPressEvent(QKeyEvent* event)
else if (key[0])
callback_list_call_attr_1(graphics_priv->callbacks, attr_keypress, (void*)key);
else
- dbg(lvl_debug, "keyval 0x%x\n", keycode);
+ dbg(lvl_debug, "keyval 0x%x", keycode);
}
void QNavitQuick::keyReleaseEvent(QKeyEvent* event)
{
- dbg(lvl_debug, "enter\n");
+ dbg(lvl_debug, "enter");
}
void QNavitQuick::geometryChanged(const QRectF& newGeometry, const QRectF& oldGeometry)
{
- dbg(lvl_debug, "enter\n");
+ dbg(lvl_debug, "enter");
QQuickPaintedItem::geometryChanged(newGeometry, oldGeometry);
QPainter* painter = NULL;
if (graphics_priv == NULL) {
- dbg(lvl_debug, "Context not set, aborting\n");
+ dbg(lvl_debug, "Context not set, aborting");
return;
}
if (graphics_priv->pixmap != NULL) {
@@ -186,8 +186,8 @@ void QNavitQuick::geometryChanged(const QRectF& newGeometry, const QRectF& oldGe
painter->fillRect(0, 0, width(), height(), brush);
delete painter;
}
- dbg(lvl_debug, "size %fx%f\n", width(), height());
- dbg(lvl_debug, "pixmap %p %dx%d\n", graphics_priv->pixmap, graphics_priv->pixmap->width(), graphics_priv->pixmap->height());
+ dbg(lvl_debug, "size %fx%f", width(), height());
+ dbg(lvl_debug, "pixmap %p %dx%d", graphics_priv->pixmap, graphics_priv->pixmap->width(), graphics_priv->pixmap->height());
/* if the root window got resized, tell navit about it */
if (graphics_priv->root)
resize_callback(graphics_priv, width(), height());
@@ -196,7 +196,7 @@ void QNavitQuick::geometryChanged(const QRectF& newGeometry, const QRectF& oldGe
void QNavitQuick::mouseEvent(int pressed, QMouseEvent* event)
{
struct point p;
- dbg(lvl_debug, "enter\n");
+ dbg(lvl_debug, "enter");
p.x = event->x();
p.y = event->y();
switch (event->button()) {
@@ -216,19 +216,19 @@ void QNavitQuick::mouseEvent(int pressed, QMouseEvent* event)
void QNavitQuick::mousePressEvent(QMouseEvent* event)
{
- dbg(lvl_debug, "enter\n");
+ dbg(lvl_debug, "enter");
mouseEvent(1, event);
}
void QNavitQuick::mouseReleaseEvent(QMouseEvent* event)
{
- dbg(lvl_debug, "enter\n");
+ dbg(lvl_debug, "enter");
mouseEvent(0, event);
}
void QNavitQuick::mouseMoveEvent(QMouseEvent* event)
{
- dbg(lvl_debug, "enter\n");
+ dbg(lvl_debug, "enter");
struct point p;
p.x = event->x();
p.y = event->y();
@@ -239,7 +239,7 @@ void QNavitQuick::wheelEvent(QWheelEvent* event)
{
struct point p;
int button;
- dbg(lvl_debug, "enter\n");
+ dbg(lvl_debug, "enter");
p.x = event->x(); // xy-coordinates of the mouse pointer
p.y = event->y();
diff --git a/navit/graphics/qt5/QNavitWidget.cpp b/navit/graphics/qt5/QNavitWidget.cpp
index 5a5bd303b..df051b557 100644
--- a/navit/graphics/qt5/QNavitWidget.cpp
+++ b/navit/graphics/qt5/QNavitWidget.cpp
@@ -70,7 +70,7 @@ static void paintOverlays(QPainter* painter, struct graphics_priv* gp, QPaintEve
if (!value->disable) {
QRect rr(value->x, value->y, value->pixmap->width(), value->pixmap->height());
if (event->rect().intersects(rr)) {
- dbg(lvl_debug, "draw overlay (%d, %d, %d, %d)\n", value->x + value->scroll_x, value->y + value->scroll_y, value->pixmap->width(), value->pixmap->height());
+ dbg(lvl_debug, "draw overlay (%d, %d, %d, %d)", value->x + value->scroll_x, value->y + value->scroll_y, value->pixmap->width(), value->pixmap->height());
painter->drawPixmap(value->x + value->scroll_x, value->y + value->scroll_y, *value->pixmap);
/* draw overlays of overlay if any by recursive calling */
paintOverlays(painter, value, event);
@@ -81,7 +81,7 @@ static void paintOverlays(QPainter* painter, struct graphics_priv* gp, QPaintEve
void QNavitWidget::paintEvent(QPaintEvent* event)
{
- dbg(lvl_debug, "enter (%d, %d, %d, %d)\n", event->rect().x(), event->rect().y(), event->rect().width(), event->rect().height());
+ dbg(lvl_debug, "enter (%d, %d, %d, %d)", event->rect().x(), event->rect().y(), event->rect().width(), event->rect().height());
QPainter painter(this);
/* color background if any */
if (graphics_priv->background_graphics_gc_priv != NULL) {
@@ -109,8 +109,8 @@ void QNavitWidget::resizeEvent(QResizeEvent* event)
painter->fillRect(0, 0, width(), height(), brush);
delete painter;
}
- dbg(lvl_debug, "size %dx%d\n", width(), height());
- dbg(lvl_debug, "pixmap %p %dx%d\n", graphics_priv->pixmap, graphics_priv->pixmap->width(), graphics_priv->pixmap->height());
+ dbg(lvl_debug, "size %dx%d", width(), height());
+ dbg(lvl_debug, "pixmap %p %dx%d", graphics_priv->pixmap, graphics_priv->pixmap->width(), graphics_priv->pixmap->height());
/* if the root window got resized, tell navit about it */
if (graphics_priv->root)
resize_callback(graphics_priv, width(), height());
@@ -119,7 +119,7 @@ void QNavitWidget::resizeEvent(QResizeEvent* event)
void QNavitWidget::mouseEvent(int pressed, QMouseEvent* event)
{
struct point p;
- // dbg(lvl_debug,"enter\n");
+ // dbg(lvl_debug,"enter");
p.x = event->x();
p.y = event->y();
switch (event->button()) {
@@ -139,7 +139,7 @@ void QNavitWidget::mouseEvent(int pressed, QMouseEvent* event)
void QNavitWidget::keyPressEvent(QKeyEvent* event)
{
- dbg(lvl_debug, "enter\n");
+ dbg(lvl_debug, "enter");
char key[2];
int keycode;
char* text = NULL;
@@ -199,25 +199,25 @@ void QNavitWidget::keyPressEvent(QKeyEvent* event)
else if (key[0])
callback_list_call_attr_1(graphics_priv->callbacks, attr_keypress, (void*)key);
else
- dbg(lvl_debug, "keyval 0x%x\n", keycode);
+ dbg(lvl_debug, "keyval 0x%x", keycode);
}
void QNavitWidget::mousePressEvent(QMouseEvent* event)
{
- // dbg(lvl_debug,"enter\n");
+ // dbg(lvl_debug,"enter");
mouseEvent(1, event);
}
void QNavitWidget::mouseReleaseEvent(QMouseEvent* event)
{
- // dbg(lvl_debug,"enter\n");
+ // dbg(lvl_debug,"enter");
mouseEvent(0, event);
}
void QNavitWidget::mouseMoveEvent(QMouseEvent* event)
{
struct point p;
- // dbg(lvl_debug,"enter\n");
+ // dbg(lvl_debug,"enter");
p.x = event->x();
p.y = event->y();
callback_list_call_attr_1(graphics_priv->callbacks, attr_motion, (void*)&p);
@@ -227,7 +227,7 @@ void QNavitWidget::wheelEvent(QWheelEvent* event)
{
struct point p;
int button;
- dbg(lvl_debug, "enter\n");
+ dbg(lvl_debug, "enter");
p.x = event->x(); // xy-coordinates of the mouse pointer
p.y = event->y();
diff --git a/navit/graphics/qt5/event_qt5.cpp b/navit/graphics/qt5/event_qt5.cpp
index 08fb6e525..e7cb1fd9f 100644
--- a/navit/graphics/qt5/event_qt5.cpp
+++ b/navit/graphics/qt5/event_qt5.cpp
@@ -63,7 +63,7 @@ qt5_navit_timer::qt5_navit_timer(QObject* parent)
timer_type = g_hash_table_new(NULL, NULL);
timer_callback = g_hash_table_new(NULL, NULL);
watches = g_hash_table_new(NULL, NULL);
- dbg(lvl_debug, "qt5_navit_timer object created\n");
+ dbg(lvl_debug, "qt5_navit_timer object created");
}
void qt5_navit_timer::watchEvent(int id)
@@ -71,7 +71,7 @@ void qt5_navit_timer::watchEvent(int id)
struct event_watch* ret = g_new0(struct event_watch, 1);
ret = (struct event_watch*)g_hash_table_lookup(watches, (void*)(long)id);
if (ret) {
- dbg(lvl_debug, "callback found, calling it\n");
+ dbg(lvl_debug, "callback found, calling it");
callback_call_0(ret->cb);
}
}
@@ -80,7 +80,7 @@ void qt5_navit_timer::timerEvent(QTimerEvent* event)
{
int id = event->timerId();
void* multi = NULL;
- // dbg(lvl_debug, "TimerEvent (%d)\n", id);
+ // dbg(lvl_debug, "TimerEvent (%d)", id);
struct callback* cb = (struct callback*)g_hash_table_lookup(timer_callback, (void*)(long)id);
if (cb)
callback_call_0(cb);
@@ -90,7 +90,7 @@ void qt5_navit_timer::timerEvent(QTimerEvent* event)
if (((int)(long)multi) == 0)
event_qt5_remove_timeout((struct event_timeout*)(long)id);
}
- // dbg(lvl_debug, "TimerEvent (%d) leave\n", id);
+ // dbg(lvl_debug, "TimerEvent (%d) leave", id);
}
qt5_navit_timer* qt5_timer = NULL;
@@ -99,21 +99,21 @@ static void
event_qt5_main_loop_run(void)
{
- dbg(lvl_debug, "enter\n");
+ dbg(lvl_debug, "enter");
if (navit_app != NULL)
navit_app->exec();
}
static void event_qt5_main_loop_quit(void)
{
- dbg(lvl_debug, "enter\n");
+ dbg(lvl_debug, "enter");
exit(0);
}
static struct event_watch*
event_qt5_add_watch(int fd, enum event_watch_cond cond, struct callback* cb)
{
- dbg(lvl_debug, "enter fd=%d\n", (int)(long)fd);
+ dbg(lvl_debug, "enter fd=%d", (int)(long)fd);
struct event_watch* ret = g_new0(struct event_watch, 1);
ret->fd = fd;
ret->cb = cb;
@@ -126,7 +126,7 @@ event_qt5_add_watch(int fd, enum event_watch_cond cond, struct callback* cb)
static void
event_qt5_remove_watch(struct event_watch* ev)
{
- dbg(lvl_debug, "enter\n");
+ dbg(lvl_debug, "enter");
g_hash_table_remove(qt5_timer->watches, GINT_TO_POINTER(ev->fd));
delete (ev->sn);
g_free(ev);
@@ -138,7 +138,7 @@ event_qt5_add_timeout(int timeout, int multi, struct callback* cb)
int id;
dbg(lvl_debug, "add timeout %d, mul %d, %p ==", timeout, multi, cb);
id = qt5_timer->startTimer(timeout);
- dbg(lvl_debug, "%d\n", id);
+ dbg(lvl_debug, "%d", id);
g_hash_table_insert(qt5_timer->timer_callback, (void*)(long)id, cb);
g_hash_table_insert(qt5_timer->timer_type, (void*)(long)id, (void*)(long)!!multi);
return (struct event_timeout*)(long)id;
@@ -147,7 +147,7 @@ event_qt5_add_timeout(int timeout, int multi, struct callback* cb)
static void
event_qt5_remove_timeout(struct event_timeout* to)
{
- dbg(lvl_debug, "remove timeout (%d)\n", (int)(long)to);
+ dbg(lvl_debug, "remove timeout (%d)", (int)(long)to);
qt5_timer->killTimer((int)(long)to);
g_hash_table_remove(qt5_timer->timer_callback, to);
g_hash_table_remove(qt5_timer->timer_type, to);
@@ -156,21 +156,21 @@ event_qt5_remove_timeout(struct event_timeout* to)
static struct event_idle*
event_qt5_add_idle(int priority, struct callback* cb)
{
- dbg(lvl_debug, "add idle event\n");
+ dbg(lvl_debug, "add idle event");
return (struct event_idle*)event_qt5_add_timeout(0, 1, cb);
}
static void
event_qt5_remove_idle(struct event_idle* ev)
{
- dbg(lvl_debug, "Remove idle timeout\n");
+ dbg(lvl_debug, "Remove idle timeout");
event_qt5_remove_timeout((struct event_timeout*)ev);
}
static void
event_qt5_call_callback(struct callback_list* cb)
{
- dbg(lvl_debug, "enter\n");
+ dbg(lvl_debug, "enter");
}
static struct event_methods event_qt5_methods = {
diff --git a/navit/graphics/qt5/graphics_qt5.cpp b/navit/graphics/qt5/graphics_qt5.cpp
index f7ac15f43..f142758ea 100644
--- a/navit/graphics/qt5/graphics_qt5.cpp
+++ b/navit/graphics/qt5/graphics_qt5.cpp
@@ -92,7 +92,7 @@ struct graphics_image_priv {
static void
graphics_destroy(struct graphics_priv* gr)
{
-// dbg(lvl_debug,"enter\n");
+// dbg(lvl_debug,"enter");
#if HAVE_FREETYPE
gr->freetype_methods.destroy();
#endif
@@ -146,7 +146,7 @@ graphics_destroy(struct graphics_priv* gr)
static void font_destroy(struct graphics_font_priv* font)
{
- // dbg(lvl_debug,"enter\n");
+ // dbg(lvl_debug,"enter");
if (font->font != NULL)
delete (font->font);
g_free(font);
@@ -190,7 +190,7 @@ static struct graphics_font_priv* font_new(struct graphics_priv* gr, struct grap
{
int a = 0;
struct graphics_font_priv* font_priv;
- dbg(lvl_debug, "enter (font %s, %d, 0x%x)\n", font, size, flags);
+ dbg(lvl_debug, "enter (font %s, %d, 0x%x)", font, size, flags);
font_priv = g_new0(struct graphics_font_priv, 1);
font_priv->font = new QFont(fontfamilies[0]);
if (font != NULL)
@@ -201,7 +201,7 @@ static struct graphics_font_priv* font_new(struct graphics_priv* gr, struct grap
a++;
}
if (font_priv->font->exactMatch()) {
- dbg(lvl_debug, "Exactly matching font: %s\n", font_priv->font->family().toUtf8().data());
+ dbg(lvl_debug, "Exactly matching font: %s", font_priv->font->family().toUtf8().data());
} else {
/* set any font*/
if (font != NULL) {
@@ -209,7 +209,7 @@ static struct graphics_font_priv* font_new(struct graphics_priv* gr, struct grap
} else {
font_priv->font->setFamily(fontfamilies[0]);
}
- dbg(lvl_debug, "No matching font. Resort to: %s\n", font_priv->font->family().toUtf8().data());
+ dbg(lvl_debug, "No matching font. Resort to: %s", font_priv->font->family().toUtf8().data());
}
/* No clue why factor 20. Found this by comparing to Freetype rendering. */
@@ -227,7 +227,7 @@ static struct graphics_font_priv* font_new(struct graphics_priv* gr, struct grap
static void
gc_destroy(struct graphics_gc_priv* gc)
{
- // dbg(lvl_debug,"enter gc=%p\n", gc);
+ // dbg(lvl_debug,"enter gc=%p", gc);
delete (gc->pen);
delete (gc->brush);
g_free(gc);
@@ -236,7 +236,7 @@ gc_destroy(struct graphics_gc_priv* gc)
static void
gc_set_linewidth(struct graphics_gc_priv* gc, int w)
{
- // dbg(lvl_debug,"enter gc=%p, %d\n", gc, w);
+ // dbg(lvl_debug,"enter gc=%p, %d", gc, w);
gc->pen->setWidth(w);
}
@@ -266,7 +266,7 @@ static void
gc_set_foreground(struct graphics_gc_priv* gc, struct color* c)
{
QColor col(c->r >> 8, c->g >> 8, c->b >> 8, c->a >> 8);
- // dbg(lvl_debug,"context %p: color %02x%02x%02x\n",gc, c->r >> 8, c->g >> 8, c->b >> 8);
+ // dbg(lvl_debug,"context %p: color %02x%02x%02x",gc, c->r >> 8, c->g >> 8, c->b >> 8);
gc->pen->setColor(col);
gc->brush->setColor(col);
//gc->c=*c;
@@ -276,7 +276,7 @@ static void
gc_set_background(struct graphics_gc_priv* gc, struct color* c)
{
QColor col(c->r >> 8, c->g >> 8, c->b >> 8, c->a >> 8);
- // dbg(lvl_debug,"context %p: color %02x%02x%02x\n",gc, c->r >> 8, c->g >> 8, c->b >> 8);
+ // dbg(lvl_debug,"context %p: color %02x%02x%02x",gc, c->r >> 8, c->g >> 8, c->b >> 8);
//gc->pen->setColor(col);
//gc->brush->setColor(col);
}
@@ -292,7 +292,7 @@ static struct graphics_gc_methods gc_methods = {
static struct graphics_gc_priv* gc_new(struct graphics_priv* gr, struct graphics_gc_methods* meth)
{
struct graphics_gc_priv* graphics_gc_priv = NULL;
- // dbg(lvl_debug,"enter gr==%p\n", gr);
+ // dbg(lvl_debug,"enter gr==%p", gr);
graphics_gc_priv = g_new0(struct graphics_gc_priv, 1);
graphics_gc_priv->graphics_priv = gr;
graphics_gc_priv->pen = new QPen();
@@ -304,7 +304,7 @@ static struct graphics_gc_priv* gc_new(struct graphics_priv* gr, struct graphics
static void image_destroy(struct graphics_image_priv* img)
{
- // dbg(lvl_debug, "enter\n");
+ // dbg(lvl_debug, "enter");
if (img->pixmap != NULL)
delete (img->pixmap);
g_free(img);
@@ -318,9 +318,9 @@ static struct graphics_image_priv*
image_new(struct graphics_priv* gr, struct graphics_image_methods* meth, char* path, int* w, int* h, struct point* hot, int rotation)
{
struct graphics_image_priv* image_priv;
- // dbg(lvl_debug,"enter %s, %d %d\n", path, *w, *h);
+ // dbg(lvl_debug,"enter %s, %d %d", path, *w, *h);
if (path[0] == 0) {
- dbg(lvl_debug, "Refuse to load image without path\n");
+ dbg(lvl_debug, "Refuse to load image without path");
return NULL;
}
QString key(path);
@@ -333,11 +333,11 @@ image_new(struct graphics_priv* gr, struct graphics_image_methods* meth, char* p
*/
if (extension != "") {
/*file doesn't exist. give up */
- dbg(lvl_debug, "File %s does not exist\n", path);
+ dbg(lvl_debug, "File %s does not exist", path);
return NULL;
} else {
/* add ".svg" for renderer to try .svg file first in renderer */
- dbg(lvl_debug, "Guess extension on %s\n", path);
+ dbg(lvl_debug, "Guess extension on %s", path);
renderer_key += ".svg";
}
}
@@ -348,7 +348,7 @@ image_new(struct graphics_priv* gr, struct graphics_image_methods* meth, char* p
if (renderer_key.endsWith("svg")) {
QSvgRenderer renderer(renderer_key);
if (renderer.isValid()) {
- dbg(lvl_debug, "render %s\n", path);
+ dbg(lvl_debug, "render %s", path);
/* try to render this */
/* assume "standard" size if size is not given */
if (*w <= 0)
@@ -364,7 +364,7 @@ image_new(struct graphics_priv* gr, struct graphics_image_methods* meth, char* p
if (image_priv->pixmap == NULL) {
/*cannot be rendered. try to load it */
- dbg(lvl_debug, "cannot render %s\n", path);
+ dbg(lvl_debug, "cannot render %s", path);
image_priv->pixmap = new QPixmap(key);
}
@@ -376,7 +376,7 @@ image_new(struct graphics_priv* gr, struct graphics_image_methods* meth, char* p
/* check if we need to scale this */
if ((*w > 0) && (*h > 0)) {
if ((image_priv->pixmap->width() != *w) || (image_priv->pixmap->height() != *h)) {
- dbg(lvl_debug, "scale pixmap %s, %d->%d,%d->%d\n", path, image_priv->pixmap->width(), *w, image_priv->pixmap->height(), *h);
+ dbg(lvl_debug, "scale pixmap %s, %d->%d,%d->%d", path, image_priv->pixmap->width(), *w, image_priv->pixmap->height(), *h);
QPixmap* scaled = new QPixmap(image_priv->pixmap->scaled(*w, *h, Qt::IgnoreAspectRatio, Qt::FastTransformation));
delete (image_priv->pixmap);
image_priv->pixmap = scaled;
@@ -386,7 +386,7 @@ image_new(struct graphics_priv* gr, struct graphics_image_methods* meth, char* p
*w = image_priv->pixmap->width();
*h = image_priv->pixmap->height();
- // dbg(lvl_debug, "Got (%d,%d)\n", *w,*h);
+ // dbg(lvl_debug, "Got (%d,%d)", *w,*h);
if (hot) {
hot->x = *w / 2;
hot->y = *h / 2;
@@ -400,7 +400,7 @@ draw_lines(struct graphics_priv* gr, struct graphics_gc_priv* gc, struct point*
{
int i;
QPolygon polygon;
- // dbg(lvl_debug,"enter gr=%p, gc=%p, (%d, %d)\n", gr, gc, p->x, p->y);
+ // dbg(lvl_debug,"enter gr=%p, gc=%p, (%d, %d)", gr, gc, p->x, p->y);
if (gr->painter == NULL)
return;
@@ -415,7 +415,7 @@ draw_polygon(struct graphics_priv* gr, struct graphics_gc_priv* gc, struct point
{
int i;
QPolygon polygon;
- // dbg(lvl_debug,"enter gr=%p, gc=%p, (%d, %d)\n", gr, gc, p->x, p->y);
+ // dbg(lvl_debug,"enter gr=%p, gc=%p, (%d, %d)", gr, gc, p->x, p->y);
if (gr->painter == NULL)
return;
@@ -436,7 +436,7 @@ draw_polygon(struct graphics_priv* gr, struct graphics_gc_priv* gc, struct point
static void
draw_rectangle(struct graphics_priv* gr, struct graphics_gc_priv* gc, struct point* p, int w, int h)
{
- // dbg(lvl_debug,"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", gr, gc, p->x, p->y, w, h);
if (gr->painter == NULL)
return;
/* if the rectangle is transparent, we need to clear it first */
@@ -452,7 +452,7 @@ draw_rectangle(struct graphics_priv* gr, struct graphics_gc_priv* gc, struct poi
static void
draw_circle(struct graphics_priv* gr, struct graphics_gc_priv* gc, struct point* p, int r)
{
- // dbg(lvl_debug,"enter gr=%p, gc=%p, (%d,%d) r=%d\n", gr, gc, p->x, p->y, r);
+ // dbg(lvl_debug,"enter gr=%p, gc=%p, (%d,%d) r=%d", gr, gc, p->x, p->y, r);
if (gr->painter == NULL)
return;
gr->painter->setPen(*gc->pen);
@@ -475,7 +475,7 @@ draw_circle(struct graphics_priv* gr, struct graphics_gc_priv* gc, struct point*
static void
draw_text(struct graphics_priv* gr, struct graphics_gc_priv* fg, struct graphics_gc_priv* bg, struct graphics_font_priv* font, char* text, struct point* p, int dx, int dy)
{
- dbg(lvl_debug, "enter gc=%p, fg=%p, bg=%p pos(%d,%d) d(%d, %d) %s\n", gr, fg, bg, p->x, p->y, dx, dy, text);
+ dbg(lvl_debug, "enter gc=%p, fg=%p, bg=%p pos(%d,%d) d(%d, %d) %s", gr, fg, bg, p->x, p->y, dx, dy, text);
QPainter* painter = gr->painter;
if (painter == NULL)
return;
@@ -568,11 +568,11 @@ draw_text(struct graphics_priv* gr, struct graphics_gc_priv* fg, struct graphics
static void
draw_image(struct graphics_priv* gr, struct graphics_gc_priv* fg, struct point* p, struct graphics_image_priv* img)
{
- // dbg(lvl_debug,"enter\n");
+ // dbg(lvl_debug,"enter");
if (gr->painter != NULL)
gr->painter->drawPixmap(p->x, p->y, *img->pixmap);
else
- dbg(lvl_debug, "Try to draw image, but no painter\n");
+ dbg(lvl_debug, "Try to draw image, but no painter");
}
/**
@@ -589,10 +589,10 @@ static void draw_drag(struct graphics_priv* gr, struct point* p)
struct point vector;
if (p != NULL) {
- dbg(lvl_debug, "enter %p (%d,%d)\n", gr, p->x, p->y);
+ dbg(lvl_debug, "enter %p (%d,%d)", gr, p->x, p->y);
vector = *p;
} else {
- dbg(lvl_debug, "enter %p (NULL)\n", gr);
+ dbg(lvl_debug, "enter %p (NULL)", gr);
vector.x = 0;
vector.y = 0;
}
@@ -624,7 +624,7 @@ static void draw_drag(struct graphics_priv* gr, struct point* p)
static void
background_gc(struct graphics_priv* gr, struct graphics_gc_priv* gc)
{
- // dbg(lvl_debug,"register context %p on %p\n", gc, gr);
+ // dbg(lvl_debug,"register context %p on %p", gc, gr);
gr->background_graphics_gc_priv = gc;
}
@@ -633,26 +633,26 @@ draw_mode(struct graphics_priv* gr, enum draw_mode_num mode)
{
switch (mode) {
case draw_mode_begin:
- dbg(lvl_debug, "Begin drawing on context %p (use == %d)\n", gr, gr->use_count);
+ dbg(lvl_debug, "Begin drawing on context %p (use == %d)", gr, gr->use_count);
gr->use_count++;
if (gr->painter == NULL)
gr->painter = new QPainter(gr->pixmap);
else
- dbg(lvl_debug, "drawing on %p already active\n", gr);
+ dbg(lvl_debug, "drawing on %p already active", gr);
break;
case draw_mode_end:
- dbg(lvl_debug, "End drawing on context %p (use == %d)\n", gr, gr->use_count);
+ dbg(lvl_debug, "End drawing on context %p (use == %d)", gr, gr->use_count);
gr->use_count--;
if (gr->use_count < 0)
gr->use_count = 0;
if (gr->use_count > 0) {
- dbg(lvl_debug, "drawing on %p still in use\n", gr);
+ dbg(lvl_debug, "drawing on %p still in use", gr);
} else if (gr->painter != NULL) {
gr->painter->end();
delete (gr->painter);
gr->painter = NULL;
} else {
- dbg(lvl_debug, "Context %p not active!\n", gr)
+ dbg(lvl_debug, "Context %p not active!", gr)
}
#if USE_QWIDGET
/* call repaint on widget */
@@ -667,7 +667,7 @@ draw_mode(struct graphics_priv* gr, enum draw_mode_num mode)
break;
default:
- dbg(lvl_debug, "Unknown drawing %d on context %p\n", mode, gr);
+ dbg(lvl_debug, "Unknown drawing %d on context %p", mode, gr);
break;
}
}
@@ -676,7 +676,7 @@ static struct graphics_priv* overlay_new(struct graphics_priv* gr, struct graphi
void resize_callback(struct graphics_priv* gr, int w, int h)
{
- // dbg(lvl_debug,"enter (%d, %d)\n", w, h);
+ // dbg(lvl_debug,"enter (%d, %d)", w, h);
callback_list_call_attr_2(gr->callbacks, attr_resize,
GINT_TO_POINTER(w), GINT_TO_POINTER(h));
}
@@ -685,7 +685,7 @@ static int
graphics_qt5_fullscreen(struct window* w, int on)
{
struct graphics_priv* gr;
- // dbg(lvl_debug,"enter\n");
+ // dbg(lvl_debug,"enter");
gr = (struct graphics_priv*)w->priv;
#if USE_QML
if (gr->window != NULL) {
@@ -710,7 +710,7 @@ graphics_qt5_fullscreen(struct window* w, int on)
static void
keep_display_on(struct graphics_priv* priv)
{
- // dbg(lvl_debug,"enter\n");
+ // dbg(lvl_debug,"enter");
QDBusConnection system = QDBusConnection::connectToBus(QDBusConnection::SystemBus, "system");
QDBusInterface interface("com.nokia.mce", "/com/nokia/mce/request", "com.nokia.mce.request", system);
@@ -721,7 +721,7 @@ keep_display_on(struct graphics_priv* priv)
static void
graphics_qt5_disable_suspend(struct window* w)
{
-// dbg(lvl_debug,"enter\n");
+// dbg(lvl_debug,"enter");
#ifdef SAILFISH_OS
struct graphics_priv* gr;
gr = (struct graphics_priv*)w->priv;
@@ -736,10 +736,10 @@ graphics_qt5_disable_suspend(struct window* w)
static void*
get_data(struct graphics_priv* this_priv, char const* type)
{
- // dbg(lvl_debug,"enter: %s\n", type);
+ // dbg(lvl_debug,"enter: %s", type);
if (strcmp(type, "window") == 0) {
struct window* win;
- // dbg(lvl_debug,"window detected\n");
+ // dbg(lvl_debug,"window detected");
win = g_new0(struct window, 1);
win->priv = this_priv;
win->fullscreen = graphics_qt5_fullscreen;
@@ -748,7 +748,7 @@ get_data(struct graphics_priv* this_priv, char const* type)
return win;
}
if (strcmp(type, "engine") == 0) {
- dbg(lvl_debug, "Hand over QQmlApplicationEngine\n");
+ dbg(lvl_debug, "Hand over QQmlApplicationEngine");
return (this_priv->engine);
}
return NULL;
@@ -756,7 +756,7 @@ get_data(struct graphics_priv* this_priv, char const* type)
static void image_free(struct graphics_priv* gr, struct graphics_image_priv* priv)
{
- // dbg(lvl_debug,"enter\n");
+ // dbg(lvl_debug,"enter");
delete (priv->pixmap);
g_free(priv);
}
@@ -779,7 +779,7 @@ static void get_text_bbox(struct graphics_priv* gr, struct graphics_font_priv* f
struct point pt;
QString tmp = QString::fromUtf8(text);
QRect r;
- // dbg(lvl_debug,"enter %s %d %d\n", text, dx, dy);
+ // dbg(lvl_debug,"enter %s %d %d", text, dx, dy);
/* use QFontMetrix for bbox calculation as we do not always have a painter */
QFontMetrics fm(*font->font);
@@ -811,7 +811,7 @@ static void overlay_disable(struct graphics_priv* gr, int disable)
{
GHashTableIter iter;
struct graphics_priv *key, *value;
- // dbg(lvl_debug,"enter gr=%p, %d\n", gr, disable);
+ // dbg(lvl_debug,"enter gr=%p, %d", gr, disable);
g_hash_table_iter_init(&iter, gr->overlays);
while (g_hash_table_iter_next(&iter, (void**)&key, (void**)&value)) {
@@ -822,7 +822,7 @@ static void overlay_disable(struct graphics_priv* gr, int disable)
static void overlay_resize(struct graphics_priv* gr, struct point* p, int w, int h, int wraparound)
{
- // dbg(lvl_debug,"enter\n");
+ // dbg(lvl_debug,"enter");
gr->x = p->x;
gr->y = p->y;
if (gr->painter != NULL) {
@@ -897,7 +897,7 @@ overlay_new(struct graphics_priv* gr, struct graphics_methods* meth, struct poin
graphics_priv->argv[0] = NULL;
/* register on parent */
g_hash_table_insert(gr->overlays, graphics_priv, graphics_priv);
- // dbg(lvl_debug,"New overlay: %p\n", graphics_priv);
+ // dbg(lvl_debug,"New overlay: %p", graphics_priv);
return graphics_priv;
}
@@ -914,7 +914,7 @@ graphics_qt5_new(struct navit* nav, struct graphics_methods* meth, struct attr**
bool use_qml = USE_QML;
bool use_qwidget = USE_QWIDGET;
- //dbg(lvl_debug,"enter\n");
+ //dbg(lvl_debug,"enter");
/* get qt widget attr */
if ((attr_widget = attr_search(attrs, NULL, attr_qt5_widget))) {
@@ -938,7 +938,7 @@ graphics_qt5_new(struct navit* nav, struct graphics_methods* meth, struct attr**
/* get event loop from config and request event loop*/
event_loop_system = attr_search(attrs, NULL, attr_event_loop_system);
if (event_loop_system && event_loop_system->u.str) {
- //dbg(lvl_debug, "event_system is %s\n", event_loop_system->u.str);
+ //dbg(lvl_debug, "event_system is %s", event_loop_system->u.str);
if (!event_request_system(event_loop_system->u.str, "graphics_qt5"))
return NULL;
} else {
@@ -952,7 +952,7 @@ graphics_qt5_new(struct navit* nav, struct graphics_methods* meth, struct attr**
/* get font plugin if present */
font_freetype_new = (struct font_priv * (*)(void*))plugin_get_category_font("freetype");
if (!font_freetype_new) {
- dbg(lvl_error, "no freetype\n");
+ dbg(lvl_error, "no freetype");
return NULL;
}
#endif
@@ -1101,7 +1101,7 @@ void plugin_init(void)
#if USE_QML
Q_INIT_RESOURCE(graphics_qt5);
#endif
- // dbg(lvl_debug,"enter\n");
+ // dbg(lvl_debug,"enter");
plugin_register_category_graphics("qt5", graphics_qt5_new);
qt5_event_init();
}
diff --git a/navit/graphics/qt_qpainter/RenderArea.cpp b/navit/graphics/qt_qpainter/RenderArea.cpp
index 1159082ed..4a20b1d54 100644
--- a/navit/graphics/qt_qpainter/RenderArea.cpp
+++ b/navit/graphics/qt_qpainter/RenderArea.cpp
@@ -86,7 +86,7 @@ bool RenderArea::event(QEvent *event)
{
#if QT_VERSION >= 0x040700
if (event->type() == QEvent::Gesture) {
- dbg(lvl_debug,"gesture\n");
+ dbg(lvl_debug,"gesture");
return true;
}
#endif
@@ -123,8 +123,8 @@ void RenderArea::do_resize(QSize size)
QPainter painter(pixmap);
QBrush brush;
painter.fillRect(0, 0, size.width(), size.height(), brush);
- dbg(lvl_debug,"size %dx%d\n", size.width(), size.height());
- dbg(lvl_debug,"pixmap %p %dx%d\n", pixmap, pixmap->width(), pixmap->height());
+ dbg(lvl_debug,"size %dx%d", size.width(), size.height());
+ dbg(lvl_debug,"pixmap %p %dx%d", pixmap, pixmap->width(), pixmap->height());
callback_list_call_attr_2(this->cbl, attr_resize, GINT_TO_POINTER(size.width()), GINT_TO_POINTER(size.height()));
}
@@ -223,9 +223,9 @@ void RenderArea::keyPressEvent(QKeyEvent *event)
{
QString str=event->text();
const char *text=str.toUtf8().constData();
- dbg(lvl_debug,"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", text, text[0], strlen(text), event->key());
if (!text || !text[0] || text[0] == 0x7f) {
- dbg(lvl_debug,"special key\n");
+ dbg(lvl_debug,"special key");
switch (event->key()) {
case 4099:
{
@@ -288,7 +288,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_debug,"fd=%d ev=%p cb=%p\n", fd, ev, ev->cb);
+ dbg(lvl_debug,"fd=%d ev=%p cb=%p", 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 65163ea9d..4fd4f46f6 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_debug,"update %d,%d %d x %d\n", r->x(), r->y(), r->width(), r->height());
+ dbg(lvl_debug,"update %d,%d %d x %d", 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_debug,"update valid %d,%d %dx%d\n", r->x(), r->y(), r->width(), r->height());
+ dbg(lvl_debug,"update valid %d,%d %dx%d", r->x(), r->y(), r->width(), r->height());
gr->widget->update(*r);
#endif
return;
@@ -359,7 +359,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_debug,"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", gr, gc, p->x, p->y, w, h);
gr->painter->fillRect(p->x,p->y, w, h, *gc->brush);
}
@@ -496,7 +496,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_debug,"mode for %p %d\n", gr, mode);
+ dbg(lvl_debug,"mode for %p %d", gr, mode);
QRect r;
if (mode == draw_mode_begin) {
if (gr->widget->pixmap->paintingActive()) {
@@ -574,7 +574,7 @@ static void * get_data(struct graphics_priv *this_, const char *type)
bool ok;
if (!strcmp(type, "resize")) {
- dbg(lvl_debug,"resize %d %d\n",this_->w,this_->h);
+ dbg(lvl_debug,"resize %d %d",this_->w,this_->h);
QSize size(this_->w,this_->h);
this_->widget->do_resize(size);
}
@@ -743,14 +743,14 @@ event_qt_main_loop_run(void)
static void event_qt_main_loop_quit(void)
{
- dbg(lvl_debug,"enter\n");
+ dbg(lvl_debug,"enter");
exit(0);
}
static struct event_watch *
event_qt_add_watch(int fd, enum event_watch_cond cond, struct callback *cb)
{
- dbg(lvl_debug,"enter fd=%d\n",(int)(long)fd);
+ dbg(lvl_debug,"enter fd=%d",(int)(long)fd);
struct event_watch *ret=g_new0(struct event_watch, 1);
ret->fd=fd;
ret->cb=cb;
@@ -790,21 +790,21 @@ event_qt_remove_timeout(struct event_timeout *ev)
static struct event_idle *
event_qt_add_idle(int priority, struct callback *cb)
{
- dbg(lvl_debug,"enter\n");
+ dbg(lvl_debug,"enter");
return (struct event_idle *)event_qt_add_timeout(0, 1, cb);
}
static void
event_qt_remove_idle(struct event_idle *ev)
{
- dbg(lvl_debug,"enter\n");
+ dbg(lvl_debug,"enter");
event_qt_remove_timeout((struct event_timeout *) ev);
}
static void
event_qt_call_callback(struct callback_list *cb)
{
- dbg(lvl_debug,"enter\n");
+ dbg(lvl_debug,"enter");
}
static struct event_methods event_qt_methods = {
@@ -825,7 +825,7 @@ struct event_priv {
struct event_priv *
event_qt_new(struct event_methods *meth)
{
- dbg(lvl_debug,"enter\n");
+ dbg(lvl_debug,"enter");
*meth=event_qt_methods;
return NULL;
}
@@ -842,7 +842,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_debug,"enter\n");
+ dbg(lvl_debug,"enter");
#ifdef QT_QPAINTER_USE_EVENT_QT
if (event_gr)
return NULL;
@@ -856,7 +856,7 @@ static struct graphics_priv * graphics_qt_qpainter_new(struct navit *nav, struct
#ifdef QT_QPAINTER_USE_FREETYPE
font_freetype_new=(struct font_priv *(*)(void *))plugin_get_category_font("freetype");
if (!font_freetype_new) {
- dbg(lvl_error,"no freetype\n");
+ dbg(lvl_error,"no freetype");
return NULL;
}
#endif
@@ -909,7 +909,7 @@ static struct graphics_priv * graphics_qt_qpainter_new(struct navit *nav, struct
else
ret->window_title=g_strdup("Navit");
- dbg(lvl_debug,"return\n");
+ dbg(lvl_debug,"return");
return ret;
}
diff --git a/navit/graphics/sdl/event.c b/navit/graphics/sdl/event.c
index f96b079b3..647330813 100644
--- a/navit/graphics/sdl/event.c
+++ b/navit/graphics/sdl/event.c
@@ -48,7 +48,7 @@ static void sdl_accelerometer_handler(void* param) {
int zAxis = SDL_JoystickGetAxis(accelerometer, 2);
unsigned char new_orientation;
- dbg(lvl_info, "x(%d) y(%d) z(%d) c(%d)\n", xAxis, yAxis, zAxis,
+ dbg(lvl_info, "x(%d) y(%d) z(%d) c(%d)", xAxis, yAxis, zAxis,
sdl_orientation_count);
if (zAxis > -30000) {
@@ -74,7 +74,7 @@ static void sdl_accelerometer_handler(void* param) {
sdl_orientation_count++;
if (new_orientation != orientation) {
- dbg(lvl_debug, "x(%d) y(%d) z(%d) o(%d)\n", xAxis, yAxis, zAxis,
+ dbg(lvl_debug, "x(%d) y(%d) z(%d) o(%d)", 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_debug, "timer(%p) multi(%d) interval(%d) fired\n", param, timeout->multi,
+ dbg(lvl_debug, "timer(%p) multi(%d) interval(%d) fired", 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_debug, "watch(%p) event(%d) encountered\n", ew,
+ dbg(lvl_debug, "watch(%p) event(%d) encountered", 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_debug, "enter\n");
+ dbg(lvl_debug, "enter");
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_debug, "enter\n");
+ dbg(lvl_debug, "enter");
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_debug, "fd(%d) cond(%x) cb(%x)\n", fd, cond, cb);
+ dbg(lvl_debug, "fd(%d) cond(%x) cb(%x)", 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_debug, "enter %p\n", ew);
+ dbg(lvl_debug, "enter %p", 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_debug, "timer(%p) multi(%d) interval(%d) cb(%p) added\n", ret, multi,
+ dbg(lvl_debug, "timer(%p) multi(%d) interval(%d) cb(%p) added", ret, multi,
timeout, cb);
ret->multi = multi;
ret->cb = cb;
@@ -282,14 +282,14 @@ event_sdl_add_timeout(int timeout, int multi, struct callback *cb) {
}
static void event_sdl_remove_timeout(struct event_timeout *to) {
- dbg(lvl_info, "enter %p\n", to);
+ dbg(lvl_info, "enter %p", to);
if (to != NULL) {
int ret = to->id ? SDL_RemoveTimer(to->id) : SDL_TRUE;
if (ret == SDL_FALSE) {
- dbg(lvl_debug, "SDL_RemoveTimer (%p) failed\n", to->id);
+ dbg(lvl_debug, "SDL_RemoveTimer (%p) failed", to->id);
} else {
g_free(to);
- dbg(lvl_debug, "timer(%p) removed\n", to);
+ dbg(lvl_debug, "timer(%p) removed", 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_debug, "add idle priority(%d) cb(%p)\n", priority, cb);
+ dbg(lvl_debug, "add idle priority(%d) cb(%p)", 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_debug, "poking eventloop because of new idle_events\n");
+ dbg(lvl_debug, "poking eventloop because of new idle_events");
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_debug, "remove task(%p)\n", task);
+ dbg(lvl_debug, "remove task(%p)", task);
g_ptr_array_remove(idle_tasks, (gpointer) task);
}
/* callback */
static void event_sdl_call_callback(struct callback_list *cbl) {
- dbg(lvl_debug, "call_callback cbl(%p)\n", cbl);
+ dbg(lvl_debug, "call_callback cbl(%p)", cbl);
SDL_Event event;
SDL_UserEvent userevent;
diff --git a/navit/graphics/sdl/event_sdl.c b/navit/graphics/sdl/event_sdl.c
index 28fe4fafb..d60c2d04c 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_debug,"timer(%p) multi(%d) interval(%d) fired\n", param, timeout->multi, interval);
+ dbg(lvl_debug,"timer(%p) multi(%d) interval(%d) fired", 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_debug,"watch(%p) event(%d) encountered\n", ew, pfds[idx].revents);
+ dbg(lvl_debug,"watch(%p) event(%d) encountered", 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_debug,"enter\n");
+ dbg(lvl_debug,"enter");
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_debug,"enter\n");
+ dbg(lvl_debug,"enter");
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_debug,"fd(%d) cond(%x) cb(%x)\n", fd, cond, cb);
+ dbg(lvl_debug,"fd(%d) cond(%x) cb(%x)", 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_debug,"enter %p\n",ew);
+ dbg(lvl_debug,"enter %p",ew);
event_sdl_watch_stopthread();
@@ -212,10 +212,10 @@ event_sdl_add_timeout(int timeout, int multi, struct callback *cb)
{
struct event_timeout * ret = g_new0(struct event_timeout, 1);
if(!ret) {
- dbg(lvl_error,"g_new0 failed\n");
+ dbg(lvl_error,"g_new0 failed");
return ret;
}
- dbg(lvl_debug,"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",ret, multi, timeout, cb);
ret->multi = multi;
ret->cb = cb;
ret->id = SDL_AddTimer(timeout, sdl_timer_callback, ret);
@@ -226,17 +226,17 @@ event_sdl_add_timeout(int timeout, int multi, struct callback *cb)
static void
event_sdl_remove_timeout(struct event_timeout *to)
{
- dbg(lvl_info,"enter %p\n", to);
+ dbg(lvl_info,"enter %p", to);
if(to)
{
/* do not SDL_RemoveTimer if oneshot timer has already fired */
int ret = to->id == 0 ? SDL_TRUE : SDL_RemoveTimer(to->id);
if (ret == SDL_FALSE)
- dbg(lvl_error,"SDL_RemoveTimer (%p) failed\n", to->id);
+ dbg(lvl_error,"SDL_RemoveTimer (%p) failed", to->id);
g_free(to);
- dbg(lvl_debug,"timer(%p) removed\n", to);
+ dbg(lvl_debug,"timer(%p) removed", 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_debug,"add idle priority(%d) cb(%p)\n", priority, cb);
+ dbg(lvl_debug,"add idle priority(%d) cb(%p)", 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_debug,"poking eventloop because of new idle_events\n");
+ dbg(lvl_debug,"poking eventloop because of new idle_events");
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_debug,"remove task(%p)\n", task);
+ dbg(lvl_debug,"remove task(%p)", 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_debug,"call_callback cbl(%p)\n",cbl);
+ dbg(lvl_debug,"call_callback cbl(%p)",cbl);
SDL_Event event;
SDL_UserEvent userevent;
diff --git a/navit/graphics/sdl/graphics_sdl.c b/navit/graphics/sdl/graphics_sdl.c
index b1a9c17b9..a87805b73 100644
--- a/navit/graphics/sdl/graphics_sdl.c
+++ b/navit/graphics/sdl/graphics_sdl.c
@@ -185,7 +185,7 @@ struct graphics_image_priv {
static void
graphics_destroy(struct graphics_priv *gr)
{
- dbg(lvl_debug, "graphics_destroy %p %u\n", gr, gr->overlay_mode);
+ dbg(lvl_debug, "graphics_destroy %p %u", gr, gr->overlay_mode);
if(gr->overlay_mode)
{
@@ -220,7 +220,7 @@ gc_destroy(struct graphics_gc_priv *gc)
static void
gc_set_linewidth(struct graphics_gc_priv *gc, int w)
{
- dbg(lvl_debug, "gc_set_linewidth %p %d\n", gc, w);
+ dbg(lvl_debug, "gc_set_linewidth %p %d", gc, w);
gc->linewidth = w;
}
@@ -233,7 +233,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_debug, "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", 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;
@@ -243,7 +243,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_debug, "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", 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;
@@ -292,7 +292,7 @@ image_new(struct graphics_priv *gr, struct graphics_image_methods *meth, char *n
else
{
/* TODO: debug "colour parse errors" on xpm */
- dbg(lvl_error,"image_new on '%s' failed: %s\n", name, IMG_GetError());
+ dbg(lvl_error,"image_new on '%s' failed: %s", name, IMG_GetError());
g_free(gi);
gi = NULL;
}
@@ -329,7 +329,7 @@ draw_polygon(struct graphics_priv *gr, struct graphics_gc_priv *gc, struct point
vx[i] = x;
vy[i] = y;
- dbg(lvl_debug, "draw_polygon: %p %i %d,%d\n", gc, i, p[i].x, p[i].y);
+ dbg(lvl_debug, "draw_polygon: %p %i %d,%d", gc, i, p[i].x, p[i].y);
}
if(gr->aa)
@@ -360,7 +360,7 @@ draw_rectangle(struct graphics_priv *gr, struct graphics_gc_priv *gc, struct poi
return;
}
- dbg(lvl_debug, "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", p->x, p->y, w, h,
gc->fore_r, gc->fore_g, gc->fore_b, gc->fore_a);
if(w > gr->screen->w)
{
@@ -493,10 +493,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_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);
+ dbg(lvl_debug, "i=%d", i);
+ dbg(lvl_debug, " %d,%d->%d,%d", p[i].x, p[i].y, p[i+1].x, p[i+1].y);
+ dbg(lvl_debug, " lw=%d angle=%f", lw, 180.0 * angle / M_PI);
+ dbg(lvl_debug, " x_lw_adj=%d y_lw_adj=%d", x_lw_adj, y_lw_adj);
}
}
@@ -586,7 +586,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_debug, "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)", ft_buffer_size, new_size, ft_buffer);
ft_buffer_size = new_size;
}
}
@@ -744,7 +744,7 @@ draw_text(struct graphics_priv *gr, struct graphics_gc_priv *fg,
int color = 1;
if (!font) {
- dbg(lvl_error, "no font, returning\n");
+ dbg(lvl_error, "no font, returning");
return;
}
t = gr->freetype_methods.text_new(text,
@@ -780,7 +780,7 @@ draw_image(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct point *
static void
background_gc(struct graphics_priv *gr, struct graphics_gc_priv *gc)
{
- dbg(lvl_debug, "background_gc\n");
+ dbg(lvl_debug, "background_gc");
}
@@ -797,7 +797,7 @@ draw_mode(struct graphics_priv *gr, enum draw_mode_num mode)
}
else
{
- dbg(lvl_debug, "draw_mode: %d\n", mode);
+ dbg(lvl_debug, "draw_mode: %d", mode);
if(mode == draw_mode_end)
{
@@ -927,11 +927,11 @@ overlay_new(struct graphics_priv *gr, struct graphics_methods *meth, struct poin
}
if(i == OVERLAY_MAX)
{
- dbg(lvl_error, "too many overlays! increase OVERLAY_MAX\n");
+ dbg(lvl_error, "too many overlays! increase OVERLAY_MAX");
return NULL;
}
- dbg(lvl_debug, "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)", i,
p->x,
p->y,
w,
@@ -1025,7 +1025,7 @@ static gboolean graphics_sdl_idle(void *data)
gr = the_graphics;
}
else {
- dbg(lvl_error,"graphics_idle: graphics not set!\n");
+ dbg(lvl_error,"graphics_idle: graphics not set!");
return FALSE;
}
}
@@ -1070,7 +1070,7 @@ static gboolean graphics_sdl_idle(void *data)
if (idle_tasks_idx >= idle_tasks->len)
idle_tasks_idx = 0;
- dbg(lvl_debug,"idle_tasks_idx(%d)\n",idle_tasks_idx);
+ dbg(lvl_debug,"idle_tasks_idx(%d)",idle_tasks_idx);
task = (struct idle_task *)g_ptr_array_index(idle_tasks,idle_tasks_idx);
if (idle_tasks_idx == 0) // only execute tasks with lowest priority value
@@ -1095,7 +1095,7 @@ static gboolean graphics_sdl_idle(void *data)
}
#ifdef USE_WEBOS
- dbg(lvl_debug,"SDL_Event %d\n", ev.type);
+ dbg(lvl_debug,"SDL_Event %d", ev.type);
#endif
switch(ev.type)
{
@@ -1220,7 +1220,7 @@ static gboolean graphics_sdl_idle(void *data)
key_mod &= ~(WEBOS_KEY_MOD_ORANGE_STICKY);
}
else {
- dbg(lvl_error,"Unknown key sym: %x\n", ev.key.keysym.sym);
+ dbg(lvl_error,"Unknown key sym: %x", ev.key.keysym.sym);
}
#else
/* return unicode chars when they can be converted to ascii */
@@ -1230,7 +1230,7 @@ static gboolean graphics_sdl_idle(void *data)
}
}
- dbg(lvl_info,"key mod: 0x%x\n", key_mod);
+ dbg(lvl_info,"key mod: 0x%x", key_mod);
if (keybuf[0]) {
callback_list_call_attr_1(gr->cbl, attr_keypress, (void *)keybuf);
@@ -1245,7 +1245,7 @@ static gboolean graphics_sdl_idle(void *data)
case SDL_MOUSEBUTTONDOWN:
{
- dbg(lvl_debug, "SDL_MOUSEBUTTONDOWN %d %d %d %d %d\n",
+ dbg(lvl_debug, "SDL_MOUSEBUTTONDOWN %d %d %d %d %d",
ev.button.which,
ev.button.button,
ev.button.state,
@@ -1260,7 +1260,7 @@ static gboolean graphics_sdl_idle(void *data)
case SDL_MOUSEBUTTONUP:
{
- dbg(lvl_debug, "SDL_MOUSEBUTTONUP %d %d %d %d %d\n",
+ dbg(lvl_debug, "SDL_MOUSEBUTTONUP %d %d %d %d %d",
ev.button.which,
ev.button.button,
ev.button.state,
@@ -1302,7 +1302,7 @@ static gboolean graphics_sdl_idle(void *data)
case SDL_USEREVENT:
{
SDL_UserEvent userevent = ev.user;
- dbg(lvl_info,"received SDL_USEREVENT type(%x) code(%x)\n",userevent.type,userevent.code);
+ dbg(lvl_info,"received SDL_USEREVENT type(%x) code(%x)",userevent.type,userevent.code);
if (userevent.type != SDL_USEREVENT)
break;
@@ -1322,28 +1322,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_debug, "SDL_USEREVENT timer received cb(%p)\n", cb);
+ dbg(lvl_debug, "SDL_USEREVENT timer received cb(%p)", cb);
callback_call_0(cb);
}
else if(userevent.code == SDL_USEREVENT_CODE_WATCH)
{
struct callback *cb = (struct callback *)userevent.data1;
- dbg(lvl_debug, "SDL_USEREVENT watch received cb(%p)\n", cb);
+ dbg(lvl_debug, "SDL_USEREVENT watch received cb(%p)", 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_debug, "SDL_USEREVENT call_callback received cbl(%p)\n", cbl);
+ dbg(lvl_debug, "SDL_USEREVENT call_callback received cbl(%p)", cbl);
callback_list_call_0(cbl);
}
else if(userevent.code == SDL_USEREVENT_CODE_IDLE_EVENT) {
- dbg(lvl_debug, "SDL_USEREVENT idle_event received\n");
+ dbg(lvl_debug, "SDL_USEREVENT idle_event received");
}
#ifdef USE_WEBOS_ACCELEROMETER
else if(userevent.code == SDL_USEREVENT_CODE_ROTATE)
{
- dbg(lvl_debug, "SDL_USEREVENT rotate received\n");
+ dbg(lvl_debug, "SDL_USEREVENT rotate received");
switch(gr->orientation)
{
case WEBOS_ORIENTATION_PORTRAIT:
@@ -1366,14 +1366,14 @@ static gboolean graphics_sdl_idle(void *data)
}
#endif
else
- dbg(lvl_warning, "unknown SDL_USEREVENT\n");
+ dbg(lvl_warning, "unknown SDL_USEREVENT");
break;
}
#endif
default:
{
- dbg(lvl_debug, "SDL_Event %d\n", ev.type);
+ dbg(lvl_debug, "SDL_Event %d", ev.type);
break;
}
}
@@ -1423,7 +1423,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_debug,"Calling SDL_Init\n");
+ dbg(lvl_debug,"Calling SDL_Init");
#ifdef USE_WEBOS
# ifdef USE_WEBOS_ACCELEROMETER
ret = SDL_Init(SDL_INIT_VIDEO|SDL_INIT_TIMER|SDL_INIT_JOYSTICK);
@@ -1435,18 +1435,18 @@ graphics_sdl_new(struct navit *nav, struct graphics_methods *meth, struct attr *
#endif
if(ret < 0)
{
- dbg(lvl_error,"SDL_Init failed %d\n", ret);
+ dbg(lvl_error,"SDL_Init failed %d", ret);
this->freetype_methods.destroy();
g_free(this);
return NULL;
}
#ifdef USE_WEBOS
- dbg(lvl_debug,"Calling PDL_Init(0)\n");
+ dbg(lvl_debug,"Calling PDL_Init(0)");
ret = PDL_Init(0);
if(ret < 0)
{
- dbg(lvl_error,"PDL_Init failed %d\n", ret);
+ dbg(lvl_error,"PDL_Init failed %d", ret);
this->freetype_methods.destroy();
g_free(this);
return NULL;
@@ -1489,7 +1489,7 @@ graphics_sdl_new(struct navit *nav, struct graphics_methods *meth, struct attr *
if(this->screen == NULL)
{
- dbg(lvl_error,"SDL_SetVideoMode failed\n");
+ dbg(lvl_error,"SDL_SetVideoMode failed");
this->freetype_methods.destroy();
g_free(this);
#ifdef USE_WEBOS
@@ -1503,7 +1503,7 @@ graphics_sdl_new(struct navit *nav, struct graphics_methods *meth, struct attr *
w = this->screen->w;
h = this->screen->h;
- dbg(lvl_debug, "using screen %ix%i@%i\n",
+ dbg(lvl_debug, "using screen %ix%i@%i",
this->screen->w, this->screen->h,
this->screen->format->BytesPerPixel * 8);
#ifdef USE_WEBOS_ACCELEROMETER
@@ -1530,7 +1530,7 @@ graphics_sdl_new(struct navit *nav, struct graphics_methods *meth, struct attr *
#ifdef USE_WEBOS
if(the_graphics!=NULL) {
- dbg(lvl_debug,"graphics_sdl_new: graphics struct already set: %d!\n", the_graphics_count);
+ dbg(lvl_debug,"graphics_sdl_new: graphics struct already set: %d!", the_graphics_count);
}
the_graphics = this;
the_graphics_count++;
@@ -1556,7 +1556,7 @@ sdl_timer_callback(Uint32 interval, void* param)
{
struct event_timeout *timeout=(struct event_timeout*)param;
- dbg(lvl_debug,"timer(%p) multi(%d) interval(%d) fired\n", param, timeout->multi, interval);
+ dbg(lvl_debug,"timer(%p) multi(%d) interval(%d) fired", param, timeout->multi, interval);
SDL_Event event;
SDL_UserEvent userevent;
@@ -1613,7 +1613,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_debug,"watch(%p) event(%d) encountered\n", ew, pfds[idx].revents);
+ dbg(lvl_debug,"watch(%p) event(%d) encountered", ew, pfds[idx].revents);
SDL_Event event;
SDL_UserEvent userevent;
@@ -1639,7 +1639,7 @@ event_sdl_watch_thread (GPtrArray *watch_list)
static void
event_sdl_watch_startthread(GPtrArray *watch_list)
{
- dbg(lvl_debug,"enter\n");
+ dbg(lvl_debug,"enter");
if (sdl_watch_thread)
event_sdl_watch_stopthread();
@@ -1652,7 +1652,7 @@ event_sdl_watch_startthread(GPtrArray *watch_list)
static void
event_sdl_watch_stopthread()
{
- dbg(lvl_debug,"enter\n");
+ dbg(lvl_debug,"enter");
if (sdl_watch_thread) {
/* Notify the watch thread that the list of FDs will change */
pthread_kill(sdl_watch_thread, SIGUSR1);
@@ -1664,7 +1664,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_debug,"fd(%d) cond(%x) cb(%x)\n", fd, cond, cb);
+ dbg(lvl_debug,"fd(%d) cond(%x) cb(%x)", fd, cond, cb);
event_sdl_watch_stopthread();
@@ -1702,7 +1702,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_debug,"enter %p\n",ew);
+ dbg(lvl_debug,"enter %p",ew);
event_sdl_watch_stopthread();
@@ -1721,10 +1721,10 @@ event_sdl_add_timeout(int timeout, int multi, struct callback *cb)
{
struct event_timeout * ret = g_new0(struct event_timeout, 1);
if(!ret) {
- dbg(lvl_error,"g_new0 failed\n");
+ dbg(lvl_error,"g_new0 failed");
return ret;
}
- dbg(lvl_debug,"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",ret, multi, timeout, cb);
ret->multi = multi;
ret->cb = cb;
ret->id = SDL_AddTimer(timeout, sdl_timer_callback, ret);
@@ -1735,17 +1735,17 @@ event_sdl_add_timeout(int timeout, int multi, struct callback *cb)
static void
event_sdl_remove_timeout(struct event_timeout *to)
{
- dbg(lvl_info,"enter %p\n", to);
+ dbg(lvl_info,"enter %p", to);
if(to)
{
/* do not SDL_RemoveTimer if oneshot timer has already fired */
int ret = to->id == 0 ? SDL_TRUE : SDL_RemoveTimer(to->id);
if (ret == SDL_FALSE)
- dbg(lvl_error,"SDL_RemoveTimer (%p) failed\n", to->id);
+ dbg(lvl_error,"SDL_RemoveTimer (%p) failed", to->id);
g_free(to);
- dbg(lvl_debug,"timer(%p) removed\n", to);
+ dbg(lvl_debug,"timer(%p) removed", to);
}
}
@@ -1767,7 +1767,7 @@ sdl_sort_idle_tasks(gconstpointer parama, gconstpointer paramb)
static struct event_idle *
event_sdl_add_idle(int priority, struct callback *cb)
{
- dbg(lvl_debug,"add idle priority(%d) cb(%p)\n", priority, cb);
+ dbg(lvl_debug,"add idle priority(%d) cb(%p)", priority, cb);
struct idle_task *task = g_new0(struct idle_task, 1);
task->priority = priority;
@@ -1780,7 +1780,7 @@ event_sdl_add_idle(int priority, struct callback *cb)
SDL_Event event;
SDL_UserEvent userevent;
- dbg(lvl_debug,"poking eventloop because of new idle_events\n");
+ dbg(lvl_debug,"poking eventloop because of new idle_events");
userevent.type = SDL_USEREVENT;
userevent.code = SDL_USEREVENT_CODE_IDLE_EVENT;
@@ -1801,7 +1801,7 @@ event_sdl_add_idle(int priority, struct callback *cb)
static void
event_sdl_remove_idle(struct event_idle *task)
{
- dbg(lvl_debug,"remove task(%p)\n", task);
+ dbg(lvl_debug,"remove task(%p)", task);
g_ptr_array_remove(idle_tasks, (gpointer)task);
}
@@ -1810,7 +1810,7 @@ event_sdl_remove_idle(struct event_idle *task)
static void
event_sdl_call_callback(struct callback_list *cbl)
{
- dbg(lvl_debug,"call_callback cbl(%p)\n",cbl);
+ dbg(lvl_debug,"call_callback cbl(%p)",cbl);
SDL_Event event;
SDL_UserEvent userevent;
diff --git a/navit/graphics/win32/graphics_win32.c b/navit/graphics/win32/graphics_win32.c
index 3d8fa351d..a450789c4 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_debug, "resize memDC to: %d %d \n", gr->width, gr->height );
+ dbg(lvl_debug, "resize memDC to: %d %d ", 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_debug,"HandleKey %d\n",key);
+ dbg(lvl_debug,"HandleKey %d",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_debug,"HandleKey %d\n",key);
+ dbg(lvl_debug,"HandleKey %d",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_debug, "resize gfx to: %d %d \n", gra_priv->width, gra_priv->height );
+ dbg(lvl_debug, "resize gfx to: %d %d ", 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_debug, "WM_PAINT\n");
+ dbg(lvl_debug, "WM_PAINT");
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_debug, "LBUTTONDOWN\n");
+ dbg(lvl_debug, "LBUTTONDOWN");
HandleButtonClick( gra_priv, 1, 1, lParam);
}
break;
case WM_LBUTTONUP:
{
- dbg(lvl_debug, "LBUTTONUP\n");
+ dbg(lvl_debug, "LBUTTONUP");
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_debug, "LBUTTONDBLCLK\n");
+ dbg(lvl_debug, "LBUTTONDBLCLK");
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_debug,"got WM_COPYDATA\n");
+ dbg(lvl_debug,"got WM_COPYDATA");
callback_list_call_attr_2(gra_priv->cbl, attr_wm_copydata, (void *)wParam, (void*)lParam);
break;
#ifdef HAVE_API_WIN32_CE
@@ -689,7 +689,7 @@ static HANDLE CreateGraphicsWindows( struct graphics_priv* gr, HMENU hMenu )
if (!RegisterClassEx(&wc))
#endif
{
- dbg(lvl_error, "Window registration failed\n");
+ dbg(lvl_error, "Window registration failed");
return NULL;
}
@@ -732,7 +732,7 @@ static HANDLE CreateGraphicsWindows( struct graphics_priv* gr, HMENU hMenu )
#endif
if (hwnd == NULL)
{
- dbg(lvl_error, "Window creation failed: %d\n", GetLastError());
+ dbg(lvl_error, "Window creation failed: %d", GetLastError());
return NULL;
}
/* For Vista, we need here ChangeWindowMessageFilter(WM_COPYDATA,MSGFLT_ADD); since Win7 we need above one or ChangeWindowMessageFilterEx (MSDN), both are
@@ -932,7 +932,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_debug, "set draw_mode to %x, %d\n", gr, (int)mode );
+ dbg(lvl_debug, "set draw_mode to %x, %d", gr, (int)mode );
if ( mode == draw_mode_begin )
{
@@ -944,7 +944,7 @@ static void draw_mode(struct graphics_priv *gr, enum draw_mode_num mode)
{
if ( gr->hMemDC )
{
- dbg(lvl_debug, "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", gr, gr->width, gr->height, gr->bg_color);
#ifdef FAST_TRANSPARENCY
if ( gr->hPrebuildDC )
{
@@ -1136,11 +1136,11 @@ pngdecode(struct graphics_priv *gr, char *name, struct graphics_image_priv *img)
BITMAPINFO pnginfo;
HDC dc;
- dbg(lvl_debug,"enter %s\n",name);
+ dbg(lvl_debug,"enter %s",name);
png_file=fopen(name, "rb");
if (!png_file)
{
- dbg(lvl_warning,"failed to open %s\n",name);
+ dbg(lvl_warning,"failed to open %s",name);
return FALSE;
}
@@ -1278,7 +1278,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_debug,"ok\n");
+ dbg(lvl_debug,"ok");
fclose(png_file);
return TRUE;
@@ -1426,7 +1426,7 @@ static struct graphics_image_priv *image_new(struct graphics_priv *gr, struct gr
if (len >= 4)
{
char *ext;
- dbg(lvl_info, "loading image '%s'\n", name );
+ dbg(lvl_info, "loading image '%s'", name );
ret = g_new0( struct graphics_image_priv, 1 );
ext = name+len-4;
if (!strcmp(ext,".xpm")) {
@@ -1436,7 +1436,7 @@ static struct graphics_image_priv *image_new(struct graphics_priv *gr, struct gr
}
}
if (!rc) {
- dbg(lvl_warning, "failed loading '%s'\n", name );
+ dbg(lvl_warning, "failed loading '%s'", name );
g_free(ret);
ret=NULL;
}
@@ -1479,7 +1479,7 @@ static struct graphics_priv *
static void overlay_resize(struct graphics_priv *gr, struct point *p, int w, int h, int wraparound)
{
- dbg(lvl_debug, "resize overlay: %x, x: %d, y: %d, w: %d, h: %d, wraparound: %d\n", gr, p->x, p->y, w, h, wraparound);
+ dbg(lvl_debug, "resize overlay: %x, x: %d, y: %d, w: %d, h: %d, wraparound: %d", gr, p->x, p->y, w, h, wraparound);
if ( gr->width != w || gr->height != h )
{
@@ -1497,7 +1497,7 @@ static struct graphics_priv *
overlay_new(struct graphics_priv *gr, struct graphics_methods *meth, struct point *p, int w, int h, int wraparound)
{
struct graphics_priv *this=graphics_win32_new_helper(meth);
- dbg(lvl_debug, "overlay: %x, x: %d, y: %d, w: %d, h: %d, wraparound: %d\n", this, p->x, p->y, w, h, wraparound);
+ dbg(lvl_debug, "overlay: %x, x: %d, y: %d, w: %d, h: %d, wraparound: %d", this, p->x, p->y, w, h, wraparound);
this->width = w;
this->height = h;
this->parent = gr;
@@ -1531,7 +1531,7 @@ static struct graphics_priv *
static void overlay_disable(struct graphics_priv *gr, int disable)
{
- dbg(lvl_debug, "overlay: %x, disable: %d\n", gr, disable);
+ dbg(lvl_debug, "overlay: %x, disable: %d", gr, disable);
gr->disabled = disable;
}
@@ -1543,7 +1543,7 @@ static void get_text_bbox(struct graphics_priv *gr, struct graphics_font_priv *f
int yMax = 13*font->size/256;
int xMax = 9*font->size*len/256;
- dbg(lvl_info, "Get bbox for %s\n", text);
+ dbg(lvl_info, "Get bbox for %s", text);
ret[0].x = xMin;
ret[0].y = -yMin;
@@ -1610,7 +1610,7 @@ static void bind_late(struct graphics_priv* gra_priv)
gra_priv->AlphaBlend = (FP_AlphaBlend)GetProcAddress(gra_priv->hCoreDll, TEXT("AlphaBlend") );
if (!gra_priv->AlphaBlend)
{
- dbg(lvl_warning, "AlphaBlend not supported\n");
+ dbg(lvl_warning, "AlphaBlend not supported");
}
#if HAVE_API_WIN32_CE
gra_priv->SetStretchBltMode= (FP_SetStretchBltMode)GetProcAddress(gra_priv->hCoreDll, TEXT("SetStretchBltMode") );
@@ -1619,12 +1619,12 @@ static void bind_late(struct graphics_priv* gra_priv)
#endif
if (!gra_priv->SetStretchBltMode)
{
- dbg(lvl_warning, "SetStretchBltMode not supported\n");
+ dbg(lvl_warning, "SetStretchBltMode not supported");
}
}
else
{
- dbg(lvl_error, "Error loading coredll\n");
+ dbg(lvl_error, "Error loading coredll");
}
if(gra_priv->hUser32Dll) {
@@ -1678,7 +1678,7 @@ event_win32_main_loop_run(void)
{
MSG msg;
- dbg(lvl_debug,"enter\n");
+ dbg(lvl_debug,"enter");
while (GetMessage(&msg, 0, 0, 0))
{
TranslateMessage(&msg); /* Keyboard input. */
@@ -1694,7 +1694,7 @@ static void event_win32_main_loop_quit(void)
HWND hwndSip;
#endif
- dbg(lvl_debug,"enter\n");
+ dbg(lvl_debug,"enter");
#ifdef HAVE_API_WIN32_CE
hwndTaskbar = FindWindow(L"HHTaskBar", NULL);
@@ -1710,14 +1710,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_debug,"enter\n");
+ dbg(lvl_debug,"enter");
return NULL;
}
static void
event_win32_remove_watch(struct event_watch *ev)
{
- dbg(lvl_debug,"enter\n");
+ dbg(lvl_debug,"enter");
}
static GList *timers;
@@ -1740,7 +1740,7 @@ static void run_timer(UINT_PTR idEvent)
if (t->timer_id == idEvent)
{
struct callback *cb = t->cb;
- dbg(lvl_info, "Timer %d (multi: %d)\n", t->timer_id, t->multi);
+ dbg(lvl_info, "Timer %d (multi: %d)", t->timer_id, t->multi);
if (!t->multi)
{
KillTimer(NULL, t->timer_id);
@@ -1752,7 +1752,7 @@ static void run_timer(UINT_PTR idEvent)
}
l = g_list_next(l);
}
- dbg(lvl_error, "timer %d not found\n", idEvent);
+ dbg(lvl_error, "timer %d not found", idEvent);
}
static VOID CALLBACK win32_timer_cb(HWND hwnd, UINT uMsg,
@@ -1773,7 +1773,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_debug, "Started timer %d for %d (multi: %d)\n", t->timer_id, timeout, multi);
+ dbg(lvl_debug, "Started timer %d for %d (multi: %d)", t->timer_id, timeout, multi);
return t;
}
@@ -1784,7 +1784,7 @@ event_win32_remove_timeout(struct event_timeout *to)
{
GList *l;
struct event_timeout *t=NULL;
- dbg(lvl_debug, "Try stopping timer %d\n", to->timer_id);
+ dbg(lvl_debug, "Try stopping timer %d", to->timer_id);
l = timers;
while (l)
{
@@ -1799,7 +1799,7 @@ event_win32_remove_timeout(struct event_timeout *to)
}
l = g_list_next(l);
}
- dbg(lvl_error, "Timer %d not found\n", to->timer_id);
+ dbg(lvl_error, "Timer %d not found", to->timer_id);
g_free(to);
}
}