X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fdata-io%2Flist.q;h=ddc072a46b5ebaad10b5ed03dc6d0136d5c824f3;hb=7caed4c8228cf00ed5061b474f32a47b5ff7c40f;hp=738b667183523a210d6530b74ef4f15ea2b598e8;hpb=a258e53c63a08b0ec48aea8f03808eb651729424;p=pspp diff --git a/src/language/data-io/list.q b/src/language/data-io/list.q index 738b667183..ddc072a46b 100644 --- a/src/language/data-io/list.q +++ b/src/language/data-io/list.q @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 1997-9, 2000, 2006, 2009 Free Software Foundation, Inc. + Copyright (C) 1997-9, 2000, 2006, 2009-2011 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 @@ -20,29 +20,28 @@ #include #include -#include "intprops.h" -#include "xmalloca.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "minmax.h" -#include "xalloc.h" +#include "data/casegrouper.h" +#include "data/casereader.h" +#include "data/dataset.h" +#include "data/dictionary.h" +#include "data/data-out.h" +#include "data/format.h" +#include "data/subcase.h" +#include "data/variable.h" +#include "language/command.h" +#include "language/dictionary/split-file.h" +#include "language/lexer/lexer.h" +#include "libpspp/compiler.h" +#include "libpspp/ll.h" +#include "libpspp/message.h" +#include "libpspp/misc.h" +#include "output/tab.h" +#include "output/table-item.h" + +#include "gl/intprops.h" +#include "gl/minmax.h" +#include "gl/xalloc.h" +#include "gl/xmalloca.h" #include "gettext.h" #define _(msgid) gettext (msgid) @@ -131,13 +130,6 @@ cmd_list (struct lexer *lexer, struct dataset *ds) struct ccase *ccase; struct table *t; - group = casereader_project (group, &sc); - if (cmd.numbering == LST_NUMBERED) - group = casereader_create_arithmetic_sequence (group, 1, 1); - group = casereader_select (group, cmd.first - 1, - (cmd.last != LONG_MAX ? cmd.last - : CASENUMBER_MAX), cmd.step); - ccase = casereader_peek (group, 0); if (ccase != NULL) { @@ -145,6 +137,13 @@ cmd_list (struct lexer *lexer, struct dataset *ds) case_unref (ccase); } + group = casereader_project (group, &sc); + if (cmd.numbering == LST_NUMBERED) + group = casereader_create_arithmetic_sequence (group, 1, 1); + group = casereader_select (group, cmd.first - 1, + (cmd.last != LONG_MAX ? cmd.last + : CASENUMBER_MAX), cmd.step); + if (cmd.numbering == LST_NUMBERED) { struct fmt_spec fmt;