oop_readline_register(), oop_readline_cancel()

#include <oop.h>
#include <oop-rl.h>

void oop_readline_register(oop_source *source);
void oop_readline_cancel(oop_source *source);


oop_source *source
The event source to use. The adapter will use this event source to wait asynchronously for console input.


Register a liboop source with the GNU Readline Library. The adapter responds asynchronously to console input and notifies Readline when it arrives via rl_callback_read_char(). You should use the Readline alternate interface to prompt the user and receive input.

Note well that Readline will install its own signal handlers by default. Make sure to disable this behavior by setting rl_catch_signals to zero if you wish to manage signals with liboop.

Unregister liboop with Readline. After this is called, rl_readback_read_char() will no longer be invoked automatically.

liboop reference