t = tab_create (n_cols, n_rows, 0);
tab_headers (t, 2, 0, 1, 0);
- tab_dim (t, tab_natural_dimensions);
+ tab_dim (t, tab_natural_dimensions, NULL);
tab_box (t,
t = tab_create (n_cols, n_rows, 0);
tab_headers (t, 2, 0, 2, 0);
- tab_dim (t, tab_natural_dimensions);
+ tab_dim (t, tab_natural_dimensions, NULL);
/* Put a frame around the entire box, and vertical lines inside */
t = tab_create (n_cols, n_rows, 0);
tab_headers (t, 1, 0, 1, 0);
- tab_dim (t, tab_natural_dimensions);
+ tab_dim (t, tab_natural_dimensions, NULL);
/* Put a frame around the entire box, and vertical lines inside */
tab_box (t,
{
int n_cols = 2 + ostensible_number_of_groups;
int n_rows = 2 + cmd.sbc_contrast;
- union value *group_value;
int count = 0;
void *const *group_values;
t = tab_create (n_cols, n_rows, 0);
tab_headers (t, 2, 0, 2, 0);
- tab_dim (t, tab_natural_dimensions);
+ tab_dim (t, tab_natural_dimensions, NULL);
/* Put a frame around the entire box, and vertical lines inside */
tab_box (t,
count < hsh_count (global_group_hash);
++count)
{
+ double *group_value_p;
+ union value group_value;
int i;
struct string vstr;
- group_value = group_values[count];
ds_init_empty (&vstr);
- var_append_value_name (indep_var, group_value, &vstr);
+ group_value_p = group_values[count];
+ group_value.f = *group_value_p;
+ var_append_value_name (indep_var, &group_value, &vstr);
tab_text (t, count + 2, 1, TAB_CENTER | TAT_TITLE,
ds_cstr (&vstr));
t = tab_create (n_cols, n_rows, 0);
tab_headers (t, 3, 0, 1, 0);
- tab_dim (t, tab_natural_dimensions);
+ tab_dim (t, tab_natural_dimensions, NULL);
/* Put a frame around the entire box, and vertical lines inside */
tab_box (t,
}
}
+static int
+compare_double_3way (const void *a_, const void *b_, const void *aux UNUSED)
+{
+ const double *a = a_;
+ const double *b = b_;
+ return *a < *b ? -1 : *a > *b;
+}
+
+static unsigned
+do_hash_double (const void *value_, const void *aux UNUSED)
+{
+ const double *value = value_;
+ return hash_double (*value, 0);
+}
+
static void
-free_value (void *value_, const void *aux UNUSED)
+free_double (void *value_, const void *aux UNUSED)
{
- union value *value = value_;
+ double *value = value_;
free (value);
}
taint = taint_clone (casereader_get_taint (input));
global_group_hash = hsh_create (4,
- compare_values_short,
- hash_value_short,
- free_value,
+ compare_double_3way,
+ do_hash_double,
+ free_double,
indep_var);
precalc (cmd);
const double weight = dict_get_case_weight (dict, c, NULL);
const union value *indep_val = case_data (c, indep_var);
- void **p = hsh_probe (global_group_hash, indep_val);
+ void **p = hsh_probe (global_group_hash, &indep_val->f);
if (*p == NULL)
- *p = value_dup (indep_val, var_get_width (indep_var));
+ {
+ double *value = *p = xmalloc (sizeof *value);
+ *value = indep_val->f;
+ }
for (i = 0; i < n_vars; ++i)
{