summaryrefslogtreecommitdiffstats
path: root/text-utils
Commit message (Collapse)AuthorAgeFilesLines
...
* misc: remove stray semicolonsSami Kerola2017-06-141-1/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* misc: fix ggc-7 fallthrough warningsSami Kerola2017-06-144-7/+8
| | | | | | | | | | | | | | | | | | | (Original patch and commit message edited by Rudi.) gcc-7 adds -Wimplicit-fallthrough=3 to our default flag -Wextra. This warning can be silenced by using comment /* fallthrough */ which is also recognized by other tools like coverity. There are also other valid comments (see man gcc-7) but we consolidate this style now. We could have also used __attribute__((fallthrough)) but the comment looks nice and does not need to be ifdef'ed for compatibility. Reference: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 Reference: https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/ Reviewed-by: Ruediger Meier <ruediger.meier@ga-group.nl> Suggested-by: Karel Zak <kzak@redhat.com> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* column: add --table-header-repeatKarel Zak2017-06-132-2/+13
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* column: add missed semicolons in case of !HAVE_WIDECHARAlexander Kuleshov2017-06-011-2/+2
| | | | | | | | | | In other case we will get: error: expected ‘;’ before ‘}’ token error. Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
* build-sys: ncurses headers cleanupKarel Zak2017-05-313-17/+15Star
| | | | | | | | | * assume ncursesw headers in ncursesw/ directory only * prefer long paths, <term.h> and <ncurses.h> should be last possibility * fix typos Signed-off-by: Karel Zak <kzak@redhat.com>
* text-utils: use proper paths to term.hKarel Zak2017-05-303-4/+27
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: make column.1 example to use ascii outputSami Kerola2017-05-101-5/+5
| | | | | | In same go ease reading by having data and arguments in same order. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* col: avoid extra newline if no inputSami Kerola2017-05-101-0/+2
| | | | | | | | | BSD fix missed for 22 years, and all util-linux releases so far. Backported-from: https://github.com/dspinellis/unix-history-repo/commit/2a15260a2a3230e02f57c096fb4c5e1f797bf4f3 Addresses: https://github.com/karelzak/util-linux/issues/422 Reported-by: Pavel Raiskup <praiskup@redhat.com> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* column: be robust on empty tableKarel Zak2017-05-051-2/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* 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>