2010-01-13 Vladimir Serbinenko <phcoder@gmail.com>
* term/ieee1275/ofconsole.c (grub_ofconsole_putchar): Handle '\r'. (grub_ofconsole_getwh): Split to ... (grub_ofconsole_getwh): ... this. (grub_ofconsole_dimensions): ...and this. (grub_ofconsole_init_output): Call grub_ofconsole_dimensions.
This commit is contained in:
parent
58655a160b
commit
c1f2882010
2 changed files with 22 additions and 6 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2010-01-13 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* term/ieee1275/ofconsole.c (grub_ofconsole_putchar): Handle '\r'.
|
||||||
|
(grub_ofconsole_getwh): Split to ...
|
||||||
|
(grub_ofconsole_getwh): ... this.
|
||||||
|
(grub_ofconsole_dimensions): ...and this.
|
||||||
|
(grub_ofconsole_init_output): Call grub_ofconsole_dimensions.
|
||||||
|
|
||||||
2010-01-13 Robert Millan <rmh.grub@aybabtu.com>
|
2010-01-13 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
* util/mkisofs/rock.c (generate_rock_ridge_attributes): Fix a typo.
|
* util/mkisofs/rock.c (generate_rock_ridge_attributes): Fix a typo.
|
||||||
|
|
|
@ -83,12 +83,17 @@ grub_ofconsole_putchar (grub_uint32_t c)
|
||||||
grub_curr_y++;
|
grub_curr_y++;
|
||||||
grub_curr_x = 0;
|
grub_curr_x = 0;
|
||||||
}
|
}
|
||||||
|
else if (c == '\r')
|
||||||
|
{
|
||||||
|
grub_curr_x = 0;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
grub_curr_x++;
|
grub_curr_x++;
|
||||||
if (grub_curr_x > grub_ofconsole_width)
|
if (grub_curr_x >= grub_ofconsole_width)
|
||||||
{
|
{
|
||||||
grub_ofconsole_putchar ('\n');
|
grub_ofconsole_putchar ('\n');
|
||||||
|
grub_ofconsole_putchar ('\r');
|
||||||
grub_curr_x++;
|
grub_curr_x++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -234,16 +239,13 @@ grub_ofconsole_getxy (void)
|
||||||
return ((grub_curr_x - 1) << 8) | grub_curr_y;
|
return ((grub_curr_x - 1) << 8) | grub_curr_y;
|
||||||
}
|
}
|
||||||
|
|
||||||
static grub_uint16_t
|
static void
|
||||||
grub_ofconsole_getwh (void)
|
grub_ofconsole_dimensions (void)
|
||||||
{
|
{
|
||||||
grub_ieee1275_ihandle_t options;
|
grub_ieee1275_ihandle_t options;
|
||||||
char *val;
|
char *val;
|
||||||
grub_ssize_t lval;
|
grub_ssize_t lval;
|
||||||
|
|
||||||
if (grub_ofconsole_width && grub_ofconsole_height)
|
|
||||||
return (grub_ofconsole_width << 8) | grub_ofconsole_height;
|
|
||||||
|
|
||||||
if (! grub_ieee1275_finddevice ("/options", &options)
|
if (! grub_ieee1275_finddevice ("/options", &options)
|
||||||
&& options != (grub_ieee1275_ihandle_t) -1)
|
&& options != (grub_ieee1275_ihandle_t) -1)
|
||||||
{
|
{
|
||||||
|
@ -280,7 +282,11 @@ grub_ofconsole_getwh (void)
|
||||||
grub_ofconsole_width = 80;
|
grub_ofconsole_width = 80;
|
||||||
if (! grub_ofconsole_height)
|
if (! grub_ofconsole_height)
|
||||||
grub_ofconsole_height = 24;
|
grub_ofconsole_height = 24;
|
||||||
|
}
|
||||||
|
|
||||||
|
static grub_uint16_t
|
||||||
|
grub_ofconsole_getwh (void)
|
||||||
|
{
|
||||||
return (grub_ofconsole_width << 8) | grub_ofconsole_height;
|
return (grub_ofconsole_width << 8) | grub_ofconsole_height;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -379,6 +385,8 @@ grub_ofconsole_init_output (void)
|
||||||
grub_ofconsole_setcolorstate (GRUB_TERM_COLOR_NORMAL);
|
grub_ofconsole_setcolorstate (GRUB_TERM_COLOR_NORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
grub_ofconsole_dimensions ();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue