|
@@ -406,8 +406,9 @@ static void say_attributes(struct vc_data *vc)
|
|
|
if (bg > 7) {
|
|
|
synth_printf(" %s ", spk_msg_get(MSG_ON_BLINKING));
|
|
|
bg -= 8;
|
|
|
- } else
|
|
|
+ } else {
|
|
|
synth_printf(" %s ", spk_msg_get(MSG_ON));
|
|
|
+ }
|
|
|
synth_printf("%s\n", spk_msg_get(MSG_COLORS_START + bg));
|
|
|
}
|
|
|
|
|
@@ -637,8 +638,9 @@ static void say_prev_word(struct vc_data *vc)
|
|
|
break;
|
|
|
spk_y--;
|
|
|
spk_x = vc->vc_cols - 1;
|
|
|
- } else
|
|
|
+ } else {
|
|
|
spk_x--;
|
|
|
+ }
|
|
|
spk_pos -= 2;
|
|
|
ch = get_char(vc, (u_short *)spk_pos, &temp);
|
|
|
if (ch == SPACE || ch == 0)
|
|
@@ -691,8 +693,9 @@ static void say_next_word(struct vc_data *vc)
|
|
|
spk_y++;
|
|
|
spk_x = 0;
|
|
|
edge_said = edge_right;
|
|
|
- } else
|
|
|
+ } else {
|
|
|
spk_x++;
|
|
|
+ }
|
|
|
spk_pos += 2;
|
|
|
last_state = state;
|
|
|
}
|
|
@@ -723,8 +726,9 @@ static void spell_word(struct vc_data *vc)
|
|
|
spk_pitch_shift++;
|
|
|
else /* synth has no pitch */
|
|
|
last_cap = spk_str_caps_stop;
|
|
|
- } else
|
|
|
+ } else {
|
|
|
str_cap = spk_str_caps_stop;
|
|
|
+ }
|
|
|
if (str_cap != last_cap) {
|
|
|
synth_printf("%s", str_cap);
|
|
|
last_cap = str_cap;
|
|
@@ -1348,8 +1352,9 @@ static int speakup_allocate(struct vc_data *vc)
|
|
|
if (!speakup_console[vc_num])
|
|
|
return -ENOMEM;
|
|
|
speakup_date(vc);
|
|
|
- } else if (!spk_parked)
|
|
|
+ } else if (!spk_parked) {
|
|
|
speakup_date(vc);
|
|
|
+ }
|
|
|
|
|
|
return 0;
|
|
|
}
|
|
@@ -1402,9 +1407,9 @@ static void read_all_doc(struct vc_data *vc)
|
|
|
prev_cursor_track = cursor_track;
|
|
|
cursor_track = read_all_mode;
|
|
|
spk_reset_index_count(0);
|
|
|
- if (get_sentence_buf(vc, 0) == -1)
|
|
|
+ if (get_sentence_buf(vc, 0) == -1) {
|
|
|
kbd_fakekey2(vc, RA_DOWN_ARROW);
|
|
|
- else {
|
|
|
+ } else {
|
|
|
say_sentence_num(0, 0);
|
|
|
synth_insert_next_index(0);
|
|
|
start_read_all_timer(vc, RA_TIMER);
|
|
@@ -1451,8 +1456,9 @@ static void handle_cursor_read_all(struct vc_data *vc, int command)
|
|
|
if (!say_sentence_num(sentcount + 1, 1)) {
|
|
|
sn = 1;
|
|
|
spk_reset_index_count(sn);
|
|
|
- } else
|
|
|
+ } else {
|
|
|
synth_insert_next_index(0);
|
|
|
+ }
|
|
|
if (!say_sentence_num(sn, 0)) {
|
|
|
kbd_fakekey2(vc, RA_FIND_NEXT_SENT);
|
|
|
return;
|
|
@@ -1481,9 +1487,9 @@ static void handle_cursor_read_all(struct vc_data *vc, int command)
|
|
|
rv = get_sentence_buf(vc, 0);
|
|
|
if (rv == -1)
|
|
|
read_all_doc(vc);
|
|
|
- if (rv == 0)
|
|
|
+ if (rv == 0) {
|
|
|
kbd_fakekey2(vc, RA_FIND_NEXT_SENT);
|
|
|
- else {
|
|
|
+ } else {
|
|
|
say_sentence_num(1, 0);
|
|
|
synth_insert_next_index(0);
|
|
|
start_read_all_timer(vc, RA_TIMER);
|
|
@@ -2179,10 +2185,11 @@ no_map:
|
|
|
if (type == KT_SPEC && value == 1) {
|
|
|
value = '\n';
|
|
|
type = KT_LATIN;
|
|
|
- } else if (type == KT_LETTER)
|
|
|
+ } else if (type == KT_LETTER) {
|
|
|
type = KT_LATIN;
|
|
|
- else if (value == 0x7f)
|
|
|
+ } else if (value == 0x7f) {
|
|
|
value = 8; /* make del = backspace */
|
|
|
+ }
|
|
|
ret = (*spk_special_handler) (vc, type, value, keycode);
|
|
|
spk_close_press = 0;
|
|
|
if (ret < 0)
|
|
@@ -2276,9 +2283,9 @@ static int vt_notifier_call(struct notifier_block *nb,
|
|
|
speakup_deallocate(vc);
|
|
|
break;
|
|
|
case VT_WRITE:
|
|
|
- if (param->c == '\b')
|
|
|
+ if (param->c == '\b') {
|
|
|
speakup_bs(vc);
|
|
|
- else {
|
|
|
+ } else {
|
|
|
u16 d = param->c;
|
|
|
speakup_con_write(vc, &d, 1);
|
|
|
}
|