diff options
author | Michael Brown | 2013-12-06 18:47:54 +0100 |
---|---|---|
committer | Michael Brown | 2013-12-06 18:47:54 +0100 |
commit | 03401f9d2101b5033c67f6d588152c28a1cc7503 (patch) | |
tree | a0885779addd3444b2c5365f04e6a1a95431dd6f /src/hci/mucurses | |
parent | [build] Fix LABEL name for .liso images (diff) | |
download | ipxe-03401f9d2101b5033c67f6d588152c28a1cc7503.tar.gz ipxe-03401f9d2101b5033c67f6d588152c28a1cc7503.tar.xz ipxe-03401f9d2101b5033c67f6d588152c28a1cc7503.zip |
[console] Allow consoles to update the recorded console size
Provide a mechanism for consoles to update the recorded console width
and height, and use this width and height to provide the curses COLS
and LINES variables.
We choose not to use ANSI escape sequences to obtain the width and
height, for two reasons:
- iPXE's model is that all output is sent to all consoles; we could
therefore end up with multiple consoles reporting conflicting widths
and heights
- when a serial console is in use, we probably don't want to resize
the output shown on the BIOS console to match the size of the serial
console, since it's likely that the serial console is in use only
for debugging.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/hci/mucurses')
-rw-r--r-- | src/hci/mucurses/ansi_screen.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/hci/mucurses/ansi_screen.c b/src/hci/mucurses/ansi_screen.c index d3c685ed..a37daff3 100644 --- a/src/hci/mucurses/ansi_screen.c +++ b/src/hci/mucurses/ansi_screen.c @@ -9,9 +9,6 @@ static void ansiscr_movetoyx(struct _curses_screen *scr, unsigned int y, unsigned int x) __nonnull; static void ansiscr_putc(struct _curses_screen *scr, chtype c) __nonnull; -unsigned short _COLS = 80; -unsigned short _LINES = 24; - static unsigned int saved_usage; static void ansiscr_attrs ( struct _curses_screen *scr, attr_t attrs ) { @@ -72,7 +69,7 @@ static void ansiscr_putc ( struct _curses_screen *scr, chtype c ) { putchar ( character ); /* Update expected cursor position */ - if ( ++(scr->curs_x) == _COLS ) { + if ( ++(scr->curs_x) == COLS ) { scr->curs_x = 0; ++scr->curs_y; } |