X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fstats%2Faggregate.c;h=f4cbaac448b3acfbd67fa81c8775176fbb6b33e0;hb=bae3da89755d9503a674712303117dd76311b267;hp=eace3479a18b17568430c7c525293faf4c31a38e;hpb=9e24f9a5c52650da0700066e8d9e72261c6492ad;p=pspp diff --git a/src/language/stats/aggregate.c b/src/language/stats/aggregate.c index eace3479a1..f4cbaac448 100644 --- a/src/language/stats/aggregate.c +++ b/src/language/stats/aggregate.c @@ -182,7 +182,7 @@ cmd_aggregate (struct lexer *lexer, struct dataset *ds) lex_match (lexer, T_EQUALS); if (!lex_match (lexer, T_ASTERISK)) { - out_file = fh_parse (lexer, FH_REF_FILE | FH_REF_SCRATCH); + out_file = fh_parse (lexer, FH_REF_FILE, dataset_session (ds)); if (out_file == NULL) goto error; } @@ -208,7 +208,7 @@ cmd_aggregate (struct lexer *lexer, struct dataset *ds) if ( agr.add_variables ) agr.dict = dict_clone (dict); else - agr.dict = dict_create (); + agr.dict = dict_create (dict_get_encoding (dict)); dict_set_label (agr.dict, dict_get_label (dict)); dict_set_documents (agr.dict, dict_get_documents (dict)); @@ -223,7 +223,7 @@ cmd_aggregate (struct lexer *lexer, struct dataset *ds) lex_match (lexer, T_EQUALS); if (!lex_match_id (lexer, "COLUMNWISE")) { - lex_error (lexer, _("expecting %s"), "COLUMNWISE"); + lex_error_expecting (lexer, "COLUMNWISE", NULL); goto error; } agr.missing = COLUMNWISE; @@ -275,7 +275,7 @@ cmd_aggregate (struct lexer *lexer, struct dataset *ds) if (out_file == NULL) { - /* The active file will be replaced by the aggregated data, + /* The active dataset will be replaced by the aggregated data, so TEMPORARY is moot. */ proc_cancel_temporary_transformations (ds); proc_discard_output (ds); @@ -638,8 +638,7 @@ parse_aggregate_functions (struct lexer *lexer, const struct dictionary *dict, free (dest[i]); if (dest_label[i]) - var_set_label (destvar, dest_label[i], - dict_get_encoding (agr->dict), true); + var_set_label (destvar, dest_label[i], true); v->dest = destvar; }