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/buffer.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/buffer.c')
-rw-r--r-- | frontends/riscos/buffer.c | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/frontends/riscos/buffer.c b/frontends/riscos/buffer.c index 7176c1c1c..c63a270db 100644 --- a/frontends/riscos/buffer.c +++ b/frontends/riscos/buffer.c @@ -107,7 +107,12 @@ void ro_gui_buffer_open(wimp_draw *redraw) */ if ((clipping.x1 < clipping.x0) || (clipping.y1 < clipping.y0)) { - LOG("Invalid clipping rectangle (%i, %i) to (%i,%i)", clipping.x0, clipping.y0, clipping.x1, clipping.y1); + NSLOG(netsurf, INFO, + "Invalid clipping rectangle (%i, %i) to (%i,%i)", + clipping.x0, + clipping.y0, + clipping.x1, + clipping.y1); return; } @@ -138,7 +143,7 @@ void ro_gui_buffer_open(wimp_draw *redraw) (word_width * sprite_size.y * 4) + palette_size; buffer = (osspriteop_area *)malloc(total_size); if (!buffer) { - LOG("Failed to allocate memory"); + NSLOG(netsurf, INFO, "Failed to allocate memory"); ro_gui_buffer_free(); return; } @@ -149,7 +154,8 @@ void ro_gui_buffer_open(wimp_draw *redraw) mode = tinct_SPRITE_MODE; #else if ((error = xwimpreadsysinfo_wimp_mode(&mode)) != NULL) { - LOG("Error reading mode '%s'", error->errmess); + NSLOG(netsurf, INFO, "Error reading mode '%s'", + error->errmess); ro_gui_buffer_free(); return; } @@ -177,7 +183,9 @@ void ro_gui_buffer_open(wimp_draw *redraw) error = xos_read_vdu_variables(PTR_OS_VDU_VAR_LIST(&vars), (int *)&vals); if (error) { - LOG("Error reading mode properties '%s'", error->errmess); + NSLOG(netsurf, INFO, + "Error reading mode properties '%s'", + error->errmess); ro_gui_buffer_free(); return; } @@ -233,7 +241,9 @@ void ro_gui_buffer_open(wimp_draw *redraw) } break; default: - LOG("Unhandled 16bpp format from flags %d", vals.flags); + NSLOG(netsurf, INFO, + "Unhandled 16bpp format from flags %d", + vals.flags); ro_gui_buffer_free(); return; } @@ -261,13 +271,16 @@ void ro_gui_buffer_open(wimp_draw *redraw) } break; default: - LOG("Unhandled 32bpp data format from flags %d", vals.flags); + NSLOG(netsurf, INFO, + "Unhandled 32bpp data format from flags %d", + vals.flags); ro_gui_buffer_free(); return; } break; default: - LOG("Unhandled NCOLOUR value %d", vals.ncolour); + NSLOG(netsurf, INFO, "Unhandled NCOLOUR value %d", + vals.ncolour); ro_gui_buffer_free(); return; } @@ -305,7 +318,7 @@ void ro_gui_buffer_open(wimp_draw *redraw) buffer, buffer_name, palette, clipping.x0, clipping.y0, clipping.x1, clipping.y1)) != NULL) { - LOG("Grab error '%s'", error->errmess); + NSLOG(netsurf, INFO, "Grab error '%s'", error->errmess); ro_gui_buffer_free(); return; } @@ -314,7 +327,7 @@ void ro_gui_buffer_open(wimp_draw *redraw) */ if ((error = xosspriteop_read_save_area_size(osspriteop_PTR, buffer, (osspriteop_id)(buffer + 1), &size)) != NULL) { - LOG("Save area error '%s'", error->errmess); + NSLOG(netsurf, INFO, "Save area error '%s'", error->errmess); ro_gui_buffer_free(); return; } @@ -329,7 +342,7 @@ void ro_gui_buffer_open(wimp_draw *redraw) if ((error = xosspriteop_switch_output_to_sprite(osspriteop_PTR, buffer, (osspriteop_id)(buffer + 1), save_area, &context0, &context1, &context2, &context3)) != NULL) { - LOG("Switching error '%s'", error->errmess); + NSLOG(netsurf, INFO, "Switching error '%s'", error->errmess); free(save_area); ro_gui_buffer_free(); return; @@ -345,7 +358,8 @@ void ro_gui_buffer_open(wimp_draw *redraw) */ if ((error = xos_set_ecf_origin(-ro_plot_origin_x, -ro_plot_origin_y)) != NULL) { - LOG("Invalid ECF origin: '%s'", error->errmess); + NSLOG(netsurf, INFO, "Invalid ECF origin: '%s'", + error->errmess); } } |