+ 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;
+