From: Robert Kessl Date: Fri, 25 Jul 2014 13:16:17 +0000 (+0200) Subject: tableprinter: code cleanup X-Git-Tag: v6.1~3^2~40 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=df9920692df37bc7b99ecd128357ae07845a15b0;p=libucw.git tableprinter: code cleanup --- 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