#define X2COL(x) (((x) - BORDER)/xw.cw)
#define Y2ROW(y) (((y) - BORDER)/xw.ch)
+#define VT102ID "\033[?6c"
+
enum glyph_attribute {
ATTR_NULL = 0,
ATTR_REVERSE = 1,
DEFAULT(csiescseq.arg[0], 1);
tmoveto(term.c.x, term.c.y+csiescseq.arg[0]);
break;
+ case 'c': /* DA -- Device Attributes */
+ if(csiescseq.arg[0] == 0)
+ ttywrite(VT102ID, sizeof(VT102ID));
+ break;
case 'C': /* CUF -- Cursor <n> Forward */
case 'a':
DEFAULT(csiescseq.arg[0], 1);
}
term.esc = 0;
break;
+ case 'Z': /* DECID -- Identify Terminal */
+ ttywrite(VT102ID, sizeof(VT102ID));
+ break;
case 'c': /* RIS -- Reset to inital state */
treset();
term.esc = 0;
* Those ranges will not be brightened:
* 8 - 15 – bright system colors
* 196 - 231 – highest 256 color cube
- * 252 - 255 – brightest colors in grescale
+ * 252 - 255 – brightest colors in greyscale
*/
font = &dc.bfont;
}
}
if(x + charlen >= term.col-1) {
xclear(winx + width, (y == 0)? 0 : winy, xw.w,
- winy + xw.ch + (y == term.row-1)? xw.h : 0);
+ (y == term.row-1)? xw.h : (winy + xw.ch));
}
if(y == 0)
xclear(winx, 0, winx + width, BORDER);