diff options
Diffstat (limited to 'src/tty.c')
-rw-r--r-- | src/tty.c | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$"; /* * $Log$ + * Revision 1.22 2008/03/06 16:49:05 james + * *** empty log message *** + * * Revision 1.21 2008/03/03 06:04:42 james * *** empty log message *** * @@ -525,10 +528,11 @@ tty_parser_new (void) return p; } -void +int tty_parse (Context * c, uint8_t * buf, int len) { TTY_Parser *p; + int err=0; p = c->tp; @@ -542,7 +546,7 @@ tty_parse (Context * c, uint8_t * buf, int len) { case DLE: tty_bit_analyse (c, 0, *buf); - utf8_parse (c, *buf); + err+=utf8_parse (c, *buf); break; case 0: p->in_errmark = 1; @@ -563,9 +567,9 @@ tty_parse (Context * c, uint8_t * buf, int len) tty_analyse (c); - utf8_parse (c, *buf); + err+=utf8_parse (c, *buf); - utf8_parse (c, SYM_CHAR_RESET); + err+=utf8_parse (c, SYM_CHAR_RESET); } else if (*buf == DLE) @@ -579,9 +583,10 @@ tty_parse (Context * c, uint8_t * buf, int len) tty_analyse (c); - utf8_parse (c, *buf); + err+=utf8_parse (c, *buf); } buf++; } +return err; } |