X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fdata-io%2Fcombine-files.c;h=c63901d3dc3ba40115120ce32bdc4cbf2aee9116;hb=0fc606c52d7cec253af9b7463b15baabfbc9a33a;hp=6eb9a3181a5f741281f480e9254baf4e48111130;hpb=24c5f7c629e68801492d7ca1766953a2a954a820;p=pspp diff --git a/src/language/data-io/combine-files.c b/src/language/data-io/combine-files.c index 6eb9a3181a..c63901d3dc 100644 --- a/src/language/data-io/combine-files.c +++ b/src/language/data-io/combine-files.c @@ -229,7 +229,8 @@ combine_files (enum comb_command_type command, 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; } @@ -237,7 +238,7 @@ combine_files (enum comb_command_type command, 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")) @@ -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). */ - 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.")); @@ -643,7 +644,7 @@ close_all_comb_files (struct comb_proc *proc) 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); @@ -658,7 +659,7 @@ static void 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) @@ -716,7 +717,7 @@ execute_match_files (struct comb_proc *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)