Added 'C_C++/readline_rl_redisplay_function_NULL.c'
This commit is contained in:
parent
b26cd7c896
commit
f2584f463a
17
C_C++/readline_rl_redisplay_function_NULL.c
Normal file
17
C_C++/readline_rl_redisplay_function_NULL.c
Normal file
@ -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);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user