From 187a214e50f283eaf2f7dbe9985507a89b5a28b5 Mon Sep 17 00:00:00 2001 From: Peetz0r Date: Tue, 6 Dec 2011 10:54:48 +0100 Subject: Clear the screen when done (standalone, not telnet). --- src/nyancat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nyancat.c b/src/nyancat.c index e65576c..3cbca75 100644 --- a/src/nyancat.c +++ b/src/nyancat.c @@ -118,10 +118,10 @@ int digits(int val) { /* * In the standalone mode, we want to handle an interrupt signal - * (^C) so that we can restore the cursor. + * (^C) so that we can restore the cursor and clear the terminal. */ void SIGINT_handler(int sig){ - printf("\033[?25h\033[0m"); + printf("\033[?25h\033[0m\033[H\033[2J"); exit(0); } -- cgit v1.2.3