summaryrefslogtreecommitdiff
path: root/riscos/help.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 /riscos/help.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 'riscos/help.c')
-rw-r--r--riscos/help.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/riscos/help.c b/riscos/help.c
index 76d75db9f..c54af1ded 100644
--- a/riscos/help.c
+++ b/riscos/help.c
@@ -167,8 +167,7 @@ void ro_gui_interactive_help_request(wimp_message *message)
error = xwimp_get_menu_state(wimp_GIVEN_WINDOW_AND_ICON,
&menu_tree, window, icon);
if (error) {
- LOG(("xwimp_get_menu_state: 0x%x: %s",
- error->errnum, error->errmess));
+ LOG("xwimp_get_menu_state: 0x%x: %s", error->errnum, error->errmess);
warn_user("WimpError", error->errmess);
return;
}
@@ -271,8 +270,7 @@ static void ro_gui_interactive_help_broadcast(wimp_message *message,
error = xwimp_send_message(wimp_USER_MESSAGE, (wimp_message *)reply,
reply->sender);
if (error) {
- LOG(("xwimp_send_message: 0x%x: %s",
- error->errnum, error->errmess));
+ LOG("xwimp_send_message: 0x%x: %s", error->errnum, error->errmess);
warn_user("WimpError", error->errmess);
}
}
@@ -300,8 +298,7 @@ bool ro_gui_interactive_help_available(void)
error = xtaskmanager_enumerate_tasks(context, &task,
sizeof(taskmanager_task), &context, 0);
if (error) {
- LOG(("xtaskmanager_enumerate_tasks: 0x%x: %s",
- error->errnum, error->errmess));
+ LOG("xtaskmanager_enumerate_tasks: 0x%x: %s", error->errnum, error->errmess);
warn_user("MiscError", error->errmess);
}
@@ -338,8 +335,7 @@ void ro_gui_interactive_help_start(void)
if ((help_start) && (help_start[0])) {
error = xwimp_start_task("<Help$Start>", &task);
if (error) {
- LOG(("xwimp_start_tast: 0x%x: %s",
- error->errnum, error->errmess));
+ LOG("xwimp_start_tast: 0x%x: %s", error->errnum, error->errmess);
warn_user("WimpError", error->errmess);
return;
}
@@ -349,8 +345,7 @@ void ro_gui_interactive_help_start(void)
if (!task) {
error = xwimp_start_task("Resources:$.Apps.!Help", &task);
if (error) {
- LOG(("xwimp_start_tast: 0x%x: %s",
- error->errnum, error->errmess));
+ LOG("xwimp_start_tast: 0x%x: %s", error->errnum, error->errmess);
warn_user("WimpError", error->errmess);
return;
}
@@ -360,8 +355,7 @@ void ro_gui_interactive_help_start(void)
if (task) {
error = xos_read_monotonic_time(&help_time);
if (error) {
- LOG(("xwimp_read_monotonic_time: 0x%x: %s",
- error->errnum, error->errmess));
+ LOG("xwimp_read_monotonic_time: 0x%x: %s", error->errnum, error->errmess);
warn_user("WimpError", error->errmess);
}
}