1 /* **************************************************************** */
5 /* **************************************************************** */
9 #include "../readline.h"
10 #include "../history.h"
14 HIST_ENTRY **history_list ();
15 char *temp = (char *)NULL;
16 char *prompt = "readline$ ";
21 temp = readline (prompt);
27 /* If there is anything on the line, print it and remember it. */
30 fprintf (stderr, "%s\r\n", temp);
34 /* Check for `command' that we handle. */
35 if (strcmp (temp, "quit") == 0)
38 if (strcmp (temp, "list") == 0)
40 HIST_ENTRY **list = history_list ();
44 for (i = 0; list[i]; i++)
46 fprintf (stderr, "%d: %s\r\n", i, list[i]->line);