/* 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
#include <stdio.h>
#include <stdlib.h>
-#include "intprops.h"
-#include "xmalloca.h"
-
-#include <data/casegrouper.h>
-#include <data/casereader.h>
-#include <data/dictionary.h>
-#include <data/data-out.h>
-#include <data/format.h>
-#include <data/procedure.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 "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)
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)
{
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;
ok = proc_commit (ds) && ok;
subcase_destroy (&sc);
+ free (cmd.v_variables);
return ok ? CMD_SUCCESS : CMD_CASCADING_FAILURE;
}