1 | /* 'info readline' shows an example with these three headers */ |
2 | |
3 | #include <stdio.h> /* readline needs this, issue #21 */ |
4 | #include <readline/readline.h> |
5 | #include <readline/history.h> |
6 | |
7 | static int test_event_hook(void) { |
8 | return 0; |
9 | } |
10 | |
11 | int main(void) { |
12 | char *line = readline(""); |
13 | |
14 | /* Ensure readline version is recent enough. |
15 | This line will break the build otherwise: https://git.io/vhZ3B */ |
16 | rl_event_hook = test_event_hook; |
17 | |
18 | return 0; |
19 | } |