diff options
author | Karel Zak | 2016-01-25 13:17:43 +0100 |
---|---|---|
committer | Karel Zak | 2016-01-25 13:17:43 +0100 |
commit | 2f09ae9d5d711ca299f6f25d194d2cdddee6c748 (patch) | |
tree | 77fbbb0c7e5322fa2c65bcc65f88bce0f76e2d60 /libsmartcols | |
parent | Merge branch 'scols_fl_wrap' of https://github.com/ignatenkobrain/util-linux (diff) | |
download | kernel-qcow2-util-linux-2f09ae9d5d711ca299f6f25d194d2cdddee6c748.tar.gz kernel-qcow2-util-linux-2f09ae9d5d711ca299f6f25d194d2cdddee6c748.tar.xz kernel-qcow2-util-linux-2f09ae9d5d711ca299f6f25d194d2cdddee6c748.zip |
libsmartcols: add samples directory
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libsmartcols')
-rw-r--r-- | libsmartcols/Makemodule.am | 1 | ||||
-rw-r--r-- | libsmartcols/samples/tree.c (renamed from libsmartcols/src/test.c) | 6 | ||||
-rw-r--r-- | libsmartcols/src/Makemodule.am | 13 | ||||
-rw-r--r-- | libsmartcols/src/column.c | 2 |
4 files changed, 6 insertions, 16 deletions
diff --git a/libsmartcols/Makemodule.am b/libsmartcols/Makemodule.am index d5b91ffa3..012848b2b 100644 --- a/libsmartcols/Makemodule.am +++ b/libsmartcols/Makemodule.am @@ -1,6 +1,7 @@ if BUILD_LIBSMARTCOLS include libsmartcols/src/Makemodule.am +include libsmartcols/samples/Makemodule.am if ENABLE_GTK_DOC # Docs uses separate Makefiles diff --git a/libsmartcols/src/test.c b/libsmartcols/samples/tree.c index f520d4c1c..7f41f9eb4 100644 --- a/libsmartcols/src/test.c +++ b/libsmartcols/samples/tree.c @@ -212,11 +212,11 @@ int main(int argc, char *argv[]) } scols_table_enable_colors(tb, 1); - scols_table_set_title(tb, "This is table title", SCOLS_TITLE_CENTER, "red"); - setup_columns(tb, notree); - while (optind < argc) + if (optind == argc) + add_lines(tb, "."); + else while (optind < argc) add_lines(tb, argv[optind++]); scols_print_table(tb); diff --git a/libsmartcols/src/Makemodule.am b/libsmartcols/src/Makemodule.am index 45a7eeab4..c2ec515d4 100644 --- a/libsmartcols/src/Makemodule.am +++ b/libsmartcols/src/Makemodule.am @@ -43,19 +43,6 @@ EXTRA_DIST += \ libsmartcols/src/libsmartcols.sym \ libsmartcols/src/libsmartcols.h.in - -if BUILD_LIBSMARTCOLS_TESTS -check_PROGRAMS += test_smartcols - -libsmartcols_tests_cflags = $(libsmartcols_la_CFLAGS) -libsmartcols_tests_ldadd = libsmartcols.la libcommon.la libtcolors.la - -test_smartcols_SOURCES = libsmartcols/src/test.c -test_smartcols_CFLAGS = $(libsmartcols_tests_cflags) -test_smartcols_LDADD = $(libsmartcols_tests_ldadd) -endif # BUILD_LIBSMARTCOLS_TESTS - - # move lib from $(usrlib_execdir) to $(libdir) if needed install-exec-hook-libsmartcols: if test "$(usrlib_execdir)" != "$(libdir)" -a -f "$(DESTDIR)$(usrlib_execdir)/libsmartcols.so"; then \ diff --git a/libsmartcols/src/column.c b/libsmartcols/src/column.c index 047373024..ce589684e 100644 --- a/libsmartcols/src/column.c +++ b/libsmartcols/src/column.c @@ -359,6 +359,8 @@ int scols_column_is_noextremes(struct libscols_column *cl) * Gets the value of @cl's flag wrap. * * Returns: wrap flag value, negative value in case of an error. + * + * Since: 2.28 */ int scols_column_is_wrap(struct libscols_column *cl) { |