From 2df91e7617e967377561c3c592909693c526e2c9 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Tue, 18 Apr 2006 08:19:42 +0000 Subject: [PATCH] * Handle CACA_EVENT_QUIT in the event test program. --- test/event.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/event.c b/test/event.c index c3aa3d7..c77eff8 100644 --- a/test/event.c +++ b/test/event.c @@ -118,12 +118,12 @@ static void print_event(int x, int y, caca_event_t *ev) case CACA_EVENT_KEY_PRESS: character = ev->data.key.c; cucul_printf(qq, x, y, "CACA_EVENT_KEY_PRESS 0x%02x (%c)", character, - (character > 0x20 && character < 0x80) ? character : '?'); + (character > 0x1f && character < 0x80) ? character : '?'); break; case CACA_EVENT_KEY_RELEASE: character = ev->data.key.c; cucul_printf(qq, x, y, "CACA_EVENT_KEY_RELEASE 0x%02x (%c)", character, - (character > 0x20 && character < 0x80) ? character : '?'); + (character > 0x1f && character < 0x80) ? character : '?'); break; case CACA_EVENT_MOUSE_MOTION: cucul_printf(qq, x, y, "CACA_EVENT_MOUSE_MOTION %u %u", @@ -141,6 +141,9 @@ static void print_event(int x, int y, caca_event_t *ev) cucul_printf(qq, x, y, "CACA_EVENT_RESIZE %u %u", ev->data.resize.w, ev->data.resize.h); break; + case CACA_EVENT_QUIT: + cucul_printf(qq, x, y, "CACA_EVENT_QUIT"); + break; default: cucul_printf(qq, x, y, "CACA_EVENT_UNKNOWN"); }