+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>
* util/update-grub_lib.in (prepare_grub_to_access_device): Use
{ MAX, MAX, MAX}
};
-static int fgcolor = 7;
-static int bgcolor = 0;
+static grub_uint8_t grub_ofconsole_normal_color = 0x7;
+static grub_uint8_t grub_ofconsole_highlight_color = 0x70;
/* Write control characters to the console. */
static void
{
case GRUB_TERM_COLOR_STANDARD:
case GRUB_TERM_COLOR_NORMAL:
- fg = fgcolor;
- bg = bgcolor;
+ fg = grub_ofconsole_normal_color & 0x0f;
+ bg = grub_ofconsole_normal_color >> 4;
break;
case GRUB_TERM_COLOR_HIGHLIGHT:
- fg = bgcolor;
- bg = fgcolor;
+ fg = grub_ofconsole_highlight_color & 0x0f;
+ bg = grub_ofconsole_highlight_color >> 4;
break;
default:
return;
grub_ofconsole_setcolor (grub_uint8_t normal_color,
grub_uint8_t highlight_color)
{
- fgcolor = normal_color;
- bgcolor = highlight_color;
+ grub_ofconsole_normal_color = normal_color;
+ grub_ofconsole_highlight_color = highlight_color;
}
static void
grub_ofconsole_getcolor (grub_uint8_t *normal_color, grub_uint8_t *highlight_color)
{
- *normal_color = fgcolor;
- *highlight_color = bgcolor;
+ *normal_color = grub_ofconsole_normal_color;
+ *highlight_color = grub_ofconsole_highlight_color;
}
static int