summaryrefslogtreecommitdiff
path: root/windows/localhistory.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 /windows/localhistory.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 'windows/localhistory.c')
-rw-r--r--windows/localhistory.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/windows/localhistory.c b/windows/localhistory.c
index dfca4a4e1..674f198a0 100644
--- a/windows/localhistory.c
+++ b/windows/localhistory.c
@@ -86,7 +86,7 @@ static void nsws_localhistory_up(struct nsws_localhistory *l, struct gui_window
.plot = &win_plotters
};
- LOG(("gui window %p", gw));
+ LOG("gui window %p", gw);
l->vscroll = 0;
l->hscroll = 0;
@@ -125,7 +125,7 @@ nsws_localhistory_event_callback(HWND hwnd, UINT msg,
gw = nsws_get_gui_window(hwnd);
if (gw == NULL) {
- LOG(("Unable to find gui window structure for hwnd %p", hwnd));
+ LOG("Unable to find gui window structure for hwnd %p", hwnd);
return DefWindowProc(hwnd, msg, wparam, lparam);
}
@@ -305,7 +305,7 @@ struct nsws_localhistory *nsws_window_create_localhistory(struct gui_window *gw)
int margin = 50;
RECT r;
- LOG(("gui window %p", gw));
+ LOG("gui window %p", gw);
/* if we already have a window, just update and re-show it */
if (gw->localhistory != NULL) {
@@ -348,7 +348,7 @@ struct nsws_localhistory *nsws_window_create_localhistory(struct gui_window *gw)
InitCommonControlsEx(&icc);
- LOG(("creating local history window for hInstance %p", hInstance));
+ LOG("creating local history window for hInstance %p", hInstance);
localhistory->hwnd = CreateWindow(windowclassname_localhistory,
"NetSurf History",
WS_THICKFRAME | WS_HSCROLL |
@@ -363,9 +363,7 @@ struct nsws_localhistory *nsws_window_create_localhistory(struct gui_window *gw)
/* set the gui window associated with this browser */
SetProp(localhistory->hwnd, TEXT("GuiWnd"), (HANDLE)gw);
- LOG(("gui_window %p width %d height %d hwnd %p", gw,
- localhistory->guiwidth, localhistory->guiheight,
- localhistory->hwnd));
+ LOG("gui_window %p width %d height %d hwnd %p", gw, localhistory->guiwidth, localhistory->guiheight, localhistory->hwnd);
nsws_localhistory_up(localhistory, gw);
UpdateWindow(localhistory->hwnd);