summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMyles Borins <myles.borins@gmail.com>2011-12-02 01:30:26 -0500
committerMyles Borins <myles.borins@gmail.com>2011-12-02 01:30:26 -0500
commitf95145fc4fcaadda557b18f6bd9d3b229cb3b2de (patch)
treec3bb0f547b65fc4098ce13ec1e2daa3ec14e9860
parentc0487d5ca476da43c7869261b031c119cc2908bb (diff)
downloadnyancat-f95145fc4fcaadda557b18f6bd9d3b229cb3b2de.tar.gz
Added SIGINT_handler to re-initialize cursor for reset on non-sane terminal emulators
-rw-r--r--src/nyancat.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/nyancat.c b/src/nyancat.c
index cd109de..3b07afb 100644
--- a/src/nyancat.c
+++ b/src/nyancat.c
@@ -853,10 +853,16 @@ char * output = " ";
#define MIN_COL 10
#define MAX_COL 50
+void SIGINT_handler(int sig){
+ printf("\033[?25h");
+ exit(0);
+}
+
int main(int argc, char ** argv) {
printf("\033[H\033[2J");
fflush(stdout);
int always_escape = 0;
+ signal(SIGINT, SIGINT_handler);
try_again:
printf("Select a mode:\n");
printf(" 1 xterm 256-color compatible mode (best)\n");
@@ -1025,6 +1031,5 @@ try_again:
printf("\033[H");
usleep(90000);
}
-
return 0;
}
>-12805/+69312 Data updated according with https://portalbsd.com.br/. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> 2021-04-30Remove legacy entriesMauro Carvalho Chehab129-24898/+0 There are several entries that used to be at Lyngsat. Several of them were merged with other entries. On others, there's no TV signal anymore. So, drop them. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> 2021-04-30Add new satellites from LyngsatMauro Carvalho Chehab75-21/+29721 Those are are new satellite descriptions that didn't use to exist on Lyngsat. Add them. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> 2021-04-30Rename a few satellites with two names and update frequenciesMauro Carvalho Chehab2-283/+182 Those two satellites have two names. Use Just one of them. While here, update their frequencies from Lyngsat. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> 2021-04-30Update frequencies from LyngsatMauro Carvalho Chehab188-12304/+12666 Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>