[REPOST because of missing patches]
I would like to submit the following patches to linux-2.5.7-dj1 so that:
* The "software" cursor (activate using "echo -e '\033[?17c') works like in
"xterm":
it merely inverses the current (color) attributes of the current underlying
character instead of having a fixed color
This changes affects hardware text mode and graphics framebuffers
* Blank char attributes are set equal to current char attributes
(so that the new software cursor displays properly)
* Text blinking attribute is disabled while in hardware EGA/VGA color textmode
so that all 16 background colors are available
--> echo -e '\033[5m' activates "bright background"
Examples:
$ echo -e '\033[17c'
$ echo -e '\033[32;44;1m'
The text is bright green over blue
The cursor is blue over bright green
$ echo -e '\033[m\033[30;43;5m'
The text is black over yellow
The cursor is yellow over black
I would suggest that similar changes are made for the framebuffer's "hardware"
cursor so that it has "xterm -bc"-like behavior.
--- ../linux-2.5.7-orig/drivers/char/vt.c Wed Mar 27 18:04:35 2002
+++ drivers/char/vt.c Wed Mar 27 10:38:40 2002
@@ -199,6 +199,8 @@
softcursor_original = i;
i |= ((type >> 8) & 0xff00 );
i ^= ((type) & 0xff00 );
+ if (i == softcursor_original)
+ i = (i & 0xffff00ff) | ((i & 0x0f00) << 4) | ((i & 0xf000) >> 4);
if ((type & 0x20) && ((softcursor_original & 0x7000) == (i &
0x7000)))
i ^= 0x7000;
if ((type & 0x40) && ((i & 0x700) == ((i & 0x7000) >> 4))) i ^=
0x0700;
@@ -454,7 +456,7 @@
void update_attr(struct vc_data *vc)
{
attr = build_attr(vc, color, intensity, blink, underline, reverse ^
decscnm);
- video_erase_char = (build_attr(vc, color, intensity, 0, 0, decscnm) << 8)
| ' ';
+ video_erase_char = (build_attr(vc, color, intensity, blink, 0, decscnm)
<< 8) | ' ';
}
/*
--- ../linux-2.5.7-orig/drivers/video/vgacon.c Wed Mar 27 18:04:49 2002
+++ drivers/video/vgacon.c Mon Mar 25 17:45:37 2002
@@ -267,6 +267,11 @@
outb_p (default_blu[i], 0x3c9) ;
}
}
+
+ /* Enable bold background instead of blinking */
+ inb_p (0x3da) ;
+ outb_p (0x30, 0x3c0) ;
+ outb_p (0x30, 0x3c0) ;
}
else
{
|