summaryrefslogtreecommitdiffstats
path: root/text-utils
Commit message (Collapse)AuthorAgeFilesLines
* column: require column names for JSONKarel Zak2017-05-051-1/+7
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* column: use libsmartcols to avoid circular dependencesKarel Zak2017-05-051-4/+3Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* column: add note that circular dependencies are ignoredKarel Zak2017-05-051-1/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* column: add --tree to the man pageKarel Zak2017-05-051-3/+20
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* column: fix --tree id-parent loop crashKarel Zak2017-05-051-1/+5
| | | | | | The loop is silently ignored. Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: remove column-old.cKarel Zak2017-05-032-498/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* column: parent and child has to be independentKarel Zak2017-05-021-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* column: force to follow specified widthKarel Zak2017-05-021-2/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* columns: add note about widthKarel Zak2017-05-021-1/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* column: use NOEXTREMES for the last columnKarel Zak2017-05-022-1/+27
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* column: add support for treesKarel Zak2017-05-021-1/+77
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* column: clean up man pageKarel Zak2017-05-021-20/+29
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* column: clean up usage() and options orderKarel Zak2017-05-021-37/+46
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* column: add --table-orderKarel Zak2017-05-022-1/+38
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* column: fix typoKarel Zak2017-05-021-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* column: add --table-hideKarel Zak2017-05-022-1/+13
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* column: add --table-wrapKarel Zak2017-05-022-2/+17
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* column: add --table-noextremeKarel Zak2017-05-022-6/+20
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* column: add --table-truncateKarel Zak2017-05-022-13/+37
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* column: rename optionsKarel Zak2017-05-022-8/+8
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* column: fix greedy initializationKarel Zak2017-05-021-1/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* column: add --table-colrightKarel Zak2017-05-022-9/+63
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* column: use err_exclusive_options()Karel Zak2017-05-021-3/+14
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* column: make mbs/wcs conversions more robustKarel Zak2017-05-021-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* column: add --jsonKarel Zak2017-05-022-3/+27
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* column: add --table-colnamesKarel Zak2017-05-022-10/+39
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* column: rename too generic macroKarel Zak2017-05-021-6/+5Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* column: use libsmartcols for --tableKarel Zak2017-05-021-154/+121Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* column: clean up multi-byte #ifelseKarel Zak2017-05-021-25/+10Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* column: reorder functionsKarel Zak2017-05-021-136/+139
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* column: rename functionsKarel Zak2017-05-021-7/+8
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* column: don't ignore mbs_to_wcs() errorsKarel Zak2017-05-021-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* column: make input() more genericKarel Zak2017-05-021-62/+53Star
| | | | | | | | * remove line size limit * use multi-byte rather than wchar when read input * prepare for future libsmartcols use in input() for table Signed-off-by: Karel Zak <kzak@redhat.com>
* column: use colntrol struct on more placesKarel Zak2017-05-021-58/+61
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* columns: add control structKarel Zak2017-05-021-21/+35
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* column: split old and new codeKarel Zak2017-05-022-1/+500
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tailf: remove deprecated utilitySami Kerola2017-04-023-375/+0Star
| | | | | | | | March 2017 is gone, it is time to remove this utility as scheduled in earlier commit, and promised in manual page. Reference: 3f8478a71ccde6883d4c81b7e65561a106653b28 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* misc: stop mixing declarations and codeSami Kerola2017-03-131-2/+2
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* column: make more obvious what is default behaviorKarel Zak2017-03-012-9/+9
| | | | | | | | | | | | | | | | | | | | The man page contains mistakes. The default is to fill columns before lines: $ printf 'aaaaaaaaaaaaaaaaaaaaaa\nBBBBBBBBBBBBBBBBBBBBB\nXXXXXXX\nYYYYYYYYYYY\nZZZZZ' > data $ column --columns 80 < data aaaaaaaaaaaaaaaaaaaaaa XXXXXXX ZZZZZ BBBBBBBBBBBBBBBBBBBBB YYYYYYYYYYY $ column --fillrows --columns 80 < data aaaaaaaaaaaaaaaaaaaaaa BBBBBBBBBBBBBBBBBBBBB XXXXXXX YYYYYYYYYYY ZZZZZ The patch also rename functions in the code to make it more obvious for code readers. Signed-off-by: Karel Zak <kzak@redhat.com>
* misc: add static keyword to where needed [smatch scan]Sami Kerola2017-02-206-119/+118Star
| | | | | | | text-utils/rev.c:68:9: warning: symbol 'buf' was not declared. Should it be static? Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* misc: do not use plain 0 as NULL [smatch scan]Sami Kerola2017-02-208-37/+37
| | | | | | | | | | text-utils/tailf.c:69:21: warning: Using plain integer as NULL pointer Since many 'struct option' has used zero as NULL make them more readable in same go by reindenting, and using named argument requirements. Reference: https://lwn.net/Articles/93577/ Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* build-sys: fix compilation with ncurses and uClibc or musl libcCarlos Santos2017-01-203-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compiling util-linux with musl and uClibc-ng toolchains when wide-char support is not enabled in ncurses results in compilation failures with the following message: error: two or more data types in declaration specifiers #define wchar_t char The problem occurs because util-linux #defines its own wchar_t (as char) when configured without widechar support. This conflicts with definition of wchar_t contained in stddef.h. This error can be reproduced running "<toolchain-cc -o test test.c" with the following test program: #include <ctype.h> #define wchar_t char #include <stddef.h> int main() { return 0; } The only way to avoid the problem it to reorder the inclusion of headers in some files under the text-utils directory. Addresses: http://autobuild.buildroot.net/results/3a2f228e0fa7b5cc28a13d49f48f1a6aef8d9d7a http://autobuild.buildroot.net/results/99e96069f652d511c6212a5bb6be29e68fb1747c http://autobuild.buildroot.net/results/2dc5721aef93b7b410153bafad78248fac3db941 http://autobuild.buildroot.net/results/8a9e197ba7a292b18f8c0c36dca974685556a38a Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
* column: rename --columns to --output-widthKarel Zak2017-01-172-14/+16
| | | | | | | | | * rename to use less confusing option name * cleanup usage() * update man page Addresses: https://github.com/karelzak/util-linux/pull/327 Signed-off-by: Karel Zak <kzak@redhat.com>
* col: backspacing widecharsGrady Martin2017-01-041-3/+9
| | | | | | | | Until now, backspace characters have not accounted for characters of widths other than one. This single line amends that. Requsted-by: Grady Martin <admin@nosuck.org> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* Use --help suggestion on invalid optionKarel Zak2016-12-199-9/+9
| | | | | | | | The current default is to print all usage() output. This is overkill in many case. Addresses: https://github.com/karelzak/util-linux/issues/338 Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: replace FTP by HTTPS in kernel.org URLsSébastien Helleu2016-12-1911-11/+11
| | | | | | | The links to ftp://ftp.kernel.org/ are replaced by https://www.kernel.org/. Signed-off-by: Karel Zak <kzak@redhat.com>
* more: avoid double free() on exitKarel Zak2016-12-151-0/+8
| | | | | | | | | | | | | On 'q' command more(1) calls end_it() function with _exit(). The _exit() may suspend program execution due to pending I/O on very loaded server. In this time SIGINT may be delivered due to impatient user who will press ^C. And then end_it() cleanup function may be executed by signal handler too. The result is double free()... Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1403971 Signed-off-by: Karel Zak <kzak@redhat.com>
* Correctly format page cross referencesMichael Kerrisk (man-pages)2016-11-291-2/+2
| | | | | | | | Most pages in util-linux follow the standard convention of formatting page cross references in bold. Fix the few exceptions that use italic. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
* Place SEE ALSO entries in orderMichael Kerrisk (man-pages)2016-11-293-6/+6
| | | | | | | | | | | | This patch does only the following: * Order SEE ALSO entries first by section name, then alphabetically within section * Adds one or two missing commas in SEE ALSO lists * Removes one or two periods that were (inconsistently) used at the end of SEE ALSO lists. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
* misc: fix some compiler warningsRuediger Meier2016-10-271-4/+4
| | | | | | | | | | libsmartcols/samples/fromfile.c:59:2: warning: passing argument 3 of 'string_to_bitmask' from incompatible pointer type text-utils/pg.c:79:0: warning: "TABSIZE" redefined libblkid/src/read.c:455:13: warning: 'debug_dump_dev' defined but not used [-Wunused-function] libblkid/src/probe.c:769:13: warning: unused function 'cdrom_size_correction' [-Wunused-function] /usr/include/sys/termios.h:3:2: warning: "this file includes <sys/termios.h> which is deprecated, use <termios.h> instead" [-W#warnings] Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>