struct tab_table *t;
- t = tab_create (n_cols, n_rows, 0);
+ t = tab_create (n_cols, n_rows);
tab_headers (t, 2, 0, 1, 0);
- tab_dim (t, tab_natural_dimensions);
+ tab_dim (t, tab_natural_dimensions, NULL, NULL);
tab_box (t,
for ( v = 0; v < n_vars; ++v )
n_rows += group_proc_get (vars[v])->n_groups + 1;
- t = tab_create (n_cols, n_rows, 0);
+ t = tab_create (n_cols, n_rows);
tab_headers (t, 2, 0, 2, 0);
- tab_dim (t, tab_natural_dimensions);
+ tab_dim (t, tab_natural_dimensions, NULL, NULL);
/* Put a frame around the entire box, and vertical lines inside */
tab_vline (t, TAL_0, 7, 0, 0);
tab_hline (t, TAL_1, 6, 7, 1);
- tab_joint_text (t, 6, 0, 7, 0, TAB_CENTER | TAT_TITLE | TAT_PRINTF,
- _("%g%% Confidence Interval for Mean"), confidence*100.0);
+ tab_joint_text_format (t, 6, 0, 7, 0, TAB_CENTER | TAT_TITLE,
+ _("%g%% Confidence Interval for Mean"),
+ confidence*100.0);
tab_text (t, 6, 1, TAB_CENTER | TAT_TITLE, _("Lower Bound"));
tab_text (t, 7, 1, TAB_CENTER | TAT_TITLE, _("Upper Bound"));
struct tab_table *t;
- t = tab_create (n_cols, n_rows, 0);
+ t = tab_create (n_cols, n_rows);
tab_headers (t, 1, 0, 1, 0);
- tab_dim (t, tab_natural_dimensions);
+ tab_dim (t, tab_natural_dimensions, NULL, 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;
struct tab_table *t;
- t = tab_create (n_cols, n_rows, 0);
+ t = tab_create (n_cols, n_rows);
tab_headers (t, 2, 0, 2, 0);
- tab_dim (t, tab_natural_dimensions);
+ tab_dim (t, tab_natural_dimensions, NULL, 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));
for (i = 0; i < cmd.sbc_contrast; ++i )
{
- tab_text (t, 1, i + 2, TAB_CENTER | TAT_PRINTF, "%d", i + 1);
+ tab_text_format (t, 1, i + 2, TAB_CENTER, "%d", i + 1);
if ( bad_contrast[i] )
tab_text (t, count + 2, i + 2, TAB_RIGHT, "?" );
else
- tab_text (t, count + 2, i + 2, TAB_RIGHT | TAT_PRINTF, "%g",
- subc_list_double_at (&cmd.dl_contrast[i], count)
- );
+ tab_text_format (t, count + 2, i + 2, TAB_RIGHT, "%g",
+ subc_list_double_at (&cmd.dl_contrast[i], count));
}
}
struct tab_table *t;
- t = tab_create (n_cols, n_rows, 0);
+ t = tab_create (n_cols, n_rows);
tab_headers (t, 3, 0, 1, 0);
- tab_dim (t, tab_natural_dimensions);
+ tab_dim (t, tab_natural_dimensions, NULL, NULL);
/* Put a frame around the entire box, and vertical lines inside */
tab_box (t,
_("Does not assume equal"));
}
- tab_text (t, 2, (v * lines_per_variable) + i + 1,
- TAB_CENTER | TAT_TITLE | TAT_PRINTF, "%d", i + 1);
+ tab_text_format (t, 2, (v * lines_per_variable) + i + 1,
+ TAB_CENTER | TAT_TITLE, "%d", i + 1);
- tab_text (t, 2, (v * lines_per_variable) + i + 1 + cmd.sbc_contrast,
- TAB_CENTER | TAT_TITLE | TAT_PRINTF, "%d", i + 1);
+ tab_text_format (t, 2,
+ (v * lines_per_variable) + i + 1 + cmd.sbc_contrast,
+ TAB_CENTER | TAT_TITLE, "%d", i + 1);
if ( bad_contrast[i])
}
}
+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)
{