| 1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| 2 |
<html><head> |
| 3 |
<title>liboop: oop_readline_register(), oop_readline_cancel()</title> |
| 4 |
<link rel="stylesheet" type="text/css" href="style.css"> |
| 5 |
</head><body> |
| 6 |
|
| 7 |
<h2>oop_readline_register(), oop_readline_cancel()</h2> |
| 8 |
|
| 9 |
<pre> |
| 10 |
#include <oop.h> |
| 11 |
#include <oop-rl.h> |
| 12 |
|
| 13 |
void oop_readline_register(oop_source *source); |
| 14 |
void oop_readline_cancel(oop_source *source); |
| 15 |
</pre> |
| 16 |
|
| 17 |
<h3>Arguments.</h3> |
| 18 |
|
| 19 |
<dl> |
| 20 |
<dt><b>oop_source *source</b> |
| 21 |
<dd>The event source to use. The adapter will use this event source to wait |
| 22 |
asynchronously for console input.<p> |
| 23 |
</dl> |
| 24 |
|
| 25 |
<h3>Description.</h3> |
| 26 |
|
| 27 |
<dl> |
| 28 |
<dt><b>oop_readline_register</b> |
| 29 |
<dd>Register a liboop <em>source</em> with the |
| 30 |
<a href="http://cnswww.cns.cwru.edu/~chet/readline/rltop.html">GNU Readline |
| 31 |
Library</a>. The adapter responds asynchronously to console input and notifies |
| 32 |
Readline when it arrives via rl_callback_read_char(). You should use the |
| 33 |
Readline <a href="http://cnswww.cns.cwru.edu/~chet/readline/readline.html#SEC38">alternate |
| 34 |
interface</a> to prompt the user and receive input.<p> |
| 35 |
|
| 36 |
Note well that Readline will |
| 37 |
<a href="http://cnswww.cns.cwru.edu/~chet/readline/readline.html#SEC40">install |
| 38 |
its own signal handlers</a> by default. Make sure to disable this behavior |
| 39 |
by setting rl_catch_signals to zero if you wish to manage signals with |
| 40 |
liboop.<p> |
| 41 |
|
| 42 |
<dt><b>oop_readline_cancel</b> |
| 43 |
<dd>Unregister liboop with Readline. After this is called, |
| 44 |
rl_readback_read_char() will no longer be invoked automatically.<p> |
| 45 |
</dl> |
| 46 |
|
| 47 |
<hr><a href="ref.html">liboop reference</a></body></html> |