diff options
author | Vincent Sanders <vince@kyllikki.org> | 2017-09-06 18:28:12 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2017-09-06 18:45:27 +0100 |
commit | 75018632a9b953aafeae6f4e8aea607fd1d89dca (patch) | |
tree | d661d2fded2ad4b80c4cf019dee2954c052ab090 /frontends/riscos/content-handlers/artworks.c | |
parent | 8d9b2efc11529da8cb5870b39ff15249c648b10a (diff) | |
download | netsurf-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 'frontends/riscos/content-handlers/artworks.c')
-rw-r--r-- | frontends/riscos/content-handlers/artworks.c | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/frontends/riscos/content-handlers/artworks.c b/frontends/riscos/content-handlers/artworks.c index d6f6da318..8ec4edcae 100644 --- a/frontends/riscos/content-handlers/artworks.c +++ b/frontends/riscos/content-handlers/artworks.c @@ -183,7 +183,7 @@ bool artworks_convert(struct content *c) xos_read_var_val_size("Alias$LoadArtWorksModules", 0, os_VARTYPE_STRING, &used, NULL, NULL); if (used >= 0) { - LOG("Alias$LoadArtWorksModules not defined"); + NSLOG(netsurf, INFO, "Alias$LoadArtWorksModules not defined"); msg_data.error = messages_get("AWNotSeen"); content_broadcast(c, CONTENT_MSG_ERROR, &msg_data); return false; @@ -192,7 +192,8 @@ bool artworks_convert(struct content *c) /* load the modules, or do nothing if they're already loaded */ error = xos_cli("LoadArtWorksModules"); if (error) { - LOG("xos_cli: 0x%x: %s", error->errnum, error->errmess); + NSLOG(netsurf, INFO, "xos_cli: 0x%x: %s", error->errnum, + error->errmess); msg_data.error = error->errmess; content_broadcast(c, CONTENT_MSG_ERROR, &msg_data); return false; @@ -202,7 +203,8 @@ bool artworks_convert(struct content *c) error = (os_error*)_swix(AWRender_FileInitAddress, _OUT(0) | _OUT(1), &init_routine, &init_workspace); if (error) { - LOG("AWRender_FileInitAddress: 0x%x: %s", error->errnum, error->errmess); + NSLOG(netsurf, INFO, "AWRender_FileInitAddress: 0x%x: %s", + error->errnum, error->errmess); msg_data.error = error->errmess; content_broadcast(c, CONTENT_MSG_ERROR, &msg_data); return false; @@ -212,7 +214,8 @@ bool artworks_convert(struct content *c) &aw->render_routine, &aw->render_workspace); if (error) { - LOG("AWRender_RenderAddress: 0x%x: %s", error->errnum, error->errmess); + NSLOG(netsurf, INFO, "AWRender_RenderAddress: 0x%x: %s", + error->errnum, error->errmess); msg_data.error = error->errmess; content_broadcast(c, CONTENT_MSG_ERROR, &msg_data); return false; @@ -224,7 +227,8 @@ bool artworks_convert(struct content *c) error = awrender_init(&source_data, &source_size, init_routine, init_workspace); if (error) { - LOG("awrender_init: 0x%x : %s", error->errnum, error->errmess); + NSLOG(netsurf, INFO, "awrender_init: 0x%x : %s", + error->errnum, error->errmess); msg_data.error = error->errmess; content_broadcast(c, CONTENT_MSG_ERROR, &msg_data); return false; @@ -239,13 +243,15 @@ bool artworks_convert(struct content *c) &aw->y1); if (error) { - LOG("AWRender_DocBounds: 0x%x: %s", error->errnum, error->errmess); + NSLOG(netsurf, INFO, "AWRender_DocBounds: 0x%x: %s", + error->errnum, error->errmess); msg_data.error = error->errmess; content_broadcast(c, CONTENT_MSG_ERROR, &msg_data); return false; } - LOG("bounding box: %d,%d,%d,%d", aw->x0, aw->y0, aw->x1, aw->y1); + NSLOG(netsurf, INFO, "bounding box: %d,%d,%d,%d", aw->x0, aw->y0, + aw->x1, aw->y1); /* create the resizable workspace required by the ArtWorksRenderer rendering routine */ @@ -253,7 +259,8 @@ bool artworks_convert(struct content *c) aw->size = INITIAL_BLOCK_SIZE; aw->block = malloc(INITIAL_BLOCK_SIZE); if (!aw->block) { - LOG("failed to create block for ArtworksRenderer"); + NSLOG(netsurf, INFO, + "failed to create block for ArtworksRenderer"); msg_data.error = messages_get("NoMemory"); content_broadcast(c, CONTENT_MSG_ERROR, &msg_data); return false; @@ -368,13 +375,15 @@ bool artworks_redraw(struct content *c, struct content_redraw_data *data, error = xos_read_vdu_variables(PTR_OS_VDU_VAR_LIST(&vars), vals); if (error) { - LOG("xos_read_vdu_variables: 0x%x: %s", error->errnum, error->errmess); + NSLOG(netsurf, INFO, "xos_read_vdu_variables: 0x%x: %s", + error->errnum, error->errmess); return false; } error = xwimp_read_palette((os_palette*)&vals[3]); if (error) { - LOG("xwimp_read_palette: 0x%x: %s", error->errnum, error->errmess); + NSLOG(netsurf, INFO, "xwimp_read_palette: 0x%x: %s", + error->errnum, error->errmess); return false; } @@ -393,7 +402,8 @@ bool artworks_redraw(struct content *c, struct content_redraw_data *data, aw->render_workspace); if (error) { - LOG("awrender_render: 0x%x: %s", error->errnum, error->errmess); + NSLOG(netsurf, INFO, "awrender_render: 0x%x: %s", + error->errnum, error->errmess); return false; } |