summary refs log tree commit diff stats
path: root/include/ui/console.h
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2017-09-27 12:38:11 +0200
committerGerd Hoffmann <kraxel@redhat.com>2017-09-29 10:36:33 +0200
commite2f82e924d057935dd4c61c0c53e11b15762eda2 (patch)
tree32007cf68c19695db0b1dd1e43bc85cb8e8ad6ad /include/ui/console.h
parentab161529261928ae7f3556e3220829c34b2686ec (diff)
downloadfocaccia-qemu-e2f82e924d057935dd4c61c0c53e11b15762eda2.tar.gz
focaccia-qemu-e2f82e924d057935dd4c61c0c53e11b15762eda2.zip
console: purge curses bits from console.h
Handle the translation from vga chars to curses chars in curses_update()
instead of console_write_ch().  Purge any curses support bits from
ui/console.h include file.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20170927103811.19249-1-kraxel@redhat.com
Diffstat (limited to 'include/ui/console.h')
-rw-r--r--include/ui/console.h23
1 files changed, 2 insertions, 21 deletions
diff --git a/include/ui/console.h b/include/ui/console.h
index 8024878bae..6966e4bd9d 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -336,29 +336,10 @@ static inline pixman_format_code_t surface_format(DisplaySurface *s)
     return s->format;
 }
 
-#ifdef CONFIG_CURSES
-/* KEY_EVENT is defined in wincon.h and in curses.h. Avoid redefinition. */
-#undef KEY_EVENT
-#include <curses.h>
-#undef KEY_EVENT
-typedef chtype console_ch_t;
-extern chtype vga_to_curses[];
-#else
-typedef unsigned long console_ch_t;
-#endif
+typedef uint32_t console_ch_t;
+
 static inline void console_write_ch(console_ch_t *dest, uint32_t ch)
 {
-    uint8_t c = ch;
-#ifdef CONFIG_CURSES
-    if (vga_to_curses[c]) {
-        ch &= ~(console_ch_t)0xff;
-        ch |= vga_to_curses[c];
-    }
-#else
-    if (c == '\0') {
-        ch |= ' ';
-    }
-#endif
     *dest = ch;
 }