1 /* **************************************************************** */
5 /* **************************************************************** */
8 * Remove the next line if you're compiling this against an installed
11 #define READLINE_LIBRARY
13 #if defined (HAVE_CONFIG_H)
18 #include <sys/types.h>
24 HIST_ENTRY **history_list ();
25 char *temp = (char *)NULL;
26 char *prompt = "readline$ ";
31 temp = readline (prompt);
37 /* If there is anything on the line, print it and remember it. */
40 fprintf (stderr, "%s\r\n", temp);
44 /* Check for `command' that we handle. */
45 if (strcmp (temp, "quit") == 0)
48 if (strcmp (temp, "list") == 0)
50 HIST_ENTRY **list = history_list ();
54 for (i = 0; list[i]; i++)
56 fprintf (stderr, "%d: %s\r\n", i, list[i]->line);