]> mj.ucw.cz Git - libucw.git/commitdiff
tableprinter: update of size units
authorRobert Kessl <kesslr@centrum.cz>
Thu, 10 Jul 2014 08:17:17 +0000 (10:17 +0200)
committerRobert Kessl <kesslr@centrum.cz>
Thu, 10 Jul 2014 08:17:17 +0000 (10:17 +0200)
ucw/table-test-2.c

index e4a06830d7a6a9ce89ed6ab7b0017be3103f62f7..8b58dfa96a5cbe269ede8e02fe7840bf3db4f6d1 100644 (file)
@@ -37,24 +37,24 @@ static void do_test(void)
   table_col_timestamp(tbl, TEST_COL1_TS, test_time);
   table_end_row(tbl);
 
-  tbl->column_order[TEST_COL0_SIZE].output_type = UNIT_SIZE_KILOBYTE;
+  tbl->column_order[TEST_COL0_SIZE].output_type = SIZE_UNIT_KILOBYTE;
   table_col_size(tbl, TEST_COL0_SIZE, test_size);
   table_col_timestamp(tbl, TEST_COL1_TS, test_time);
   table_end_row(tbl);
 
-  tbl->column_order[TEST_COL0_SIZE].output_type = UNIT_SIZE_MEGABYTE;
+  tbl->column_order[TEST_COL0_SIZE].output_type = SIZE_UNIT_MEGABYTE;
   table_col_size(tbl, TEST_COL0_SIZE, test_size);
   table_col_timestamp(tbl, TEST_COL1_TS, test_time);
   table_end_row(tbl);
 
-  tbl->column_order[TEST_COL0_SIZE].output_type = UNIT_SIZE_GIGABYTE;
+  tbl->column_order[TEST_COL0_SIZE].output_type = SIZE_UNIT_GIGABYTE;
   tbl->column_order[TEST_COL1_TS].output_type = TIMESTAMP_DATETIME;
   table_col_size(tbl, TEST_COL0_SIZE, test_size);
   table_col_timestamp(tbl, TEST_COL1_TS, test_time);
   table_end_row(tbl);
 
   test_size = test_size * 1024LU;
-  tbl->column_order[TEST_COL0_SIZE].output_type = UNIT_SIZE_TERABYTE;
+  tbl->column_order[TEST_COL0_SIZE].output_type = SIZE_UNIT_TERABYTE;
   tbl->column_order[TEST_COL1_TS].output_type = TIMESTAMP_DATETIME;
   table_col_size(tbl, TEST_COL0_SIZE, test_size);
   table_col_timestamp(tbl, TEST_COL1_TS, test_time);
@@ -68,7 +68,7 @@ static void do_test(void)
 
 static struct table_template test_tbl2 = {
   TBL_COLUMNS {
-    [TEST_COL0_SIZE] = TBL_COL_SIZE_FMT("size", 15, UNIT_SIZE_BYTE),
+    [TEST_COL0_SIZE] = TBL_COL_SIZE_FMT("size", 15, SIZE_UNIT_BYTE),
     [TEST_COL1_TS] = TBL_COL_TIMESTAMP("ts", 20),
     TBL_COL_END
   },