emulate a new line by the grub shell itself instead of ncurses.
This commit is contained in:
parent
a1fafbfb0e
commit
e8e3b99925
2 changed files with 25 additions and 1 deletions
|
@ -1,3 +1,12 @@
|
|||
2000-08-28 OKUJI Yoshinori <okuji@gnu.org>
|
||||
|
||||
* grub/asmstub.c (console_putchar) [HAVE_LIBCURSES]: If
|
||||
USE_CURSES is true, emulate a new line like a ordinary terminal,
|
||||
because ncurses treats it badly. If current position on y-axis
|
||||
is the bottom of the screen, call scroll. Otherwise, call move
|
||||
with the arguments, Y + 1 and X, where X and Y are current
|
||||
position of the cursor.
|
||||
|
||||
2000-08-28 OKUJI Yoshinori <okuji@gnu.org>
|
||||
|
||||
* stage2/asm.S (console_putchar): Don't print a carriage return
|
||||
|
|
|
@ -499,7 +499,22 @@ console_putchar (int c)
|
|||
{
|
||||
#ifdef HAVE_LIBCURSES
|
||||
if (use_curses)
|
||||
{
|
||||
/* In ncurses, a newline is treated badly, so we emulate it in our
|
||||
own way. */
|
||||
if (c == '\n')
|
||||
{
|
||||
int x, y;
|
||||
|
||||
getyx (stdscr, y, x);
|
||||
if (y + 1 == LINES)
|
||||
scroll (stdscr);
|
||||
else
|
||||
move (y + 1, x);
|
||||
}
|
||||
else
|
||||
addch (c);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
putchar (c);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue