diff options
author | Thomas Wouters <thomas@python.org> | 2000-07-22 19:20:54 (GMT) |
---|---|---|
committer | Thomas Wouters <thomas@python.org> | 2000-07-22 19:20:54 (GMT) |
commit | 23c9e0024af99379ae517b016b874d57127e9a97 (patch) | |
tree | 8b9550548b9af667e20b8aaaae03ac54d38d6f70 /Parser/intrcheck.c | |
parent | f70ef4f8606f99744252a804229d53a4d97601c1 (diff) | |
download | cpython-23c9e0024af99379ae517b016b874d57127e9a97.zip cpython-23c9e0024af99379ae517b016b874d57127e9a97.tar.gz cpython-23c9e0024af99379ae517b016b874d57127e9a97.tar.bz2 |
Mass ANSIfication.
Work around intrcheck.c's desire to pass 'PyErr_CheckSignals' to
'Py_AddPendingCall' by providing a (static) wrapper function that has the
right number of arguments.
Diffstat (limited to 'Parser/intrcheck.c')
-rw-r--r-- | Parser/intrcheck.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/Parser/intrcheck.c b/Parser/intrcheck.c index 5278d76..34a3425 100644 --- a/Parser/intrcheck.c +++ b/Parser/intrcheck.c @@ -30,17 +30,17 @@ int Py_AddPendingCall(int (*func)(ANY *), ANY *arg); #include <io.h> void -PyOS_InitInterrupts() +PyOS_InitInterrupts(void) { } void -PyOS_FiniInterrupts() +PyOS_FiniInterrupts(void) { } int -PyOS_InterruptOccurred() +PyOS_InterruptOccurred(void) { _wyield(); } @@ -66,18 +66,18 @@ PyOS_InterruptOccurred() #include <go32.h> void -PyOS_InitInterrupts() +PyOS_InitInterrupts(void) { _go32_want_ctrl_break(1 /* TRUE */); } void -PyOS_FiniInterrupts() +PyOS_FiniInterrupts(void) { } int -PyOS_InterruptOccurred() +PyOS_InterruptOccurred(void) { return _go32_was_ctrl_break_hit(); } @@ -87,17 +87,17 @@ PyOS_InterruptOccurred() /* This might work for MS-DOS (untested though): */ void -PyOS_InitInterrupts() +PyOS_InitInterrupts(void) { } void -PyOS_FiniInterrupts() +PyOS_FiniInterrupts(void) { } int -PyOS_InterruptOccurred() +PyOS_InterruptOccurred(void) { int interrupted = 0; while (kbhit()) { @@ -136,21 +136,21 @@ PyOS_InterruptOccurred() static int interrupted; void -PyErr_SetInterrupt() +PyErr_SetInterrupt(void) { interrupted = 1; } -extern int PyErr_CheckSignals(); +extern int PyErr_CheckSignals(void); + +static int +checksignals_witharg(void * arg) +{ + return PyErr_CheckSignals(); +} -/* ARGSUSED */ static RETSIGTYPE -#if defined(_M_IX86) && !defined(__QNX__) -intcatcher(int sig) /* So the C compiler shuts up */ -#else /* _M_IX86 */ -intcatcher(sig) - int sig; /* Not used by required by interface */ -#endif /* _M_IX86 */ +intcatcher(int sig) { extern void Py_Exit(int); static char message[] = @@ -167,13 +167,13 @@ intcatcher(sig) break; } signal(SIGINT, intcatcher); - Py_AddPendingCall(PyErr_CheckSignals, NULL); + Py_AddPendingCall(checksignals_witharg, NULL); } -static RETSIGTYPE (*old_siginthandler)() = SIG_DFL; +static RETSIGTYPE (*old_siginthandler)(int) = SIG_DFL; void -PyOS_InitInterrupts() +PyOS_InitInterrupts(void) { if ((old_siginthandler = signal(SIGINT, SIG_IGN)) != SIG_IGN) signal(SIGINT, intcatcher); @@ -189,13 +189,13 @@ PyOS_InitInterrupts() } void -PyOS_FiniInterrupts() +PyOS_FiniInterrupts(void) { signal(SIGINT, old_siginthandler); } int -PyOS_InterruptOccurred() +PyOS_InterruptOccurred(void) { if (!interrupted) return 0; @@ -206,6 +206,6 @@ PyOS_InterruptOccurred() #endif /* !OK */ void -PyOS_AfterFork() +PyOS_AfterFork(void) { } |