aboutsummaryrefslogtreecommitdiff
path: root/signal.c
diff options
context:
space:
mode:
Diffstat (limited to 'signal.c')
-rw-r--r--signal.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/signal.c b/signal.c
index 7a0786137d5a..42fb73d9497d 100644
--- a/signal.c
+++ b/signal.c
@@ -41,7 +41,7 @@ extern long jump_sline_fraction;
static RETSIGTYPE u_interrupt(int type)
{
(void) type;
- bell();
+ lbell();
#if OS2
LSIGNAL(SIGINT, SIG_ACK);
#endif
@@ -59,6 +59,7 @@ static RETSIGTYPE u_interrupt(int type)
#if HILITE_SEARCH
set_filter_pattern(NULL, 0);
#endif
+ polling_ok();
intio();
}
#endif
@@ -91,10 +92,10 @@ static RETSIGTYPE stop(int type)
* "Window" change handler
*/
/* ARGSUSED*/
-public RETSIGTYPE winch(int type)
+public RETSIGTYPE lwinch(int type)
{
(void) type;
- LSIGNAL(SIG_LESSWINDOW, winch);
+ LSIGNAL(SIG_LESSWINDOW, lwinch);
#if LESSTEST
/*
* Ignore window changes during lesstest.
@@ -180,10 +181,10 @@ public void init_signals(int on)
(void) LSIGNAL(SIGTSTP, !secure_allow(SF_STOP) ? SIG_IGN : stop);
#endif
#ifdef SIGWINCH
- (void) LSIGNAL(SIGWINCH, winch);
+ (void) LSIGNAL(SIGWINCH, lwinch);
#endif
#ifdef SIGWIND
- (void) LSIGNAL(SIGWIND, winch);
+ (void) LSIGNAL(SIGWIND, lwinch);
#endif
#ifdef SIGQUIT
(void) LSIGNAL(SIGQUIT, SIG_IGN);
@@ -191,6 +192,9 @@ public void init_signals(int on)
#ifdef SIGTERM
(void) LSIGNAL(SIGTERM, terminate);
#endif
+#ifdef SIGHUP
+ (void) LSIGNAL(SIGHUP, terminate);
+#endif
#ifdef SIGUSR1
(void) LSIGNAL(SIGUSR1, sigusr1);
#endif
@@ -219,6 +223,9 @@ public void init_signals(int on)
#ifdef SIGTERM
(void) LSIGNAL(SIGTERM, SIG_DFL);
#endif
+#ifdef SIGHUP
+ (void) LSIGNAL(SIGHUP, SIG_DFL);
+#endif
#ifdef SIGUSR1
(void) LSIGNAL(SIGUSR1, SIG_DFL);
#endif
@@ -247,7 +254,7 @@ public void psignals(void)
LSIGNAL(SIGTTOU, SIG_IGN);
#endif
clear_bot();
- deinit();
+ term_deinit();
flush();
raw_mode(0);
#ifdef SIGTTOU
@@ -263,7 +270,7 @@ public void psignals(void)
*/
LSIGNAL(SIGTSTP, stop);
raw_mode(1);
- init();
+ term_init();
screen_trashed();
tsignals |= S_WINCH;
}
@@ -279,10 +286,7 @@ public void psignals(void)
old_height = sc_height;
get_term();
if (sc_width != old_width || sc_height != old_height)
- {
- wscroll = (sc_height + 1) / 2;
screen_size_changed();
- }
screen_trashed();
}
#endif
@@ -290,5 +294,9 @@ public void psignals(void)
{
if (quit_on_intr)
quit(QUIT_INTERRUPT);
+ getcc_clear();
+#if MSDOS_COMPILER==WIN32C
+ win32_getch_clear();
+#endif
}
}