summaryrefslogtreecommitdiff
path: root/content/handlers/image/png.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 /content/handlers/image/png.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 'content/handlers/image/png.c')
-rw-r--r--content/handlers/image/png.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/content/handlers/image/png.c b/content/handlers/image/png.c
index 288f6c3e4..7a4ce3010 100644
--- a/content/handlers/image/png.c
+++ b/content/handlers/image/png.c
@@ -74,7 +74,7 @@ enum nspng_cberr {
*/
static void nspng_warning(png_structp png_ptr, png_const_charp warning_message)
{
- LOG("%s", warning_message);
+ NSLOG(netsurf, INFO, "%s", warning_message);
}
/**
@@ -82,7 +82,7 @@ static void nspng_warning(png_structp png_ptr, png_const_charp warning_message)
*/
static void nspng_error(png_structp png_ptr, png_const_charp error_message)
{
- LOG("%s", error_message);
+ NSLOG(netsurf, INFO, "%s", error_message);
longjmp(png_jmpbuf(png_ptr), CBERR_LIBPNG);
}
@@ -175,10 +175,8 @@ static void info_callback(png_structp png_s, png_infop info)
png_c->rowbytes = png_get_rowbytes(png_s, info);
png_c->interlace = (interlace == PNG_INTERLACE_ADAM7);
- LOG("size %li * %li, rowbytes %" PRIsizet,
- (unsigned long)width,
- (unsigned long)height,
- png_c->rowbytes);
+ NSLOG(netsurf, INFO, "size %li * %li, rowbytes %"PRIsizet,
+ (unsigned long)width, (unsigned long)height, png_c->rowbytes);
}
static void row_callback(png_structp png_s, png_bytep new_row,
@@ -260,7 +258,7 @@ static nserror nspng_create_png_data(nspng_content *png_c)
if (setjmp(png_jmpbuf(png_c->png))) {
png_destroy_read_struct(&png_c->png, &png_c->info, 0);
- LOG("Failed to set callbacks");
+ NSLOG(netsurf, INFO, "Failed to set callbacks");
png_c->png = NULL;
png_c->info = NULL;
@@ -350,7 +348,8 @@ static bool nspng_process_data(struct content *c, const char *data,
* up png conversion and signal the content
* error
*/
- LOG("Fatal PNG error during header, error content");
+ NSLOG(netsurf, INFO,
+ "Fatal PNG error during header, error content");
png_destroy_read_struct(&png_c->png, &png_c->info, 0);
png_c->png = NULL;