1 |
/* |
/* |
2 |
* GRUB -- GRand Unified Bootloader |
* GRUB -- GRand Unified Bootloader |
3 |
* Copyright (C) 2002,2003 Free Software Foundation, Inc. |
* Copyright (C) 2002,2003,2005 Free Software Foundation, Inc. |
4 |
* |
* |
5 |
* GRUB is free software; you can redistribute it and/or modify |
* GRUB is free software; you can redistribute it and/or modify |
6 |
* it under the terms of the GNU General Public License as published by |
* it under the terms of the GNU General Public License as published by |
90 |
void |
void |
91 |
grub_putcode (grub_uint32_t code) |
grub_putcode (grub_uint32_t code) |
92 |
{ |
{ |
93 |
|
int height = grub_getwh () & 255; |
94 |
|
|
95 |
if (code == '\t' && grub_cur_term->getxy) |
if (code == '\t' && grub_cur_term->getxy) |
96 |
{ |
{ |
97 |
int n; |
int n; |
110 |
grub_putcode ('\r'); |
grub_putcode ('\r'); |
111 |
|
|
112 |
grub_more_lines++; |
grub_more_lines++; |
113 |
/* XXX: Don't use a fixed height! */ |
|
114 |
if (grub_more && grub_more_lines == 24 - 1) |
if (grub_more && grub_more_lines == height - 1) |
115 |
{ |
{ |
116 |
char key; |
char key; |
117 |
int pos = grub_getxy (); |
int pos = grub_getxy (); |
118 |
|
|
119 |
/* Show --MORE-- on the lower left side of the screen. */ |
/* Show --MORE-- on the lower left side of the screen. */ |
120 |
grub_gotoxy (1, 24 - 1); |
grub_gotoxy (1, height - 1); |
121 |
grub_setcolorstate (GRUB_TERM_COLOR_HIGHLIGHT); |
grub_setcolorstate (GRUB_TERM_COLOR_HIGHLIGHT); |
122 |
grub_printf ("--MORE--"); |
grub_printf ("--MORE--"); |
123 |
grub_setcolorstate (GRUB_TERM_COLOR_STANDARD); |
grub_setcolorstate (GRUB_TERM_COLOR_STANDARD); |
125 |
key = grub_getkey (); |
key = grub_getkey (); |
126 |
|
|
127 |
/* Remove the message. */ |
/* Remove the message. */ |
128 |
grub_gotoxy (1, 24 -1); |
grub_gotoxy (1, height - 1); |
129 |
grub_printf (" "); |
grub_printf (" "); |
130 |
grub_gotoxy (pos >> 8, pos & 0xFF); |
grub_gotoxy (pos >> 8, pos & 0xFF); |
131 |
|
|
220 |
return (grub_cur_term->getxy) (); |
return (grub_cur_term->getxy) (); |
221 |
} |
} |
222 |
|
|
223 |
|
grub_uint16_t |
224 |
|
grub_getwh (void) |
225 |
|
{ |
226 |
|
return (grub_cur_term->getwh) (); |
227 |
|
} |
228 |
|
|
229 |
void |
void |
230 |
grub_gotoxy (grub_uint8_t x, grub_uint8_t y) |
grub_gotoxy (grub_uint8_t x, grub_uint8_t y) |
231 |
{ |
{ |