excallback.c: Fix compilation errors against readline

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson 2017-12-02 18:54:29 +01:00
parent 69d9e549a0
commit a9824655ee

View File

@ -40,6 +40,10 @@ Jeff
#include <stdio.h>
#include <sys/types.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
@ -114,7 +118,7 @@ main()
exit(1);
}
rl_add_defun("change-prompt", change_prompt, CTRL('t'));
// rl_add_defun("change-prompt", change_prompt, CTRL('t'));
rl_callback_handler_install(get_prompt(), process_line);
while(1) {
@ -136,7 +140,7 @@ void
process_line(char *line)
{
if( line == NULL ) {
fprintf(stderr, "\n", line);
fprintf(stderr, "\n");
/* reset the old terminal setting before exiting */
term.c_lflag = old_lflag;