From 5cc88fdabd7f3bd107052538f9f1b961f4914385 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 4 Aug 2009 20:46:33 -0700 Subject: [PATCH] output: Remove write-only "col_group' member from struct tab_table. It probably makes sense to revive support for this feature at some point, but that time has not yet arrived. Instead, since it's currently not used and not implemented, just remove it. --- src/language/data-io/data-parser.c | 4 ++-- src/language/data-io/print.c | 2 +- src/language/dictionary/sys-file-info.c | 6 +++--- src/language/stats/descriptives.c | 2 +- src/language/stats/frequencies.q | 4 ++-- src/language/stats/t-test.q | 4 ++-- src/output/table.c | 7 ++----- src/output/table.h | 3 +-- 8 files changed, 14 insertions(+), 18 deletions(-) diff --git a/src/language/data-io/data-parser.c b/src/language/data-io/data-parser.c index 258a42a0..d348a4e2 100644 --- a/src/language/data-io/data-parser.c +++ b/src/language/data-io/data-parser.c @@ -639,7 +639,7 @@ dump_fixed_table (const struct data_parser *parser, size_t i; t = tab_create (4, parser->field_cnt + 1, 0); - tab_columns (t, TAB_COL_DOWN, 1); + tab_columns (t, TAB_COL_DOWN); tab_headers (t, 0, 0, 1, 0); tab_text (t, 0, 0, TAB_CENTER | TAT_TITLE, _("Variable")); tab_text (t, 1, 0, TAB_CENTER | TAT_TITLE, _("Record")); @@ -680,7 +680,7 @@ dump_delimited_table (const struct data_parser *parser, size_t i; t = tab_create (2, parser->field_cnt + 1, 0); - tab_columns (t, TAB_COL_DOWN, 1); + tab_columns (t, TAB_COL_DOWN); tab_headers (t, 0, 0, 1, 0); tab_text (t, 0, 0, TAB_CENTER | TAT_TITLE, _("Variable")); tab_text (t, 1, 0, TAB_CENTER | TAT_TITLE, _("Format")); diff --git a/src/language/data-io/print.c b/src/language/data-io/print.c index cb06dc64..fa84f83a 100644 --- a/src/language/data-io/print.c +++ b/src/language/data-io/print.c @@ -396,7 +396,7 @@ dump_table (struct print_trns *trns, const struct file_handle *fh) spec_cnt = ll_count (&trns->specs); t = tab_create (4, spec_cnt + 1, 0); - tab_columns (t, TAB_COL_DOWN, 1); + tab_columns (t, TAB_COL_DOWN); tab_box (t, TAL_1, TAL_1, TAL_0, TAL_1, 0, 0, 3, spec_cnt); tab_hline (t, TAL_2, 0, 3, 1); tab_headers (t, 0, 0, 1, 0); diff --git a/src/language/dictionary/sys-file-info.c b/src/language/dictionary/sys-file-info.c index 1eeb9a37..01f4246f 100644 --- a/src/language/dictionary/sys-file-info.c +++ b/src/language/dictionary/sys-file-info.c @@ -418,7 +418,7 @@ display_variables (const struct variable **vl, size_t n, int flags) if (flags & ~DF_DICT_INDEX) tab_vline (t, TAL_1, nc - 1, 0, r - 1); tab_resize (t, -1, r); - tab_columns (t, TAB_COL_DOWN, 1); + tab_columns (t, TAB_COL_DOWN); tab_submit (t); } @@ -491,7 +491,7 @@ display_data_file_attributes (struct attrset *set, int flags) tab_text (t, 0, 0, TAB_LEFT | TAT_TITLE, _("Attribute")); tab_text (t, 1, 0, TAB_LEFT | TAT_TITLE, _("Value")); display_attributes (t, set, flags, 0, 1); - tab_columns (t, TAB_COL_DOWN, 1); + tab_columns (t, TAB_COL_DOWN); tab_dim (t, tab_natural_dimensions, NULL, NULL); tab_title (t, "Custom data file attributes."); tab_submit (t); @@ -718,7 +718,7 @@ display_vectors (const struct dictionary *dict, int sorted) t = tab_create (4, nrow + 1, 0); tab_headers (t, 0, 0, 1, 0); - tab_columns (t, TAB_COL_DOWN, 1); + tab_columns (t, TAB_COL_DOWN); tab_dim (t, tab_natural_dimensions, NULL, NULL); tab_box (t, TAL_1, TAL_1, -1, -1, 0, 0, 3, nrow); tab_box (t, -1, -1, -1, TAL_1, 0, 0, 3, nrow); diff --git a/src/language/stats/descriptives.c b/src/language/stats/descriptives.c index 16869a18..7ecf7350 100644 --- a/src/language/stats/descriptives.c +++ b/src/language/stats/descriptives.c @@ -554,7 +554,7 @@ dump_z_table (struct dsc_proc *dsc) t = tab_create (2, cnt + 1, 0); tab_title (t, _("Mapping of variables to corresponding Z-scores.")); - tab_columns (t, SOM_COL_DOWN, 1); + tab_columns (t, SOM_COL_DOWN); tab_headers (t, 0, 0, 1, 0); tab_box (t, TAL_1, TAL_1, TAL_0, TAL_1, 0, 0, 1, cnt); tab_hline (t, TAL_2, 0, 1, 1); diff --git a/src/language/stats/frequencies.q b/src/language/stats/frequencies.q index 77b1d5f0..72c8491b 100644 --- a/src/language/stats/frequencies.q +++ b/src/language/stats/frequencies.q @@ -1230,7 +1230,7 @@ dump_condensed (const struct variable *v, const struct variable *wv) 0, 0, 3, r - 1); tab_hline (t, TAL_2, 0, 3, 2); tab_title (t, "%s", var_to_string (v)); - tab_columns (t, SOM_COL_DOWN, 1); + tab_columns (t, SOM_COL_DOWN); tab_submit (t); } @@ -1440,7 +1440,7 @@ dump_statistics (const struct variable *v, bool show_varname, var_get_print_format (v)); } - tab_columns (t, SOM_COL_DOWN, 1); + tab_columns (t, SOM_COL_DOWN); if (show_varname) tab_title (t, "%s", var_to_string (v)); else diff --git a/src/language/stats/t-test.q b/src/language/stats/t-test.q index 500e18ff..fad93b4f 100644 --- a/src/language/stats/t-test.q +++ b/src/language/stats/t-test.q @@ -477,7 +477,7 @@ ssbox_base_init (struct ssbox *this, int cols, int rows) this->finalize = ssbox_base_finalize; this->t = tab_create (cols, rows, 0); - tab_columns (this->t, SOM_COL_DOWN, 1); + tab_columns (this->t, SOM_COL_DOWN); tab_headers (this->t, 0, 0, 1, 0); tab_box (this->t, TAL_2, TAL_2, TAL_0, TAL_1, 0, 0, cols - 1, rows - 1); tab_hline (this->t, TAL_2, 0, cols- 1, 1); @@ -1093,7 +1093,7 @@ pscbox (struct t_test_proc *proc) table = tab_create (cols, rows, 0); - tab_columns (table, SOM_COL_DOWN, 1); + tab_columns (table, SOM_COL_DOWN); tab_headers (table, 0, 0, 1, 0); tab_box (table, TAL_2, TAL_2, TAL_0, TAL_1, 0, 0, cols - 1, rows - 1); tab_hline (table, TAL_2, 0, cols - 1, 1); diff --git a/src/output/table.c b/src/output/table.c index f6afa89c..b6b5b84c 100644 --- a/src/output/table.c +++ b/src/output/table.c @@ -63,7 +63,6 @@ tab_create (int nc, int nr, int reallocable UNUSED) t = pool_create_container (struct tab_table, container); t->ref_cnt = 1; t->col_style = TAB_COL_NONE; - t->col_group = 0; t->title = NULL; t->flags = SOMF_NONE; t->nr = nr; @@ -222,14 +221,12 @@ tab_headers (struct tab_table *table, int l, int r, int t, int b) /* Set up table T so that, when it is an appropriate size, it will be displayed across the page in columns. - STYLE is a TAB_COL_* constant. GROUP is the number of rows to take - as a unit. */ + STYLE is a TAB_COL_* constant. */ void -tab_columns (struct tab_table *t, int style, int group) +tab_columns (struct tab_table *t, int style) { assert (t != NULL); t->col_style = style; - t->col_group = group; } /* Rules. */ diff --git a/src/output/table.h b/src/output/table.h index d5a03298..3cfac386 100644 --- a/src/output/table.h +++ b/src/output/table.h @@ -79,7 +79,6 @@ struct tab_table /* Contents. */ int col_style; /* Columns: One of TAB_COL_*. */ - int col_group; /* Number of rows per column group. */ char *title; /* Table title. */ unsigned flags; /* SOMF_*. */ int nc, nr; /* Number of columns, rows. */ @@ -133,7 +132,7 @@ void tab_ref (struct tab_table *); void tab_resize (struct tab_table *, int nc, int nr); void tab_realloc (struct tab_table *, int nc, int nr); void tab_headers (struct tab_table *, int l, int r, int t, int b); -void tab_columns (struct tab_table *, int style, int group); +void tab_columns (struct tab_table *, int style); void tab_title (struct tab_table *, const char *, ...) PRINTF_FORMAT (2, 3); void tab_flags (struct tab_table *, unsigned); -- 2.30.2