From 75018632a9b953aafeae6f4e8aea607fd1d89dca Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 6 Sep 2017 18:28:12 +0100 Subject: Use coccinelle to change logging macro calls in c files for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done @@ expression E; @@ -LOG(E); +NSLOG(netsurf, INFO, E); @@ expression E, E1; @@ -LOG(E, E1); +NSLOG(netsurf, INFO, E, E1); @@ expression E, E1, E2; @@ -LOG(E, E1, E2); +NSLOG(netsurf, INFO, E, E1, E2); @@ expression E, E1, E2, E3; @@ -LOG(E, E1, E2, E3); +NSLOG(netsurf, INFO, E, E1, E2, E3); @@ expression E, E1, E2, E3, E4; @@ -LOG(E, E1, E2, E3, E4); +NSLOG(netsurf, INFO, E, E1, E2, E3, E4); @@ expression E, E1, E2, E3, E4, E5; @@ -LOG(E, E1, E2, E3, E4, E5); +NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5); @@ expression E, E1, E2, E3, E4, E5, E6; @@ -LOG(E, E1, E2, E3, E4, E5, E6); +NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6); @@ expression E, E1, E2, E3, E4, E5, E6, E7; @@ -LOG(E, E1, E2, E3, E4, E5, E6, E7); +NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7); --- frontends/atari/hotlist.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'frontends/atari/hotlist.c') diff --git a/frontends/atari/hotlist.c b/frontends/atari/hotlist.c index 659b3a562..3a54c98eb 100644 --- a/frontends/atari/hotlist.c +++ b/frontends/atari/hotlist.c @@ -72,13 +72,13 @@ static struct atari_treeview_callbacks atari_hotlist_treeview_callbacks = { static nserror atari_hotlist_init_phase2(struct core_window *cw, struct core_window_callback_table *cb_t) { - LOG("cw:%p", cw); + NSLOG(netsurf, INFO, "cw:%p", cw); return hotlist_manager_init(cb_t, cw); } static void atari_hotlist_finish(struct core_window *cw) { - LOG("cw:%p", cw); + NSLOG(netsurf, INFO, "cw:%p", cw); hotlist_fini(); } @@ -93,7 +93,7 @@ static void atari_hotlist_keypress(struct core_window *cw, uint32_t ucs4) { //GUIWIN *gemtk_win; //GRECT area; - LOG("ucs4: %"PRIu32 , ucs4); + NSLOG(netsurf, INFO, "ucs4: %"PRIu32, ucs4); hotlist_keypress(ucs4); //gemtk_win = atari_treeview_get_gemtk_window(cw); //atari_treeview_get_grect(cw, TREEVIEW_AREA_CONTENT, &area); @@ -104,7 +104,7 @@ static void atari_hotlist_mouse_action(struct core_window *cw, browser_mouse_state mouse, int x, int y) { - LOG("x: %d, y: %d\n", x, y); + NSLOG(netsurf, INFO, "x: %d, y: %d\n", x, y); hotlist_mouse_action(mouse, x, y); } @@ -123,7 +123,7 @@ static short handle_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8]) GRECT tb_area; GUIWIN * gemtk_win; - LOG("gw:%p", win); + NSLOG(netsurf, INFO, "gw:%p", win); tv = (struct atari_treeview_window*) gemtk_wm_get_user_data(win); cw = (struct core_window *)tv; @@ -132,7 +132,7 @@ static short handle_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8]) switch (msg[0]) { case WM_TOOLBAR: - LOG("WM_TOOLBAR"); + NSLOG(netsurf, INFO, "WM_TOOLBAR"); toolbar = gemtk_obj_get_tree(TOOLBAR_HOTLIST); @@ -198,7 +198,7 @@ void atari_hotlist_init(void) strncpy( (char*)&hl.path, nsoption_charp(hotlist_file), PATH_MAX-1 ); } - LOG("Hotlist: %s", (char *)&hl.path); + NSLOG(netsurf, INFO, "Hotlist: %s", (char *)&hl.path); hotlist_init(hl.path, hl.path); if( hl.window == NULL ){ @@ -224,7 +224,8 @@ void atari_hotlist_init(void) if (hl.tv == NULL) { /* handle it properly, clean up previous allocs */ - LOG("Failed to allocate treeview"); + NSLOG(netsurf, INFO, + "Failed to allocate treeview"); return; } @@ -276,7 +277,7 @@ void atari_hotlist_destroy(void) atari_treeview_delete(hl.tv); hl.init = false; } - LOG("done"); + NSLOG(netsurf, INFO, "done"); } void atari_hotlist_redraw(void) @@ -299,7 +300,7 @@ void atari_hotlist_add_page( const char * url, const char * title ) return; if (hotlist_has_url(nsurl)) { - LOG("URL already added as Bookmark"); + NSLOG(netsurf, INFO, "URL already added as Bookmark"); nsurl_unref(nsurl); return; } -- cgit v1.2.3