[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
An alternate interface is available to plain readline()
. Some
applications need to interleave keyboard I/O with file, device, or
window system I/O, typically by using a main loop to select()
on various file descriptors. To accomodate this need, readline can
also be invoked as a `callback' function from an event loop. There
are functions available to make this easy.
rl_callback_read_char()
, which will read the next
character from the current input source. If that character completes the
line, rl_callback_read_char
will invoke the lhandler
function saved by rl_callback_handler_install
to process the
line. EOF
is indicated by calling lhandler with a
NULL
line.