patch-2.2.3 linux/drivers/char/console.c
Next file: linux/drivers/char/dtlk.c
Previous file: linux/drivers/char/bttv.c
Back to the patch index
Back to the overall index
- Lines: 62
- Date:
Thu Feb 25 10:02:12 1999
- Orig file:
v2.2.2/linux/drivers/char/console.c
- Orig date:
Wed Jan 20 23:14:05 1999
diff -u --recursive --new-file v2.2.2/linux/drivers/char/console.c linux/drivers/char/console.c
@@ -203,7 +203,14 @@
static inline unsigned short *screenpos(int currcons, int offset, int viewed)
{
- unsigned short *p = (unsigned short *)(visible_origin + offset);
+ unsigned short *p;
+
+ if (!viewed)
+ p = (unsigned short *)(origin + offset);
+ else if (!sw->con_screen_pos)
+ p = (unsigned short *)(visible_origin + offset);
+ else
+ p = sw->con_screen_pos(vc_cons[currcons].d, offset);
return p;
}
@@ -253,16 +260,16 @@
unsigned int xx, yy, offset;
u16 *p;
- if (start < origin) {
- count -= origin - start;
- start = origin;
- }
- if (count <= 0)
- return;
- offset = (start - origin) / 2;
- xx = offset % video_num_columns;
- yy = offset / video_num_columns;
p = (u16 *) start;
+ if (!sw->con_getxy) {
+ offset = (start - origin) / 2;
+ xx = offset % video_num_columns;
+ yy = offset / video_num_columns;
+ } else {
+ int nxx, nyy;
+ start = sw->con_getxy(vc_cons[currcons].d, start, &nxx, &nyy);
+ xx = nxx; yy = nyy;
+ }
for(;;) {
u16 attrib = scr_readw(p) & 0xff00;
int startx = xx;
@@ -285,6 +292,10 @@
break;
xx = 0;
yy++;
+ if (sw->con_getxy) {
+ p = (u16 *)start;
+ start = sw->con_getxy(vc_cons[currcons].d, start, NULL, NULL);
+ }
}
#endif
}
@@ -2778,7 +2789,7 @@
set_cursor(currcons);
}
-u16 vcs_scr_readw(int currcons, u16 *org)
+u16 vcs_scr_readw(int currcons, const u16 *org)
{
if ((unsigned long)org == pos && softcursor_original != -1)
return softcursor_original;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)