projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Apply UNUSED and include additional headers to avoid complaints from
[pspp]
/
src
/
language
/
stats
/
frequencies.q
diff --git
a/src/language/stats/frequencies.q
b/src/language/stats/frequencies.q
index 535e69070f8e2761d09c7ef245f6475a68d5af57..34223e104fea78361dbfec63e378dcc2ffed4c17 100644
(file)
--- a/
src/language/stats/frequencies.q
+++ b/
src/language/stats/frequencies.q
@@
-700,7
+700,7
@@
not_missing (const void *f_, const void *v_)
const struct freq *f = f_;
const struct variable *v = v_;
const struct freq *f = f_;
const struct variable *v = v_;
- return !var_is_value_missing (v, f->value);
+ return !var_is_value_missing (v, f->value
, MV_ANY
);
}
/* Summarizes the frequency table data for variable V. */
}
/* Summarizes the frequency table data for variable V. */
@@
-1100,13
+1100,19
@@
compare_freq_alpha_d (const void *a_, const void *b_, const void *v_)
static void
full_dim (struct tab_table *t, struct outp_driver *d)
{
static void
full_dim (struct tab_table *t, struct outp_driver *d)
{
- int
lab = cmd.labels == FRQ_LABELS
;
- int
i
;
+ int
i = 0
;
+ int
columns = 5
;
- if (lab)
+ if (cmd.labels == FRQ_LABELS)
+ {
t->w[0] = MIN (tab_natural_width (t, d, 0), d->prop_em_width * 15);
t->w[0] = MIN (tab_natural_width (t, d, 0), d->prop_em_width * 15);
- for (i = lab; i < lab + 5; i++)
+ i = 1;
+ columns ++;
+ }
+
+ for (;i < columns; i++)
t->w[i] = MAX (tab_natural_width (t, d, i), d->prop_em_width * 8);
t->w[i] = MAX (tab_natural_width (t, d, i), d->prop_em_width * 8);
+
for (i = 0; i < t->nr; i++)
t->h[i] = d->font_height;
}
for (i = 0; i < t->nr; i++)
t->h[i] = d->font_height;
}
@@
-1148,7
+1154,7
@@
dump_full (struct variable *v)
{-1, -1, NULL},
};
{-1, -1, NULL},
};
-
int lab = cmd.labels == FRQ_LABELS
;
+
const bool lab = (cmd.labels == FRQ_LABELS)
;
vf = get_var_freqs (v);
ft = &vf->tab;
vf = get_var_freqs (v);
ft = &vf->tab;
@@
-1159,8
+1165,9
@@
dump_full (struct variable *v)
if (lab)
tab_text (t, 0, 1, TAB_CENTER | TAT_TITLE, _("Value Label"));
if (lab)
tab_text (t, 0, 1, TAB_CENTER | TAT_TITLE, _("Value Label"));
+
for (p = vec; p->s; p++)
for (p = vec; p->s; p++)
- tab_text (t,
p->c - (p->r ? !lab : 0)
, p->r,
+ tab_text (t,
lab ? p->c : p->c - 1
, p->r,
TAB_CENTER | TAT_TITLE, gettext (p->s));
r = 2;
TAB_CENTER | TAT_TITLE, gettext (p->s));
r = 2;
@@
-1176,11
+1183,6
@@
dump_full (struct variable *v)
if (lab)
{
if (lab)
{
-#if 0
-<<<<<<< frequencies.q
- const char *label = val_labs_find (v->val_labs, f->value[0]);
-=======
-#endif
const char *label = var_lookup_value_label (v, &f->value[0]);
if (label != NULL)
tab_text (t, 0, r, TAB_LEFT, label);
const char *label = var_lookup_value_label (v, &f->value[0]);
if (label != NULL)
tab_text (t, 0, r, TAB_LEFT, label);
@@
-1562,7
+1564,7
@@
freq_tab_to_hist(const struct freq_tab *ft, const struct variable *var)
/* Find out the extremes of the x value */
for ( frq = hsh_first(fh, &hi); frq != 0; frq = hsh_next(fh, &hi) )
{
/* Find out the extremes of the x value */
for ( frq = hsh_first(fh, &hi); frq != 0; frq = hsh_next(fh, &hi) )
{
- if (
var_is_value_missing(var, frq->value
))
+ if (
var_is_value_missing(var, frq->value, MV_ANY
))
continue;
if ( frq->value[0].f < x_min ) x_min = frq->value[0].f ;
continue;
if ( frq->value[0].f < x_min ) x_min = frq->value[0].f ;