From 04883518fd67a322e2035eff33a3e36aa0d87aa4 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Wed, 9 May 2012 11:36:45 +0400 Subject: [PATCH] Accuracy use of arguments of dlg_move and widget_move macros. Signed-off-by: Andrew Borodin --- lib/widget/dialog.h | 2 +- lib/widget/widget-common.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/widget/dialog.h b/lib/widget/dialog.h index 30323500c..a8fe2f4da 100644 --- a/lib/widget/dialog.h +++ b/lib/widget/dialog.h @@ -24,7 +24,7 @@ #define B_HELP 3 #define B_USER 100 -#define dlg_move(h, _y, _x) tty_gotoyx (((Dlg_head *)(h))->y + _y, ((Dlg_head *)(h))->x + _x) +#define dlg_move(h, _y, _x) tty_gotoyx (((Dlg_head *)(h))->y + (_y), ((Dlg_head *)(h))->x + (_x)) /*** enums ***************************************************************************************/ diff --git a/lib/widget/widget-common.h b/lib/widget/widget-common.h index a1d2f5bfd..df2f2d104 100644 --- a/lib/widget/widget-common.h +++ b/lib/widget/widget-common.h @@ -10,7 +10,7 @@ /*** typedefs(not structures) and defined constants **********************************************/ -#define widget_move(w, _y, _x) tty_gotoyx (((Widget *)(w))->y + _y, ((Widget *)(w))->x + _x) +#define widget_move(w, _y, _x) tty_gotoyx (((Widget *)(w))->y + (_y), ((Widget *)(w))->x + (_x)) /* Sets/clear the specified flag in the options field */ #define widget_option(w,f,i) \ w.options = ((i) ? ((w).options | (f)) : ((w).options & (~(f))))