#include <stdio.h>
#include <math.h>
+#include <data/procedure.h>
#include <data/variable.h>
#include <language/command.h>
#include <language/lexer/lexer.h>
#include <libpspp/message.h>
#include <libpspp/str.h>
#include <math/random.h>
-#include <procedure.h>
#include "gettext.h"
#define _(msgid) gettext (msgid)
static trns_free_func sample_trns_free;
int
-cmd_sample (void)
+cmd_sample (struct dataset *ds)
{
struct sample_trns *trns;
trns->N = b;
trns->m = trns->t = 0;
trns->frac = frac;
- add_transformation (sample_trns_proc, sample_trns_free, trns);
+ add_transformation (ds, sample_trns_proc, sample_trns_free, trns);
return lex_end_of_command ();
}
/* Executes a SAMPLE transformation. */
static int
sample_trns_proc (void *t_, struct ccase *c UNUSED,
- int case_num UNUSED)
+ casenumber case_num UNUSED)
{
struct sample_trns *t = t_;
double U;