Linux Programming

Christoph Doerbeck doerbeck at dma.isg.mot.com
Wed Oct 7 08:53:13 EDT 1998


>    From: Jerry A Clabaugh <JerryC at world.std.com>
> 
>    I've only started learning Linux/UNIX programming in the last year, 
>    having worked in the past on VAX, Pr1mos, Win16 and Win32, and I'm
>    coming along, but there's one thing I can't find info on anywhere:
>    How do you implement command-line recall, like bash does when
>    you hit up-arrow.
> 
> You probably have to capture all keystrokes and implement everything
> yourself.  But you can also use the FSF library that bash uses to do
> it; I believe it's called "readline".  Check the bash sources...
> 

Be careful about binding your application directly to specific key
codes.  I'm not a programmer either, but I believe what you are looking
for needs to be interfaced through terminfo/termcap.

Termcap/terminfo are databases of terminal types, and if you build
your application with these ...  now I don't know what the word is ...
includes/libraries (?) ... anyway, have a look at /usr/include/term.h,
termio.h and termios.h (from Solaris 2.5.1, but linux should have 'em too)

Any comments from the peanut gallery?

- Christoph


***
Subcription/unsubscription/info requests: send e-mail with subject of
"subscribe", "unsubscribe", or "info" to discuss-request at blu.org



More information about the Discuss mailing list