- while (casereader_read (input, &c))
- {
- union value obs_value;
- struct freq **existing_fr;
- struct freq *fr = xmalloc(sizeof (*fr));
- fr->value = case_data (&c, var);
-
- fr->count = dict_get_case_weight (dict, &c, &warn);
-
- obs_value.f = trunc (fr->value->f);
-
- if ( obs_value.f < lo || obs_value.f > hi)
- {
- free (fr);
- case_destroy (&c);
- continue;
- }
-
- fr->value = &obs_value;
-
- existing_fr = (struct freq **) hsh_probe (freq_hash, fr);
-
- /* This must exist in the hash, because we previously populated it
- with zero counts */
- assert (*existing_fr);
-
- (*existing_fr)->count += fr->count;
- free (fr);
-
- case_destroy (&c);
- }
- if (casereader_destroy (input))
- return freq_hash;
- else