1 #include "adventure.h" 2 3 /* this in only needed for readline */ 4 #include <stdio.h> 5 6 #include <readline/history.h> 7 #include <readline/readline.h> 8 9 char *line = NULL; 10 11 int 12 getinput() 13 { 14 line = readline(PROMPT); 15 if (line && *line) 16 add_history(line); 17 return line != NULL; 18 }