diff options
Diffstat (limited to 'signal.c')
-rw-r--r-- | signal.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/signal.c b/signal.c index f53b2f90e832c..4f7444cab90be 100644 --- a/signal.c +++ b/signal.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2017 Mark Nudelman + * Copyright (C) 1984-2019 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. @@ -38,6 +38,7 @@ extern long jump_sline_fraction; /* * Interrupt signal handler. */ +#if MSDOS_COMPILER!=WIN32C /* ARGSUSED*/ static RETSIGTYPE u_interrupt(type) @@ -61,6 +62,7 @@ u_interrupt(type) if (reading) intread(); /* May longjmp */ } +#endif #ifdef SIGTSTP /* @@ -107,7 +109,8 @@ winch(type) /* * Handle CTRL-C and CTRL-BREAK keys. */ -#include "windows.h" +#define WIN32_LEAN_AND_MEAN +#include <windows.h> static BOOL WINAPI wbreak_handler(dwCtrlType) @@ -145,9 +148,10 @@ init_signals(on) /* * Set signal handlers. */ - (void) LSIGNAL(SIGINT, u_interrupt); #if MSDOS_COMPILER==WIN32C SetConsoleCtrlHandler(wbreak_handler, TRUE); +#else + (void) LSIGNAL(SIGINT, u_interrupt); #endif #ifdef SIGTSTP (void) LSIGNAL(SIGTSTP, stop); @@ -169,9 +173,10 @@ init_signals(on) /* * Restore signals to defaults. */ - (void) LSIGNAL(SIGINT, SIG_DFL); #if MSDOS_COMPILER==WIN32C SetConsoleCtrlHandler(wbreak_handler, FALSE); +#else + (void) LSIGNAL(SIGINT, SIG_DFL); #endif #ifdef SIGTSTP (void) LSIGNAL(SIGTSTP, SIG_DFL); @@ -196,7 +201,7 @@ init_signals(on) * A received signal cause a bit to be set in "sigs". */ public void -psignals() +psignals(VOID_PARAM) { int tsignals; @@ -250,8 +255,8 @@ psignals() wscroll = (sc_height + 1) / 2; calc_jump_sline(); calc_shift_count(); - screen_trashed = 1; } + screen_trashed = 1; } #endif if (tsignals & S_INTERRUPT) |