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/configure | |
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/configure')
-rw-r--r-- | frontends/riscos/configure/con_language.c | 6 | ||||
-rw-r--r-- | frontends/riscos/configure/con_theme.c | 23 |
2 files changed, 19 insertions, 10 deletions
diff --git a/frontends/riscos/configure/con_language.c b/frontends/riscos/configure/con_language.c index 2030c65c0..77e4f6cb4 100644 --- a/frontends/riscos/configure/con_language.c +++ b/frontends/riscos/configure/con_language.c @@ -98,7 +98,8 @@ bool ro_gui_options_language_ok(wimp_w w) if (temp) { nsoption_set_charp(language, temp); } else { - LOG("No memory to duplicate language code"); + NSLOG(netsurf, INFO, + "No memory to duplicate language code"); ro_warn_user("NoMemory", 0); } } @@ -113,7 +114,8 @@ bool ro_gui_options_language_ok(wimp_w w) if (temp) { nsoption_set_charp(accept_language,temp); } else { - LOG("No memory to duplicate language code"); + NSLOG(netsurf, INFO, + "No memory to duplicate language code"); ro_warn_user("NoMemory", 0); } } diff --git a/frontends/riscos/configure/con_theme.c b/frontends/riscos/configure/con_theme.c index fb0d3dfb0..28195dea9 100644 --- a/frontends/riscos/configure/con_theme.c +++ b/frontends/riscos/configure/con_theme.c @@ -104,20 +104,23 @@ bool ro_gui_options_theme_initialise(wimp_w w) return false; error = xwimp_create_window(&theme_pane_definition, &theme_pane); if (error) { - LOG("xwimp_create_window: 0x%x: %s", error->errnum, error->errmess); + NSLOG(netsurf, INFO, "xwimp_create_window: 0x%x: %s", + error->errnum, error->errmess); return false; } state.w = w; 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); return false; } icon_state.w = w; icon_state.i = THEME_PANE_AREA; error = xwimp_get_icon_state(&icon_state); if (error) { - LOG("xwimp_get_icon_state: 0x%x: %s", error->errnum, error->errmess); + NSLOG(netsurf, INFO, "xwimp_get_icon_state: 0x%x: %s", + error->errnum, error->errmess); return false; } state.w = theme_pane; @@ -126,7 +129,8 @@ bool ro_gui_options_theme_initialise(wimp_w w) state.visible.x0 += icon_state.icon.extent.x0 + 16; state.visible.y0 = state.visible.y1 + icon_state.icon.extent.y0 + 16; state.visible.y1 += icon_state.icon.extent.y1 - 28; - LOG("Y0 = %i, y1 = %i", icon_state.icon.extent.y0, icon_state.icon.extent.y1); + NSLOG(netsurf, INFO, "Y0 = %i, y1 = %i", icon_state.icon.extent.y0, + icon_state.icon.extent.y1); error = xwimp_open_window_nested(PTR_WIMP_OPEN(&state), w, wimp_CHILD_LINKS_PARENT_VISIBLE_BOTTOM_OR_LEFT << wimp_CHILD_XORIGIN_SHIFT | @@ -141,7 +145,8 @@ bool ro_gui_options_theme_initialise(wimp_w w) wimp_CHILD_LINKS_PARENT_VISIBLE_TOP_OR_RIGHT << wimp_CHILD_TS_EDGE_SHIFT); if (error) { - LOG("xwimp_open_window_nested: 0x%x: %s", error->errnum, error->errmess); + NSLOG(netsurf, INFO, "xwimp_open_window_nested: 0x%x: %s", + error->errnum, error->errmess); return false; } @@ -176,7 +181,8 @@ void ro_gui_options_theme_finalise(wimp_w w) ro_gui_wimp_event_finalise(theme_pane); error = xwimp_delete_window(theme_pane); if (error) { - LOG("xwimp_delete_window: 0x%x: %s", error->errnum, error->errmess); + NSLOG(netsurf, INFO, "xwimp_delete_window: 0x%x: %s", + error->errnum, error->errmess); ro_warn_user("WimpError", error->errmess); } theme_pane = 0; @@ -269,7 +275,7 @@ void ro_gui_options_theme_load(void) ro_toolbar_rebuild(toolbar); toolbar_display = calloc(sizeof(struct toolbar_display), 1); if (!toolbar_display) { - LOG("No memory for calloc()"); + NSLOG(netsurf, INFO, "No memory for calloc()"); ro_warn_user("NoMemory", 0); return; } @@ -291,7 +297,8 @@ void ro_gui_options_theme_load(void) state.w = theme_pane; 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; } |