diff options
author | Vincent Sanders <vince@kyllikki.org> | 2015-05-28 17:06:18 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2015-05-28 17:06:18 +0100 |
commit | 0d811963c1498aa625b5438bf66dbb677a0d4494 (patch) | |
tree | 470d44bdf1986a9e77a5bc5f2d71fe6d8bf7827f /beos | |
parent | 30c2962faa0c31d70b91993ccd9c2f3f8f298810 (diff) | |
download | netsurf-0d811963c1498aa625b5438bf66dbb677a0d4494.tar.gz netsurf-0d811963c1498aa625b5438bf66dbb677a0d4494.tar.bz2 |
fixup all the remaining logging macro callsites
The semantic patch tool appears to have missed some difficult to
reason about callsites which have now been manually cleaned up
Diffstat (limited to 'beos')
-rw-r--r-- | beos/fetch_rsrc.cpp | 6 | ||||
-rw-r--r-- | beos/font.cpp | 4 | ||||
-rw-r--r-- | beos/gui.cpp | 16 | ||||
-rw-r--r-- | beos/plotters.cpp | 4 | ||||
-rw-r--r-- | beos/scaffolding.cpp | 8 | ||||
-rw-r--r-- | beos/schedule.cpp | 8 | ||||
-rw-r--r-- | beos/throbber.cpp | 11 | ||||
-rw-r--r-- | beos/window.cpp | 8 |
8 files changed, 32 insertions, 33 deletions
diff --git a/beos/fetch_rsrc.cpp b/beos/fetch_rsrc.cpp index ceed7d25e..917e759fa 100644 --- a/beos/fetch_rsrc.cpp +++ b/beos/fetch_rsrc.cpp @@ -161,7 +161,7 @@ static bool fetch_rsrc_process(struct fetch_rsrc_context *c) * rsrc://[TYPE][@NUM]/name[,mime] */ - LOG(("*** Processing %s", c->url)); + LOG("*** Processing %s", c->url); if (strlen(c->url) < 7) { /* 7 is the minimum possible length (rsrc://) */ @@ -198,11 +198,11 @@ 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", &type)); + LOG("fetch_rsrc: type:%4.4s\n", &type); } } - LOG(("fetch_rsrc: 0x%08lx, %ld, '%s'\n", type, id, c->name)); + LOG("fetch_rsrc: 0x%08lx, %ld, '%s'\n", type, id, c->name); bool found; if (id) diff --git a/beos/font.cpp b/beos/font.cpp index ba6803f53..cba3e4d4b 100644 --- a/beos/font.cpp +++ b/beos/font.cpp @@ -125,7 +125,7 @@ bool nsfont_position_in_string(const plot_font_style_t *fstyle, const char *string, size_t length, int x, size_t *char_offset, int *actual_x) { - //LOG(("(, '%s', %d, %d, , )", string, length, x)); + //LOG("(, '%s', %d, %d, , )", string, length, x); //fprintf(stderr, "%s(, '%s', %d, %d, , )\n", __FUNCTION__, string, length, x); int index; BFont font; @@ -183,7 +183,7 @@ bool nsfont_split(const plot_font_style_t *fstyle, int x, size_t *char_offset, int *actual_x) { //fprintf(stderr, "%s(, '%s', %d, %d, , )\n", __FUNCTION__, string, length, x); - //LOG(("(, '%s', %d, %d, , )", string, length, x)); + //LOG("(, '%s', %d, %d, , )", string, length, x); int index = 0; BFont font; diff --git a/beos/gui.cpp b/beos/gui.cpp index 716a4480d..36cc92248 100644 --- a/beos/gui.cpp +++ b/beos/gui.cpp @@ -371,7 +371,7 @@ static nsurl *gui_get_resource_url(const char *path) path = "favicon.png"; u << path; - LOG(("(%s) -> '%s'\n", path, u.String())); + LOG("(%s) -> '%s'\n", path, u.String()); nsurl_create(u.String(), &url); return url; } @@ -692,7 +692,7 @@ void nsbeos_pipe_message(BMessage *message, BView *_this, struct gui_window *gui if (gui) message->AddPointer("gui_window", gui); int len = write(sEventPipe[1], &message, sizeof(void *)); - //LOG(("nsbeos_pipe_message: %d written", len)); + //LOG("nsbeos_pipe_message: %d written", len); //printf("nsbeos_pipe_message: %d written\n", len); } @@ -708,7 +708,7 @@ void nsbeos_pipe_message_top(BMessage *message, BWindow *_this, struct beos_scaf if (scaffold) message->AddPointer("scaffolding", scaffold); int len = write(sEventPipe[1], &message, sizeof(void *)); - //LOG(("nsbeos_pipe_message: %d written", len)); + //LOG("nsbeos_pipe_message: %d written", len); //printf("nsbeos_pipe_message: %d written\n", len); } @@ -747,17 +747,17 @@ void nsbeos_gui_poll(void) timeout.tv_sec = (long)(next_schedule / 1000000LL); timeout.tv_usec = (long)(next_schedule % 1000000LL); - //LOG(("gui_poll: select(%d, ..., %Ldus", max_fd, next_schedule)); + //LOG("gui_poll: select(%d, ..., %Ldus", max_fd, next_schedule); fd_count = select(max_fd, &read_fd_set, &write_fd_set, &exc_fd_set, &timeout); - //LOG(("select: %d\n", fd_count)); + //LOG("select: %d\n", fd_count); if (fd_count > 0 && FD_ISSET(sEventPipe[0], &read_fd_set)) { BMessage *message; int len = read(sEventPipe[0], &message, sizeof(void *)); - //LOG(("gui_poll: BMessage ? %d read", len)); + //LOG("gui_poll: BMessage ? %d read", len); if (len == sizeof(void *)) { - //LOG(("gui_poll: BMessage.what %-4.4s\n", &(message->what))); + //LOG("gui_poll: BMessage.what %-4.4s\n", &(message->what)); nsbeos_dispatch_event(message); } } @@ -921,7 +921,7 @@ static nserror gui_launch_url(struct nsurl *url) void warn_user(const char *warning, const char *detail) { - LOG(("warn_user: %s (%s)", warning, detail)); + LOG("warn_user: %s (%s)", warning, detail); BAlert *alert; BString text(warning); if (detail) diff --git a/beos/plotters.cpp b/beos/plotters.cpp index 81d0e10e7..f63d7343e 100644 --- a/beos/plotters.cpp +++ b/beos/plotters.cpp @@ -484,7 +484,7 @@ bool nsbeos_plot_path(const float *p, unsigned int n, colour fill, float width, 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; } @@ -511,7 +511,7 @@ bool nsbeos_plot_path(const float *p, unsigned int n, colour fill, float width, shape.BezierTo(pt); i += 7; } else { - LOG(("bad path command %f", p[i])); + LOG("bad path command %f", p[i]); return false; } } diff --git a/beos/scaffolding.cpp b/beos/scaffolding.cpp index 83f313dd6..b64bdcaee 100644 --- a/beos/scaffolding.cpp +++ b/beos/scaffolding.cpp @@ -826,7 +826,7 @@ void nsbeos_scaffolding_dispatch_event(nsbeos_scaffolding *scaffold, BMessage *m bw = nsbeos_get_browser_for_gui(scaffold->top_level); bool reloadAll = false; - LOG(("nsbeos_scaffolding_dispatch_event() what = 0x%08lx", message->what)); + LOG("nsbeos_scaffolding_dispatch_event() what = 0x%08lx", message->what); switch (message->what) { case B_QUIT_REQUESTED: nsbeos_scaffolding_destroy(scaffold); @@ -970,7 +970,7 @@ void nsbeos_scaffolding_dispatch_event(nsbeos_scaffolding *scaffold, BMessage *m browser_window_key_press(bw, NS_KEY_PASTE); break; case B_SELECT_ALL: - LOG(("Selecting all text")); + LOG("Selecting all text"); browser_window_key_press(bw, NS_KEY_SELECT_ALL); break; case B_NETPOSITIVE_BACK: @@ -1374,7 +1374,7 @@ static void recursively_set_menu_items_target(BMenu *menu, BHandler *handler) void nsbeos_attach_toplevel_view(nsbeos_scaffolding *g, BView *view) { - LOG(("Attaching view to scaffolding %p", g)); + LOG("Attaching view to scaffolding %p", g); // this is a replicant,... and it went bad if (!g->window) { @@ -1651,7 +1651,7 @@ nsbeos_scaffolding *nsbeos_new_scaffolding(struct gui_window *toplevel) { struct beos_scaffolding *g = (struct beos_scaffolding *)malloc(sizeof(*g)); - LOG(("Constructing a scaffold of %p for gui_window %p", g, toplevel)); + LOG("Constructing a scaffold of %p for gui_window %p", g, toplevel); g->top_level = toplevel; g->being_destroyed = 0; diff --git a/beos/schedule.cpp b/beos/schedule.cpp index c00f68942..6bf6c974b 100644 --- a/beos/schedule.cpp +++ b/beos/schedule.cpp @@ -81,7 +81,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)); + LOG("t:%d cb:%p p:%p", t, cb->callback, cb->context); if (callbacks == NULL) { callbacks = new BList; @@ -111,7 +111,7 @@ nserror beos_schedule(int t, void (*callback)(void *p), void *p) bool schedule_run(void) { - LOG(("schedule_run()")); + LOG("schedule_run()"); earliest_callback_timeout = B_INFINITE_TIMEOUT; if (callbacks == NULL) @@ -120,7 +120,7 @@ schedule_run(void) bigtime_t now = system_time(); int32 i; - LOG(("Checking %ld callbacks to for deadline.", this_run->CountItems())); + LOG("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 +132,7 @@ schedule_run(void) i++; continue; } - LOG(("Running callbacks %p(%p).", cb->callback, cb->context)); + LOG("Running callbacks %p(%p).", cb->callback, cb->context); if (!cb->callback_killed) cb->callback(cb->context); callbacks->RemoveItem(cb); diff --git a/beos/throbber.cpp b/beos/throbber.cpp index f7fb35306..fe40b3edc 100644 --- a/beos/throbber.cpp +++ b/beos/throbber.cpp @@ -50,15 +50,14 @@ bool nsbeos_throbber_initialise_from_png(const int frames, ...) if (frames < 2) { /* we need at least two frames - one for idle, one for active */ - LOG(("Insufficent number of frames in throbber animation!")); - LOG(("(called with %d frames, where 2 is a minimum.)", - frames)); + LOG("Insufficent number of frames in throbber animation!"); + LOG("(called with %d frames, where 2 is a minimum.)", frames); return false; } BResources *res = get_app_resources(); if (res == NULL) { - LOG(("Can't find resources for throbber!")); + LOG("Can't find resources for throbber!"); return false; } @@ -75,14 +74,14 @@ bool nsbeos_throbber_initialise_from_png(const int frames, ...) data = res->LoadResource('data', fn, &size); throb->framedata[i] = NULL; if (!data) { - LOG(("Error when loading resource %s", fn)); + LOG("Error when loading resource %s", fn); errors_when_loading = true; continue; } BMemoryIO mem(data, size); throb->framedata[i] = BTranslationUtils::GetBitmap(&mem); if (throb->framedata[i] == NULL) { - LOG(("Error when loading %s: GetBitmap() returned NULL", fn)); + LOG("Error when loading %s: GetBitmap() returned NULL", fn); errors_when_loading = true; } } diff --git a/beos/window.cpp b/beos/window.cpp index 9d7d6f230..2763bc372 100644 --- a/beos/window.cpp +++ b/beos/window.cpp @@ -351,7 +351,7 @@ static struct gui_window *gui_window_create(struct browser_window *bw, return 0; } - LOG(("Creating gui window %p for browser window %p", g, bw)); + LOG("Creating gui window %p for browser window %p", g, bw); g->bw = bw; g->mouse.state = 0; @@ -451,7 +451,7 @@ void nsbeos_dispatch_event(BMessage *message) return; } - //LOG(("processing message")); + //LOG("processing message"); switch (message->what) { case B_QUIT_REQUESTED: // from the BApplication @@ -950,10 +950,10 @@ static void gui_window_destroy(struct gui_window *g) g->next->prev = g->prev; - LOG(("Destroying gui_window %p", g)); + LOG("Destroying gui_window %p", g); assert(g != NULL); assert(g->bw != NULL); - LOG((" Scaffolding: %p", g->scaffold)); + LOG(" Scaffolding: %p", g->scaffold); if (g->view == NULL) return; |