projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added a summary introduction to INSTALL, to try to make it less frightening to inexpe...
[pspp]
/
src
/
ui
/
terminal
/
terminal-reader.c
diff --git
a/src/ui/terminal/terminal-reader.c
b/src/ui/terminal/terminal-reader.c
index 7c80d27b39df747579f6ba1e20599e8db9757c81..db561a9a2fde0b7e26452579eec8525cc32f43e9 100644
(file)
--- a/
src/ui/terminal/terminal-reader.c
+++ b/
src/ui/terminal/terminal-reader.c
@@
-153,6
+153,36
@@
terminal_reader_create (void)
return &r->reader;
}
\f
return &r->reader;
}
\f
+
+
+static const char *
+readline_prompt (enum prompt_style style)
+{
+ switch (style)
+ {
+ case PROMPT_FIRST:
+ return "PSPP> ";
+
+ case PROMPT_LATER:
+ return " > ";
+
+ case PROMPT_DATA:
+ return "data> ";
+
+ case PROMPT_COMMENT:
+ return "comment> ";
+
+ case PROMPT_DOCUMENT:
+ return "document> ";
+
+ case PROMPT_DO_REPEAT:
+ return "DO REPEAT> ";
+ }
+
+ NOT_REACHED ();
+}
+
+
#if HAVE_READLINE
#include <readline/readline.h>
#include <readline/history.h>
#if HAVE_READLINE
#include <readline/readline.h>
#include <readline/history.h>
@@
-189,33
+219,6
@@
readline_done (void)
free (history_file);
}
free (history_file);
}
-static const char *
-readline_prompt (enum prompt_style style)
-{
- switch (style)
- {
- case PROMPT_FIRST:
- return "PSPP> ";
-
- case PROMPT_LATER:
- return " > ";
-
- case PROMPT_DATA:
- return "data> ";
-
- case PROMPT_COMMENT:
- return "comment> ";
-
- case PROMPT_DOCUMENT:
- return "document> ";
-
- case PROMPT_DO_REPEAT:
- return "DO REPEAT> ";
- }
-
- NOT_REACHED ();
-}
-
static struct substring
readline_read (enum prompt_style style)
{
static struct substring
readline_read (enum prompt_style style)
{
@@
-295,7
+298,7
@@
readline_done (void)
static struct substring
readline_read (enum prompt_style style)
{
static struct substring
readline_read (enum prompt_style style)
{
- const char *prompt =
prompt_ge
t (style);
+ const char *prompt =
readline_promp
t (style);
struct string line;
fputs (prompt, stdout);
struct string line;
fputs (prompt, stdout);