From 9d7972be8f555a5ece9a8e7b1b6275a9d7c0b212 Mon Sep 17 00:00:00 2001 From: james <> Date: Thu, 6 Mar 2008 17:21:41 +0000 Subject: *** empty log message *** --- src/vt102.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'src/vt102.c') diff --git a/src/vt102.c b/src/vt102.c index 4ca4578..cdbb236 100644 --- a/src/vt102.c +++ b/src/vt102.c @@ -10,6 +10,9 @@ static char rcsid[] = "$Id$"; /* * $Log$ + * Revision 1.61 2008/03/06 17:21:41 james + * *** empty log message *** + * * Revision 1.60 2008/03/06 16:49:39 james * *** empty log message *** * @@ -1143,13 +1146,14 @@ vt102_scs (Context * c, int g, int s) } -void +static int vt102_parse_csi (Context * c, char *buf, int len) { char last; char *ptr; char *arg = buf + 1; int narg; + int err=0; VT102 *v = c->v; @@ -1322,8 +1326,10 @@ vt102_parse_csi (Context * c, char *buf, int len) vt102_cursor_absolute (v, narg - 1, v->pos.y); break; case 'b': - while (narg--) + while (narg--) { vt102_regular_char (c, v, v->last_reg_char); + err += vt102_rx_hook (c, v->last_reg_char); + } break; case 'c': /* For some obscure reason some programs seem to send */ @@ -1436,11 +1442,13 @@ vt102_parse_csi (Context * c, char *buf, int len) +return err; } -void +static int vt102_parse_esc (Context * c) { + int err=0; VT102 *v = c->v; VT102_parser *p = &v->parser; @@ -1600,7 +1608,7 @@ vt102_parse_esc (Context * c) //FIXME: break; case '[': - vt102_parse_csi (c, p->cmd_buf, p->cmd_ptr); + err+=vt102_parse_csi (c, p->cmd_buf, p->cmd_ptr); break; case '(': /*Charsets */ case ')': @@ -1621,6 +1629,7 @@ vt102_parse_esc (Context * c) log_f (c->l, "", v->pos.x, v->pos.y, v->pending_wrap); #endif +return err; } void @@ -1789,7 +1798,7 @@ vt102_parse_char (Context * c, int ch) if (!p->in_cmd) { - vt102_parse_esc (c); + err+=vt102_parse_esc (c); p->cmd_more_bytes = 0; p->cmd_termination = 0; } @@ -1803,7 +1812,7 @@ vt102_parse_char (Context * c, int ch) pre_parse_cmd (ch, p); if (!p->in_cmd) - vt102_parse_esc (c); + err+=vt102_parse_esc (c); } else if (ch == 0x9b) { /*One byte CSI */ @@ -1897,7 +1906,7 @@ vt102_parse_char (Context * c, int ch) #endif /*regular character */ default: vt102_regular_char (c, v, ch); - err += vt102_rx_hook (c, ch); + err += vt102_rx_hook (c, ch); } #ifdef DEBUG -- cgit v1.2.3