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 /desktop/font_haru.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 'desktop/font_haru.c')
-rw-r--r-- | desktop/font_haru.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/desktop/font_haru.c b/desktop/font_haru.c index caa751bcb..f92d89197 100644 --- a/desktop/font_haru.c +++ b/desktop/font_haru.c @@ -74,7 +74,10 @@ const struct font_functions haru_nsfont = { static void error_handler(HPDF_STATUS error_no, HPDF_STATUS detail_no, void *user_data) { - LOG("ERROR: in font_haru \n\terror_no=%x\n\tdetail_no=%d\n", (HPDF_UINT)error_no, (HPDF_UINT)detail_no); + NSLOG(netsurf, INFO, + "ERROR: in font_haru \n\terror_no=%x\n\tdetail_no=%d\n", + (HPDF_UINT)error_no, + (HPDF_UINT)detail_no); #ifdef FONT_HARU_DEBUG exit(1); #endif @@ -143,7 +146,9 @@ bool haru_nsfont_width(const plot_font_style_t *fstyle, *width = width_real; #ifdef FONT_HARU_DEBUG - LOG("Measuring string: %s ; Calculated width: %f %i", string_nt, width_real, *width); + NSLOG(netsurf, INFO, + "Measuring string: %s ; Calculated width: %f %i", string_nt, + width_real, *width); #endif free(string_nt); HPDF_Free(pdf); @@ -201,7 +206,11 @@ bool haru_nsfont_position_in_string(const plot_font_style_t *fstyle, *actual_x = real_width; #ifdef FONT_HARU_DEBUG - LOG("Position in string: %s at x: %i; Calculated position: %i", string_nt, x, *char_offset); + NSLOG(netsurf, INFO, + "Position in string: %s at x: %i; Calculated position: %i", + string_nt, + x, + *char_offset); #endif free(string_nt); HPDF_Free(pdf); @@ -246,7 +255,12 @@ bool haru_nsfont_split(const plot_font_style_t *fstyle, HPDF_TRUE, &real_width); #ifdef FONT_HARU_DEBUG - LOG("Splitting string: %s for width: %i ; Calculated position: %i Calculated real_width: %f", string_nt, x, *char_offset, real_width); + NSLOG(netsurf, INFO, + "Splitting string: %s for width: %i ; Calculated position: %i Calculated real_width: %f", + string_nt, + x, + *char_offset, + real_width); #endif *char_offset = offset - 1; @@ -327,7 +341,7 @@ bool haru_nsfont_apply_style(const plot_font_style_t *fstyle, strcat(font_name, "-Roman"); #ifdef FONT_HARU_DEBUG - LOG("Setting font: %s", font_name); + NSLOG(netsurf, INFO, "Setting font: %s", font_name); #endif size = fstyle->size; |