summaryrefslogtreecommitdiff
path: root/riscos/save_draw.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2015-05-28 16:08:46 +0100
committerVincent Sanders <vince@kyllikki.org>2015-05-28 16:08:46 +0100
commitc105738fa36bb2400adc47399c5b878d252d1c86 (patch)
tree138eeb449e1bf51ee1726b5f820740aada0ccd0b /riscos/save_draw.c
parent20f2c86a511f7913cf858e7bd3668b0b59663ba0 (diff)
downloadnetsurf-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 'riscos/save_draw.c')
-rw-r--r--riscos/save_draw.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/riscos/save_draw.c b/riscos/save_draw.c
index bf81bca10..8b8d72cd6 100644
--- a/riscos/save_draw.c
+++ b/riscos/save_draw.c
@@ -142,8 +142,7 @@ bool save_as_draw(hlcache_handle *h, const char *path)
(byte *) drawfile_buffer,
(byte *) drawfile_buffer + drawfile_size);
if (error) {
- LOG(("xosfile_save_stamped failed: 0x%x: %s",
- error->errnum, error->errmess));
+ LOG("xosfile_save_stamped failed: 0x%x: %s", error->errnum, error->errmess);
warn_user("SaveError", error->errmess);
pencil_free(ro_save_draw_diagram);
return false;
@@ -271,13 +270,13 @@ bool ro_save_draw_path(const float *p, unsigned int n, colour fill,
return true;
if (p[0] != PLOTTER_PATH_MOVE) {
- LOG(("path doesn't start with a move"));
+ LOG("path doesn't start with a move");
return false;
}
int *path = malloc(sizeof *path * (n + 10));
if (!path) {
- LOG(("out of memory"));
+ LOG("out of memory");
return false;
}
@@ -329,7 +328,7 @@ bool ro_save_draw_path(const float *p, unsigned int n, colour fill,
i += 7;
empty_path = false;
} else {
- LOG(("bad path command %f", p[i]));
+ LOG("bad path command %f", p[i]);
free(path);
return false;
}
@@ -450,7 +449,7 @@ bool ro_save_draw_group_end(void)
bool ro_save_draw_error(pencil_code code)
{
- LOG(("code %i", code));
+ LOG("code %i", code);
switch (code) {
case pencil_OK: