summaryrefslogtreecommitdiffstats
path: root/src/arch/i386/firmware/pcbios/bios_console.c
diff options
context:
space:
mode:
authorMichael Brown2013-11-25 15:01:40 +0100
committerMichael Brown2013-11-27 12:27:50 +0100
commit02a63c6dec835943bf9bf64fae72d391c696a639 (patch)
tree21cd9a0967675db705cfe66168fea950b7f4d03e /src/arch/i386/firmware/pcbios/bios_console.c
parent[main] Defer "initialising devices" message until initialising devices (diff)
downloadipxe-02a63c6dec835943bf9bf64fae72d391c696a639.tar.gz
ipxe-02a63c6dec835943bf9bf64fae72d391c696a639.tar.xz
ipxe-02a63c6dec835943bf9bf64fae72d391c696a639.zip
[console] Pass escape sequence context to ANSI escape sequence handlers
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/arch/i386/firmware/pcbios/bios_console.c')
-rw-r--r--src/arch/i386/firmware/pcbios/bios_console.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/arch/i386/firmware/pcbios/bios_console.c b/src/arch/i386/firmware/pcbios/bios_console.c
index 79e43708..035831c8 100644
--- a/src/arch/i386/firmware/pcbios/bios_console.c
+++ b/src/arch/i386/firmware/pcbios/bios_console.c
@@ -62,11 +62,13 @@ static unsigned int bios_attr = ATTR_DEFAULT;
/**
* Handle ANSI CUP (cursor position)
*
+ * @v ctx ANSI escape sequence context
* @v count Parameter count
* @v params[0] Row (1 is top)
* @v params[1] Column (1 is left)
*/
-static void bios_handle_cup ( unsigned int count __unused, int params[] ) {
+static void bios_handle_cup ( struct ansiesc_context *ctx __unused,
+ unsigned int count __unused, int params[] ) {
int cx = ( params[1] - 1 );
int cy = ( params[0] - 1 );
@@ -85,10 +87,12 @@ static void bios_handle_cup ( unsigned int count __unused, int params[] ) {
/**
* Handle ANSI ED (erase in page)
*
+ * @v ctx ANSI escape sequence context
* @v count Parameter count
* @v params[0] Region to erase
*/
-static void bios_handle_ed ( unsigned int count __unused,
+static void bios_handle_ed ( struct ansiesc_context *ctx __unused,
+ unsigned int count __unused,
int params[] __unused ) {
/* We assume that we always clear the whole screen */
assert ( params[0] == ANSIESC_ED_ALL );
@@ -103,10 +107,12 @@ static void bios_handle_ed ( unsigned int count __unused,
/**
* Handle ANSI SGR (set graphics rendition)
*
+ * @v ctx ANSI escape sequence context
* @v count Parameter count
* @v params List of graphic rendition aspects
*/
-static void bios_handle_sgr ( unsigned int count, int params[] ) {
+static void bios_handle_sgr ( struct ansiesc_context *ctx __unused,
+ unsigned int count, int params[] ) {
static const uint8_t bios_attr_fcols[10] = {
ATTR_FCOL_BLACK, ATTR_FCOL_RED, ATTR_FCOL_GREEN,
ATTR_FCOL_YELLOW, ATTR_FCOL_BLUE, ATTR_FCOL_MAGENTA,