X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ffrequencies.q;h=c65567e8eb0388951216ed6e210761b5094e9b5f;hb=9b4b94c6d3b5fd98bf396e23d015380b87d2d296;hp=d9f8660f94c7e49898c1e8c6db20cf05fbef94bc;hpb=f2828f801736701c0294803b5dedd4c4ab63b45e;p=pspp-builds.git diff --git a/src/frequencies.q b/src/frequencies.q index d9f8660f..c65567e8 100644 --- a/src/frequencies.q +++ b/src/frequencies.q @@ -24,7 +24,7 @@ */ #include -#include +#include "error.h" #include #include #include "alloc.h" @@ -37,7 +37,6 @@ #include "algorithm.h" #include "magic.h" #include "misc.h" -#include "stats.h" #include "output.h" #include "som.h" #include "str.h" @@ -211,7 +210,6 @@ internal_cmd_frequencies (void) for (i = 0; i < dict_get_var_cnt (default_dict); i++) dict_get_var(default_dict, i)->p.frq.used = 0; - lex_match_id ("FREQUENCIES"); if (!parse_frequencies (&cmd)) return CMD_FAILURE; @@ -246,7 +244,7 @@ internal_cmd_frequencies (void) cmd.sort = FRQ_AVALUE; /* Do it! */ - procedure (precalc, calc, postcalc, NULL); + procedure_with_splits (precalc, calc, postcalc, NULL); return CMD_SUCCESS; } @@ -518,6 +516,8 @@ get_freq_comparator (int frq_sort, int var_type) return 0; } +/* Returns nonzero iff the value in struct freq F is non-missing + for variable V. */ static int not_missing (const void *f_, void *v_) { @@ -527,8 +527,9 @@ not_missing (const void *f_, void *v_) return !is_missing (&f->v, v); } +/* Summarizes the frequency table data for variable V. */ static void -postprocess_freq_tab (struct variable * v) +postprocess_freq_tab (struct variable *v) { hsh_compare_func *compare; struct freq_tab *ft; @@ -575,6 +576,7 @@ postprocess_freq_tab (struct variable * v) } } +/* Frees the frequency table for variable V. */ static void cleanup_freq_tab (struct variable *v) {