2008-06-17 Robert Millan <rmh@aybabtu.com>
* term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables. (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New variables. (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store values in grub_ofconsole_normal_color and grub_ofconsole_highlight_color (they're not directly related to background and foreground). (grub_ofconsole_setcolorstate): Extract background and foreground from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
This commit is contained in:
parent
0aac2f79b7
commit
b23e5644cf
2 changed files with 22 additions and 10 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
||||||
|
2008-06-17 Robert Millan <rmh@aybabtu.com>
|
||||||
|
|
||||||
|
* term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
|
||||||
|
(grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
|
||||||
|
variables.
|
||||||
|
(grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
|
||||||
|
values in grub_ofconsole_normal_color and
|
||||||
|
grub_ofconsole_highlight_color (they're not directly related to
|
||||||
|
background and foreground).
|
||||||
|
(grub_ofconsole_setcolorstate): Extract background and foreground
|
||||||
|
from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
|
||||||
|
|
||||||
2008-06-17 Robert Millan <rmh@aybabtu.com>
|
2008-06-17 Robert Millan <rmh@aybabtu.com>
|
||||||
|
|
||||||
* util/update-grub_lib.in (prepare_grub_to_access_device): Use
|
* util/update-grub_lib.in (prepare_grub_to_access_device): Use
|
||||||
|
|
|
@ -56,8 +56,8 @@ static struct color colors[8] =
|
||||||
{ MAX, MAX, MAX}
|
{ MAX, MAX, MAX}
|
||||||
};
|
};
|
||||||
|
|
||||||
static int fgcolor = 7;
|
static grub_uint8_t grub_ofconsole_normal_color = 0x7;
|
||||||
static int bgcolor = 0;
|
static grub_uint8_t grub_ofconsole_highlight_color = 0x70;
|
||||||
|
|
||||||
/* Write control characters to the console. */
|
/* Write control characters to the console. */
|
||||||
static void
|
static void
|
||||||
|
@ -109,12 +109,12 @@ grub_ofconsole_setcolorstate (grub_term_color_state state)
|
||||||
{
|
{
|
||||||
case GRUB_TERM_COLOR_STANDARD:
|
case GRUB_TERM_COLOR_STANDARD:
|
||||||
case GRUB_TERM_COLOR_NORMAL:
|
case GRUB_TERM_COLOR_NORMAL:
|
||||||
fg = fgcolor;
|
fg = grub_ofconsole_normal_color & 0x0f;
|
||||||
bg = bgcolor;
|
bg = grub_ofconsole_normal_color >> 4;
|
||||||
break;
|
break;
|
||||||
case GRUB_TERM_COLOR_HIGHLIGHT:
|
case GRUB_TERM_COLOR_HIGHLIGHT:
|
||||||
fg = bgcolor;
|
fg = grub_ofconsole_highlight_color & 0x0f;
|
||||||
bg = fgcolor;
|
bg = grub_ofconsole_highlight_color >> 4;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
|
@ -128,15 +128,15 @@ static void
|
||||||
grub_ofconsole_setcolor (grub_uint8_t normal_color,
|
grub_ofconsole_setcolor (grub_uint8_t normal_color,
|
||||||
grub_uint8_t highlight_color)
|
grub_uint8_t highlight_color)
|
||||||
{
|
{
|
||||||
fgcolor = normal_color;
|
grub_ofconsole_normal_color = normal_color;
|
||||||
bgcolor = highlight_color;
|
grub_ofconsole_highlight_color = highlight_color;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
grub_ofconsole_getcolor (grub_uint8_t *normal_color, grub_uint8_t *highlight_color)
|
grub_ofconsole_getcolor (grub_uint8_t *normal_color, grub_uint8_t *highlight_color)
|
||||||
{
|
{
|
||||||
*normal_color = fgcolor;
|
*normal_color = grub_ofconsole_normal_color;
|
||||||
*highlight_color = bgcolor;
|
*highlight_color = grub_ofconsole_highlight_color;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
Loading…
Reference in a new issue