X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fpivot-table.c;h=45704a7a1ed680afbdb18f40466ba452f2e3a6d4;hb=0200682d517fd4b7cfc4e333378de03bcf74be43;hp=272ccc9e34849dca95a9d133712d219b2a3e0b75;hpb=556481e5944e4c9a9f9a0ef74ceddb005a199eea;p=pspp diff --git a/src/output/pivot-table.c b/src/output/pivot-table.c index 272ccc9e34..45704a7a1e 100644 --- a/src/output/pivot-table.c +++ b/src/output/pivot-table.c @@ -200,7 +200,7 @@ pivot_table_look_init (struct pivot_table_look *look) { memset (look, 0, sizeof *look); - look->omit_empty = false; + look->omit_empty = true; look->row_labels_in_corner = true; look->width_ranges[TABLE_HORZ][0] = 36; look->width_ranges[TABLE_HORZ][1] = 72; @@ -1216,6 +1216,14 @@ pivot_table_enumerate_axis (const struct pivot_table *table, memcpy (p, axis_indexes, axis->n_dimensions * sizeof *p); p += axis->n_dimensions; } + if (omit_empty && p == enumeration) + { + PIVOT_AXIS_FOR_EACH (axis_indexes, axis) + { + memcpy (p, axis_indexes, axis->n_dimensions * sizeof *p); + p += axis->n_dimensions; + } + } *p = SIZE_MAX; if (n) *n = (p - enumeration) / axis->n_dimensions;