aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeetz0r <peter@haas-en-berg.nl>2011-12-06 10:54:48 +0100
committerPeetz0r <peter@haas-en-berg.nl>2011-12-06 10:54:48 +0100
commit187a214e50f283eaf2f7dbe9985507a89b5a28b5 (patch)
treec21c39fb93656fa291fd6153f14847601b2cd173
parent322de459957620eef0cf8cf6d76c7bed4a63879b (diff)
downloadnyancat-187a214e50f283eaf2f7dbe9985507a89b5a28b5.tar.gz
Clear the screen when done (standalone, not telnet).
-rw-r--r--src/nyancat.c4
1 files 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);
}