summaryrefslogtreecommitdiff
path: root/frontends/riscos/configure.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2017-09-06 18:28:12 +0100
committerVincent Sanders <vince@kyllikki.org>2017-09-06 18:45:27 +0100
commit75018632a9b953aafeae6f4e8aea607fd1d89dca (patch)
treed661d2fded2ad4b80c4cf019dee2954c052ab090 /frontends/riscos/configure.c
parent8d9b2efc11529da8cb5870b39ff15249c648b10a (diff)
downloadnetsurf-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.c')
-rw-r--r--frontends/riscos/configure.c32
1 files changed, 22 insertions, 10 deletions
diff --git a/frontends/riscos/configure.c b/frontends/riscos/configure.c
index 9d28616ec..f4dced55b 100644
--- a/frontends/riscos/configure.c
+++ b/frontends/riscos/configure.c
@@ -212,7 +212,10 @@ void ro_gui_configure_open_window(wimp_open *open)
y + configure_icon_height -
CONFIGURE_ICON_PADDING_V);
if (error) {
- LOG("xwimp_resize_icon: 0x%x: %s", error->errnum, error->errmess);
+ NSLOG(netsurf, INFO,
+ "xwimp_resize_icon: 0x%x: %s",
+ error->errnum,
+ error->errmess);
}
x += configure_icon_width;
l++;
@@ -225,7 +228,8 @@ void ro_gui_configure_open_window(wimp_open *open)
error = xwimp_force_redraw(configure_window,
0, -16384, 16384, 0);
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);
}
}
@@ -248,7 +252,8 @@ void ro_gui_configure_open_window(wimp_open *open)
extent.y0 = -max_height;
error = xwimp_set_extent(open->w, &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;
}
@@ -259,7 +264,8 @@ void ro_gui_configure_open_window(wimp_open *open)
/* open the window */
error = xwimp_open_window(open);
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;
}
@@ -276,7 +282,7 @@ void ro_gui_configure_register(const char *window,
/* create our tool */
tool = calloc(sizeof(struct configure_tool), 1);
if (!tool) {
- LOG("Insufficient memory for calloc()");
+ NSLOG(netsurf, INFO, "Insufficient memory for calloc()");
die("Insufficient memory");
return; /* For the benefit of scan-build */
}
@@ -284,7 +290,7 @@ void ro_gui_configure_register(const char *window,
tool->translated[0] = '\0';
tool->validation = malloc(strlen(window) + 2);
if (!tool->validation) {
- LOG("Insufficient memory for malloc()");
+ NSLOG(netsurf, INFO, "Insufficient memory for malloc()");
die("Insufficient memory");
}
sprintf(tool->validation, "S%s", window);
@@ -311,7 +317,8 @@ void ro_gui_configure_register(const char *window,
CONFIGURE_TOOL_TRANSLATED_SIZE;
error = xwimp_create_icon(&new_icon, &tool->i);
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);
die(error->errmess);
}
@@ -360,7 +367,8 @@ bool ro_gui_configure_translate(void)
error = xosbyte1(osbyte_ALPHABET_NUMBER, 127, 0,
&alphabet);
if (error) {
- LOG("failed reading alphabet: 0x%x: %s", error->errnum, error->errmess);
+ NSLOG(netsurf, INFO, "failed reading alphabet: 0x%x: %s",
+ error->errnum, error->errmess);
/* assume Latin1 */
alphabet = territory_ALPHABET_LATIN1;
}
@@ -381,7 +389,10 @@ bool ro_gui_configure_translate(void)
error = xwimptextop_string_width(tool->translated,
strlen(tool->translated), &icon_width);
if (error) {
- LOG("xwimptextop_string_width: 0x%x: %s", error->errnum, error->errmess);
+ NSLOG(netsurf, INFO,
+ "xwimptextop_string_width: 0x%x: %s",
+ error->errnum,
+ error->errmess);
return false;
}
icon_width += CONFIGURE_ICON_PADDING_H;
@@ -395,7 +406,8 @@ bool ro_gui_configure_translate(void)
configure_icon_width,
0);
if (error) {
- LOG("xwimp_resize_icon: 0x%x: %s", error->errnum, error->errmess);
+ NSLOG(netsurf, INFO, "xwimp_resize_icon: 0x%x: %s",
+ error->errnum, error->errmess);
}
}