*/
/*
- Copyright (C) 2000-2003 Kern Sibbald and John Walker
+ Copyright (C) 1981-2004 Kern Sibbald and John Walker
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
if (!termtype) {
printf("Cannot get terminal type.\n");
- exit(1);
+ normode();
+ _exit(1);
}
if (tgetent(term_buffer, termtype) < 0) {
printf("Cannot get terminal termcap entry.\n");
- exit(1);
+ normode();
+ _exit(1);
}
t_width = t_height = -1;
t_width = tgetnum("co") - 1;
/* Interrupt caught here */
static void sigintcatcher(int sig)
{
- brkflg = 1;
+ brkflg++;
+ if (brkflg > 1) {
+ normode();
+ _exit(1);
+ }
signal(SIGINT, sigintcatcher);
}