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); --- render/imagemap.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'render/imagemap.c') diff --git a/render/imagemap.c b/render/imagemap.c index 6e2504bdc..0d3b42a1b 100644 --- a/render/imagemap.c +++ b/render/imagemap.c @@ -241,21 +241,35 @@ void imagemap_dump(html_content *c) map = c->imagemaps[i]; while (map != NULL) { - LOG("Imagemap: %s", map->key); + NSLOG(netsurf, INFO, "Imagemap: %s", map->key); for (entry = map->list; entry; entry = entry->next) { switch (entry->type) { case IMAGEMAP_DEFAULT: - LOG("\tDefault: %s", nsurl_access(entry->url)); + NSLOG(netsurf, INFO, "\tDefault: %s", + nsurl_access(entry->url)); break; case IMAGEMAP_RECT: - LOG("\tRectangle: %s: [(%d,%d),(%d,%d)]", nsurl_access(entry->url), entry->bounds.rect.x0, entry->bounds.rect.y0, entry->bounds.rect.x1, entry->bounds.rect.y1); + NSLOG(netsurf, INFO, + "\tRectangle: %s: [(%d,%d),(%d,%d)]", + nsurl_access(entry->url), + entry->bounds.rect.x0, + entry->bounds.rect.y0, + entry->bounds.rect.x1, + entry->bounds.rect.y1); break; case IMAGEMAP_CIRCLE: - LOG("\tCircle: %s: [(%d,%d),%d]", nsurl_access(entry->url), entry->bounds.circle.x, entry->bounds.circle.y, entry->bounds.circle.r); + NSLOG(netsurf, INFO, + "\tCircle: %s: [(%d,%d),%d]", + nsurl_access(entry->url), + entry->bounds.circle.x, + entry->bounds.circle.y, + entry->bounds.circle.r); break; case IMAGEMAP_POLY: - LOG("\tPolygon: %s:", nsurl_access(entry->url)); + NSLOG(netsurf, INFO, + "\tPolygon: %s:", + nsurl_access(entry->url)); for (j = 0; j != entry->bounds.poly.num; j++) { fprintf(stderr, "(%d,%d) ", -- cgit v1.2.3