projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Actually implement the new procedure code and adapt all of its clients
[pspp-builds.git]
/
src
/
language
/
dictionary
/
apply-dictionary.c
diff --git
a/src/language/dictionary/apply-dictionary.c
b/src/language/dictionary/apply-dictionary.c
index 0c9f2ade468d290cfdad8877b3cde1e1d2c4422b..ac38a0899a1b6e7b849fdb7d00b4c63c55b1dcfe 100644
(file)
--- a/
src/language/dictionary/apply-dictionary.c
+++ b/
src/language/dictionary/apply-dictionary.c
@@
-21,6
+21,7
@@
#include <stdlib.h>
#include <data/any-reader.h>
#include <stdlib.h>
#include <data/any-reader.h>
+#include <data/casereader.h>
#include <data/dictionary.h>
#include <data/file-handle-def.h>
#include <data/missing-values.h>
#include <data/dictionary.h>
#include <data/file-handle-def.h>
#include <data/missing-values.h>
@@
-42,7
+43,7
@@
int
cmd_apply_dictionary (struct lexer *lexer, struct dataset *ds)
{
struct file_handle *handle;
cmd_apply_dictionary (struct lexer *lexer, struct dataset *ds)
{
struct file_handle *handle;
- struct
any_
reader *reader;
+ struct
case
reader *reader;
struct dictionary *dict;
int n_matched = 0;
struct dictionary *dict;
int n_matched = 0;
@@
-58,7
+59,7
@@
cmd_apply_dictionary (struct lexer *lexer, struct dataset *ds)
reader = any_reader_open (handle, &dict);
if (dict == NULL)
return CMD_FAILURE;
reader = any_reader_open (handle, &dict);
if (dict == NULL)
return CMD_FAILURE;
-
any_reader_close
(reader);
+
casereader_destroy
(reader);
for (i = 0; i < dict_get_var_cnt (dict); i++)
{
for (i = 0; i < dict_get_var_cnt (dict); i++)
{
@@
-136,7
+137,5
@@
cmd_apply_dictionary (struct lexer *lexer, struct dataset *ds)
dict_set_weight (dataset_dict (ds), new_weight);
}
dict_set_weight (dataset_dict (ds), new_weight);
}
- any_reader_close (reader);
-
return lex_end_of_command (lexer);
}
return lex_end_of_command (lexer);
}