+static enum ctables_domain_type
+ctables_function_domain (enum ctables_summary_function function)
+{
+ switch (function)
+ {
+ case CTSF_COUNT:
+ case CTSF_ECOUNT:
+ case CTSF_MISSING:
+ case CSTF_TOTALN:
+ case CTSF_ETOTALN:
+ case CTSF_VALIDN:
+ case CTSF_EVALIDN:
+ case CTSF_MAXIMUM:
+ case CTSF_MINIMUM:
+ case CTSF_RANGE:
+ case CTSF_MEAN:
+ case CTSF_SEMEAN:
+ case CTSF_STDDEV:
+ case CTSF_SUM:
+ case CTSF_VARIANCE:
+ 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:
+ return CTDT_TABLE;
+ }
+
+ NOT_REACHED ();
+}
+