summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
41297e8)
These settings will be insufficient to configure prompting for the new
lexer, which is able to detect more special cases in syntax and report
them through the prompt. (However, if users actually want this feature,
then we could add it; it's not difficult.)
PSPP NEWS -- history of user-visible changes.
PSPP NEWS -- history of user-visible changes.
-Time-stamp: <2010-11-21 11:14:27 blp>
+Time-stamp: <2010-11-21 11:58:30 blp>
Copyright (C) 1996-9, 2000, 2008, 2009, 2010 Free Software Foundation, Inc.
See the end for copying conditions.
Copyright (C) 1996-9, 2000, 2008, 2009, 2010 Free Software Foundation, Inc.
See the end for copying conditions.
* The HOST command has been updated to use more modern syntax.
* The HOST command has been updated to use more modern syntax.
- * The SET and SHOW commands no longer support the ENDCMD and NULLINE
- subcommands. The defaults are now the only supported values.
+ * The SET and SHOW commands no longer support the ENDCMD, NULLINE,
+ PROMPT, CPROMPT, and DPROMPT subcommands. The defaults are now the
+ only supported values.
Changes from 0.7.2 to 0.7.3:
Changes from 0.7.2 to 0.7.3:
/RRB=@{NATIVE,ISL,ISB,IDL,IDB,VF,VD,VG,ZS,ZL@}
(interaction)
/RRB=@{NATIVE,ISL,ISB,IDL,IDB,VF,VD,VG,ZS,ZL@}
(interaction)
- /CPROMPT='cprompt_string'
- /DPROMPT='dprompt_string'
/MXERRS=max_errs
/MXWARNS=max_warnings
/MXERRS=max_errs
/MXWARNS=max_warnings
/WORKSPACE=workspace_size
(program execution)
/WORKSPACE=workspace_size
(program execution)
online user. The interaction subcommands are
@table @asis
online user. The interaction subcommands are
@table @asis
-@item CPROMPT
-The command continuation prompt. The default is @samp{ > }.
-
-@item DPROMPT
-Prompt used when expecting data input within @cmd{BEGIN DATA} (@pxref{BEGIN
-DATA}). The default is @samp{data> }.
-
@item MXERRS
The maximum number of errors before PSPP halts processing of the current
command file. The default is 50.
@item MXERRS
The maximum number of errors before PSPP halts processing of the current
command file. The default is 50.
No warnings will be issued, except a single initial warning advising the user
that warnings will not be given.
The default value is 100.
No warnings will be issued, except a single initial warning advising the user
that warnings will not be given.
The default value is 100.
-
-@item PROMPT
-The command prompt. The default is @samp{PSPP> }.
@end table
Program execution subcommands control the way that PSPP commands
@end table
Program execution subcommands control the way that PSPP commands
-/* Current prompts in each style. */
-static char *prompts[PROMPT_CNT];
-
/* Current prompting style. */
static enum prompt_style current_style;
/* Current prompting style. */
static enum prompt_style current_style;
-/* Initializes prompts. */
-void
-prompt_init (void)
-{
- prompts[PROMPT_FIRST] = xstrdup ("PSPP> ");
- prompts[PROMPT_LATER] = xstrdup (" > ");
- prompts[PROMPT_DATA] = xstrdup ("data> ");
- current_style = PROMPT_FIRST;
-}
-
-/* Frees prompts. */
-void
-prompt_done (void)
-{
- int i;
-
- for (i = 0; i < PROMPT_CNT; i++)
- {
- free (prompts[i]);
- prompts[i] = NULL;
- }
-}
-
/* Gets the command prompt for the given STYLE. */
const char *
prompt_get (enum prompt_style style)
{
/* Gets the command prompt for the given STYLE. */
const char *
prompt_get (enum prompt_style style)
{
- assert (style < PROMPT_CNT);
- return prompts[style];
-}
+ switch (style)
+ {
+ case PROMPT_FIRST:
+ return "PSPP> ";
-/* Sets the given STYLE's prompt to STRING. */
-void
-prompt_set (enum prompt_style style, const char *string)
-{
- assert (style < PROMPT_CNT);
- free (prompts[style]);
- prompts[style] = xstrdup (string);
+ case PROMPT_LATER:
+ return " > ";
+
+ case PROMPT_DATA:
+ return "data> ";
+
+ case PROMPT_CNT:
+ NOT_REACHED ();
+ }
+ NOT_REACHED ();
}
/* Sets STYLE as the current prompt style. */
}
/* Sets STYLE as the current prompt style. */
/* PSPP - a program for statistical analysis.
/* PSPP - a program for statistical analysis.
- Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997-9, 2000, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-
-void prompt_init (void);
-void prompt_done (void);
-
enum prompt_style prompt_get_style (void);
enum prompt_style prompt_get_style (void);
-
-const char *prompt_get (enum prompt_style);
-void prompt_set (enum prompt_style, const char *);
void prompt_set_style (enum prompt_style);
void prompt_set_style (enum prompt_style);
+const char *prompt_get (enum prompt_style);
#include <language/command.h>
#include <language/lexer/format-parser.h>
#include <language/lexer/lexer.h>
#include <language/command.h>
#include <language/lexer/format-parser.h>
#include <language/lexer/lexer.h>
-#include <language/prompt.h>
#include <libpspp/compiler.h>
#include <libpspp/copyleft.h>
#include <libpspp/float-format.h>
#include <libpspp/compiler.h>
#include <libpspp/copyleft.h>
#include <libpspp/float-format.h>
cce=string;
compression=compress:on/off;
cpi=integer "x>0" "%s must be greater than 0";
cce=string;
compression=compress:on/off;
cpi=integer "x>0" "%s must be greater than 0";
epoch=custom;
errors=custom;
format=custom;
epoch=custom;
errors=custom;
format=custom;
mxmemory=integer;
mxwarns=integer;
printback=custom;
mxmemory=integer;
mxwarns=integer;
printback=custom;
results=custom;
rib=rib:msbfirst/lsbfirst/vax/native;
rrb=rrb:native/isl/isb/idl/idb/vf/vd/vg/zs/zl;
results=custom;
rib=rib:msbfirst/lsbfirst/vax/native;
rrb=rrb:native/isl/isb/idl/idb/vf/vd/vg/zs/zl;
if (cmd.sbc_cce)
settings_set_cc ( cmd.s_cce, FMT_CCE);
if (cmd.sbc_cce)
settings_set_cc ( cmd.s_cce, FMT_CCE);
- if (cmd.sbc_prompt)
- prompt_set (PROMPT_FIRST, cmd.s_prompt);
- if (cmd.sbc_cprompt)
- prompt_set (PROMPT_LATER, cmd.s_cprompt);
- if (cmd.sbc_dprompt)
- prompt_set (PROMPT_DATA, cmd.s_dprompt);
-
if (cmd.sbc_decimal)
settings_set_decimal_char (cmd.dec == STC_DOT ? '.' : ',');
if (cmd.sbc_decimal)
settings_set_decimal_char (cmd.dec == STC_DOT ? '.' : ',');
#include "gsl/gsl_errno.h"
#include "language/command.h"
#include "language/lexer/lexer.h"
#include "gsl/gsl_errno.h"
#include "language/command.h"
#include "language/lexer/lexer.h"
-#include "language/prompt.h"
#include "language/syntax-file.h"
#include "libpspp/argv-parser.h"
#include "libpspp/compiler.h"
#include "language/syntax-file.h"
#include "libpspp/argv-parser.h"
#include "libpspp/compiler.h"
fh_init ();
the_source_stream = create_source_stream ();
fh_init ();
the_source_stream = create_source_stream ();
readln_initialize ();
settings_init ();
terminal_check_size ();
readln_initialize ();
settings_init ();
terminal_check_size ();
fh_done ();
lex_destroy (the_lexer);
destroy_source_stream (the_source_stream);
fh_done ();
lex_destroy (the_lexer);
destroy_source_stream (the_source_stream);
readln_uninitialize ();
output_close ();
msg_ui_done ();
readln_uninitialize ();
output_close ();
msg_ui_done ();