diff --git a/Python-2.7.13/Modules/readline.c b/Python-2.7.13/Modules/readline.c index 68502c02de..f9caa23ae9 100644 --- a/Python-2.7.13/Modules/readline.c +++ b/Python-2.7.13/Modules/readline.c @@ -11,6 +11,39 @@ #include #include +/* ------------------------------------------------------------------------- */ + +/* OVM_MAIN: This section copied from autotool-generated pyconfig.h. + * We're not detecting any of it in Oil's configure script. They are for + * ancient readline versions. + * */ + +/* Define if you have readline 2.1 */ +#define HAVE_RL_CALLBACK 1 + +/* Define if you can turn off readline's signal handling. */ +#define HAVE_RL_CATCH_SIGNAL 1 + +/* Define if you have readline 2.2 */ +#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1 + +/* Define if you have readline 4.0 */ +#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1 + +/* Define if you have readline 4.2 */ +#define HAVE_RL_COMPLETION_MATCHES 1 + +/* Define if you have rl_completion_suppress_append */ +#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1 + +/* Define if you have readline 4.0 */ +#define HAVE_RL_PRE_INPUT_HOOK 1 + +/* Define if you have readline 4.0 */ +#define HAVE_RL_RESIZE_TERMINAL 1 + +/* ------------------------------------------------------------------------- */ + #if defined(HAVE_SETLOCALE) /* GNU readline() mistakenly sets the LC_CTYPE locale. * This is evil. Only the user or the app's main() should do this! @@ -891,7 +924,7 @@ flex_complete(const char *text, int start, int end) // Removed two #ifdefs because our frozen pyconfig.h doesn't have them. That // is because I froze it inside Alpine Linux, which doesn't have readline. // -// This fixes a bug where we would get extra spaces after completionS (only +// This fixes a bug where we would get extra spaces after completions (only // detectable interactively). // // I'm not sure why the bug didn't show up until 0.6.pre11. It may have been