X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fsample.c;h=8db7c8372a0bac9695a8d7641de351256460b805;hb=02ef5fef5288b80a4822e1006f6cb2b1369a55bd;hp=8a5406d14299daacb7806a5022f0c9cfb34617a6;hpb=7b98b3a4f58f6dc5a8e9cbc188b627966d5e652d;p=pspp-builds.git diff --git a/src/sample.c b/src/sample.c index 8a5406d1..8db7c837 100644 --- a/src/sample.c +++ b/src/sample.c @@ -48,7 +48,7 @@ struct sample_trns 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) @@ -59,8 +59,6 @@ cmd_sample (void) int a, b; unsigned frac; - lex_match_id ("SAMPLE"); - if (!lex_force_num ()) return CMD_FAILURE; if (!lex_integer_p ()) @@ -98,13 +96,6 @@ cmd_sample (void) } 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; @@ -118,8 +109,10 @@ cmd_sample (void) 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;