From f2584f463a163544eb31bdd5111a12b11240e94f Mon Sep 17 00:00:00 2001 From: anon Date: Tue, 10 Dec 2024 20:39:01 +0100 Subject: [PATCH] Added 'C_C++/readline_rl_redisplay_function_NULL.c' --- C_C++/readline_rl_redisplay_function_NULL.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 C_C++/readline_rl_redisplay_function_NULL.c diff --git a/C_C++/readline_rl_redisplay_function_NULL.c b/C_C++/readline_rl_redisplay_function_NULL.c new file mode 100644 index 0000000..7fc5938 --- /dev/null +++ b/C_C++/readline_rl_redisplay_function_NULL.c @@ -0,0 +1,17 @@ +// @BAKE gcc $@ -o rl.out $(pkg-config --libs readline) -g +#include +#include + +int main(void) { + /* Variable: rl_voidfunc_t * rl_redisplay_function + * If non-zero, Readline will call indirectly through this pointer to update + * the display with the current contents of the editing buffer. + * By default, it is set to rl_redisplay, + * the default Readline redisplay function (see Redisplay). + */ + rl_redisplay_function = NULL; + // The above documentation quote is correct, but forgets to add "else segfault" + + char * input = readline("> "); + puts(input); +}