summaryrefslogtreecommitdiff
path: root/atari/hotlist.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 /atari/hotlist.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 'atari/hotlist.c')
-rw-r--r--atari/hotlist.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/atari/hotlist.c b/atari/hotlist.c
index 621d68891..265491191 100644
--- a/atari/hotlist.c
+++ b/atari/hotlist.c
@@ -72,13 +72,13 @@ static struct atari_treeview_callbacks atari_hotlist_treeview_callbacks = {
static nserror atari_hotlist_init_phase2(struct core_window *cw,
struct core_window_callback_table *cb_t)
{
- LOG((""));
+ LOG("");
return(hotlist_init(cb_t, cw, hl.path));
}
static void atari_hotlist_finish(struct core_window *cw)
{
- LOG((""));
+ LOG("");
hotlist_fini(hl.path);
}
@@ -93,7 +93,7 @@ static void atari_hotlist_keypress(struct core_window *cw, uint32_t ucs4)
{
GUIWIN *gemtk_win;
GRECT area;
- LOG(("ucs4: %lu\n", ucs4));
+ LOG("ucs4: %lu\n", ucs4);
hotlist_keypress(ucs4);
gemtk_win = atari_treeview_get_gemtk_window(cw);
atari_treeview_get_grect(cw, TREEVIEW_AREA_CONTENT, &area);
@@ -104,7 +104,7 @@ static void atari_hotlist_mouse_action(struct core_window *cw,
browser_mouse_state mouse,
int x, int y)
{
- LOG(("x: %d, y: %d\n", x, y));
+ LOG("x: %d, y: %d\n", x, y);
hotlist_mouse_action(mouse, x, y);
}
@@ -123,7 +123,7 @@ static short handle_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8])
GRECT tb_area;
GUIWIN * gemtk_win;
- LOG((""));
+ LOG("");
tv = (struct atari_treeview_window*) gemtk_wm_get_user_data(win);
cw = (struct core_window *)tv;
@@ -132,7 +132,7 @@ static short handle_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8])
switch (msg[0]) {
case WM_TOOLBAR:
- LOG(("WM_TOOLBAR"));
+ LOG("WM_TOOLBAR");
toolbar = gemtk_obj_get_tree(TOOLBAR_HOTLIST);
@@ -198,7 +198,7 @@ void atari_hotlist_init(void)
strncpy( (char*)&hl.path, nsoption_charp(hotlist_file), PATH_MAX-1 );
}
- LOG(("Hotlist: %s", (char*)&hl.path ));
+ LOG("Hotlist: %s", (char *)&hl.path);
if( hl.window == NULL ){
int flags = ATARI_TREEVIEW_WIDGETS;
@@ -223,7 +223,7 @@ void atari_hotlist_init(void)
if (hl.tv == NULL) {
/* handle it properly, clean up previous allocs */
- LOG(("Failed to allocate treeview"));
+ LOG("Failed to allocate treeview");
return;
}
@@ -275,7 +275,7 @@ void atari_hotlist_destroy(void)
atari_treeview_delete(hl.tv);
hl.init = false;
}
- LOG(("done"));
+ LOG("done");
}
void atari_hotlist_redraw(void)
@@ -298,7 +298,7 @@ void atari_hotlist_add_page( const char * url, const char * title )
return;
if (hotlist_has_url(nsurl)) {
- LOG(("URL already added as Bookmark"));
+ LOG("URL already added as Bookmark");
nsurl_unref(nsurl);
return;
}