I have had problems with using the gnu readline with jython under linux
systems. It would work fine except when the window was resized and then
everything would hang and I would have to exit with Control-C causing a
JavaVM panic in native code type of exit. This is with various linux
distributions though all of them were gcc 2.9X based.
Because of this problem and the distribution incompatibility of gnu readline
with jython, I tried getline. The compile went ok but testing and usage
revealed the arrow keys would print out 'A','D',... This was under KDE
Konsole terminal. From experimentation and debugging if I made the following
changes,
modified src/native/Makefile: add unix symbol
CFLAGS=-fPIC -DPOSIX -Dunix
CC = gcc -g
modified src/native/getline.c: add c=='O' option
case '\033': /* ansi arrow keys */
c = gl_getc();
if (c == '['||c=='O') {
then it worked fine. I am not too familiar with unix terminal i/o. Do these
seem like reasonable changes for getline or any hint as to what might be
going on?
thanks,
rob andre
|