Added 'C_C++/readline_rl_redisplay_function_NULL.c'

This commit is contained in:
anon 2024-12-10 20:39:01 +01:00
parent b26cd7c896
commit f2584f463a

@ -0,0 +1,17 @@
// @BAKE gcc $@ -o rl.out $(pkg-config --libs readline) -g
#include <stdio.h>
#include <readline/readline.h>
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);
}