diff options
author | Vincent Sanders <vince@kyllikki.org> | 2017-09-06 18:28:12 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2017-09-06 18:45:27 +0100 |
commit | 75018632a9b953aafeae6f4e8aea607fd1d89dca (patch) | |
tree | d661d2fded2ad4b80c4cf019dee2954c052ab090 /frontends/riscos/url_complete.c | |
parent | 8d9b2efc11529da8cb5870b39ff15249c648b10a (diff) | |
download | netsurf-75018632a9b953aafeae6f4e8aea607fd1d89dca.tar.gz netsurf-75018632a9b953aafeae6f4e8aea607fd1d89dca.tar.bz2 |
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);
Diffstat (limited to 'frontends/riscos/url_complete.c')
-rw-r--r-- | frontends/riscos/url_complete.c | 66 |
1 files changed, 46 insertions, 20 deletions
diff --git a/frontends/riscos/url_complete.c b/frontends/riscos/url_complete.c index 16c6e3a2e..82c2d2c67 100644 --- a/frontends/riscos/url_complete.c +++ b/frontends/riscos/url_complete.c @@ -171,7 +171,8 @@ bool ro_gui_url_complete_keypress(struct toolbar *toolbar, uint32_t key) -(url_complete_matches_selection + 1) * 44, 65536, -url_complete_matches_selection * 44); if (error) { - LOG("xwimp_force_redraw: 0x%x: %s", error->errnum, error->errmess); + NSLOG(netsurf, INFO, "xwimp_force_redraw: 0x%x: %s", + error->errnum, error->errmess); ro_warn_user("WimpError", error->errmess); } @@ -210,7 +211,10 @@ bool ro_gui_url_complete_keypress(struct toolbar *toolbar, uint32_t key) state.w = parent; error = xwimp_get_window_state(&state); if (error) { - LOG("xwimp_get_window_state: 0x%x: %s", error->errnum, error->errmess); + NSLOG(netsurf, INFO, + "xwimp_get_window_state: 0x%x: %s", + error->errnum, + error->errmess); ro_warn_user("WimpError", error->errmess); return false; } @@ -228,7 +232,10 @@ bool ro_gui_url_complete_keypress(struct toolbar *toolbar, uint32_t key) error = xwimp_force_redraw(dialog_url_complete, 0, -(i + 1) * 44, 65536, -i * 44); if (error) { - LOG("xwimp_force_redraw: 0x%x: %s", error->errnum, error->errmess); + NSLOG(netsurf, INFO, + "xwimp_force_redraw: 0x%x: %s", + error->errnum, + error->errmess); ro_warn_user("WimpError", error->errmess); } @@ -281,7 +288,8 @@ bool ro_gui_url_complete_keypress(struct toolbar *toolbar, uint32_t key) 0, -(old_selection + 1) * 44, 65536, -old_selection * 44); if (error) { - LOG("xwimp_force_redraw: 0x%x: %s", error->errnum, error->errmess); + NSLOG(netsurf, INFO, "xwimp_force_redraw: 0x%x: %s", + error->errnum, error->errmess); ro_warn_user("WimpError", error->errmess); } @@ -289,7 +297,8 @@ bool ro_gui_url_complete_keypress(struct toolbar *toolbar, uint32_t key) 0, -(url_complete_matches_selection + 1) * 44, 65536, -url_complete_matches_selection * 44); if (error) { - LOG("xwimp_force_redraw: 0x%x: %s", error->errnum, error->errmess); + NSLOG(netsurf, INFO, "xwimp_force_redraw: 0x%x: %s", + error->errnum, error->errmess); ro_warn_user("WimpError", error->errmess); } @@ -320,7 +329,8 @@ bool ro_gui_url_complete_keypress(struct toolbar *toolbar, uint32_t key) state.w = dialog_url_complete; error = xwimp_get_window_state(&state); if (error) { - LOG("xwimp_get_window_state: 0x%x: %s", error->errnum, error->errmess); + NSLOG(netsurf, INFO, "xwimp_get_window_state: 0x%x: %s", + error->errnum, error->errmess); ro_warn_user("WimpError", error->errmess); return true; } @@ -335,7 +345,8 @@ bool ro_gui_url_complete_keypress(struct toolbar *toolbar, uint32_t key) error = xwimp_open_window(PTR_WIMP_OPEN(&state)); if (error) { - LOG("xwimp_open_window: 0x%x: %s", error->errnum, error->errmess); + NSLOG(netsurf, INFO, "xwimp_open_window: 0x%x: %s", + error->errnum, error->errmess); ro_warn_user("WimpError", error->errmess); return true; } @@ -411,7 +422,8 @@ void ro_gui_url_complete_resize(struct toolbar *toolbar, wimp_open *open) state.w = dialog_url_complete; error = xwimp_get_window_state(&state); if (error) { - LOG("xwimp_get_window_state: 0x%x: %s", error->errnum, error->errmess); + NSLOG(netsurf, INFO, "xwimp_get_window_state: 0x%x: %s", + error->errnum, error->errmess); ro_warn_user("WimpError", error->errmess); return; } @@ -423,13 +435,14 @@ void ro_gui_url_complete_resize(struct toolbar *toolbar, wimp_open *open) toolbar_state.w = ro_toolbar_get_window(toolbar); error = xwimp_get_window_state(&toolbar_state); if (error) { - LOG("xwimp_get_window_state: 0x%x: %s", error->errnum, error->errmess); + NSLOG(netsurf, INFO, "xwimp_get_window_state: 0x%x: %s", + error->errnum, error->errmess); ro_warn_user("WimpError", error->errmess); return; } if (!ro_toolbar_get_url_field_extent(toolbar, &url_extent)) { - LOG("Failed to read URL field extent."); + NSLOG(netsurf, INFO, "Failed to read URL field extent."); return; } @@ -438,7 +451,8 @@ void ro_gui_url_complete_resize(struct toolbar *toolbar, wimp_open *open) extent.x1 = 65536; error = xwimp_set_extent(dialog_url_complete, &extent); if (error) { - LOG("xwimp_set_extent: 0x%x: %s", error->errnum, error->errmess); + NSLOG(netsurf, INFO, "xwimp_set_extent: 0x%x: %s", + error->errnum, error->errmess); ro_warn_user("WimpError", error->errmess); return; } @@ -460,14 +474,16 @@ void ro_gui_url_complete_resize(struct toolbar *toolbar, wimp_open *open) if (state.visible.x1 - state.visible.x0 < 0) { error = xwimp_close_window(dialog_url_complete); if (error) { - LOG("xwimp_close_window: 0x%x: %s", error->errnum, error->errmess); + NSLOG(netsurf, INFO, "xwimp_close_window: 0x%x: %s", + error->errnum, error->errmess); ro_warn_user("WimpError", error->errmess); } } else { error = xwimp_open_window_nested_with_flags(&state, (wimp_w)-1, 0); if (error) { - LOG("xwimp_open_window: 0x%x: %s", error->errnum, error->errmess); + NSLOG(netsurf, INFO, "xwimp_open_window: 0x%x: %s", + error->errnum, error->errmess); ro_warn_user("WimpError", error->errmess); return; } @@ -507,7 +523,8 @@ bool ro_gui_url_complete_close(void) error = xwimp_close_window(dialog_url_complete); if (error) { - LOG("xwimp_close_window: 0x%x: %s", error->errnum, error->errmess); + NSLOG(netsurf, INFO, "xwimp_close_window: 0x%x: %s", + error->errnum, error->errmess); ro_warn_user("WimpError", error->errmess); } @@ -547,7 +564,7 @@ void ro_gui_url_complete_redraw(wimp_draw *redraw) /* no matches? no redraw */ if (!url_complete_matches) { - LOG("Attempt to redraw with no matches made"); + NSLOG(netsurf, INFO, "Attempt to redraw with no matches made"); /* Fill is never used, so make it something obvious */ ro_gui_user_redraw(redraw, false, os_COLOUR_BLACK); return; @@ -582,7 +599,10 @@ void ro_gui_url_complete_redraw(wimp_draw *redraw) error = xwimp_plot_icon(&url_complete_icon); if (error) { - LOG("xwimp_plot_icon: 0x%x: %s", error->errnum, error->errmess); + NSLOG(netsurf, INFO, + "xwimp_plot_icon: 0x%x: %s", + error->errnum, + error->errmess); ro_warn_user("WimpError", error->errmess); } @@ -604,7 +624,10 @@ void ro_gui_url_complete_redraw(wimp_draw *redraw) url_complete_sprite.extent.y0 = -(line + 1) * 44; error = xwimp_plot_icon(&url_complete_sprite); if (error) { - LOG("xwimp_plot_icon: 0x%x: %s", error->errnum, error->errmess); + NSLOG(netsurf, INFO, + "xwimp_plot_icon: 0x%x: %s", + error->errnum, + error->errmess); ro_warn_user("WimpError", error->errmess); } } @@ -658,7 +681,8 @@ bool ro_gui_url_complete_click(wimp_pointer *pointer) state.w = dialog_url_complete; error = xwimp_get_window_state(&state); if (error) { - LOG("xwimp_get_window_state: 0x%x: %s", error->errnum, error->errmess); + NSLOG(netsurf, INFO, "xwimp_get_window_state: 0x%x: %s", + error->errnum, error->errmess); ro_warn_user("WimpError", error->errmess); return false; } @@ -685,14 +709,16 @@ bool ro_gui_url_complete_click(wimp_pointer *pointer) 0, -(old_selection + 1) * 44, 65536, -old_selection * 44); if (error) { - LOG("xwimp_force_redraw: 0x%x: %s", error->errnum, error->errmess); + NSLOG(netsurf, INFO, "xwimp_force_redraw: 0x%x: %s", + error->errnum, error->errmess); ro_warn_user("WimpError", error->errmess); } error = xwimp_force_redraw(dialog_url_complete, 0, -(url_complete_matches_selection + 1) * 44, 65536, -url_complete_matches_selection * 44); if (error) { - LOG("xwimp_force_redraw: 0x%x: %s", error->errnum, error->errmess); + NSLOG(netsurf, INFO, "xwimp_force_redraw: 0x%x: %s", + error->errnum, error->errmess); ro_warn_user("WimpError", error->errmess); } } |