[PYTHON MATRIX-SIG] Gist and GNU readline

Emmanuel Viennet viennet@ura1507.univ-paris13.fr
Sun, 2 Jun 1996 14:08:52 +0100


 Hi,

GIST seems to be a cool plotting package.
For those like me who can't live without the line editing facilities
from GNU readline, here is a useful patch. I did not make extensive
tests, but it seems to work.

Apply the following diff to the file gistCmodule.c
from  ftp-icf.llnl.gov:/pub/python/busby/pygist-1.0.tgz
Then configure python with readline enabled and recompile.

13a14,22
> #ifdef WITH_READLINE
> #  error Sorry: The Gist module cannot presently co-exist with Readline.
> #endif
> 
> /* (Actually, Gist probably *can* co-exist with readline, by using the
>  * trick of replacing read() with a gist_read(), but I haven't had a chance
>  * to review the readline source yet.)
>  */
> 
82,87d90
< /* GNU readline callback (E.viennet) */ 
< #ifdef WITH_READLINE
< static int readline_event_hook(void);
< extern  int (*rl_event_hook)(); /* from readline.h */
< #endif
< 
409d411
< #ifndef WITH_READLINE
420,422d421
< #else /* GNU READLINE */
<   rl_event_hook = readline_event_hook;
< #endif
521d519
< #ifndef WITH_READLINE
524d521
< #endif
1429,1436d1425
< 
< #ifdef WITH_READLINE
< static int readline_event_hook(void) {
<   do YGDispatch ();
<   while (!yPendingIn);
<   return 1;
< }
< #endif

-- 
Emmanuel Viennet: <viennet@ura1507.univ-paris13.fr>
LIPN - Institut Galilee - Universite Paris-Nord       
93430 Villetaneuse -  France

=================
MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
=================