summaryrefslogtreecommitdiff
path: root/frontends/beos/fetch_rsrc.cpp
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2017-09-06 18:27:19 +0100
committerVincent Sanders <vince@kyllikki.org>2017-09-06 18:45:27 +0100
commit9e81082355a54daf468589f5c4f351d869ec5a21 (patch)
tree24686103c8d9bf25154b92d539f10ae043750560 /frontends/beos/fetch_rsrc.cpp
parent75018632a9b953aafeae6f4e8aea607fd1d89dca (diff)
downloadnetsurf-9e81082355a54daf468589f5c4f351d869ec5a21.tar.gz
netsurf-9e81082355a54daf468589f5c4f351d869ec5a21.tar.bz2
Use coccinelle to change logging macro calls in c++
for F in $(git ls-files '*.cpp');do spatch --c++ --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/beos/fetch_rsrc.cpp')
-rw-r--r--frontends/beos/fetch_rsrc.cpp22
1 files changed, 15 insertions, 7 deletions
diff --git a/frontends/beos/fetch_rsrc.cpp b/frontends/beos/fetch_rsrc.cpp
index e77f4c96e..ae3648354 100644
--- a/frontends/beos/fetch_rsrc.cpp
+++ b/frontends/beos/fetch_rsrc.cpp
@@ -71,13 +71,15 @@ BResources *gAppResources = NULL;
static bool fetch_rsrc_initialise(lwc_string *scheme)
{
- LOG("fetch_rsrc_initialise called for %s", lwc_string_data(scheme));
+ NSLOG(netsurf, INFO, "fetch_rsrc_initialise called for %s",
+ lwc_string_data(scheme));
return true;
}
static void fetch_rsrc_finalise(lwc_string *scheme)
{
- LOG("fetch_rsrc_finalise called for %s", lwc_string_data(scheme));
+ NSLOG(netsurf, INFO, "fetch_rsrc_finalise called for %s",
+ lwc_string_data(scheme));
}
static bool fetch_rsrc_can_fetch(const nsurl *url)
@@ -162,7 +164,7 @@ static bool fetch_rsrc_process(struct fetch_rsrc_context *c)
* rsrc://[TYPE][@NUM]/name[,mime]
*/
- LOG("*** Processing %s", c->url);
+ NSLOG(netsurf, INFO, "*** Processing %s", c->url);
if (strlen(c->url) < 7) {
/* 7 is the minimum possible length (rsrc://) */
@@ -199,11 +201,13 @@ static bool fetch_rsrc_process(struct fetch_rsrc_context *c)
uint8 c1, c2, c3, c4;
if (sscanf(params, "%c%c%c%c", &c1, &c2, &c3, &c4) > 3) {
type = c1 << 24 | c2 << 16 | c3 << 8 | c4;
- LOG("fetch_rsrc: type:%4.4s\n", (char *)&type);
+ NSLOG(netsurf, INFO, "fetch_rsrc: type:%4.4s\n",
+ (char *)&type);
}
}
- LOG("fetch_rsrc: 0x%08lx, %ld, '%s'\n", type, id, c->name);
+ NSLOG(netsurf, INFO, "fetch_rsrc: 0x%08lx, %ld, '%s'\n", type, id,
+ c->name);
bool found;
if (id)
@@ -278,7 +282,10 @@ static void fetch_rsrc_poll(lwc_string *scheme)
char header[64];
fetch_set_http_code(c->parent_fetch, 200);
- LOG("setting rsrc: MIME type to %s, length to %zd", c->mimetype, c->datalen);
+ NSLOG(netsurf, INFO,
+ "setting rsrc: MIME type to %s, length to %zd",
+ c->mimetype,
+ c->datalen);
/* Any callback can result in the fetch being aborted.
* Therefore, we _must_ check for this after _every_
* call to fetch_rsrc_send_callback().
@@ -308,7 +315,8 @@ static void fetch_rsrc_poll(lwc_string *scheme)
fetch_rsrc_send_callback(&msg, c);
}
} else {
- LOG("Processing of %s failed!", c->url);
+ NSLOG(netsurf, INFO, "Processing of %s failed!",
+ c->url);
/* Ensure that we're unlocked here. If we aren't,
* then fetch_rsrc_process() is broken.