X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fstats%2Fctables.c;h=5f7162fd2ad39134ce65c38130f1d231548cba1a;hb=4b9e9bd0e1c0454b637ec05f8e7538a74433f467;hp=8f8d6c885f4d0ee5b3991d3d0a2833abc175ba16;hpb=4d777aeacfa602840718862c31c9059e3d289eed;p=pspp diff --git a/src/language/stats/ctables.c b/src/language/stats/ctables.c index 8f8d6c885f..5f7162fd2a 100644 --- a/src/language/stats/ctables.c +++ b/src/language/stats/ctables.c @@ -4725,43 +4725,23 @@ ctables_prepare_table (struct ctables_table *t) break; case CTAT_ROW: - if (a == PIVOT_AXIS_COLUMN && t->label_axis[PIVOT_AXIS_ROW] == PIVOT_AXIS_COLUMN) - n_drop = 0; - else if (a == PIVOT_AXIS_COLUMN && t->label_axis[PIVOT_AXIS_COLUMN] == PIVOT_AXIS_ROW) - { - drop_inner = true; - n_drop = 0; - } - else if (a == PIVOT_AXIS_COLUMN && t->label_axis[PIVOT_AXIS_COLUMN] == PIVOT_AXIS_LAYER) - { - drop_inner = true; - n_drop = 0; - } - else - { - n_drop = a == PIVOT_AXIS_COLUMN; - if (a == PIVOT_AXIS_ROW && t->label_axis[PIVOT_AXIS_ROW] == PIVOT_AXIS_COLUMN) - n_drop++; - } - break; - case CTAT_COL: - if (a == PIVOT_AXIS_ROW && t->label_axis[PIVOT_AXIS_ROW] == PIVOT_AXIS_COLUMN) + if (a == atb && t->label_axis[ata] == atb) + n_drop = 0; + else if (a == atb && t->label_axis[atb] == ata) { drop_inner = true; n_drop = 0; } - else if (a == PIVOT_AXIS_ROW && t->label_axis[PIVOT_AXIS_COLUMN] == PIVOT_AXIS_ROW) - n_drop = 0; - else if (a == PIVOT_AXIS_ROW && t->label_axis[PIVOT_AXIS_ROW] == PIVOT_AXIS_LAYER) + else if (a == atb && t->label_axis[atb] == PIVOT_AXIS_LAYER) { drop_inner = true; n_drop = 0; } else { - n_drop = a == PIVOT_AXIS_ROW; - if (a == PIVOT_AXIS_COLUMN && t->label_axis[PIVOT_AXIS_COLUMN] == PIVOT_AXIS_ROW) + n_drop = a == atb; + if (a == ata && t->label_axis[ata] == atb) n_drop++; } break;