[Python-checkins] python/dist/src/Modules readline.c,2.54,2.55

gvanrossum@users.sourceforge.net gvanrossum@users.sourceforge.net
Mon, 30 Dec 2002 08:25:43 -0800


Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1:/tmp/cvs-serv13946/Modules

Modified Files:
	readline.c 
Log Message:
Patch 659834 by Magnus Lie Hetland:

Check for readline 2.2 features.  This should make it possible to
compile readline.c again with GNU readline versions 2.0 or 2.1; this
ability was removed in readline.c rev. 2.49.  Apparently the older
versions are still in widespread deployment on older Solaris
installations.  With an older readline, completion behavior is subtly
different (a space is always added).



Index: readline.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/readline.c,v
retrieving revision 2.54
retrieving revision 2.55
diff -C2 -d -r2.54 -r2.55
*** readline.c	26 Oct 2002 14:39:09 -0000	2.54
--- readline.c	30 Dec 2002 16:25:41 -0000	2.55
***************
*** 575,579 ****
--- 575,581 ----
  		strdup(" \t\n`~!@#$%^&*()-=+[{]}\\|;:'\",<>/?");
  		/* All nonalphanums except '.' */
+ #ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER
  	rl_completion_append_character ='\0';
+ #endif
  
  	begidx = PyInt_FromLong(0L);
***************
*** 627,631 ****
--- 629,635 ----
                  rl_instream = sys_stdin;
                  rl_outstream = sys_stdout;
+ #ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER
                  rl_prep_terminal (1);
+ #endif
          }