Made array.h const correct, and dealt with the consequences.
[pspp-builds.git] / src / language / xforms / sample.c
index 830c981e703aeef1513d27dbf6989aafff2f98fd..83fae8878e20f82c4ac7286ee3c6c97a4a067c01 100644 (file)
@@ -24,6 +24,7 @@
 #include <stdio.h>
 #include <math.h>
 
+#include <data/procedure.h>
 #include <data/variable.h>
 #include <language/command.h>
 #include <language/lexer/lexer.h>
@@ -32,7 +33,6 @@
 #include <libpspp/message.h>
 #include <libpspp/str.h>
 #include <math/random.h>
-#include <procedure.h>
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
@@ -57,7 +57,7 @@ static trns_proc_func sample_trns_proc;
 static trns_free_func sample_trns_free;
 
 int
-cmd_sample (void)
+cmd_sample (struct dataset *ds)
 {
   struct sample_trns *trns;
 
@@ -111,7 +111,7 @@ cmd_sample (void)
   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 ();
 }
@@ -119,7 +119,7 @@ cmd_sample (void)
 /* 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;