1 /* **************************************************************** */
5 /* **************************************************************** */
7 #if defined (HAVE_CONFIG_H)
12 #include <sys/types.h>
14 #ifdef READLINE_LIBRARY
15 # include "readline.h"
18 # include <readline/readline.h>
19 # include <readline/history.h>
22 extern HIST_ENTRY **history_list ();
30 prompt = "readline$ ";
35 temp = readline (prompt);
41 /* If there is anything on the line, print it and remember it. */
44 fprintf (stderr, "%s\r\n", temp);
48 /* Check for `command' that we handle. */
49 if (strcmp (temp, "quit") == 0)
52 if (strcmp (temp, "list") == 0)
57 list = history_list ();
60 for (i = 0; list[i]; i++)
61 fprintf (stderr, "%d: %s\r\n", i, list[i]->line);