diff options
author | sleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2014-11-22 22:34:19 +0000 |
---|---|---|
committer | sleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2014-11-22 22:34:19 +0000 |
commit | 2a6aa9b917249f44e4aa27d88e255f61eb171d6a (patch) | |
tree | 0ad46b248e42f96e93b54874aa3b073ad1273aa1 /navit/binding/win32/binding_win32.c | |
parent | 05edfdebd6b83267121b11538abafe39bff266e7 (diff) | |
download | navit-2a6aa9b917249f44e4aa27d88e255f61eb171d6a.tar.gz |
Refactor:core:Introduce enum for debug levels, and use it everywhere.|First part of #1269.
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5960 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/binding/win32/binding_win32.c')
-rw-r--r-- | navit/binding/win32/binding_win32.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/navit/binding/win32/binding_win32.c b/navit/binding/win32/binding_win32.c index 5d33ec47e..835a2f6e2 100644 --- a/navit/binding/win32/binding_win32.c +++ b/navit/binding/win32/binding_win32.c @@ -60,10 +60,10 @@ struct win32_binding_private { static int win32_cmd_send_signal(struct navit *navit, char *command, struct attr **in, struct attr ***out) { - dbg(0,"this function is a stub\n"); + dbg(lvl_error,"this function is a stub\n"); if (in) { while (*in) { - dbg(0,"another attribute to be sent\n"); + dbg(lvl_error,"another attribute to be sent\n"); in++; } } @@ -84,23 +84,23 @@ win32_wm_copydata(struct win32_binding_private *this, int *hwndSender, COPYDATAS navit.type=attr_navit; navit.u.navit=this->navit; if(cpd->dwData!=NAVIT_BINDING_W32_DWDATA) { - dbg(0,"COPYDATA message came with wrong DWDATA value, expected %d, got %d.\n",NAVIT_BINDING_W32_DWDATA,cpd->dwData); + dbg(lvl_error,"COPYDATA message came with wrong DWDATA value, expected %d, got %d.\n",NAVIT_BINDING_W32_DWDATA,cpd->dwData); return; } if(cpd->cbData<sizeof(*msg)) { - dbg(0,"COPYDATA message too short, expected >=%d, got %d.\n",sizeof(*msg),cpd->cbData); + dbg(lvl_error,"COPYDATA message too short, expected >=%d, got %d.\n",sizeof(*msg),cpd->cbData); return; } msg=cpd->lpData; if(cpd->dwData!=NAVIT_BINDING_W32_VERSION) { - dbg(0,"Got request with wrong version number, expected %d, got %d.\n",NAVIT_BINDING_W32_VERSION,msg->version); + dbg(lvl_error,"Got request with wrong version number, expected %d, got %d.\n",NAVIT_BINDING_W32_VERSION,msg->version); return; } if(strcmp(NAVIT_BINDING_W32_MAGIC,msg->magic)) { - dbg(0,"Got request with wrong MAGIC, expected %s, got %*s.\n",NAVIT_BINDING_W32_MAGIC, msg->magic,sizeof(msg->magic)); + dbg(lvl_error,"Got request with wrong MAGIC, expected %s, got %*s.\n",NAVIT_BINDING_W32_MAGIC, msg->magic,sizeof(msg->magic)); return; } - dbg(0,"Running command %s\n", msg->text); + dbg(lvl_error,"Running command %s\n", msg->text); command_evaluate(&navit, msg->text); } @@ -120,9 +120,9 @@ static void win32_main_navit(struct win32_binding_private *this, struct navit *navit, int added) { struct attr attr; - dbg(0,"enter\n"); + dbg(lvl_error,"enter\n"); if (added==1) { - dbg(0,"enter2\n"); + dbg(lvl_error,"enter2\n"); this->navit=navit; command_add_table_attr(commands, sizeof(commands)/sizeof(struct command_table), navit, &attr); navit_add_attr(navit, &attr); @@ -137,7 +137,7 @@ void plugin_init(void) { struct attr callback; struct win32_binding_private *this=g_new0(struct win32_binding_private,1); - dbg(0,"enter\n"); + dbg(lvl_error,"enter\n"); callback.type=attr_callback; callback.u.callback=callback_new_attr_1(callback_cast(win32_main_navit),attr_navit,this); config_add_attr(config, &callback); |