projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove the PROMPT, CPROMPT, and DPROMPT settings.
[pspp]
/
src
/
language
/
utilities
/
set.q
diff --git
a/src/language/utilities/set.q
b/src/language/utilities/set.q
index 3883f09649e4f18797526b6bce8ffb585d7a0fc4..5fa7406164bcbe921312a34ce372ff629956c7d8 100644
(file)
--- a/
src/language/utilities/set.q
+++ b/
src/language/utilities/set.q
@@
-32,7
+32,6
@@
#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>
@@
-70,10
+69,7
@@
int tgetnum (const char *);
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";
- cprompt=string;
decimal=dec:dot/comma;
decimal=dec:dot/comma;
- dprompt=string;
- endcmd=string "x==1" "one character long";
epoch=custom;
errors=custom;
format=custom;
epoch=custom;
errors=custom;
format=custom;
@@
-97,9
+93,7
@@
int tgetnum (const char *);
mxloops=integer "x >=1" "%s must be at least 1";
mxmemory=integer;
mxwarns=integer;
mxloops=integer "x >=1" "%s must be at least 1";
mxmemory=integer;
mxwarns=integer;
- nulline=null:on/off;
printback=custom;
printback=custom;
- prompt=string;
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;
@@
-148,26
+142,15
@@
cmd_set (struct lexer *lexer, struct dataset *ds)
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 ? '.' : ',');
- if (cmd.sbc_endcmd)
- settings_set_endcmd (cmd.s_endcmd[0]);
if (cmd.sbc_include)
settings_set_include (cmd.inc == STC_ON);
if (cmd.sbc_mxerrs)
settings_set_max_messages (MSG_S_ERROR, cmd.n_mxerrs[0]);
if (cmd.sbc_mxwarns)
settings_set_max_messages (MSG_S_WARNING, cmd.n_mxwarns[0]);
if (cmd.sbc_include)
settings_set_include (cmd.inc == STC_ON);
if (cmd.sbc_mxerrs)
settings_set_max_messages (MSG_S_ERROR, cmd.n_mxerrs[0]);
if (cmd.sbc_mxwarns)
settings_set_max_messages (MSG_S_WARNING, cmd.n_mxwarns[0]);
- if (cmd.sbc_nulline)
- settings_set_nulline (cmd.null == STC_ON);
if (cmd.sbc_rib)
settings_set_input_integer_format (stc_to_integer_format (cmd.rib));
if (cmd.sbc_rrb)
if (cmd.sbc_rib)
settings_set_input_integer_format (stc_to_integer_format (cmd.rib));
if (cmd.sbc_rrb)
@@
-383,27
+366,26
@@
static int
stc_custom_locale (struct lexer *lexer, struct dataset *ds UNUSED,
struct cmd_set *cmd UNUSED, void *aux UNUSED)
{
stc_custom_locale (struct lexer *lexer, struct dataset *ds UNUSED,
struct cmd_set *cmd UNUSED, void *aux UNUSED)
{
- const
struct string
*s;
+ const
char
*s;
lex_match (lexer, T_EQUALS);
if ( !lex_force_string (lexer))
return 0;
lex_match (lexer, T_EQUALS);
if ( !lex_force_string (lexer))
return 0;
- s = lex_tokstr (lexer);
+ s = lex_tok
c
str (lexer);
/* First try this string as an encoding name */
/* First try this string as an encoding name */
- if ( valid_encoding (
ds_cstr (s)
))
- set_default_encoding (
ds_cstr (s)
);
+ if ( valid_encoding (
s
))
+ set_default_encoding (
s
);
/* Now try as a locale name (or alias) */
/* Now try as a locale name (or alias) */
- else if (set_encoding_from_locale (
ds_cstr (s)
))
+ else if (set_encoding_from_locale (
s
))
{
}
else
{
{
}
else
{
- msg (ME, _("%s is not a recognized encoding or locale name"),
- ds_cstr (s));
+ msg (ME, _("%s is not a recognized encoding or locale name"), s);
return 0;
}
return 0;
}
@@
-511,7
+493,7
@@
stc_custom_journal (struct lexer *lexer, struct dataset *ds UNUSED, struct cmd_s
journal_disable ();
else if (lex_is_string (lexer) || lex_token (lexer) == T_ID)
{
journal_disable ();
else if (lex_is_string (lexer) || lex_token (lexer) == T_ID)
{
- journal_set_file_name (
ds_cstr (lex_tokstr (lexer)
));
+ journal_set_file_name (
lex_tokcstr (lexer
));
lex_get (lexer);
}
else
lex_get (lexer);
}
else
@@
-621,12
+603,6
@@
show_decimals (const struct dataset *ds UNUSED)
return xasprintf ("`%c'", settings_get_decimal_char (FMT_F));
}
return xasprintf ("`%c'", settings_get_decimal_char (FMT_F));
}
-static char *
-show_endcmd (const struct dataset *ds UNUSED)
-{
- return xasprintf ("`%c'", settings_get_endcmd ());
-}
-
static char *
show_errors (const struct dataset *ds UNUSED)
{
static char *
show_errors (const struct dataset *ds UNUSED)
{
@@
-811,7
+787,6
@@
const struct show_sbc show_table[] =
{"CCD", show_ccd},
{"CCE", show_cce},
{"DECIMALS", show_decimals},
{"CCD", show_ccd},
{"CCE", show_cce},
{"DECIMALS", show_decimals},
- {"ENDCMD", show_endcmd},
{"ERRORS", show_errors},
{"FORMAT", show_format},
{"LENGTH", show_length},
{"ERRORS", show_errors},
{"FORMAT", show_format},
{"LENGTH", show_length},