From: Karel Zak Date: Fri, 4 Apr 2014 11:51:47 +0000 (+0200) Subject: libsmartcols: fix test X-Git-Tag: v2.25-rc1~333 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=71dbc865f83389cd4b05d6cf90373a85fa6ce879;p=thirdparty%2Futil-linux.git libsmartcols: fix test Signed-off-by: Karel Zak --- diff --git a/libsmartcols/src/test.c b/libsmartcols/src/test.c index 4a45a9a53e..19d35f00a7 100644 --- a/libsmartcols/src/test.c +++ b/libsmartcols/src/test.c @@ -36,7 +36,11 @@ int main(int argc, char *argv[]) struct libscols_column *cl; int notree = 0, clone = 0, i, color = 0; - tb = scols_new_table(NULL); + setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + + tb = scols_new_table(); if (!tb) err(EXIT_FAILURE, "table initialization failed"); @@ -47,14 +51,14 @@ int main(int argc, char *argv[]) scols_unref_table(tb); return EXIT_SUCCESS; } else if (argc == 2 && !strcmp(argv[1], "--max")) { - scols_table_set_max(tb, 1); + scols_table_enable_maxout(tb, 1); } else if (argc == 2 && !strcmp(argv[1], "--ascii")) { - scols_table_set_ascii(tb, 1); + scols_table_enable_ascii(tb, 1); } else if (argc == 2 && !strcmp(argv[1], "--raw")) { - scols_table_set_raw(tb, 1); + scols_table_enable_raw(tb, 1); notree = 1; } else if (argc == 2 && !strcmp(argv[1], "--export")) { - scols_table_set_export(tb, 1); + scols_table_enable_export(tb, 1); notree = 1; } else if (argc == 2 && !strcmp(argv[1], "--list")) { notree = 1; @@ -72,10 +76,6 @@ int main(int argc, char *argv[]) clone = 1; } - setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); - cl = scols_table_new_column(tb, "NAME", 0.3, notree ? 0 : SCOLS_FL_TREE); scols_table_enable_colors(tb, color);