diff options
| -rw-r--r-- | st.c | 9 |
1 files changed, 9 insertions, 0 deletions
| @@ -72,6 +72,8 @@ | |||
| 72 | #define X2COL(x) (((x) - BORDER)/xw.cw) | 72 | #define X2COL(x) (((x) - BORDER)/xw.cw) |
| 73 | #define Y2ROW(y) (((y) - BORDER)/xw.ch) | 73 | #define Y2ROW(y) (((y) - BORDER)/xw.ch) |
| 74 | 74 | ||
| 75 | #define VT102ID "\033[?6c" | ||
| 76 | |||
| 75 | enum glyph_attribute { | 77 | enum glyph_attribute { |
| 76 | ATTR_NULL = 0, | 78 | ATTR_NULL = 0, |
| 77 | ATTR_REVERSE = 1, | 79 | ATTR_REVERSE = 1, |
| @@ -1510,6 +1512,10 @@ csihandle(void) { | |||
| 1510 | DEFAULT(csiescseq.arg[0], 1); | 1512 | DEFAULT(csiescseq.arg[0], 1); |
| 1511 | tmoveto(term.c.x, term.c.y+csiescseq.arg[0]); | 1513 | tmoveto(term.c.x, term.c.y+csiescseq.arg[0]); |
| 1512 | break; | 1514 | break; |
| 1515 | case 'c': /* DA -- Device Attributes */ | ||
| 1516 | if(csiescseq.arg[0] == 0) | ||
| 1517 | ttywrite(VT102ID, sizeof(VT102ID)); | ||
| 1518 | break; | ||
| 1513 | case 'C': /* CUF -- Cursor <n> Forward */ | 1519 | case 'C': /* CUF -- Cursor <n> Forward */ |
| 1514 | case 'a': | 1520 | case 'a': |
| 1515 | DEFAULT(csiescseq.arg[0], 1); | 1521 | DEFAULT(csiescseq.arg[0], 1); |
| @@ -1933,6 +1939,9 @@ tputc(char *c, int len) { | |||
| 1933 | } | 1939 | } |
| 1934 | term.esc = 0; | 1940 | term.esc = 0; |
| 1935 | break; | 1941 | break; |
| 1942 | case 'Z': /* DECID -- Identify Terminal */ | ||
| 1943 | ttywrite(VT102ID, sizeof(VT102ID)); | ||
| 1944 | break; | ||
| 1936 | case 'c': /* RIS -- Reset to inital state */ | 1945 | case 'c': /* RIS -- Reset to inital state */ |
| 1937 | treset(); | 1946 | treset(); |
| 1938 | term.esc = 0; | 1947 | term.esc = 0; |
