Kaydet (Commit) adf87693 authored tarafından Guido van Rossum's avatar Guido van Rossum

Separate readline initialization into new function PyOS_ReadlineInit().

For Dave Ascher's readline extensions.
üst d1705774
......@@ -100,14 +100,9 @@ my_fgets(buf, len, fp)
#endif /* WITH_READLINE */
char *
my_readline(prompt)
char *prompt;
void
PyOS_ReadlineInit()
{
int n;
char *p;
#ifdef WITH_READLINE
RETSIGTYPE (*old_inthandler)();
static int been_here;
if (!been_here) {
/* Force rebind of TAB to insert-tab */
......@@ -115,6 +110,18 @@ my_readline(prompt)
rl_bind_key('\t', rl_insert);
been_here++;
}
}
char *
my_readline(prompt)
char *prompt;
{
int n;
char *p;
#ifdef WITH_READLINE
RETSIGTYPE (*old_inthandler)();
PyOS_ReadlineInit();
old_inthandler = signal(SIGINT, onintr);
if (setjmp(jbuf)) {
#ifdef HAVE_SIGRELSE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment