X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=st.c;h=8e25d2334ec9a73703f2c6df117e046e998cbda6;hb=fbfa1f83eb501e885d1077e95739a7d7cab2397f;hp=67b4942cdb42108922c3897ac5016669dfb29b4d;hpb=0cc7ee5e737c9df5a41a4bca708e583117830085;p=st.git diff --git a/st.c b/st.c index 67b4942..8e25d23 100644 --- a/st.c +++ b/st.c @@ -302,7 +302,6 @@ static void ttywrite(const char *, size_t); static void xdraws(char *, Glyph, int, int, int, int); static void xhints(void); static void xclear(int, int, int, int); -static void xclearborders(void); static void xdrawcursor(void); static void xinit(void); static void xloadcols(void); @@ -1790,32 +1789,45 @@ tputc(char *c, int len) { write(iofd, c, len); switch(ascii) { - case '\t': + case '\t': /* HT */ tputtab(1); return; - case '\b': + case '\b': /* BS */ tmoveto(term.c.x-1, term.c.y); return; - case '\r': + case '\r': /* CR */ tmoveto(0, term.c.y); return; - case '\f': - case '\v': - case '\n': + case '\f': /* LF */ + case '\v': /* VT */ + case '\n': /* LF */ /* go to first col if the mode is set */ tnewline(IS_SET(MODE_CRLF)); return; - case '\a': + case '\a': /* BEL */ if(term.esc & ESC_STR) break; - if(!(xw.state & WIN_FOCUSED)) xseturgency(1); return; - case '\033': + case '\033': /* ESC */ csireset(); term.esc = ESC_START; return; + case '\016': /* XXX: SO */ + case '\017': /* XXX: SI */ + break; + case '\032': /* SUB */ + case '\030': /* CAN */ + csireset(); + return; + default: + /* case '\005': ENQ (IGNORED) */ + /* case '\000': NUL (IGNORED) */ + /* case '\021': XON (IGNORED) */ + /* case '\023': XOFF (IGNORED) */ + /* case 0177: DEL (IGNORED) */ + break; } if(term.esc & ESC_START) {