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