X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fdata-io%2Flist.c;h=153c204f219c780ec3b94ef92dbb18146aee20d8;hb=1fce5ac3073c36061e61a3956a8e96516a4a5723;hp=c7f85f3917d780f564a1060ce1f8d639aee77b37;hpb=4e5a6cc044c6c82e6c4d842bf056579b6bc47d48;p=pspp diff --git a/src/language/data-io/list.c b/src/language/data-io/list.c index c7f85f3917..153c204f21 100644 --- a/src/language/data-io/list.c +++ b/src/language/data-io/list.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 1997-9, 2000, 2006, 2009-2011, 2013 Free Software Foundation, Inc. + Copyright (C) 1997-9, 2000, 2006, 2009-2011, 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 @@ -56,10 +56,10 @@ enum numbering struct lst_cmd { - int first; - int last; - int step; - struct variable **v_variables; + long first; + long last; + long step; + const struct variable **v_variables; size_t n_variables; enum numbering numbering; }; @@ -128,7 +128,7 @@ list_execute (const struct lst_cmd *lcmd, struct dataset *ds) casereader_destroy (group); - table_item_submit (table_item_create (t, "Data List")); + table_item_submit (table_item_create (t, "Data List", NULL)); } ok = casegrouper_destroy (grouper); ok = proc_commit (ds) && ok; @@ -162,7 +162,7 @@ cmd_list (struct lexer *lexer, struct dataset *ds) if (lex_match_id (lexer, "VARIABLES") ) { lex_match (lexer, T_EQUALS); - if (! parse_variables (lexer, dict, &cmd.v_variables, &cmd.n_variables, 0 )) + if (! parse_variables_const (lexer, dict, &cmd.v_variables, &cmd.n_variables, 0 )) { msg (SE, _("No variables specified.")); return CMD_FAILURE; @@ -193,7 +193,7 @@ cmd_list (struct lexer *lexer, struct dataset *ds) if (lex_force_int (lexer)) { - lex_match_int (lexer, &cmd.first); + cmd.first = lex_integer (lexer); lex_get (lexer); } @@ -213,7 +213,7 @@ cmd_list (struct lexer *lexer, struct dataset *ds) lex_get (lexer); } } - else if (! parse_variables (lexer, dict, &cmd.v_variables, &cmd.n_variables, 0 )) + else if (! parse_variables_const (lexer, dict, &cmd.v_variables, &cmd.n_variables, 0 )) { return CMD_FAILURE; }