mirror of
https://github.com/ipxe/ipxe
synced 2025-12-25 00:17:57 +03:00
[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>
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdarg.h>
|
||||
#include <ipxe/console.h>
|
||||
|
||||
/** @file
|
||||
*
|
||||
@@ -105,12 +106,10 @@ typedef struct _curses_window {
|
||||
} WINDOW;
|
||||
|
||||
extern WINDOW _stdscr;
|
||||
extern unsigned short _COLS;
|
||||
extern unsigned short _LINES;
|
||||
|
||||
#define stdscr ( &_stdscr )
|
||||
#define COLS _COLS
|
||||
#define LINES _LINES
|
||||
#define COLS console_width
|
||||
#define LINES console_height
|
||||
|
||||
#define MUCURSES_BITS( mask, shift ) (( mask ) << (shift))
|
||||
#define CPAIR_SHIFT 8
|
||||
|
||||
Reference in New Issue
Block a user