projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed error running 'make distcheck'
[pspp]
/
src
/
language
/
data-io
/
combine-files.c
diff --git
a/src/language/data-io/combine-files.c
b/src/language/data-io/combine-files.c
index d803ccdc869d40d2fe49cb295e0d50ad23c01533..c63901d3dc3ba40115120ce32bdc4cbf2aee9116 100644
(file)
--- a/
src/language/data-io/combine-files.c
+++ b/
src/language/data-io/combine-files.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, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-9, 2000, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
, 2014
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
@@
-229,7
+229,8
@@
combine_files (enum comb_command_type command,
if (file->handle == NULL)
goto error;
if (file->handle == NULL)
goto error;
- file->reader = any_reader_open (file->handle, NULL, &file->dict);
+ file->reader = any_reader_open_and_decode (file->handle, NULL,
+ &file->dict, NULL);
if (file->reader == NULL)
goto error;
}
if (file->reader == NULL)
goto error;
}
@@
-237,7
+238,7
@@
combine_files (enum comb_command_type command,
while (lex_match (lexer, T_SLASH))
if (lex_match_id (lexer, "RENAME"))
{
while (lex_match (lexer, T_SLASH))
if (lex_match_id (lexer, "RENAME"))
{
- if (!parse_dict_rename (lexer, file->dict))
+ if (!parse_dict_rename (lexer, file->dict
, false
))
goto error;
}
else if (lex_match_id (lexer, "IN"))
goto error;
}
else if (lex_match_id (lexer, "IN"))
@@
-445,7
+446,7
@@
combine_files (enum comb_command_type command,
if (active_file == NULL)
{
proc_discard_output (ds);
if (active_file == NULL)
{
proc_discard_output (ds);
- file->reader = active_file = proc_open
(ds
);
+ file->reader = active_file = proc_open
_filtering (ds, false
);
}
else
file->reader = casereader_clone (active_file);
}
else
file->reader = casereader_clone (active_file);
@@
-516,7
+517,7
@@
merge_dictionary (struct dictionary *const m, struct comb_file *f)
The correct thing to do would be to convert to an encoding
which can cope with all the input files (eg UTF-8).
*/
The correct thing to do would be to convert to an encoding
which can cope with all the input files (eg UTF-8).
*/
- if (
0 != strcmp (dict_get_encoding (f->dict), dict_get_encoding (m)))
+ if (0 != strcmp (dict_get_encoding (f->dict), dict_get_encoding (m)))
msg (MW, _("Combining files with incompatible encodings. String data may "
"not be represented correctly."));
msg (MW, _("Combining files with incompatible encodings. String data may "
"not be represented correctly."));
@@
-590,7
+591,7
@@
merge_dictionary (struct dictionary *const m, struct comb_file *f)
if (var_has_missing_values (dv) && !var_has_missing_values (mv))
var_set_missing_values (mv, var_get_missing_values (dv));
if (var_get_label (dv) && !var_get_label (mv))
if (var_has_missing_values (dv) && !var_has_missing_values (mv))
var_set_missing_values (mv, var_get_missing_values (dv));
if (var_get_label (dv) && !var_get_label (mv))
- var_set_label (mv, var_get_label (dv)
, false
);
+ var_set_label (mv, var_get_label (dv));
}
else
mv = dict_clone_var_assert (m, dv);
}
else
mv = dict_clone_var_assert (m, dv);
@@
-643,7
+644,7
@@
close_all_comb_files (struct comb_proc *proc)
subcase_destroy (&file->dst);
free (file->mv);
fh_unref (file->handle);
subcase_destroy (&file->dst);
free (file->mv);
fh_unref (file->handle);
- dict_
destroy
(file->dict);
+ dict_
unref
(file->dict);
casereader_destroy (file->reader);
case_unref (file->data);
free (file->in_name);
casereader_destroy (file->reader);
case_unref (file->data);
free (file->in_name);
@@
-658,7
+659,7
@@
static void
free_comb_proc (struct comb_proc *proc)
{
close_all_comb_files (proc);
free_comb_proc (struct comb_proc *proc)
{
close_all_comb_files (proc);
- dict_
destroy
(proc->dict);
+ dict_
unref
(proc->dict);
casewriter_destroy (proc->output);
case_matcher_destroy (proc->matcher);
if (proc->prev_BY)
casewriter_destroy (proc->output);
case_matcher_destroy (proc->matcher);
if (proc->prev_BY)
@@
-716,7
+717,7
@@
execute_match_files (struct comb_proc *proc)
size_t i;
output = create_output_case (proc);
size_t i;
output = create_output_case (proc);
- for (i = proc->n_files; i-- > 0;
)
+ for (i = proc->n_files; i-- > 0;)
{
struct comb_file *file = &proc->files[i];
if (file->type == COMB_FILE)
{
struct comb_file *file = &proc->files[i];
if (file->type == COMB_FILE)