summaryrefslogtreecommitdiff
path: root/libsmartcols
Commit message (Collapse)AuthorAgeFilesLines
* build-sys: use AC_PROG_MKDIR_P and remove a few gnuismsRuediger Meier2016-03-131-1/+1
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* misc: fix icc/clang compiler warningsRuediger Meier2016-03-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | clang warning: libmount/src/tab.c:1833:6: warning: variable 'rc' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] if (!mpc) ^~~~ icc printf warnings: libmount/src/monitor.c(348): warning #2279: printf/scanf format not a string literal and no format arguments DBG(MONITOR, ul_debugobj(mn, status == 1 ? " success" : " nothing")); ^ login-utils/vipw.c(348): warning #2279: printf/scanf format not a string literal and no format arguments : _("You are using shadow passwords on this system.\n")); ^ icc enum warnings: disk-utils/fdisk-menu.c(150): warning #188: enumerated type mixed with another type .exclude = FDISK_DISKLABEL_GPT | FDISK_DISKLABEL_BSD, ^ libsmartcols/src/table_print.c(750): warning #188: enumerated type mixed with another type &width, align, ^ Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* build-sys: fix if..endif for *_la_LDFLAGSKarel Zak2016-03-101-4/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: add and use openat build conditionalsRuediger Meier2016-03-071-1/+3
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* libsmartcols: fix uninitialized variableRuediger Meier2016-02-291-1/+1
| | | | | | This got broken in 2a750b4c. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* Merge branch 'ldadd-cflags-warnings' of https://github.com/rudimeier/util-linuxKarel Zak2016-02-245-15/+19
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'ldadd-cflags-warnings' of https://github.com/rudimeier/util-linux: build-sys: disable unused parameter warnings for some test progs misc: fix compiler warnungs (unsigned/signed) misc: fix warnings "unused parameter" [-Wunused-parameter] libfdisk: fix warnings, "redundant redeclaration" [-Wredundant-decls] tests: fix compiler warnings [-Wmissing-prototypes] libfdisk: fix compiler warnings [-Wmissing-prototypes] libfdisk: fix missing symbol libblkid: fix compiler warnings [-Wmissing-prototypes] libmount: add mnt_fs_set_priority() build-sys: always add AM_CFLAGS build-sys: always use global LDADD
| * build-sys: disable unused parameter warnings for some test progsRuediger Meier2016-02-231-8/+12
| | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * misc: fix compiler warnungs (unsigned/signed)Ruediger Meier2016-02-232-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These ones should be fixed: libblkid/src/probe.c:393:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] libblkid/src/probe.c:907:25: warning: signed and unsigned type in conditional expression [-Wsign-compare] libblkid/src/probe.c:1221:8: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] libblkid/src/partitions/partitions.c:540:47: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] libblkid/src/partitions/partitions.c:1043:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] libblkid/src/partitions/partitions.c:1056:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] libblkid/src/partitions/partitions.c:1057:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] libblkid/src/partitions/partitions.c:1061:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] libblkid/src/partitions/partitions.c:1199:27: warning: signed and unsigned type in conditional expression [-Wsign-compare] libblkid/src/partitions/partitions.c:1410:26: warning: signed and unsigned type in conditional expression [-Wsign-compare] libblkid/src/partitions/partitions.c:1431:25: warning: signed and unsigned type in conditional expression [-Wsign-compare] libblkid/src/superblocks/linux_raid.c:151:8: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] libblkid/src/superblocks/linux_raid.c:155:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] libblkid/src/superblocks/superblocks.c:375:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] libblkid/src/superblocks/xfs.c:141:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] libsmartcols/src/table.c:333:24: warning: signed and unsigned type in conditional expression [-Wsign-compare] libsmartcols/src/table.c:344:25: warning: signed and unsigned type in conditional expression [-Wsign-compare] libsmartcols/src/table_print.c:753:9: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] libfdisk/src/ask.c:364:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] libfdisk/src/utils.c:33:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] libfdisk/src/context.c:435:56: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] libfdisk/src/context.c:730:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] libfdisk/src/script.c:557:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] libfdisk/src/dos.c:1791:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] libfdisk/src/gpt.c:813:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] misc-utils/logger.c:408:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] misc-utils/logger.c:408:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] misc-utils/logger.c:408:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] misc-utils/logger.c:408:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] misc-utils/logger.c:408:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] disk-utils/partx.c:140:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] disk-utils/partx.c:551:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] disk-utils/partx.c:640:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * misc: fix warnings "unused parameter" [-Wunused-parameter]Ruediger Meier2016-02-231-3/+2
| | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests: fix compiler warnings [-Wmissing-prototypes]Ruediger Meier2016-02-231-1/+1
| | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * build-sys: always add AM_CFLAGSRuediger Meier2016-02-232-4/+5
| | | | | | | | | | | | | | | | We were missing our nice compliler warnings for many programs and libs. See next commits how many trivial and non-trival warnings have to be fixed. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * build-sys: always use global LDADDRuediger Meier2016-02-231-4/+4
| | | | | | | | | | | | | | | | This was a major showstopper when building on a system where LTLIBINTL libs are needed (e.g. OSX). Maybe there are a few test programs which wouldn't need LDADD ... never mind. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | libsmartcols: fix stupid typoKarel Zak2016-02-241-2/+1
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | libsmartcols: fix relative column width for maxoutKarel Zak2016-02-244-35/+56
|/ | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: fix scols_table_print_range() to print headerKarel Zak2016-02-221-1/+1
| | | | | References: https://github.com/karelzak/util-linux/issues/287 Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: implement scols_table_print_range_to_stringIgor Gnatenko2016-02-215-1/+51
| | | | | Reference: https://github.com/karelzak/util-linux/issues/283 Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* libsmartcols: add sample-scols-continuousKarel Zak2016-02-192-1/+135
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: support continuous printingKarel Zak2016-02-197-5/+45
| | | | | | | | | This patch allows to disable line-breaks. This feature is usable when you want to re-print the same line more than once -- move terminal cursor to the begin of the line and print again and again (aka progress bar). Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: add scols_table_print_range()Karel Zak2016-02-196-51/+142
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lib: rename strmode() and setmode()Ruediger Meier2016-02-181-1/+1
| | | | | | On BSD they are part of the standard C library. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* build-sys: check linker support for version scriptsRuediger Meier2016-02-181-1/+3
| | | | | | | The macro AX_CHECK_VSCRIPT was taken from gnu autoconf archive. http://www.gnu.org/software/autoconf-archive/ Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* libsmartcols: fill wrapped lines with space instead of 'x'Igor Gnatenko2016-02-161-1/+1
| | | | Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* libsmartcols: print title only with SCOLS_FMT_HUMANIgor Gnatenko2016-02-131-1/+2
| | | | | Reference: https://github.com/karelzak/util-linux/issues/279 Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* libsmartcols: rewrite ./sample-scols-wrapKarel Zak2016-02-101-13/+39
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: support multi-line cellsKarel Zak2016-02-104-42/+174
| | | | | | | | | | | The initial implementation has been introduced by SCOLS_FL_WRAP columns, but this patch clean ups all and makes things more elegant. Note that use SCOLS_FL_TREE | SCOLS_FL_WRAP for a column is bad idea and I don't think we need to fix it. References: https://github.com/karelzak/util-linux/issues/269 Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: use libscols_cell for titleKarel Zak2016-02-098-107/+78
| | | | | References: https://github.com/karelzak/util-linux/issues/270 Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: fix typos found by codespellRuediger Meier2016-02-031-1/+1
| | | | | | Using "codespell" from https://github.com/lucasdemarchi/codespell Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* libsmartcols: make SCOLS_FL_WRAP usable in treeKarel Zak2016-01-252-10/+16
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: reduce also SCOLS_FL_WRAP columnsKarel Zak2016-01-251-2/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: add wrap.c sampleKarel Zak2016-01-252-1/+85
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: fix title sampleKarel Zak2016-01-251-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: fix samples build, add title.cKarel Zak2016-01-252-0/+106
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: add samples directoryKarel Zak2016-01-254-16/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'scols_fl_wrap' of https://github.com/ignatenkobrain/util-linuxKarel Zak2016-01-255-1/+47
|\ | | | | | | | | | | | | | | * 'scols_fl_wrap' of https://github.com/ignatenkobrain/util-linux: libsmartcols: add scols_column_is_wrap to docs libsmartcols: don't loose colors when wrapping libsmartcols: wrap columns correctly with unicode libsmartcols: implement SCOLS_FL_WRAP
| * libsmartcols: add scols_column_is_wrap to docsIgor Gnatenko2016-01-221-0/+1
| | | | | | | | Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
| * libsmartcols: don't loose colors when wrappingIgor Gnatenko2016-01-221-0/+6
| | | | | | | | Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
| * libsmartcols: wrap columns correctly with unicodeIgor Gnatenko2016-01-221-5/+15
| | | | | | | | Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
| * libsmartcols: implement SCOLS_FL_WRAPIgor Gnatenko2016-01-224-1/+30
| | | | | | | | | | Reference: https://github.com/karelzak/util-linux/issues/257 Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* | libsmartcols: document v2.27 symbolsKarel Zak2016-01-253-0/+12
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | libsmartcols: add 'Since' tag for gtkdoc for some functionsIgor Gnatenko2016-01-254-2/+14
| | | | | | | | Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* | libsmartcols: add few methods to get information about titleIgor Gnatenko2016-01-254-0/+48
| | | | | | | | 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-227-46/+57
| | | | | | | | | | | | | | | | | | - 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: add new functions to docsKarel Zak2016-01-221-0/+2
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | libsmartcols: set everything once in scols_table_set_title()Igor Gnatenko2016-01-221-9/+8
| | | | | | | | | | 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>