Made array.h const correct, and dealt with the consequences.
[pspp-builds.git] / src / language / xforms / sample.c
index fd5bd5ec40e2d2358541caa006090c2eae7030f5..83fae8878e20f82c4ac7286ee3c6c97a4a067c01 100644 (file)
    02110-1301, USA. */
 
 #include <config.h>
+
 #include <gsl/gsl_rng.h>
 #include <limits.h>
 #include <stdio.h>
 #include <math.h>
-#include <libpspp/alloc.h>
+
+#include <data/procedure.h>
+#include <data/variable.h>
 #include <language/command.h>
+#include <language/lexer/lexer.h>
+#include <libpspp/alloc.h>
 #include <libpspp/compiler.h>
 #include <libpspp/message.h>
-#include <language/lexer/lexer.h>
-#include <math/random.h>
 #include <libpspp/str.h>
-#include <data/variable.h>
+#include <math/random.h>
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
@@ -54,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;
 
@@ -108,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 ();
 }
@@ -116,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;