mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-26 00:59:55 +00:00
Changed highlight state code for hercules, console and serial.
The state was 0 - normal or 1 - highlight.
The state is now defined using an enum called color_state.
* stage2/term.h (color_state): New enum.
(COLOR_STATE_STANDARD): Standard color to use when not using user defined.
(COLOR_STATE_NORMAL): User defined normal color.
(COLOR_STATE_HIGHLIGHT): User defined highlight color.
(console_highlight): Renamed to console_setcolorstate.
(serial_highlight): Renamed to serial_setcolorstate.
(hercules_highlight): Renamed to hercules_setcolorstate.
* stage2/hercules.c (herc_highlight_state): Removed.
(herc_standard_color): New variable.
(herc_color_state): Likewise.
(herc_highlight): Renamed to herc_setcolorstate.
(herc_setcolorstate): Added switch to handle new states.
* stage2/console.c (console_highlight_state): Removed.
(console_standard_color): New variable.
(console_color_state): Likewise.
(console_highlight): Renamed to console_setcolorstate.
(console_setcolorstate): Added switch to handle new states.
* stage2/serial.c (serial_highlight): Renamed to serial_setcolorstate.
(serial_setcolorstate): Adjusted 'if' to suit new states.
* grub/asmstub.c (console_highlight): Renamed to console_setcolorstate.
(console_setcolorstate): Adjusted 'if' to suit new states.
* stage2/stage2.c (print_entry): Set color states using new states.
(print_border): Likewise.
* stage2/stage2.c (run_menu): Reverse if (!) to if () for uniformitty.
This commit is contained in:
1 parent
51955d52d8
commit
d932c071e9
8 files changed
+119
-38
No files matched your search
+7
-7
@@ -41,7 +41,7 @@ struct term_entry term_table[] =
|
||||
console_getxy,
|
||||
console_gotoxy,
|
||||
console_cls,
|
||||
console_highlight,
|
||||
console_setcolorstate,
|
||||
console_setcolor,
|
||||
console_nocursor
|
||||
},
|
||||
@@ -56,7 +56,7 @@ struct term_entry term_table[] =
|
||||
serial_getxy,
|
||||
serial_gotoxy,
|
||||
serial_cls,
|
||||
serial_highlight,
|
||||
serial_setcolorstate,
|
||||
0,
|
||||
0
|
||||
},
|
||||
@@ -71,7 +71,7 @@ struct term_entry term_table[] =
|
||||
hercules_getxy,
|
||||
hercules_gotoxy,
|
||||
hercules_cls,
|
||||
hercules_highlight,
|
||||
hercules_setcolorstate,
|
||||
hercules_setcolor,
|
||||
hercules_nocursor
|
||||
},
|
||||
@@ -1028,13 +1028,13 @@ grub_putchar (int c)
|
||||
the following grub_printf call will print newlines. */
|
||||
count_lines = -1;
|
||||
|
||||
if (current_term->highlight)
|
||||
current_term->highlight (1);
|
||||
if (current_term->setcolorstate)
|
||||
current_term->setcolorstate (COLOR_STATE_HIGHLIGHT);
|
||||
|
||||
grub_printf ("\n[Hit return to continue]");
|
||||
|
||||
if (current_term->highlight)
|
||||
current_term->highlight (0);
|
||||
if (current_term->setcolorstate)
|
||||
current_term->setcolorstate (COLOR_STATE_NORMAL);
|
||||
|
||||
do
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user