Commit aada0a34 authored by Jiri Slaby's avatar Jiri Slaby Committed by Greg Kroah-Hartman

tty: vt, whitespace cleanup in csi_m

Flush the switch cases to be aligned with the switch. Mostly
everything can now fit to the 80-chars terminal.
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 193df022
...@@ -1330,90 +1330,91 @@ static void csi_m(struct vc_data *vc) ...@@ -1330,90 +1330,91 @@ static void csi_m(struct vc_data *vc)
for (i = 0; i <= vc->vc_npar; i++) for (i = 0; i <= vc->vc_npar; i++)
switch (vc->vc_par[i]) { switch (vc->vc_par[i]) {
case 0: /* all attributes off */ case 0: /* all attributes off */
default_attr(vc); default_attr(vc);
break; break;
case 1: case 1:
vc->vc_intensity = 2; vc->vc_intensity = 2;
break; break;
case 2: case 2:
vc->vc_intensity = 0; vc->vc_intensity = 0;
break; break;
case 3: case 3:
vc->vc_italic = 1; vc->vc_italic = 1;
break; break;
case 4: case 4:
vc->vc_underline = 1; vc->vc_underline = 1;
break; break;
case 5: case 5:
vc->vc_blink = 1; vc->vc_blink = 1;
break; break;
case 7: case 7:
vc->vc_reverse = 1; vc->vc_reverse = 1;
break; break;
case 10: /* ANSI X3.64-1979 (SCO-ish?) case 10: /* ANSI X3.64-1979 (SCO-ish?)
* Select primary font, don't display * Select primary font, don't display control chars if
* control chars if defined, don't set * defined, don't set bit 8 on output.
* bit 8 on output. */
*/ vc->vc_translate = set_translate(vc->vc_charset == 0
vc->vc_translate = set_translate(vc->vc_charset == 0 ? vc->vc_G0_charset
? vc->vc_G0_charset : vc->vc_G1_charset, vc);
: vc->vc_G1_charset, vc); vc->vc_disp_ctrl = 0;
vc->vc_disp_ctrl = 0; vc->vc_toggle_meta = 0;
vc->vc_toggle_meta = 0; break;
break; case 11: /* ANSI X3.64-1979 (SCO-ish?)
case 11: /* ANSI X3.64-1979 (SCO-ish?) * Select first alternate font, lets chars < 32 be
* Select first alternate font, lets * displayed as ROM chars.
* chars < 32 be displayed as ROM chars. */
*/ vc->vc_translate = set_translate(IBMPC_MAP, vc);
vc->vc_translate = set_translate(IBMPC_MAP, vc); vc->vc_disp_ctrl = 1;
vc->vc_disp_ctrl = 1; vc->vc_toggle_meta = 0;
vc->vc_toggle_meta = 0; break;
break; case 12: /* ANSI X3.64-1979 (SCO-ish?)
case 12: /* ANSI X3.64-1979 (SCO-ish?) * Select second alternate font, toggle high bit
* Select second alternate font, toggle * before displaying as ROM char.
* high bit before displaying as ROM char. */
*/ vc->vc_translate = set_translate(IBMPC_MAP, vc);
vc->vc_translate = set_translate(IBMPC_MAP, vc); vc->vc_disp_ctrl = 1;
vc->vc_disp_ctrl = 1; vc->vc_toggle_meta = 1;
vc->vc_toggle_meta = 1; break;
break; case 21:
case 21: case 22:
case 22: vc->vc_intensity = 1;
vc->vc_intensity = 1; break;
break; case 23:
case 23: vc->vc_italic = 0;
vc->vc_italic = 0; break;
break; case 24:
case 24: vc->vc_underline = 0;
vc->vc_underline = 0; break;
break; case 25:
case 25: vc->vc_blink = 0;
vc->vc_blink = 0; break;
break; case 27:
case 27: vc->vc_reverse = 0;
vc->vc_reverse = 0; break;
break; case 38:
case 38: i = vc_t416_color(vc, i, rgb_foreground);
i = vc_t416_color(vc, i, rgb_foreground); break;
break; case 48:
case 48: i = vc_t416_color(vc, i, rgb_background);
i = vc_t416_color(vc, i, rgb_background); break;
break; case 39:
case 39: vc->vc_color = (vc->vc_def_color & 0x0f) |
vc->vc_color = (vc->vc_def_color & 0x0f) | (vc->vc_color & 0xf0); (vc->vc_color & 0xf0);
break; break;
case 49: case 49:
vc->vc_color = (vc->vc_def_color & 0xf0) | (vc->vc_color & 0x0f); vc->vc_color = (vc->vc_def_color & 0xf0) |
break; (vc->vc_color & 0x0f);
default: break;
if (vc->vc_par[i] >= 30 && vc->vc_par[i] <= 37) default:
vc->vc_color = color_table[vc->vc_par[i] - 30] if (vc->vc_par[i] >= 30 && vc->vc_par[i] <= 37)
| (vc->vc_color & 0xf0); vc->vc_color = color_table[vc->vc_par[i] - 30]
else if (vc->vc_par[i] >= 40 && vc->vc_par[i] <= 47) | (vc->vc_color & 0xf0);
vc->vc_color = (color_table[vc->vc_par[i] - 40] << 4) else if (vc->vc_par[i] >= 40 && vc->vc_par[i] <= 47)
| (vc->vc_color & 0x0f); vc->vc_color = (color_table[vc->vc_par[i] - 40] << 4)
break; | (vc->vc_color & 0x0f);
break;
} }
update_attr(vc); update_attr(vc);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment