@Test public void testCSI_SGR() { term.write("\u001b[7;m"); term.write("\u001b[8;m"); term.write("\u001b[24;m"); term.write("\u001b[27;m"); term.write("\u001b[28;m"); term.write("\u001b[30;m"); term.write("\u001b[39;m"); term.write("\u001b[40;m"); term.write("\u001b[49;m"); term.write("\u001b[<8;m"); }
private void csi_SGR(String p) { int[] ps = vt100_parse_params(p, new int[] { 0 }); for (int m : ps) { if (m == 0) { attr = 0x00fe0000; } else if (m == 1) { attr |= 0x08000000; } else if (m == 4) { attr |= 0x01000000; } else if (m == 7) { attr |= 0x02000000; } else if (m == 8) { attr |= 0x04000000; } else if (m == 24) { attr &= 0x7eff0000; } else if (m == 27) { attr &= 0x7dff0000; } else if (m == 28) { attr &= 0x7bff0000; } else if (m >= 30 && m <= 37) { attr = (attr & 0x7f0f0000) | ((m - 30) << 20); } else if (m == 39) { attr = (attr & 0x7f0f0000) | 0x00f00000; } else if (m >= 40 && m <= 47) { attr = (attr & 0x7ff00000) | ((m - 40) << 16); } else if (m == 49) { attr = (attr & 0x7ff00000) | 0x000e0000; } } }
Terminal { private void csi_SGR(String p) { int[] ps = vt100_parse_params(p, new int[] { 0 }); for (int m : ps) { if (m == 0) { attr = 0x00fe0000; } else if (m == 1) { attr |= 0x08000000; } else if (m == 4) { attr |= 0x01000000; } else if (m == 7) { attr |= 0x02000000; } else if (m == 8) { attr |= 0x04000000; } else if (m == 24) { attr &= 0x7eff0000; } else if (m == 27) { attr &= 0x7dff0000; } else if (m == 28) { attr &= 0x7bff0000; } else if (m >= 30 && m <= 37) { attr = (attr & 0x7f0f0000) | ((m - 30) << 20); } else if (m == 39) { attr = (attr & 0x7f0f0000) | 0x00f00000; } else if (m >= 40 && m <= 47) { attr = (attr & 0x7ff00000) | ((m - 40) << 16); } else if (m == 49) { attr = (attr & 0x7ff00000) | 0x000e0000; } } } }
Terminal { private void csi_SGR(String p) { int[] ps = vt100_parse_params(p, new int[] { 0 }); for (int m : ps) { if (m == 0) { attr = 0x00fe0000; } else if (m == 1) { attr |= 0x08000000; } else if (m == 4) { attr |= 0x01000000; } else if (m == 7) { attr |= 0x02000000; } else if (m == 8) { attr |= 0x04000000; } else if (m == 24) { attr &= 0x7eff0000; } else if (m == 27) { attr &= 0x7dff0000; } else if (m == 28) { attr &= 0x7bff0000; } else if (m >= 30 && m <= 37) { attr = (attr & 0x7f0f0000) | ((m - 30) << 20); } else if (m == 39) { attr = (attr & 0x7f0f0000) | 0x00f00000; } else if (m >= 40 && m <= 47) { attr = (attr & 0x7ff00000) | ((m - 40) << 16); } else if (m == 49) { attr = (attr & 0x7ff00000) | 0x000e0000; } } } Terminal();  Terminal(int width, int height); }
Terminal { private void csi_SGR(String p) { int[] ps = vt100_parse_params(p, new int[] { 0 }); for (int m : ps) { if (m == 0) { attr = 0x00fe0000; } else if (m == 1) { attr |= 0x08000000; } else if (m == 4) { attr |= 0x01000000; } else if (m == 7) { attr |= 0x02000000; } else if (m == 8) { attr |= 0x04000000; } else if (m == 24) { attr &= 0x7eff0000; } else if (m == 27) { attr &= 0x7dff0000; } else if (m == 28) { attr &= 0x7bff0000; } else if (m >= 30 && m <= 37) { attr = (attr & 0x7f0f0000) | ((m - 30) << 20); } else if (m == 39) { attr = (attr & 0x7f0f0000) | 0x00f00000; } else if (m >= 40 && m <= 47) { attr = (attr & 0x7ff00000) | ((m - 40) << 16); } else if (m == 49) { attr = (attr & 0x7ff00000) | 0x000e0000; } } } Terminal();  Terminal(int width, int height); synchronized boolean setSize(int w, int h); synchronized String read(); synchronized String pipe(String d); synchronized boolean write(String d); synchronized String dump(); String toString(); }
Terminal { private void csi_SGR(String p) { int[] ps = vt100_parse_params(p, new int[] { 0 }); for (int m : ps) { if (m == 0) { attr = 0x00fe0000; } else if (m == 1) { attr |= 0x08000000; } else if (m == 4) { attr |= 0x01000000; } else if (m == 7) { attr |= 0x02000000; } else if (m == 8) { attr |= 0x04000000; } else if (m == 24) { attr &= 0x7eff0000; } else if (m == 27) { attr &= 0x7dff0000; } else if (m == 28) { attr &= 0x7bff0000; } else if (m >= 30 && m <= 37) { attr = (attr & 0x7f0f0000) | ((m - 30) << 20); } else if (m == 39) { attr = (attr & 0x7f0f0000) | 0x00f00000; } else if (m >= 40 && m <= 47) { attr = (attr & 0x7ff00000) | ((m - 40) << 16); } else if (m == 49) { attr = (attr & 0x7ff00000) | 0x000e0000; } } } Terminal();  Terminal(int width, int height); synchronized boolean setSize(int w, int h); synchronized String read(); synchronized String pipe(String d); synchronized boolean write(String d); synchronized String dump(); String toString();  }