unsigned frac; /* TYPE_FRACTION: a fraction of UINT_MAX. */
};
-int sample_trns_proc (struct trns_header *, struct ccase *);
+static trns_proc_func sample_trns_proc;
int
cmd_sample (void)
int a, b;
unsigned frac;
- lex_match_id ("SAMPLE");
-
if (!lex_force_num ())
return CMD_FAILURE;
if (!lex_integer_p ())
}
lex_get ();
-#if DEBUGGING
- if (type == TYPE_FRACTION)
- printf ("SAMPLE %g.\n", frac / (double) UINT_MAX);
- else
- printf ("SAMPLE %d FROM %d.\n", a, b);
-#endif
-
trns = xmalloc (sizeof *trns);
trns->h.proc = sample_trns_proc;
trns->h.free = NULL;
return lex_end_of_command ();
}
-int
-sample_trns_proc (struct trns_header * trns, struct ccase *c UNUSED)
+/* Executes a SAMPLE transformation. */
+static int
+sample_trns_proc (struct trns_header * trns, struct ccase *c UNUSED,
+ int case_num UNUSED)
{
struct sample_trns *t = (struct sample_trns *) trns;
double U;