diff --git a/examples/excallback.c b/examples/excallback.c index 3d4bb18..a2d24af 100644 --- a/examples/excallback.c +++ b/examples/excallback.c @@ -40,6 +40,10 @@ Jeff #include #include +#ifdef HAVE_STDLIB_H +#include +#endif + #ifdef HAVE_UNISTD_H #include #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;