Mail Archives: djgpp/1998/05/26/22:46:51
Nate Eldredge <nate AT cartsys DOT com> writes:
> At 12:30 5/25/1998 GMT, Ruiter de M wrote:
>
> >Maybe you should take the readline-lib from bash. I noticed it is much
> >better that the version in gdb416, for instance arrow keys are
> >working. Daisuke Aoyama may have made an even better version at this
> >time.
>
> I tried it, but it takes a lot more code to work (it uses a termcap
> emulation library), and I can't see any real advantages. The arrow keys
> don't work for me (the latest bash1147s from Simtelnet), though as a slight
> plus they do nothing instead of generating bogus characters.
Enabling arrow keys requires some work. You should call some function
(I don't remember its name, something like termios_enable_arrow_keys) in
your program. Compiling standalone readline from bash is not easy. It is
better to compile it together with bash, then it defines USE_BASH? and
some things are different from standalone version. I wonder if standalone
GNU readline will understand arrow keys, if termios_enable_arrow_keys
is used (this function is in bash sources somewhere?).
And when editing long line, readline from bash scrolls one line
instead of wrapping to the next. This is annoying, when you have to scroll
back and forth to see what you have typed already.
I have a project which uses readline from bash, if you are interested
to see how it is used, I can send it by mail or place on WWW.
BTW, I don't remember exactly, but I think GNU readline can be compiled
with DJGPP (maybe together with termios lib from bash).
- Raw text -