From a4b365ed435256d40b6617408d1e375c5139ffba Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 3 Jun 2022 21:22:43 -0700 Subject: [PATCH] CTABLES remove some vestigial multiple response support --- src/language/stats/ctables.c | 202 ++++++++++------------------------- 1 file changed, 56 insertions(+), 146 deletions(-) diff --git a/src/language/stats/ctables.c b/src/language/stats/ctables.c index 418496df92..5eb4bb4a3d 100644 --- a/src/language/stats/ctables.c +++ b/src/language/stats/ctables.c @@ -115,8 +115,8 @@ enum ctables_vlabel S(CTSF_LAYERPCT_SUM, "LAYERPCT.SUM", N_("Layer Sum %"), CTF_PERCENT, CTFA_SCALE) \ S(CTSF_LAYERROWPCT_SUM, "LAYERROWPCT.SUM", N_("Layer Row Sum %"), CTF_PERCENT, CTFA_SCALE) \ S(CTSF_LAYERCOLPCT_SUM, "LAYERCOLPCT.SUM", N_("Layer Column Sum %"), CTF_PERCENT, CTFA_SCALE) \ - \ - /* Multiple response sets. */ \ + +#if 0 /* Multiple response sets not yet implemented. */ S(CTSF_RESPONSES, "RESPONSES", N_("Responses"), CTF_COUNT, CTFA_MRSETS) \ S(CTSF_ROWPCT_RESPONSES, "ROWPCT.RESPONSES", N_("Row Responses %"), CTF_PERCENT, CTFA_MRSETS) \ S(CTSF_COLPCT_RESPONSES, "COLPCT.RESPONSES", N_("Column Responses %"), CTF_PERCENT, CTFA_MRSETS) \ @@ -139,6 +139,7 @@ enum ctables_vlabel S(CTSF_LAYERPCT_COUNT_RESPONSES, "LAYERPCT.COUNT.RESPONSES", N_("Layer Count % (Base: Responses)"), CTF_PERCENT, CTFA_MRSETS) \ S(CTSF_LAYERROWPCT_COUNT_RESPONSES, "LAYERROWPCT.COUNT.RESPONSES", N_("Layer Row Count % (Base: Responses)"), CTF_PERCENT, CTFA_MRSETS) \ S(CTSF_LAYERCOLPCT_COUNT_RESPONSES, "LAYERCOLPCT.RESPONSES.COUNT", N_("Layer Column Count % (Base: Responses)"), CTF_PERCENT, CTFA_MRSETS) +#endif enum ctables_summary_function { @@ -788,32 +789,59 @@ ctables_function_availability (enum ctables_summary_function f) static bool ctables_summary_function_is_count (enum ctables_summary_function f) { - static const bool is_count[N_CTSF_FUNCTIONS] = { - [CTSF_COUNT] = true, - [CTSF_ECOUNT] = true, - [CTSF_ROWPCT_COUNT] = true, - [CTSF_COLPCT_COUNT] = true, - [CTSF_TABLEPCT_COUNT] = true, - [CTSF_SUBTABLEPCT_COUNT] = true, - [CTSF_LAYERPCT_COUNT] = true, - [CTSF_LAYERROWPCT_COUNT] = true, - [CTSF_LAYERCOLPCT_COUNT] = true, - [CTSF_ROWPCT_RESPONSES_COUNT] = true, - [CTSF_COLPCT_RESPONSES_COUNT] = true, - [CTSF_TABLEPCT_RESPONSES_COUNT] = true, - [CTSF_SUBTABLEPCT_RESPONSES_COUNT] = true, - [CTSF_LAYERPCT_RESPONSES_COUNT] = true, - [CTSF_LAYERROWPCT_RESPONSES_COUNT] = true, - [CTSF_LAYERCOLPCT_RESPONSES_COUNT] = true, - [CTSF_ROWPCT_COUNT_RESPONSES] = true, - [CTSF_COLPCT_COUNT_RESPONSES] = true, - [CTSF_TABLEPCT_COUNT_RESPONSES] = true, - [CTSF_SUBTABLEPCT_COUNT_RESPONSES] = true, - [CTSF_LAYERPCT_COUNT_RESPONSES] = true, - [CTSF_LAYERROWPCT_COUNT_RESPONSES] = true, - [CTSF_LAYERCOLPCT_COUNT_RESPONSES] = true, - }; - return is_count[f]; + switch (f) + { + case CTSF_COUNT: + case CTSF_ECOUNT: + case CTSF_ROWPCT_COUNT: + case CTSF_COLPCT_COUNT: + case CTSF_TABLEPCT_COUNT: + case CTSF_SUBTABLEPCT_COUNT: + case CTSF_LAYERPCT_COUNT: + case CTSF_LAYERROWPCT_COUNT: + case CTSF_LAYERCOLPCT_COUNT: + return true; + + case CTSF_ROWPCT_VALIDN: + case CTSF_COLPCT_VALIDN: + case CTSF_TABLEPCT_VALIDN: + case CTSF_SUBTABLEPCT_VALIDN: + case CTSF_LAYERPCT_VALIDN: + case CTSF_LAYERROWPCT_VALIDN: + case CTSF_LAYERCOLPCT_VALIDN: + case CTSF_ROWPCT_TOTALN: + case CTSF_COLPCT_TOTALN: + case CTSF_TABLEPCT_TOTALN: + case CTSF_SUBTABLEPCT_TOTALN: + case CTSF_LAYERPCT_TOTALN: + case CTSF_LAYERROWPCT_TOTALN: + case CTSF_LAYERCOLPCT_TOTALN: + case CTSF_MAXIMUM: + case CTSF_MEAN: + case CTSF_MEDIAN: + case CTSF_MINIMUM: + case CTSF_MISSING: + case CTSF_MODE: + case CTSF_PTILE: + case CTSF_RANGE: + case CTSF_SEMEAN: + case CTSF_STDDEV: + case CTSF_SUM: + case CSTF_TOTALN: + case CTSF_ETOTALN: + case CTSF_VALIDN: + case CTSF_EVALIDN: + case CTSF_VARIANCE: + case CTSF_ROWPCT_SUM: + case CTSF_COLPCT_SUM: + case CTSF_TABLEPCT_SUM: + case CTSF_SUBTABLEPCT_SUM: + case CTSF_LAYERPCT_SUM: + case CTSF_LAYERROWPCT_SUM: + case CTSF_LAYERCOLPCT_SUM: + return false; + } + NOT_REACHED (); } @@ -2130,30 +2158,6 @@ ctables_summary_init (union ctables_summary *s, s->ovalue = SYSMIS; } break; - - case CTSF_RESPONSES: - case CTSF_ROWPCT_RESPONSES: - case CTSF_COLPCT_RESPONSES: - case CTSF_TABLEPCT_RESPONSES: - case CTSF_SUBTABLEPCT_RESPONSES: - case CTSF_LAYERPCT_RESPONSES: - case CTSF_LAYERROWPCT_RESPONSES: - case CTSF_LAYERCOLPCT_RESPONSES: - case CTSF_ROWPCT_RESPONSES_COUNT: - case CTSF_COLPCT_RESPONSES_COUNT: - case CTSF_TABLEPCT_RESPONSES_COUNT: - case CTSF_SUBTABLEPCT_RESPONSES_COUNT: - case CTSF_LAYERPCT_RESPONSES_COUNT: - case CTSF_LAYERROWPCT_RESPONSES_COUNT: - case CTSF_LAYERCOLPCT_RESPONSES_COUNT: - case CTSF_ROWPCT_COUNT_RESPONSES: - case CTSF_COLPCT_COUNT_RESPONSES: - case CTSF_TABLEPCT_COUNT_RESPONSES: - case CTSF_SUBTABLEPCT_COUNT_RESPONSES: - case CTSF_LAYERPCT_COUNT_RESPONSES: - case CTSF_LAYERROWPCT_COUNT_RESPONSES: - case CTSF_LAYERCOLPCT_COUNT_RESPONSES: - NOT_REACHED (); } } @@ -2218,30 +2222,6 @@ ctables_summary_uninit (union ctables_summary *s, case CTSF_PTILE: casewriter_destroy (s->writer); break; - - case CTSF_RESPONSES: - case CTSF_ROWPCT_RESPONSES: - case CTSF_COLPCT_RESPONSES: - case CTSF_TABLEPCT_RESPONSES: - case CTSF_SUBTABLEPCT_RESPONSES: - case CTSF_LAYERPCT_RESPONSES: - case CTSF_LAYERROWPCT_RESPONSES: - case CTSF_LAYERCOLPCT_RESPONSES: - case CTSF_ROWPCT_RESPONSES_COUNT: - case CTSF_COLPCT_RESPONSES_COUNT: - case CTSF_TABLEPCT_RESPONSES_COUNT: - case CTSF_SUBTABLEPCT_RESPONSES_COUNT: - case CTSF_LAYERPCT_RESPONSES_COUNT: - case CTSF_LAYERROWPCT_RESPONSES_COUNT: - case CTSF_LAYERCOLPCT_RESPONSES_COUNT: - case CTSF_ROWPCT_COUNT_RESPONSES: - case CTSF_COLPCT_COUNT_RESPONSES: - case CTSF_TABLEPCT_COUNT_RESPONSES: - case CTSF_SUBTABLEPCT_COUNT_RESPONSES: - case CTSF_LAYERPCT_COUNT_RESPONSES: - case CTSF_LAYERROWPCT_COUNT_RESPONSES: - case CTSF_LAYERCOLPCT_COUNT_RESPONSES: - NOT_REACHED (); } } @@ -2335,30 +2315,6 @@ ctables_summary_add (union ctables_summary *s, casewriter_write (s->writer, c); } break; - - case CTSF_RESPONSES: - case CTSF_ROWPCT_RESPONSES: - case CTSF_COLPCT_RESPONSES: - case CTSF_TABLEPCT_RESPONSES: - case CTSF_SUBTABLEPCT_RESPONSES: - case CTSF_LAYERPCT_RESPONSES: - case CTSF_LAYERROWPCT_RESPONSES: - case CTSF_LAYERCOLPCT_RESPONSES: - case CTSF_ROWPCT_RESPONSES_COUNT: - case CTSF_COLPCT_RESPONSES_COUNT: - case CTSF_TABLEPCT_RESPONSES_COUNT: - case CTSF_SUBTABLEPCT_RESPONSES_COUNT: - case CTSF_LAYERPCT_RESPONSES_COUNT: - case CTSF_LAYERROWPCT_RESPONSES_COUNT: - case CTSF_LAYERCOLPCT_RESPONSES_COUNT: - case CTSF_ROWPCT_COUNT_RESPONSES: - case CTSF_COLPCT_COUNT_RESPONSES: - case CTSF_TABLEPCT_COUNT_RESPONSES: - case CTSF_SUBTABLEPCT_COUNT_RESPONSES: - case CTSF_LAYERPCT_COUNT_RESPONSES: - case CTSF_LAYERROWPCT_COUNT_RESPONSES: - case CTSF_LAYERCOLPCT_COUNT_RESPONSES: - NOT_REACHED (); } } @@ -2385,67 +2341,45 @@ ctables_function_domain (enum ctables_summary_function function) case CTSF_MEDIAN: case CTSF_PTILE: case CTSF_MODE: - case CTSF_RESPONSES: NOT_REACHED (); case CTSF_COLPCT_COUNT: - case CTSF_COLPCT_COUNT_RESPONSES: - case CTSF_COLPCT_RESPONSES: - case CTSF_COLPCT_RESPONSES_COUNT: case CTSF_COLPCT_SUM: case CTSF_COLPCT_TOTALN: case CTSF_COLPCT_VALIDN: return CTDT_COL; case CTSF_LAYERCOLPCT_COUNT: - case CTSF_LAYERCOLPCT_COUNT_RESPONSES: - case CTSF_LAYERCOLPCT_RESPONSES: - case CTSF_LAYERCOLPCT_RESPONSES_COUNT: case CTSF_LAYERCOLPCT_SUM: case CTSF_LAYERCOLPCT_TOTALN: case CTSF_LAYERCOLPCT_VALIDN: return CTDT_LAYERCOL; case CTSF_LAYERPCT_COUNT: - case CTSF_LAYERPCT_COUNT_RESPONSES: - case CTSF_LAYERPCT_RESPONSES: - case CTSF_LAYERPCT_RESPONSES_COUNT: case CTSF_LAYERPCT_SUM: case CTSF_LAYERPCT_TOTALN: case CTSF_LAYERPCT_VALIDN: return CTDT_LAYER; case CTSF_LAYERROWPCT_COUNT: - case CTSF_LAYERROWPCT_COUNT_RESPONSES: - case CTSF_LAYERROWPCT_RESPONSES: - case CTSF_LAYERROWPCT_RESPONSES_COUNT: case CTSF_LAYERROWPCT_SUM: case CTSF_LAYERROWPCT_TOTALN: case CTSF_LAYERROWPCT_VALIDN: return CTDT_LAYERROW; case CTSF_ROWPCT_COUNT: - case CTSF_ROWPCT_COUNT_RESPONSES: - case CTSF_ROWPCT_RESPONSES: - case CTSF_ROWPCT_RESPONSES_COUNT: case CTSF_ROWPCT_SUM: case CTSF_ROWPCT_TOTALN: case CTSF_ROWPCT_VALIDN: return CTDT_ROW; case CTSF_SUBTABLEPCT_COUNT: - case CTSF_SUBTABLEPCT_COUNT_RESPONSES: - case CTSF_SUBTABLEPCT_RESPONSES: - case CTSF_SUBTABLEPCT_RESPONSES_COUNT: case CTSF_SUBTABLEPCT_SUM: case CTSF_SUBTABLEPCT_TOTALN: case CTSF_SUBTABLEPCT_VALIDN: return CTDT_SUBTABLE; case CTSF_TABLEPCT_COUNT: - case CTSF_TABLEPCT_COUNT_RESPONSES: - case CTSF_TABLEPCT_RESPONSES: - case CTSF_TABLEPCT_RESPONSES_COUNT: case CTSF_TABLEPCT_SUM: case CTSF_TABLEPCT_TOTALN: case CTSF_TABLEPCT_VALIDN: @@ -2589,30 +2523,6 @@ ctables_summary_value (const struct ctables_cell *cell, statistic_destroy (&mode->parent.parent); } return s->ovalue; - - case CTSF_RESPONSES: - case CTSF_ROWPCT_RESPONSES: - case CTSF_COLPCT_RESPONSES: - case CTSF_TABLEPCT_RESPONSES: - case CTSF_SUBTABLEPCT_RESPONSES: - case CTSF_LAYERPCT_RESPONSES: - case CTSF_LAYERROWPCT_RESPONSES: - case CTSF_LAYERCOLPCT_RESPONSES: - case CTSF_ROWPCT_RESPONSES_COUNT: - case CTSF_COLPCT_RESPONSES_COUNT: - case CTSF_TABLEPCT_RESPONSES_COUNT: - case CTSF_SUBTABLEPCT_RESPONSES_COUNT: - case CTSF_LAYERPCT_RESPONSES_COUNT: - case CTSF_LAYERROWPCT_RESPONSES_COUNT: - case CTSF_LAYERCOLPCT_RESPONSES_COUNT: - case CTSF_ROWPCT_COUNT_RESPONSES: - case CTSF_COLPCT_COUNT_RESPONSES: - case CTSF_TABLEPCT_COUNT_RESPONSES: - case CTSF_SUBTABLEPCT_COUNT_RESPONSES: - case CTSF_LAYERPCT_COUNT_RESPONSES: - case CTSF_LAYERROWPCT_COUNT_RESPONSES: - case CTSF_LAYERCOLPCT_COUNT_RESPONSES: - NOT_REACHED (); } NOT_REACHED (); -- 2.30.2