X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fdata-io%2Fget.c;h=b861aca52ffef7df758d3eabfc506718795081eb;hb=a5a1e8c05118edd5d9fd0dfd1a6f421632779292;hp=22ae6feb601579f02e0ef96b78b5fc4c82e7b8e9;hpb=9db3101d0bbbcfb687acd3e442e550557e4e56b1;p=pspp-builds.git diff --git a/src/language/data-io/get.c b/src/language/data-io/get.c index 22ae6feb..b861aca5 100644 --- a/src/language/data-io/get.c +++ b/src/language/data-io/get.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include @@ -46,6 +45,10 @@ #include #include +#include "get-data.h" + +#include "xalloc.h" + #include "gettext.h" #define _(msgid) gettext (msgid) @@ -60,8 +63,7 @@ enum reader_command IMPORT_CMD }; -static void get_translate_case (const struct ccase *, struct ccase *, - void *map_); +static void get_translate_case (struct ccase *, struct ccase *, void *map_); static bool get_destroy_case_map (void *map_); /* Parses a GET or IMPORT command. */ @@ -73,6 +75,11 @@ parse_read_command (struct lexer *lexer, struct dataset *ds, enum reader_command struct dictionary *dict = NULL; struct case_map *map = NULL; + if ( type == GET_CMD && lex_match_id (lexer, "DATA") ) + { + return parse_get_data_command (lexer, ds); + } + for (;;) { lex_match (lexer, '/'); @@ -143,11 +150,12 @@ parse_read_command (struct lexer *lexer, struct dataset *ds, enum reader_command } static void -get_translate_case (const struct ccase *input, struct ccase *output, +get_translate_case (struct ccase *input, struct ccase *output, void *map_) { struct case_map *map = map_; case_map_execute (map, input, output); + case_destroy (input); } static bool @@ -563,10 +571,10 @@ rename_variables (struct lexer *lexer, struct dictionary *dict) goto done; if (nn != nv) { - msg (SE, _("Number of variables on left side of `=' (%d) does not " - "match number of variables on right side (%d), in " + msg (SE, _("Number of variables on left side of `=' (%zu) does not " + "match number of variables on right side (%zu), in " "parenthesized group %d of RENAME subcommand."), - (unsigned) (nv - old_nv), (unsigned) (nn - old_nv), group); + nv - old_nv, nn - old_nv, group); goto done; } if (!lex_force_match (lexer, ')'))