summaryrefslogtreecommitdiff
path: root/frontends/beos/schedule.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/schedule.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/schedule.cpp')
-rw-r--r--frontends/beos/schedule.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/frontends/beos/schedule.cpp b/frontends/beos/schedule.cpp
index e96e56d81..552a7cd49 100644
--- a/frontends/beos/schedule.cpp
+++ b/frontends/beos/schedule.cpp
@@ -58,7 +58,8 @@ nsbeos_schedule_kill_callback(void *_target, void *_match)
_nsbeos_callback_t *match = (_nsbeos_callback_t *)_match;
if ((target->callback == match->callback) &&
(target->context == match->context)) {
- LOG("Found match for %p(%p), killing.", target->callback, target->context);
+ NSLOG(netsurf, INFO, "Found match for %p(%p), killing.",
+ target->callback, target->context);
target->callback = NULL;
target->context = NULL;
target->callback_killed = true;
@@ -69,7 +70,8 @@ nsbeos_schedule_kill_callback(void *_target, void *_match)
static void
schedule_remove(void (*callback)(void *p), void *p)
{
- LOG("schedule_remove() for %p(%p)", cb->callback, cb->context);
+ NSLOG(netsurf, INFO, "schedule_remove() for %p(%p)", cb->callback,
+ cb->context);
if (callbacks == NULL)
return;
_nsbeos_callback_t cb_match;
@@ -81,7 +83,7 @@ schedule_remove(void (*callback)(void *p), void *p)
nserror beos_schedule(int t, void (*callback)(void *p), void *p)
{
- LOG("t:%d cb:%p p:%p", t, cb->callback, cb->context);
+ NSLOG(netsurf, INFO, "t:%d cb:%p p:%p", t, cb->callback, cb->context);
if (callbacks == NULL) {
callbacks = new BList;
@@ -111,7 +113,7 @@ nserror beos_schedule(int t, void (*callback)(void *p), void *p)
bool
schedule_run(void)
{
- LOG("schedule_run()");
+ NSLOG(netsurf, INFO, "schedule_run()");
earliest_callback_timeout = B_INFINITE_TIMEOUT;
if (callbacks == NULL)
@@ -120,7 +122,8 @@ schedule_run(void)
bigtime_t now = system_time();
int32 i;
- LOG("Checking %ld callbacks to for deadline.", this_run->CountItems());
+ NSLOG(netsurf, INFO, "Checking %ld callbacks to for deadline.",
+ this_run->CountItems());
/* Run all the callbacks which made it this far. */
for (i = 0; i < callbacks->CountItems(); ) {
@@ -132,7 +135,8 @@ schedule_run(void)
i++;
continue;
}
- LOG("Running callbacks %p(%p).", cb->callback, cb->context);
+ NSLOG(netsurf, INFO, "Running callbacks %p(%p).",
+ cb->callback, cb->context);
if (!cb->callback_killed)
cb->callback(cb->context);
callbacks->RemoveItem(cb);