summaryrefslogtreecommitdiffstats
path: root/Modules/readline.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/readline.c')
-rw-r--r--Modules/readline.c47
1 files changed, 1 insertions, 46 deletions
diff --git a/Modules/readline.c b/Modules/readline.c
index 7d32c21..f4a5e5a 100644
--- a/Modules/readline.c
+++ b/Modules/readline.c
@@ -7,7 +7,6 @@
/* Standard definitions */
#include "Python.h"
#include <stddef.h>
-#include <setjmp.h>
#include <signal.h>
#include <errno.h>
#include <sys/time.h>
@@ -1180,10 +1179,7 @@ setup_readline(readlinestate *mod_state)
/* Wrapper around GNU readline that handles signals differently. */
-
-#if defined(HAVE_RL_CALLBACK) && defined(HAVE_SELECT)
-
-static char *completed_input_string;
+static char *completed_input_string;
static void
rlhandler(char *text)
{
@@ -1262,47 +1258,6 @@ readline_until_enter_or_signal(const char *prompt, int *signal)
}
-#else
-
-/* Interrupt handler */
-
-static jmp_buf jbuf;
-
-/* ARGSUSED */
-static void
-onintr(int sig)
-{
- longjmp(jbuf, 1);
-}
-
-
-static char *
-readline_until_enter_or_signal(const char *prompt, int *signal)
-{
- PyOS_sighandler_t old_inthandler;
- char *p;
-
- *signal = 0;
-
- old_inthandler = PyOS_setsig(SIGINT, onintr);
- if (setjmp(jbuf)) {
-#ifdef HAVE_SIGRELSE
- /* This seems necessary on SunOS 4.1 (Rasmus Hahn) */
- sigrelse(SIGINT);
-#endif
- PyOS_setsig(SIGINT, old_inthandler);
- *signal = 1;
- return NULL;
- }
- rl_event_hook = PyOS_InputHook;
- p = readline(prompt);
- PyOS_setsig(SIGINT, old_inthandler);
-
- return p;
-}
-#endif /*defined(HAVE_RL_CALLBACK) && defined(HAVE_SELECT) */
-
-
static char *
call_readline(FILE *sys_stdin, FILE *sys_stdout, const char *prompt)
{