From df9920692df37bc7b99ecd128357ae07845a15b0 Mon Sep 17 00:00:00 2001 From: Robert Kessl Date: Fri, 25 Jul 2014 15:16:17 +0200 Subject: [PATCH] tableprinter: code cleanup --- ucw/table.c | 4 ++-- ucw/table.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ucw/table.c b/ucw/table.c index 07316136..1bcbb75f 100644 --- a/ucw/table.c +++ b/ucw/table.c @@ -186,9 +186,9 @@ void table_set_col_order(struct table *tbl, int *col_order, int cols_to_output) table_update_ll(tbl); } -bool table_col_is_printed(struct table *tbl, uint col_idx) +bool table_col_is_printed(struct table *tbl, uint col_def_idx) { - if(tbl->ll_headers[col_idx] == -1) return 0; + if(tbl->ll_headers[col_def_idx] == -1) return 0; return 1; } diff --git a/ucw/table.h b/ucw/table.h index 017e0652..b5898b41 100644 --- a/ucw/table.h +++ b/ucw/table.h @@ -106,7 +106,7 @@ struct table_template { uint cols_to_output; // [*] Number of columns that are printed const char *col_delimiter; // [*] Delimiter that is placed between columns // Back-end used for table formatting and its private data - const struct table_formatter *formatter; // FIXME: should be const? + const struct table_formatter *formatter; }; /** @@ -354,7 +354,7 @@ void table_set_col_order(struct table *tbl, int *col_order, int col_order_size); * FIXME: Naming of arguments is confusing. @col_idx sometimes indexes * columns, but sometimes their instances. **/ -bool table_col_is_printed(struct table *tbl, uint col_idx); +bool table_col_is_printed(struct table *tbl, uint col_def_idx); /** * Sets the order in which the columns are printed. The specification is a string with comma-separated column -- 2.39.2