/* PSPP - computes sample statistics.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007 Free Software Foundation, Inc.
Written by Ben Pfaff <blp@gnu.org>.
This program is free software; you can redistribute it and/or
#include <stdlib.h>
+#include <data/casereader.h>
#include <data/dictionary.h>
#include <data/procedure.h>
#include <language/command.h>
{
struct variable **vars;
size_t var_cnt;
+ bool ok;
if (proc_make_temporary_transformations_permanent (ds))
msg (SE, _("DELETE VARIABLES may not be used after TEMPORARY. "
"Temporary transformations will be made permanent."));
- if (!parse_variables (lexer, dataset_dict (ds), &vars, &var_cnt,
+ if (!parse_variables (lexer, dataset_dict (ds), &vars, &var_cnt,
PV_NONE))
goto error;
if (var_cnt == dict_get_var_cnt (dataset_dict (ds)))
goto error;
}
- if (!procedure (ds, NULL, NULL))
+ ok = casereader_destroy (proc_open (ds));
+ ok = proc_commit (ds) && ok;
+ if (!ok)
goto error;
-
dict_delete_vars (dataset_dict (ds), vars, var_cnt);
+
free (vars);
-
+
return CMD_SUCCESS;
error: