diff options
author | noname@inventati.org <noname@inventati.org> | 2014-04-13 20:21:32 +0400 |
---|---|---|
committer | Roberto E. Vargas Caballero <k0ga@shike2.com> | 2014-04-15 08:16:39 +0200 |
commit | 4ad2fc7f18c8a58d9f88d9a91fb4972849cfd964 (patch) | |
tree | f2448e680f0283ce25bc28700b65ef264753c8e6 | |
parent | dc74c4f729a4350267f269c767aa6e377d8d4fbc (diff) |
Simplify techo
Remove special case for \e because it is handled well by "control code"
case.
-rw-r--r-- | st.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -2318,10 +2318,7 @@ techo(char *buf, int len) { for(; len > 0; buf++, len--) { char c = *buf; - if(c == '\033') { /* escape */ - tputc("^", 1); - tputc("[", 1); - } else if(c < '\x20') { /* control code */ + if(c < '\x20') { /* control code */ if(c != '\n' && c != '\r' && c != '\t') { c |= '\x40'; tputc("^", 1); |