aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorjames <>2008-02-05 01:11:46 +0000
committerjames <>2008-02-05 01:11:46 +0000
commita4da507522747e3d7d6c6ef0a59e7a2efac27ac4 (patch)
tree1b45ab32ff6436fd88d5028f981bc21443fcc4ac /src
parent28a52b2df7761bd97d74938d582b1f678d23c756 (diff)
downloadsympathy-a4da507522747e3d7d6c6ef0a59e7a2efac27ac4.tar.gz
sympathy-a4da507522747e3d7d6c6ef0a59e7a2efac27ac4.tar.bz2
sympathy-a4da507522747e3d7d6c6ef0a59e7a2efac27ac4.zip
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r--src/crt.c6
-rw-r--r--src/vt102.c35
2 files changed, 40 insertions, 1 deletions
diff --git a/src/crt.c b/src/crt.c
index 36011a9..7b8e7dd 100644
--- a/src/crt.c
+++ b/src/crt.c
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$";
/*
* $Log$
+ * Revision 1.4 2008/02/05 01:11:46 james
+ * *** empty log message ***
+ *
* Revision 1.3 2008/02/04 20:23:55 james
* *** empty log message ***
*
@@ -100,12 +103,13 @@ crt_scroll_down (CRT * c, CRT_Pos s, CRT_Pos e,int ea)
l *= sizeof (CRT_CA);
n = e.y - s.y;
+ n++;
p = CRT_ADDR_POS (&e);
while (n--)
{
- memcpy (&c->screen[p], &c->screen[p + CRT_COLS], l);
+ memcpy (&c->screen[p],&c->screen[p-CRT_COLS], l);
p -= CRT_COLS;
}
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.y<v->screen_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.y<v->screen_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: