X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fvt102.c;h=da3a58797923b526fd29f69991ec699644d503a9;hb=8158d3e1b5d1d977bc1a91e0bb7fc6c892f9685c;hp=4fb48c5fab4ae49fc437f963d997f50360af9e8f;hpb=8ba373fecb91b8f276c754f63a5a7f1490f76dcc;p=sympathy.git diff --git a/src/vt102.c b/src/vt102.c index 4fb48c5..da3a587 100644 --- a/src/vt102.c +++ b/src/vt102.c @@ -10,6 +10,9 @@ static char rcsid[] = "$Id$"; /* * $Log$ + * Revision 1.6 2008/02/05 01:11:46 james + * *** empty log message *** + * * Revision 1.5 2008/02/04 20:23:55 james * *** empty log message *** * @@ -361,6 +364,35 @@ vt102_parse_csi (VT102 * v, char *buf, int len) } break; + case 'g': + case 'h': + case 'l': + fprintf (stderr, "C: CSI %s buf[0]=%c\n", buf,buf[0]); + break; + + case 'm': + //horror of horrors parsing the ; + break; + case 'r': + v->top_margin=v->screen_start; + v->bottom_margin=v->screen_end; + + if ((len>2) && (ptr=index(arg,';'))) { + ptr++; + v->top_margin.y=narg-1; + v->bottom_margin.y=atoi(ptr)-1; + } + + if (v->top_margin.yscreen_start.y) v->top_margin.y=v->screen_start.y; + if (v->top_margin.y>v->screen_end.y) v->top_margin.y=v->screen_end.y; + if (v->bottom_margin.yscreen_start.y) v->bottom_margin.y=v->screen_start.y; + if (v->bottom_margin.y>v->screen_end.y) v->bottom_margin.y=v->screen_end.y; + + fprintf(stderr,"D: %d %d\n",v->top_margin.y,v->bottom_margin.y); + + v->pos=v->top_margin; + break; + default: fprintf (stderr, "A: CSI %s buf[0]=%c\n", buf,buf[0]); } @@ -441,6 +473,9 @@ vt102_parse_char (VT102 * v, int c) vt102_cursor_motion (v, -1, 0, 1); break; /*HT*/ case 9: + v->pos.x+=8; + v->pos.x&=~7; + vt102_cursor_normalize(v,1,1); break; /*LF*/ case 10: /*VT*/ case 11: