summaryrefslogtreecommitdiffstats
path: root/libsmartcols/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | libsmartcols: document v2.27 symbolsKarel Zak2016-01-252-0/+8
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | libsmartcols: add 'Since' tag for gtkdoc for some functionsIgor Gnatenko2016-01-253-2/+10
| | | | | | | | Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* | libsmartcols: add few methods to get information about titleIgor Gnatenko2016-01-253-0/+45
| | | | | | | | Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* | libsmartcols: position of title in fact unsignedIgor Gnatenko2016-01-252-2/+2
| | | | | | | | Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* | libsmartcols: support multibyte titles, rename wrap to paddingKarel Zak2016-01-226-45/+56
| | | | | | | | | | | | | | | | | | - let's support multibyte table titles - use lib/mbalign.c to align the title - rename title_wrap to title_padding (we already use "wrap" on another places for another things) Signed-off-by: Karel Zak <kzak@redhat.com>
* | libsmartcols: add title to the test applicationKarel Zak2016-01-221-0/+2
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | libsmartcols: add JSON to the test applicationKarel Zak2016-01-221-2/+8
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | libsmartcols: set everything once in scols_table_set_title()Igor Gnatenko2016-01-221-9/+8Star
| | | | | | | | | | Reported-by: Karel Zak <kzak@redhat.com> Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* | libsmartcols: put new line after titleIgor Gnatenko2016-01-211-0/+2
| | | | | | | | Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* | libsmartcols: fix title aligning to centerIgor Gnatenko2016-01-211-1/+1
| | | | | | | | Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* | libsmartcols: don't try to align title if it's more that termIgor Gnatenko2016-01-211-0/+3
| | | | | | | | Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* | libsmartcols: use symbols for title wrapIgor Gnatenko2016-01-216-6/+37
| | | | | | | | Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* | libsmartcols: implement title of tableIgor Gnatenko2016-01-215-1/+114
|/ | | | | Reference: https://github.com/karelzak/util-linux/issues/258 Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* libsmartcols: don't sort if cmpfunc() is not setKarel Zak2016-01-181-1/+1
| | | | Reported-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* libsmartcols: be sure column is unusedKarel Zak2016-01-181-2/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'gh/254' of https://github.com/ignatenkobrain/util-linuxKarel Zak2016-01-183-0/+11
|\
| * libsmartcols: reflect changinging SCOLS_FL_TREE after adding to tableIgor Gnatenko2016-01-173-0/+11
| | | | | | | | | | | | | | | | When scols_column_set_flags() is called we will compare before & after status of SCOLS_FL_TREE flag and appropriately handle tb->ntreecols. Reference: https://github.com/karelzak/util-linux/issues/254 Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* | libsmartcols: add scols_column_is_hidden into sym fileIgor Gnatenko2016-01-151-1/+2
|/ | | | | | | | In commit 6d6b6d185e7427e2b5590349edd76d019b0fe920 we forgot to add this function to sym file and now we are getting undefined symbol: scols_column_is_hidden Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* libsmartcols: allow to set data by reference to libscols_columnKarel Zak2016-01-123-0/+38
| | | | | References: https://github.com/karelzak/util-linux/issues/251 Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: make output buffer size estimation more robust and elegantKarel Zak2016-01-072-7/+52
| | | | | Reported-by: Andreas Henriksson <andreas@fatal.se> Signed-off-by: Karel Zak <kzak@redhat.com>
* lib/tty: Pass default width to get_terminal_width()Boris Egorov2016-01-061-3/+1Star
| | | | | | | | | | Almost any code calling get_terminal_width() checks returned width for non-positive values and sets it to some default value (say, 80). So, let's pass this default value directly to the function. [kzak@redhat.com: - get_terminal_width() refactoring] Signed-off-by: Karel Zak <kzak@redhat.com>
* scols/table_print: restore old stream after printing to strIgor Gnatenko2015-12-131-1/+3
| | | | | Reference: https://github.com/karelzak/util-linux/issues/240 Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* libsmartcols: add SCOLS_FL_HIDDENKarel Zak2015-12-104-7/+22
| | | | | | Export "don't print this column" functionality by public API. Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: fix right-aligned logic for last columnKarel Zak2015-12-071-4/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: don't use fprintf() when count cellsKarel Zak2015-12-071-1/+3
| | | | | | fprintf("%*s") is based on bytes, no cells. Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: add scols_table_enable_nowrap()Karel Zak2015-12-075-6/+74
| | | | | | | This allows to use libsmartcols in ncurses programs without any additional voodoo. Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: make sure we have space for ascii artKarel Zak2015-11-301-9/+12
| | | | | | | | | | * more verbose output about columns width counting * strlen_line() does not care about space between columns and extra tree ASCII art. Let's assume that all termwith is possible to use for this extra stuff, it means that maximal buffer size is biggest_line + termwidth. Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: allow to reduce tree columnsKarel Zak2015-11-302-5/+12
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: add --disable-assertKarel Zak2015-08-041-9/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: make child-parent reference more robust [clang analyze]Karel Zak2015-07-291-5/+4Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: reduce relative columns more aggressivelyKarel Zak2015-07-271-1/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: don't link with tinfoKarel Zak2015-07-242-3/+2Star
| | | | | | | Let's move color names to sequence translation to separate file to make it usable without all the stuff in lib/colors.c. Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: keep JSON field names lower-caseKarel Zak2015-06-051-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* losetup: add --jsonKarel Zak2015-06-051-6/+11
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: add JSON output formatKarel Zak2015-06-045-24/+239
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lib/colors: use libtinfo to check terminal capabilityKarel Zak2015-02-271-2/+3
| | | | | | | | | | | | | | | The current implementation assumes that all terminals supports colors and users are forcet to use terminal-colors.d/ to disable colors for some terminals. This patch checks for maximal supported colors for the current terminal and colors are automatically disabled for terminals like vt100. The patch moves lib/colors.c from libcommon.la to libtcolors.la to avoid collisions with another utils. Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: remove assert(arg) from public functionsKarel Zak2015-02-165-103/+3Star
| | | | | Reported-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: remove unnecessary check [coverity scan]Karel Zak2015-01-291-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: fix two "maybe be" duplications in program commentsBenno Schulenberg2015-01-261-16/+14Star
| | | | | | Also improve the grammar of the comments and some neighbours. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* libsmartcols: (docs) improve section descriptionsKarel Zak2015-01-136-6/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: cleanup gtk-docs warningsKarel Zak2015-01-131-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: use ASCII art for trees rather than paddingKarel Zak2015-01-071-35/+97
| | | | | | | Based on patch from Roman Odaisky. References: https://launchpad.net/bugs/1406133 Signed-off-by: Karel Zak <kzak@redhat.com>
* maint: fix shadow declarationSami Kerola2015-01-071-3/+3
| | | | | | | | | | | | | | | | This change fixes all shadow declarations. The worth while to mention fix is with libfdisk sun geometry. It comes from bitops.h cpu_to_be16 macro that further expands from include/bits/byteswap.h that has the shadowing. libfdisk/src/sun.c:961:173: warning: declaration of '__v' shadows a previous local [-Wshadow] libfdisk/src/sun.c:961:69: warning: shadowed declaration is here [-Wshadow] libfdisk/src/sun.c:961:178: warning: declaration of '__x' shadows a previous local [-Wshadow] libfdisk/src/sun.c:961:74: warning: shadowed declaration is here [-Wshadow] That could have caused earlier some unexpected results. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* build-sys: cleanup library symbol filesKarel Zak2014-11-201-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: clean up debug, add help debug maskKarel Zak2014-11-032-10/+20
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* textual: fix couple typos in commentsSami Kerola2014-10-011-1/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* libs/debug: accept human readable names for _DEBUG=Ondrej Oprala2014-08-131-0/+9
| | | | | | | | | | For example $ LIBMOUNT_DEBUG=tab,cache findmnt to debug only TAB and CACHE subsystem. Signed-off-by: Ondrej Oprala <ooprala@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: avoid variable dereference after releaseSami Kerola2014-07-131-1/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* textual: fix some typosSami Kerola2014-07-131-1/+1
| | | | | | | Found with misspell-check version 2.0d. Reference: https://github.com/lyda/misspell-check Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* libsmartcols: add note about deallocationsKarel Zak2014-06-303-3/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>