diff options
Diffstat (limited to 'st.c')
| -rw-r--r-- | st.c | 22 |
1 files changed, 9 insertions, 13 deletions
| @@ -392,7 +392,7 @@ static void tsetdirtattr(int); | |||
| 392 | static void tsetmode(bool, bool, int *, int); | 392 | static void tsetmode(bool, bool, int *, int); |
| 393 | static void tfulldirt(void); | 393 | static void tfulldirt(void); |
| 394 | static void techo(char *, int); | 394 | static void techo(char *, int); |
| 395 | static bool tcontrolcode(uchar ); | 395 | static void tcontrolcode(uchar ); |
| 396 | static void tdectest(char ); | 396 | static void tdectest(char ); |
| 397 | static int32_t tdefcolor(int *, int *, int); | 397 | static int32_t tdefcolor(int *, int *, int); |
| 398 | static void tdeftran(char); | 398 | static void tdeftran(char); |
| @@ -2328,7 +2328,7 @@ tdeftran(char ascii) { | |||
| 2328 | term.trantbl[term.icharset] = (*bp)[1]; | 2328 | term.trantbl[term.icharset] = (*bp)[1]; |
| 2329 | } | 2329 | } |
| 2330 | 2330 | ||
| 2331 | bool | 2331 | void |
| 2332 | tcontrolcode(uchar ascii) { | 2332 | tcontrolcode(uchar ascii) { |
| 2333 | static char question[UTF_SIZ] = "?"; | 2333 | static char question[UTF_SIZ] = "?"; |
| 2334 | 2334 | ||
| @@ -2363,7 +2363,7 @@ tcontrolcode(uchar ascii) { | |||
| 2363 | csireset(); | 2363 | csireset(); |
| 2364 | term.esc &= ~(ESC_CSI|ESC_ALTCHARSET|ESC_TEST); | 2364 | term.esc &= ~(ESC_CSI|ESC_ALTCHARSET|ESC_TEST); |
| 2365 | term.esc |= ESC_START; | 2365 | term.esc |= ESC_START; |
| 2366 | return 1; | 2366 | return; |
| 2367 | case '\016': /* SO */ | 2367 | case '\016': /* SO */ |
| 2368 | term.charset = 0; | 2368 | term.charset = 0; |
| 2369 | break; | 2369 | break; |
| @@ -2395,11 +2395,9 @@ tcontrolcode(uchar ascii) { | |||
| 2395 | case 0x9e: /* TODO: PM */ | 2395 | case 0x9e: /* TODO: PM */ |
| 2396 | case 0x9f: /* TODO: APC */ | 2396 | case 0x9f: /* TODO: APC */ |
| 2397 | break; | 2397 | break; |
| 2398 | default: | ||
| 2399 | return 0; | ||
| 2400 | } | 2398 | } |
| 2401 | term.esc &= ~(ESC_STR_END|ESC_STR); | 2399 | term.esc &= ~(ESC_STR_END|ESC_STR); |
| 2402 | return 1; | 2400 | return; |
| 2403 | } | 2401 | } |
| 2404 | 2402 | ||
| 2405 | void | 2403 | void |
| @@ -2478,8 +2476,11 @@ tputc(char *c, int len) { | |||
| 2478 | * they must not cause conflicts with sequences. | 2476 | * they must not cause conflicts with sequences. |
| 2479 | */ | 2477 | */ |
| 2480 | if(control) { | 2478 | if(control) { |
| 2481 | if (tcontrolcode(ascii)) | 2479 | tcontrolcode(ascii); |
| 2482 | return; | 2480 | /* |
| 2481 | * control codes are not shown ever | ||
| 2482 | */ | ||
| 2483 | return; | ||
| 2483 | } else if(term.esc & ESC_START) { | 2484 | } else if(term.esc & ESC_START) { |
| 2484 | if(term.esc & ESC_CSI) { | 2485 | if(term.esc & ESC_CSI) { |
| 2485 | csiescseq.buf[csiescseq.len++] = ascii; | 2486 | csiescseq.buf[csiescseq.len++] = ascii; |
| @@ -2576,11 +2577,6 @@ tputc(char *c, int len) { | |||
| 2576 | */ | 2577 | */ |
| 2577 | return; | 2578 | return; |
| 2578 | } | 2579 | } |
| 2579 | /* | ||
| 2580 | * Display control codes only if we are in graphic mode | ||
| 2581 | */ | ||
| 2582 | if(control && term.trantbl[term.charset] != CS_GRAPHIC0) | ||
| 2583 | return; | ||
| 2584 | if(sel.ob.x != -1 && BETWEEN(term.c.y, sel.ob.y, sel.oe.y)) | 2580 | if(sel.ob.x != -1 && BETWEEN(term.c.y, sel.ob.y, sel.oe.y)) |
| 2585 | selclear(NULL); | 2581 | selclear(NULL); |
| 2586 | 2582 | ||
