+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>
* util/mkisofs/rock.c (generate_rock_ridge_attributes): Fix a typo.
grub_curr_y++;
grub_curr_x = 0;
}
+ else if (c == '\r')
+ {
+ grub_curr_x = 0;
+ }
else
{
grub_curr_x++;
- if (grub_curr_x > grub_ofconsole_width)
+ if (grub_curr_x >= grub_ofconsole_width)
{
grub_ofconsole_putchar ('\n');
+ grub_ofconsole_putchar ('\r');
grub_curr_x++;
}
}
return ((grub_curr_x - 1) << 8) | grub_curr_y;
}
-static grub_uint16_t
-grub_ofconsole_getwh (void)
+static void
+grub_ofconsole_dimensions (void)
{
grub_ieee1275_ihandle_t options;
char *val;
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)
&& options != (grub_ieee1275_ihandle_t) -1)
{
grub_ofconsole_width = 80;
if (! grub_ofconsole_height)
grub_ofconsole_height = 24;
+}
+static grub_uint16_t
+grub_ofconsole_getwh (void)
+{
return (grub_ofconsole_width << 8) | grub_ofconsole_height;
}
grub_ofconsole_setcolorstate (GRUB_TERM_COLOR_NORMAL);
}
+ grub_ofconsole_dimensions ();
+
return 0;
}