+Fri Dec 22 19:22:18 WST 2006 John Darrington <john@darrington.wattle.id.au>
+
+ * frequencies.q : Fixed bug #17420, where the table bounds were overun
+ when /FORMAT=nolabels was given.
+
Wed Dec 20 18:45:31 WST 2006 John Darrington <john@darrington.wattle.id.au>
* binomial.c binomial.h : New files. Thanks to Jason Stover
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);
- 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);
+
for (i = 0; i < t->nr; i++)
t->h[i] = d->font_height;
}
{-1, -1, NULL},
};
- int lab = cmd.labels == FRQ_LABELS;
+ const bool lab = (cmd.labels == FRQ_LABELS);
vf = get_var_freqs (v);
ft = &vf->tab;
if (lab)
tab_text (t, 0, 1, TAB_CENTER | TAT_TITLE, _("Value Label"));
+
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;
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);
tests/bugs/get.sh \
tests/bugs/examine-1sample.sh \
tests/bugs/examine-missing.sh \
+ tests/bugs/freq-nolabels.sh \
tests/bugs/get-no-file.sh \
tests/bugs/html-frequency.sh \
tests/bugs/if_crash.sh \