staging: speakup: enlosed macros with complex values in parenthesis
authorTimo von Holtz <tvh@informatik.uni-kiel.de>
Fri, 4 Feb 2011 20:29:46 +0000 (21:29 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 4 Feb 2011 21:01:02 +0000 (13:01 -0800)
Enclosed all macros with complex values in parenthesis

Signed-off-by: Timo von Holtz <tvh@informatik.uni-kiel.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/speakup/spk_priv_keyinfo.h
drivers/staging/speakup/spk_types.h

index 3fd4b82f84a5504b8c0dd8aa0e4a00f67cda756f..95c473a7e65f1cc3d1354e136eb532140ca9f93e 100644 (file)
 
 /* keys for setting variables, must be ordered same as the enum for var_ids */
 /* with dec being even and inc being 1 greater */
-#define SPELL_DELAY_DEC VAR_START+0
-#define SPELL_DELAY_INC SPELL_DELAY_DEC+1
-#define PUNC_LEVEL_DEC SPELL_DELAY_DEC+2
-#define PUNC_LEVEL_INC PUNC_LEVEL_DEC+1
-#define READING_PUNC_DEC PUNC_LEVEL_DEC+2
-#define READING_PUNC_INC READING_PUNC_DEC+1
-#define ATTRIB_BLEEP_DEC READING_PUNC_DEC+2
-#define ATTRIB_BLEEP_INC ATTRIB_BLEEP_DEC+1
-#define BLEEPS_DEC ATTRIB_BLEEP_DEC+2
-#define BLEEPS_INC BLEEPS_DEC+1
-#define RATE_DEC BLEEPS_DEC+2
-#define RATE_INC RATE_DEC+1
-#define PITCH_DEC RATE_DEC+2
-#define PITCH_INC PITCH_DEC+1
-#define VOL_DEC PITCH_DEC+2
-#define VOL_INC VOL_DEC+1
-#define TONE_DEC VOL_DEC+2
-#define TONE_INC TONE_DEC+1
-#define PUNCT_DEC TONE_DEC+2
-#define PUNCT_INC PUNCT_DEC+1
-#define VOICE_DEC PUNCT_DEC+2
-#define VOICE_INC VOICE_DEC+1
+#define SPELL_DELAY_DEC (VAR_START+0)
+#define SPELL_DELAY_INC (SPELL_DELAY_DEC+1)
+#define PUNC_LEVEL_DEC (SPELL_DELAY_DEC+2)
+#define PUNC_LEVEL_INC (PUNC_LEVEL_DEC+1)
+#define READING_PUNC_DEC (PUNC_LEVEL_DEC+2)
+#define READING_PUNC_INC (READING_PUNC_DEC+1)
+#define ATTRIB_BLEEP_DEC (READING_PUNC_DEC+2)
+#define ATTRIB_BLEEP_INC (ATTRIB_BLEEP_DEC+1)
+#define BLEEPS_DEC (ATTRIB_BLEEP_DEC+2)
+#define BLEEPS_INC (BLEEPS_DEC+1)
+#define RATE_DEC (BLEEPS_DEC+2)
+#define RATE_INC (RATE_DEC+1)
+#define PITCH_DEC (RATE_DEC+2)
+#define PITCH_INC (PITCH_DEC+1)
+#define VOL_DEC (PITCH_DEC+2)
+#define VOL_INC (VOL_DEC+1)
+#define TONE_DEC (VOL_DEC+2)
+#define TONE_INC (TONE_DEC+1)
+#define PUNCT_DEC (TONE_DEC+2)
+#define PUNCT_INC (PUNCT_DEC+1)
+#define VOICE_DEC (PUNCT_DEC+2)
+#define VOICE_INC (VOICE_DEC+1)
 
 #endif
index d36c90e30d542203937aa665d94aa492f326cdbd..3ac552c1236eddd926c244f74cfe521111f868fc 100644 (file)
@@ -79,14 +79,14 @@ struct st_spk_t {
 };
 
 /* now some defines to make these easier to use. */
-#define spk_shut_up speakup_console[vc->vc_num]->shut_up
+#define spk_shut_up (speakup_console[vc->vc_num]->shut_up)
 #define spk_killed (speakup_console[vc->vc_num]->shut_up & 0x40)
-#define spk_x speakup_console[vc->vc_num]->reading_x
-#define spk_cx speakup_console[vc->vc_num]->cursor_x
-#define spk_y speakup_console[vc->vc_num]->reading_y
-#define spk_cy speakup_console[vc->vc_num]->cursor_y
+#define spk_x (speakup_console[vc->vc_num]->reading_x)
+#define spk_cx (speakup_console[vc->vc_num]->cursor_x)
+#define spk_y (speakup_console[vc->vc_num]->reading_y)
+#define spk_cy (speakup_console[vc->vc_num]->cursor_y)
 #define spk_pos (speakup_console[vc->vc_num]->reading_pos)
-#define spk_cp speakup_console[vc->vc_num]->cursor_pos
+#define spk_cp (speakup_console[vc->vc_num]->cursor_pos)
 #define goto_pos (speakup_console[vc->vc_num]->go_pos)
 #define goto_x (speakup_console[vc->vc_num]->go_x)
 #define win_top (speakup_console[vc->vc_num]->w_top)
@@ -95,9 +95,9 @@ struct st_spk_t {
 #define win_right (speakup_console[vc->vc_num]->w_right)
 #define win_start (speakup_console[vc->vc_num]->w_start)
 #define win_enabled (speakup_console[vc->vc_num]->w_enabled)
-#define spk_attr speakup_console[vc->vc_num]->reading_attr
-#define spk_old_attr speakup_console[vc->vc_num]->old_attr
-#define spk_parked speakup_console[vc->vc_num]->parked
+#define spk_attr (speakup_console[vc->vc_num]->reading_attr)
+#define spk_old_attr (speakup_console[vc->vc_num]->old_attr)
+#define spk_parked (speakup_console[vc->vc_num]->parked)
 
 struct st_var_header {
        char *name;