* [Qemu-devel] [PATCH] curses: Fix compilation error
@ 2010-03-20 8:05 Stefan Weil
0 siblings, 0 replies; only message in thread
From: Stefan Weil @ 2010-03-20 8:05 UTC (permalink / raw)
To: QEMU Developers
d7234f4d7e373a708e1df9ab565a71b71b189025 was incomplete
and results in a compilation error when QEMU is configured
with curses support.
Fix this and clean up the code a little, too.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
curses.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/curses.c b/curses.c
index f9a983a..9fd680e 100644
--- a/curses.c
+++ b/curses.c
@@ -294,16 +294,12 @@ static void curses_refresh(DisplayState *ds)
}
}
-static void curses_cleanup(void *opaque)
+static void curses_cleanup(Notifier *notifier)
{
+ (void)notifier;
endwin();
}
-static void curses_atexit(void)
-{
- curses_cleanup(NULL);
-}
-
static void curses_setup(void)
{
int i, colour_default[8] = {
@@ -338,7 +334,7 @@ static void curses_keyboard_setup(void)
void curses_display_init(DisplayState *ds, int full_screen)
{
DisplayChangeListener *dcl;
- static Notifier notifier = { .notify = curses_atexit };
+ static Notifier notifier = { .notify = curses_cleanup };
#ifndef _WIN32
if (!isatty(1)) {
fprintf(stderr, "We need a terminal output\n");
--
1.7.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-03-20 8:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-20 8:05 [Qemu-devel] [PATCH] curses: Fix compilation error Stefan Weil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).