changelog shortlog tags manifest raw

changeset: Hack ssfe to pass through the escape character for ANSI color.

changeset 2: bfeddd70fe9a
parent 1:4380cf5d006a
child 3:c0c418b384d4
author: Emil Sit <sit@mit.edu>
date: Thu Feb 28 10:29:39 2008 -0500 (16 months ago)
files: ssfe.c
description: Hack ssfe to pass through the escape character for ANSI color.

ttytter emits ANSI color commands which ssfe filters out
in non-raw mode. Since the non-raw features of ssfe are kinda
nice (e.g., line wrapping), and I don't want to hack ttytter or
ssfe to support irc-style markup (e.g., ^B), simply special
case handling of the escape character to pass it through.

Security implication? Hopefully, Twitter doesn't let you actually
send ASCII 27 in a twit so the only such ANSI commands will come
from ttytter.
--- a/ssfe.c	Thu Feb 28 10:23:41 2008 -0500
+++ b/ssfe.c	Thu Feb 28 10:29:39 2008 -0500
@@ -567,7 +567,7 @@ int rc; {
     } else if (t==9) {
       (*w++)=t;
       wherex=(wherex & 0xfff8)+8;
-    } else if (t<' ' && (t!=7 || !beep)) {
+    } else if (t<' ' && (t!=7 || !beep) && (t!=27)) {
       wherex++;
       if (inv) {
 	writecap(t_me);