projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
README: Describe meaning of copyright year ranges.
[pspp-builds.git]
/
src
/
language
/
data-io
/
save.c
diff --git
a/src/language/data-io/save.c
b/src/language/data-io/save.c
index c34d446225bd250a76687ef736aeed697d7027be..5b51309b1946240e36afa7122b55d209f0708470 100644
(file)
--- a/
src/language/data-io/save.c
+++ b/
src/language/data-io/save.c
@@
-1,5
+1,5
@@
/* PSPP - a program for statistical analysis.
/* PSPP - a program for statistical analysis.
- Copyright (C) 1997-9, 2000, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1997-9, 2000, 2006, 2007, 2008, 2009
, 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
@@
-105,7
+105,6
@@
parse_output_proc (struct lexer *lexer, struct dataset *ds,
enum writer_type writer_type)
{
bool retain_unselected;
enum writer_type writer_type)
{
bool retain_unselected;
- struct variable *saved_filter_variable;
struct casewriter *output;
bool ok;
struct casewriter *output;
bool ok;
@@
-114,16
+113,10
@@
parse_output_proc (struct lexer *lexer, struct dataset *ds,
if (output == NULL)
return CMD_CASCADING_FAILURE;
if (output == NULL)
return CMD_CASCADING_FAILURE;
- saved_filter_variable = dict_get_filter (dataset_dict (ds));
- if (retain_unselected)
- dict_set_filter (dataset_dict (ds), NULL);
-
- casereader_transfer (proc_open (ds), output);
+ casereader_transfer (proc_open_filtering (ds, !retain_unselected), output);
ok = casewriter_destroy (output);
ok = proc_commit (ds) && ok;
ok = casewriter_destroy (output);
ok = proc_commit (ds) && ok;
- dict_set_filter (dataset_dict (ds), saved_filter_variable);
-
return ok ? CMD_SUCCESS : CMD_CASCADING_FAILURE;
}
return ok ? CMD_SUCCESS : CMD_CASCADING_FAILURE;
}
@@
-190,7
+183,7
@@
parse_write_command (struct lexer *lexer, struct dataset *ds,
case_map_prepare_dict (dict);
dict_delete_scratch_vars (dict);
case_map_prepare_dict (dict);
dict_delete_scratch_vars (dict);
- lex_match (lexer,
'/'
);
+ lex_match (lexer,
T_SLASH
);
for (;;)
{
if (lex_match_id (lexer, "OUTFILE"))
for (;;)
{
if (lex_match_id (lexer, "OUTFILE"))
@@
-201,7
+194,7
@@
parse_write_command (struct lexer *lexer, struct dataset *ds,
goto error;
}
goto error;
}
- lex_match (lexer,
'='
);
+ lex_match (lexer,
T_EQUALS
);
handle = fh_parse (lexer, FH_REF_FILE | FH_REF_SCRATCH);
if (handle == NULL)
handle = fh_parse (lexer, FH_REF_FILE | FH_REF_SCRATCH);
if (handle == NULL)
@@
-213,7
+206,7
@@
parse_write_command (struct lexer *lexer, struct dataset *ds,
{
bool cw;
{
bool cw;
- lex_match (lexer,
'='
);
+ lex_match (lexer,
T_EQUALS
);
if (lex_match_id (lexer, "READONLY"))
cw = false;
else if (lex_match_id (lexer, "WRITEABLE"))
if (lex_match_id (lexer, "READONLY"))
cw = false;
else if (lex_match_id (lexer, "WRITEABLE"))
@@
-228,7
+221,7
@@
parse_write_command (struct lexer *lexer, struct dataset *ds,
}
else if (command_type == PROC_CMD && lex_match_id (lexer, "UNSELECTED"))
{
}
else if (command_type == PROC_CMD && lex_match_id (lexer, "UNSELECTED"))
{
- lex_match (lexer,
'='
);
+ lex_match (lexer,
T_EQUALS
);
if (lex_match_id (lexer, "RETAIN"))
*retain_unselected = true;
else if (lex_match_id (lexer, "DELETE"))
if (lex_match_id (lexer, "RETAIN"))
*retain_unselected = true;
else if (lex_match_id (lexer, "DELETE"))
@@
-248,7
+241,7
@@
parse_write_command (struct lexer *lexer, struct dataset *ds,
else if (writer_type == SYSFILE_WRITER
&& lex_match_id (lexer, "VERSION"))
{
else if (writer_type == SYSFILE_WRITER
&& lex_match_id (lexer, "VERSION"))
{
- lex_match (lexer,
'='
);
+ lex_match (lexer,
T_EQUALS
);
if (!lex_force_int (lexer))
goto error;
sysfile_opts.version = lex_integer (lexer);
if (!lex_force_int (lexer))
goto error;
sysfile_opts.version = lex_integer (lexer);
@@
-256,7
+249,7
@@
parse_write_command (struct lexer *lexer, struct dataset *ds,
}
else if (writer_type == PORFILE_WRITER && lex_match_id (lexer, "TYPE"))
{
}
else if (writer_type == PORFILE_WRITER && lex_match_id (lexer, "TYPE"))
{
- lex_match (lexer,
'='
);
+ lex_match (lexer,
T_EQUALS
);
if (lex_match_id (lexer, "COMMUNICATIONS"))
porfile_opts.type = PFM_COMM;
else if (lex_match_id (lexer, "TAPE"))
if (lex_match_id (lexer, "COMMUNICATIONS"))
porfile_opts.type = PFM_COMM;
else if (lex_match_id (lexer, "TAPE"))
@@
-269,7
+262,7
@@
parse_write_command (struct lexer *lexer, struct dataset *ds,
}
else if (writer_type == PORFILE_WRITER && lex_match_id (lexer, "DIGITS"))
{
}
else if (writer_type == PORFILE_WRITER && lex_match_id (lexer, "DIGITS"))
{
- lex_match (lexer,
'='
);
+ lex_match (lexer,
T_EQUALS
);
if (!lex_force_int (lexer))
goto error;
porfile_opts.digits = lex_integer (lexer);
if (!lex_force_int (lexer))
goto error;
porfile_opts.digits = lex_integer (lexer);
@@
-278,7
+271,7
@@
parse_write_command (struct lexer *lexer, struct dataset *ds,
else if (!parse_dict_trim (lexer, dict))
goto error;
else if (!parse_dict_trim (lexer, dict))
goto error;
- if (!lex_match (lexer,
'/'
))
+ if (!lex_match (lexer,
T_SLASH
))
break;
}
if (lex_end_of_command (lexer) != CMD_SUCCESS)
break;
}
if (lex_end_of_command (lexer) != CMD_SUCCESS)