[dev] [st] [PATCH 1/3] Add NUL character dealing

From: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
Date: Thu, 13 Sep 2012 23:08:24 +0200

NUL character is usually used as padding (basically for timming purpouses),
and it should be ignorted. Some old telnet servers send it together each
character. It is also used in some terminfo entries (for example in xterm
terminfo entry).
---
 st.c |    2 ++
 1 file changed, 2 insertions(+)
diff --git a/st.c b/st.c
index 0db81f4..26237de 100644
--- a/st.c
+++ b/st.c
_AT_@ -1714,6 +1714,8 @@ tputc(char *c) {
 		if(sel.bx != -1 && BETWEEN(term.c.y, sel.by, sel.ey))
 			sel.bx = -1;
 		switch(ascii) {
+		case '\0': /* padding character, do nothing */
+			break;
 		case '\t':
 			tputtab(1);
 			break;
--
1.7.10.4
Received on Thu Sep 13 2012 - 23:08:24 CEST

This archive was generated by hypermail 2.3.0 : Thu Sep 13 2012 - 23:12:03 CEST