]> mj.ucw.cz Git - libucw.git/commitdiff
tableprinter: table_set_col_order_by_name now calls table_make_default_column_order
authorRobert Kessl <kesslr@centrum.cz>
Mon, 21 Jul 2014 07:06:00 +0000 (09:06 +0200)
committerRobert Kessl <kesslr@centrum.cz>
Mon, 21 Jul 2014 07:06:00 +0000 (09:06 +0200)
ucw/table.c

index e81dcdd8d1027353d46c08679e6b467c95ab4aee..5260a5658e9ff6e72b1dcdcf5088f15a2ab01506 100644 (file)
@@ -244,12 +244,7 @@ int table_set_col_opt_default(struct table *tbl, int col_idx, const char *col_ar
 const char * table_set_col_order_by_name(struct table *tbl, const char *col_order_str)
 {
   if(col_order_str[0] == '*') {
-    int *col_order_int = alloca(sizeof(int) * tbl->column_count);
-    for(int i = 0; i < tbl->column_count; i++) {
-      col_order_int[i] = i;
-    }
-    table_set_col_order(tbl, col_order_int, tbl->column_count);
-
+    table_make_default_column_order(tbl);
     return NULL;
   }