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/gui/button_bar.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/gui/button_bar.c')
-rw-r--r-- | frontends/riscos/gui/button_bar.c | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/frontends/riscos/gui/button_bar.c b/frontends/riscos/gui/button_bar.c index 6ecd7cffa..34ae39ae5 100644 --- a/frontends/riscos/gui/button_bar.c +++ b/frontends/riscos/gui/button_bar.c @@ -138,7 +138,7 @@ struct button_bar *ro_gui_button_bar_create(struct theme_descriptor *theme, button_bar = malloc(sizeof(struct button_bar)); if (button_bar == NULL) { - LOG("No memory for malloc()"); + NSLOG(netsurf, INFO, "No memory for malloc()"); return NULL; } @@ -538,7 +538,10 @@ bool ro_gui_button_bar_icon_update(struct button_bar *button_bar) error = xwimp_create_icon(&icon, &button->icon); if (error) { - LOG("xwimp_create_icon: 0x%x: %s", error->errnum, error->errmess); + NSLOG(netsurf, INFO, + "xwimp_create_icon: 0x%x: %s", + error->errnum, + error->errmess); ro_warn_user("WimpError", error->errmess); button->icon = -1; return false; @@ -548,7 +551,10 @@ bool ro_gui_button_bar_icon_update(struct button_bar *button_bar) error = xwimp_delete_icon(button_bar->window, button->icon); if (error != NULL) { - LOG("xwimp_delete_icon: 0x%x: %s", error->errnum, error->errmess); + NSLOG(netsurf, INFO, + "xwimp_delete_icon: 0x%x: %s", + error->errnum, + error->errmess); ro_warn_user("WimpError", error->errmess); return false; } @@ -598,7 +604,10 @@ bool ro_gui_button_bar_icon_resize(struct button_bar *button_bar) button->y_pos + button->y_size); if (error != NULL) { - LOG("xwimp_resize_icon: 0x%x: %s", error->errnum, error->errmess); + NSLOG(netsurf, INFO, + "xwimp_resize_icon: 0x%x: %s", + error->errnum, + error->errmess); ro_warn_user("WimpError", error->errmess); button->icon = -1; return false; @@ -769,7 +778,10 @@ bool ro_gui_button_bar_click(struct button_bar *button_bar, button_bar->sprites, sprite, &box, NULL); if (error) - LOG("xdragasprite_start: 0x%x: %s", error->errnum, error->errmess); + NSLOG(netsurf, INFO, + "xdragasprite_start: 0x%x: %s", + error->errnum, + error->errmess); ro_mouse_drag_start(ro_gui_button_bar_drag_end, NULL, NULL, NULL); @@ -870,7 +882,8 @@ void ro_gui_button_bar_drag_end(wimp_dragged *drag, void *data) error = xwimp_get_pointer_info(&pointer); if (error) { - LOG("xwimp_get_pointer_info: 0x%x: %s", error->errnum, error->errmess); + NSLOG(netsurf, INFO, "xwimp_get_pointer_info: 0x%x: %s", + error->errnum, error->errmess); ro_warn_user("WimpError", error->errmess); return; } @@ -880,7 +893,8 @@ void ro_gui_button_bar_drag_end(wimp_dragged *drag, void *data) state.w = drag_start->window; 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; } @@ -1068,7 +1082,7 @@ char *ro_gui_button_bar_get_config(struct button_bar *button_bar) config = malloc(size); if (config == NULL) { - LOG("No memory for malloc()"); + NSLOG(netsurf, INFO, "No memory for malloc()"); ro_warn_user("NoMemory", 0); return NULL; } |