+ case ANSI('c', '='): /* Hide or Show Cursor */
+ compatibility(SCOANSI);
+ switch(term->esc_args[0]) {
+ case 0: /* hide cursor */
+ term->cursor_on = FALSE;
+ break;
+ case 1: /* restore cursor */
+ term->big_cursor = FALSE;
+ term->cursor_on = TRUE;
+ break;
+ case 2: /* block cursor */
+ term->big_cursor = TRUE;
+ term->cursor_on = TRUE;
+ break;
+ }
+ break;
+ case ANSI('C', '='):
+ /*
+ * set cursor start on scanline esc_args[0] and
+ * end on scanline esc_args[1].If you set
+ * the bottom scan line to a value less than
+ * the top scan line, the cursor will disappear.
+ */
+ compatibility(SCOANSI);
+ if (term->esc_nargs >= 2) {
+ if (term->esc_args[0] > term->esc_args[1])
+ term->cursor_on = FALSE;
+ else
+ term->cursor_on = TRUE;
+ }
+ break;
+ case ANSI('D', '='):
+ compatibility(SCOANSI);
+ term->blink_is_real = FALSE;
+ if (term->esc_args[0]>=1)
+ term->curr_attr |= ATTR_BLINK;
+ else
+ term->curr_attr &= ~ATTR_BLINK;
+ break;
+ case ANSI('E', '='):
+ compatibility(SCOANSI);
+ term->blink_is_real = (term->esc_args[0] >= 1);
+ break;
+ case ANSI('F', '='): /* set normal foreground */
+ compatibility(SCOANSI);
+ if (term->esc_args[0] >= 0 && term->esc_args[0] < 16) {
+ term->curr_attr &= ~ATTR_FGMASK;
+ term->curr_attr |=
+ (sco2ansicolour[term->esc_args[0] & 0x7] |
+ ((term->esc_args[0] & 0x8) << 1)) <<
+ ATTR_FGSHIFT;
+ }
+ break;
+ case ANSI('G', '='): /* set normal background */
+ compatibility(SCOANSI);
+ if (term->esc_args[0] >= 0 && term->esc_args[0] < 16) {
+ term->curr_attr &= ~ATTR_BGMASK;
+ term->curr_attr |=
+ (sco2ansicolour[term->esc_args[0] & 0x7] |
+ ((term->esc_args[0] & 0x8) << 1)) <<
+ ATTR_BGSHIFT;
+ }
+ break;