aboutsummaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
Diffstat (limited to 'st.c')
-rw-r--r--st.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/st.c b/st.c
index 9a979ea..2945c1b 100644
--- a/st.c
+++ b/st.c
@@ -394,6 +394,7 @@ static void tsetmode(bool, bool, int *, int);
394static void tfulldirt(void); 394static void tfulldirt(void);
395static void techo(char *, int); 395static void techo(char *, int);
396static bool tcontrolcode(uchar ); 396static bool tcontrolcode(uchar );
397static void tdectest(char );
397static int32_t tdefcolor(int *, int *, int); 398static int32_t tdefcolor(int *, int *, int);
398static void tselcs(void); 399static void tselcs(void);
399static void tdeftran(char); 400static void tdeftran(char);
@@ -2426,6 +2427,19 @@ tcontrolcode(uchar ascii) {
2426} 2427}
2427 2428
2428void 2429void
2430tdectest(char c) {
2431 static char E[UTF_SIZ] = "E";
2432 int x, y;
2433
2434 if(c == '8') { /* DEC screen alignment test. */
2435 for(x = 0; x < term.col; ++x) {
2436 for(y = 0; y < term.row; ++y)
2437 tsetchar(E, &term.c.attr, x, y);
2438 }
2439 }
2440}
2441
2442void
2429tputc(char *c, int len) { 2443tputc(char *c, int len) {
2430 uchar ascii; 2444 uchar ascii;
2431 bool control; 2445 bool control;
@@ -2504,15 +2518,7 @@ tputc(char *c, int len) {
2504 tdeftran(ascii); 2518 tdeftran(ascii);
2505 tselcs(); 2519 tselcs();
2506 } else if(term.esc & ESC_TEST) { 2520 } else if(term.esc & ESC_TEST) {
2507 if(ascii == '8') { /* DEC screen alignment test. */ 2521 tdectest(ascii);
2508 char E[UTF_SIZ] = "E";
2509 int x, y;
2510
2511 for(x = 0; x < term.col; ++x) {
2512 for(y = 0; y < term.row; ++y)
2513 tsetchar(E, &term.c.attr, x, y);
2514 }
2515 }
2516 } else { 2522 } else {
2517 switch(ascii) { 2523 switch(ascii) {
2518 case '[': 2524 case '[':