]> mj.ucw.cz Git - libucw.git/commitdiff
tableprinter: code cleanup
authorRobert Kessl <kesslr@centrum.cz>
Fri, 25 Jul 2014 13:16:17 +0000 (15:16 +0200)
committerRobert Kessl <kesslr@centrum.cz>
Fri, 25 Jul 2014 13:16:17 +0000 (15:16 +0200)
ucw/table.c
ucw/table.h

index 073161365232bbb4fb12a850b21c1aa7e9f39aaa..1bcbb75fc1acc87c6be3475fc7fb2f8028d21452 100644 (file)
@@ -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;
 }
index 017e0652f01802871865f203bb91e815e827973d..b5898b41036779acab7bd565092fcfc4bcd5d065 100644 (file)
@@ -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