summaryrefslogtreecommitdiff
path: root/atari/toolbar.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/toolbar.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/toolbar.c')
-rw-r--r--atari/toolbar.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/atari/toolbar.c b/atari/toolbar.c
index c2e7ced06..e830679d9 100644
--- a/atari/toolbar.c
+++ b/atari/toolbar.c
@@ -272,7 +272,7 @@ struct s_toolbar *toolbar_create(struct s_gui_win_root *owner)
int i;
struct s_toolbar *t;
- LOG((""));
+ LOG("");
assert(init == true);
@@ -330,8 +330,7 @@ struct s_toolbar *toolbar_create(struct s_gui_win_root *owner)
t->throbber.max_index = THROBBER_MAX_INDEX;
t->throbber.running = false;
- LOG(("created toolbar: %p, root: %p, textarea: %p, throbber: %p", t,
- owner, t->url.textarea, t->throbber));
+ LOG("created toolbar: %p, root: %p, textarea: %p, throbber: %p", t, owner, t->url.textarea, t->throbber);
return( t );
}
@@ -459,7 +458,7 @@ void toolbar_redraw(struct s_toolbar *tb, GRECT *clip)
void toolbar_update_buttons(struct s_toolbar *tb, struct browser_window *bw,
short button)
{
- LOG((""));
+ LOG("");
struct s_tb_button * bt;
bool enable = false;
@@ -583,7 +582,7 @@ void toolbar_set_dimensions(struct s_toolbar *tb, GRECT *area)
void toolbar_set_url(struct s_toolbar *tb, const char * text)
{
- LOG((""));
+ LOG("");
textarea_set_text(tb->url.textarea, text);
if (tb->attached && tb->visible) {
@@ -668,7 +667,7 @@ bool toolbar_text_input(struct s_toolbar *tb, char *text)
{
bool handled = true;
- LOG((""));
+ LOG("");
return(handled);
}
@@ -753,7 +752,7 @@ bool toolbar_key_input(struct s_toolbar *tb, short nkc)
void toolbar_mouse_input(struct s_toolbar *tb, short obj, short button)
{
- LOG((""));
+ LOG("");
GRECT work;
short mx, my, mb, kstat;
struct gui_window * gw;