diff options
author | Vincent Sanders <vince@kyllikki.org> | 2015-05-28 16:08:46 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2015-05-28 16:08:46 +0100 |
commit | c105738fa36bb2400adc47399c5b878d252d1c86 (patch) | |
tree | 138eeb449e1bf51ee1726b5f820740aada0ccd0b /render/imagemap.c | |
parent | 20f2c86a511f7913cf858e7bd3668b0b59663ba0 (diff) | |
download | netsurf-c105738fa36bb2400adc47399c5b878d252d1c86.tar.gz netsurf-c105738fa36bb2400adc47399c5b878d252d1c86.tar.bz2 |
Change LOG() macro to be varadic
This changes the LOG macro to be varadic removing the need for all
callsites to have double bracketing and allows for future improvement
on how we use the logging macros.
The callsites were changed with coccinelle and the changes checked by
hand. Compile tested for several frontends but not all.
A formatting annotation has also been added which allows the compiler
to check the parameters and types passed to the logging.
Diffstat (limited to 'render/imagemap.c')
-rw-r--r-- | render/imagemap.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/render/imagemap.c b/render/imagemap.c index 8f0fcd0a6..2e84bd0cf 100644 --- a/render/imagemap.c +++ b/render/imagemap.c @@ -241,32 +241,21 @@ void imagemap_dump(html_content *c) map = c->imagemaps[i]; while (map != NULL) { - LOG(("Imagemap: %s", map->key)); + LOG("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))); + LOG("\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)); + 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); 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)); + LOG("\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))); + LOG("\tPolygon: %s:", nsurl_access(entry->url)); for (j = 0; j != entry->bounds.poly.num; j++) { fprintf(stderr, "(%d,%d) ", |