static void csi_m(struct vc_data *vc)
{
	int i;

	for (i = 0; i <= vc->vc_npar; i++)
		switch (vc->vc_par[i]) {
		case 0:	/* all attributes off */
			default_attr(vc);
			break;
		case 1:
			vc->state.intensity = VCI_BOLD;
			break;
		case 2:
			vc->state.intensity = VCI_HALF_BRIGHT;
			break;
		case 3:
			vc->state.italic = true;
			break;
		case 21:
			/*
			 * No console drivers support double underline, so
			 * convert it to a single underline.
			 */
		case 4:
			vc->state.underline = true;
			break;
		case 5:
			vc->state.blink = true;
			break;
		case 7:
			vc->state.reverse = true;
			break;
		case 10: /* ANSI X3.64-1979 (SCO-ish?)
			  * Select primary font, don't display control chars if
			  * defined, don't set bit 8 on output.
			  */
			vc->vc_translate = set_translate(vc->state.Gx_charset[vc->state.charset], vc);
			vc->vc_disp_ctrl = 0;
			vc->vc_toggle_meta = 0;
			break;
		case 11: /* ANSI X3.64-1979 (SCO-ish?)
			  * Select first alternate font, lets chars < 32 be
			  * displayed as ROM chars.
			  */
			vc->vc_translate = set_translate(IBMPC_MAP, vc);
			vc->vc_disp_ctrl = 1;
			vc->vc_toggle_meta = 0;
			break;
		case 12: /* ANSI X3.64-1979 (SCO-ish?)
			  * Select second alternate font, toggle high bit
			  * before displaying as ROM char.
			  */
			vc->vc_translate = set_translate(IBMPC_MAP, vc);
			vc->vc_disp_ctrl = 1;
			vc->vc_toggle_meta = 1;
			break;
		case 22:
			vc->state.intensity = VCI_NORMAL;
			break;
		case 23:
			vc->state.italic = false;
			break;
		case 24:
			vc->state.underline = false;
			break;
		case 25:
			vc->state.blink = false;
			break;
		case 27:
			vc->state.reverse = false;
			break;
		case 38:
			i = vc_t416_color(vc, i, rgb_foreground);
			break;
		case 48:
			i = vc_t416_color(vc, i, rgb_background);
			break;
		case 39:
			vc->state.color = (vc->vc_def_color & 0x0f) |
				(vc->state.color & 0xf0);
			break;
		case 49:
			vc->state.color = (vc->vc_def_color & 0xf0) |
				(vc->state.color & 0x0f);
			break;
		default:
			if (vc->vc_par[i] >= 90 && vc->vc_par[i] <= 107) {
				if (vc->vc_par[i] < 100)
					vc->state.intensity = VCI_BOLD;
				vc->vc_par[i] -= 60;
			}
			if (vc->vc_par[i] >= 30 && vc->vc_par[i] <= 37)
				vc->state.color = color_table[vc->vc_par[i] - 30]
					| (vc->state.color & 0xf0);
			else if (vc->vc_par[i] >= 40 && vc->vc_par[i] <= 47)
				vc->state.color = (color_table[vc->vc_par[i] - 40] << 4)
					| (vc->state.color & 0x0f);
			break;
		}
	update_attr(vc);
}
static void csi_m(struct vc_data *vc)
{
	int i;

	for (i = 0; i <= vc->vc_npar; i++)
		switch (vc->vc_par[i]) {
		case 0:	 
			default_attr(vc);
			break;
		case 1:
			vc->state.intensity = VCI_BOLD;
			break;
		case 2:
			vc->state.intensity = VCI_HALF_BRIGHT;
			break;
		case 3:
			vc->state.italic = true;
			break;
		case 21:
			 
		case 4:
			vc->state.underline = true;
			break;
		case 5:
			vc->state.blink = true;
			break;
		case 7:
			vc->state.reverse = true;
			break;
		case 10:  
			vc->vc_translate = set_translate(vc->state.Gx_charset[vc->state.charset], vc);
			vc->vc_disp_ctrl = 0;
			vc->vc_toggle_meta = 0;
			break;
		case 11:  
			vc->vc_translate = set_translate(IBMPC_MAP, vc);
			vc->vc_disp_ctrl = 1;
			vc->vc_toggle_meta = 0;
			break;
		case 12:  
			vc->vc_translate = set_translate(IBMPC_MAP, vc);
			vc->vc_disp_ctrl = 1;
			vc->vc_toggle_meta = 1;
			break;
		case 22:
			vc->state.intensity = VCI_NORMAL;
			break;
		case 23:
			vc->state.italic = false;
			break;
		case 24:
			vc->state.underline = false;
			break;
		case 25:
			vc->state.blink = false;
			break;
		case 27:
			vc->state.reverse = false;
			break;
		case 38:
			i = vc_t416_color(vc, i, rgb_foreground);
			break;
		case 48:
			i = vc_t416_color(vc, i, rgb_background);
			break;
		case 39:
			vc->state.color = (vc->vc_def_color & 0x0f) |
				(vc->state.color & 0xf0);
			break;
		case 49:
			vc->state.color = (vc->vc_def_color & 0xf0) |
				(vc->state.color & 0x0f);
			break;
		default:
			if (vc->vc_par[i] >= 90 && vc->vc_par[i] <= 107) {
				if (vc->vc_par[i] < 100)
					vc->state.intensity = VCI_BOLD;
				vc->vc_par[i] -= 60;
			}
			if (vc->vc_par[i] >= 30 && vc->vc_par[i] <= 37)
				vc->state.color = color_table[vc->vc_par[i] - 30]
					| (vc->state.color & 0xf0);
			else if (vc->vc_par[i] >= 40 && vc->vc_par[i] <= 47)
				vc->state.color = (color_table[vc->vc_par[i] - 40] << 4)
					| (vc->state.color & 0x0f);
			break;
		}
	update_attr(vc);
}