Ignore all control characters not handled
Taken from vt100 programmer manual: Control characters have values of \000 - \037, and \177. The control characters recognized by the VT100 are shown in Table 3-10. All other control codes cause no action to be taken. We have to take attention when we are using alternate charset, because in this cases they are not used as control characters. --- st.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)dev
parent
375b6e5b17
commit
a7d7e29300
6
st.c
6
st.c
|
@ -1663,7 +1663,7 @@ tputtab(bool forward) {
|
||||||
|
|
||||||
void
|
void
|
||||||
tputc(char *c, int len) {
|
tputc(char *c, int len) {
|
||||||
char ascii = *c;
|
uchar ascii = *c;
|
||||||
|
|
||||||
if(iofd != -1)
|
if(iofd != -1)
|
||||||
write(iofd, c, len);
|
write(iofd, c, len);
|
||||||
|
@ -1792,8 +1792,6 @@ tputc(char *c, int len) {
|
||||||
if(sel.bx != -1 && BETWEEN(term.c.y, sel.by, sel.ey))
|
if(sel.bx != -1 && BETWEEN(term.c.y, sel.by, sel.ey))
|
||||||
sel.bx = -1;
|
sel.bx = -1;
|
||||||
switch(ascii) {
|
switch(ascii) {
|
||||||
case '\0': /* padding character, do nothing */
|
|
||||||
break;
|
|
||||||
case '\t':
|
case '\t':
|
||||||
tputtab(1);
|
tputtab(1);
|
||||||
break;
|
break;
|
||||||
|
@ -1818,6 +1816,7 @@ tputc(char *c, int len) {
|
||||||
term.esc = ESC_START;
|
term.esc = ESC_START;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
if(ascii >= '\020' || term.c.attr.mode & ATTR_GFX) {
|
||||||
if(IS_SET(MODE_WRAP) && term.c.state & CURSOR_WRAPNEXT)
|
if(IS_SET(MODE_WRAP) && term.c.state & CURSOR_WRAPNEXT)
|
||||||
tnewline(1); /* always go to first col */
|
tnewline(1); /* always go to first col */
|
||||||
tsetchar(c);
|
tsetchar(c);
|
||||||
|
@ -1827,6 +1826,7 @@ tputc(char *c, int len) {
|
||||||
term.c.state |= CURSOR_WRAPNEXT;
|
term.c.state |= CURSOR_WRAPNEXT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
Loading…
Reference in New Issue