From 75018632a9b953aafeae6f4e8aea607fd1d89dca Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 6 Sep 2017 18:28:12 +0100 Subject: 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); --- content/handlers/image/rsvg.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'content/handlers/image/rsvg.c') diff --git a/content/handlers/image/rsvg.c b/content/handlers/image/rsvg.c index f6732e23f..ca2d81eeb 100644 --- a/content/handlers/image/rsvg.c +++ b/content/handlers/image/rsvg.c @@ -68,7 +68,7 @@ static nserror rsvg_create_svg_data(rsvg_content *c) c->bitmap = NULL; if ((c->rsvgh = rsvg_handle_new()) == NULL) { - LOG("rsvg_handle_new() returned NULL."); + NSLOG(netsurf, INFO, "rsvg_handle_new() returned NULL."); content_broadcast_errorcode(&c->base, NSERROR_NOMEM); return NSERROR_NOMEM; } @@ -116,7 +116,8 @@ static bool rsvg_process_data(struct content *c, const char *data, if (rsvg_handle_write(d->rsvgh, (const guchar *)data, (gsize)size, &err) == FALSE) { - LOG("rsvg_handle_write returned an error: %s", err->message); + NSLOG(netsurf, INFO, + "rsvg_handle_write returned an error: %s", err->message); content_broadcast_errorcode(c, NSERROR_SVG_ERROR); return false; } @@ -160,7 +161,8 @@ static bool rsvg_convert(struct content *c) GError *err = NULL; if (rsvg_handle_close(d->rsvgh, &err) == FALSE) { - LOG("rsvg_handle_close returned an error: %s", err->message); + NSLOG(netsurf, INFO, + "rsvg_handle_close returned an error: %s", err->message); content_broadcast_errorcode(c, NSERROR_SVG_ERROR); return false; } @@ -177,7 +179,8 @@ static bool rsvg_convert(struct content *c) if ((d->bitmap = guit->bitmap->create(c->width, c->height, BITMAP_NEW)) == NULL) { - LOG("Failed to create bitmap for rsvg render."); + NSLOG(netsurf, INFO, + "Failed to create bitmap for rsvg render."); content_broadcast_errorcode(c, NSERROR_NOMEM); return false; } @@ -187,13 +190,15 @@ static bool rsvg_convert(struct content *c) CAIRO_FORMAT_ARGB32, c->width, c->height, guit->bitmap->get_rowstride(d->bitmap))) == NULL) { - LOG("Failed to create Cairo image surface for rsvg render."); + NSLOG(netsurf, INFO, + "Failed to create Cairo image surface for rsvg render."); content_broadcast_errorcode(c, NSERROR_NOMEM); return false; } if ((d->ct = cairo_create(d->cs)) == NULL) { - LOG("Failed to create Cairo drawing context for rsvg render."); + NSLOG(netsurf, INFO, + "Failed to create Cairo drawing context for rsvg render."); content_broadcast_errorcode(c, NSERROR_NOMEM); return false; } -- cgit v1.2.3