summaryrefslogtreecommitdiffstats
path: root/text-utils
Commit message (Collapse)AuthorAgeFilesLines
* standard SEE ALSO section of man pagesMike Frysinger2013-05-131-1/+2
| | | | | | | | The standard format is to seperate each entry with a comma, and for each one to be on a line by itself. Most util-linux pages follow this, but a few do not. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* build-sys: use -Wno-clobbered for some BSD crapKarel Zak2013-05-071-0/+2
| | | | | | | | * extend UL_WARN_ADD() for accept non-default CFLAGS variable * add BSD_WARN_CFLAGS with -Wno-clobbered * use all this for pg(1) and more(1) Signed-off-by: Karel Zak <kzak@redhat.com>
* pg: check writing to a file was successfulSami Kerola2013-04-261-1/+8
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* hexdump: add long options to the commandSami Kerola2013-04-262-33/+52
| | | | | | Includes update to bash completion, and manual as well. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* Fix various typosYuri Chornoivan2013-04-261-1/+1
|
* docs: col.1: fix manual page name section [checkmans.sh]Sami Kerola2013-04-091-1/+1
| | | | | | | $ lexgrog text-utils/col.1 text-utils/col.1: parse failed Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* libmount, col: remove redundant null checks [smatch scan]Sami Kerola2013-04-091-2/+1Star
| | | | | | | | libmount/src/context_umount.c:174 mnt_context_find_umount_fs() info: redundant null check on loopdev calling free() libmount/src/context_umount.c:179 mnt_context_find_umount_fs() info: redundant null check on loopdev calling free() text-utils/col.c:406 flush_lines() info: redundant null check on l->l_line calling free() Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* various: fix variable and function declarations [smatch scan]Sami Kerola2013-04-093-13/+13
| | | | | | | | | | | | | | | | | disk-utils/fsck.minix.c:511:9: warning: mixing declarations and code fdisks/sfdisk.c:982:5: warning: mixing declarations and code fdisks/sfdisk.c:1254:5: warning: mixing declarations and code fdisks/sfdisk.c:1564:5: warning: mixing declarations and code lib/mbsalign.c:279:7: warning: mixing declarations and code libblkid/src/devname.c:378:17: warning: mixing declarations and code libfdisk/src/alignment.c:219:9: warning: mixing declarations and code term-utils/wall.c:111:9: warning: mixing declarations and code text-utils/col.c:418:19: warning: non-ANSI function declaration of function 'flush_blanks' text-utils/col.c:553:12: warning: non-ANSI function declaration of function 'alloc_line' text-utils/rev.c:105:9: warning: mixing declarations and code text-utils/tailf.c:245:9: warning: mixing declarations and code Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* ul: cleanup usage() and man pageKarel Zak2013-04-052-11/+12
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* pg: fix memory leak [coverity scan]Karel Zak2013-03-271-1/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: make the section AVAILABILITY always come last in man pagesBenno Schulenberg2013-03-201-2/+2
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* docs: add TB to list of supported suffixesKarel Zak2013-03-181-1/+1
| | | | | Reported-by: Lukas Czerner <lczerner@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* translation: unify exec error messagesSami Kerola2013-02-061-1/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* a pointer should not be compared to zero [coccinelle]Sami Kerola2013-02-061-2/+2
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* textual: spell and encode the name of Arkadiusz Miśkiewicz correctlyBenno Schulenberg2013-02-0610-10/+10
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: standardize the reporting of program name plus package versionBenno Schulenberg2013-01-301-2/+1Star
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* column: make usage() translator friendlySami Kerola2013-01-251-15/+14Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* textual: standardize reporting of program name plus package versionBenno Schulenberg2013-01-251-1/+2
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: remove inconsistent periods from two error messagesBenno Schulenberg2013-01-251-1/+1
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: fix a few typos in some of the usage help textsBenno Schulenberg2013-01-251-2/+2
| | | | | | Also improve clarity of some other lines of those texts. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* more: allow to compile as non-interactive test_more programKarel Zak2013-01-242-0/+13
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: add --disable-{more,ul,pg}Karel Zak2013-01-241-22/+32
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* hexdump: do not segfault when iterating over an empty format stringOndrej Oprala2013-01-101-7/+9
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* more: remove unnecessary variableSami Kerola2012-12-191-2/+2
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* include/c: move usleep() fallback to c.hKarel Zak2012-10-221-1/+0Star
| | | | | | To make it available everywhere in code. Signed-off-by: Karel Zak <kzak@redhat.com>
* more: remove few memory leaksSami Kerola2012-10-151-1/+7
| | | | | | | The remaining memory leaks are related to ncurses internals, or the one open file descriptor when user users 'q' to exit. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* more: align void in functions with prototypes, and remove void castsSami Kerola2012-10-151-14/+14
| | | | | | | | If there is void in argument list at function prototype it is reasonable to expect to see it also where the function is wrote. This change also removes unnecessary return value void casting. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* more: fix coding styleSami Kerola2012-10-151-1714/+1694Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* pg: fix coding styleSami Kerola2012-10-151-399/+287Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* pg: do not turn off warnigns artificiallySami Kerola2012-10-151-21/+0Star
| | | | | | | | Compiler warnings often mean something, fiddling with them is not good practise. Besides the 'proglem' removed macro tried to 'fix' does not even occur when compiling with modern gcc. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* pg: use unistd.h STDOUT_FILENOSami Kerola2012-10-151-26/+26
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* pg: add noreturn function attributesSami Kerola2012-10-151-5/+5
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* pg: add const qualifiers where suitableSami Kerola2012-10-151-10/+13
| | | | | | | | | | | | Includes a fix also to one assignment warning (see below). text-utils/pg.c:1477:24: warning: assignment discards 'const' qualifier \ from pointer target type [enabled by default] [kzak@redhat.com: - use const char rather than xstrdup() for static /bin/sh string] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* pg: use libc error printing facilitiesSami Kerola2012-10-151-27/+12Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* pg: refactor argument handingSami Kerola2012-10-151-75/+84
| | | | | | | Add function parse_arguments(), which has the same code block that was in over long, and too deeply intended, main(). Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: fix column.1 groff syntax errorSami Kerola2012-10-151-1/+1
| | | | | | Quote backslash which user is expected to see. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* column: add --output-separator optionSami Kerola2012-10-152-5/+17
| | | | | | | | | | The --output-separator option will allow user to define table column separator. This will allow for example to write back same delimeter as which was used as input separator, for example column -t -s : -o : /etc/passwd Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* pg: check numeric user inputsSami Kerola2012-10-152-4/+7
| | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* column: describe change of separator behavior in man page bugs sectionSami Kerola2012-10-021-0/+20
| | | | | | | | | | | Add to manual page how to achieve old behavior, just in case someone relies on buggy behavior of the command. [kzak@redhat.com: - remove unnecessary info from the man page :-)] Reported-by: Padraig Brady <P@draigBrady.com> Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* column: clarify the --separator optionPádraig Brady2012-10-022-3/+3
| | | | | | Indicate that the string is a set, which also clarifies that it's only significant when parsing the input.
* column: make defined separator to be non-greedySami Kerola2012-10-021-5/+32
| | | | | | | | | | | | | | | | | | | | | | | This patch changes interpretation of subsequent delimeter interpretation. Earlier version merged columns that had null string as content together, which lead to output as visualized below. $ printf "a:b:c\n1::3\n" | column -t -s ':' a b c 1 3 The number 3 has wrong column, which this patch takes care of, and alters the output following way. $ printf "a:b:c\n1::3\n" | column -t -s ':' a b c 1 3 This patch does not alter the default case, e.g., subsequent white spaces are understood as separator of the same field, and the beginning of line white spaces are being ignored together. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* mark expected fallthrough for static analysersKarel Zak2012-09-071-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* textual: fix typos in messagesYuri Chornoivan2012-09-041-1/+1
|
* col: fix compiler warning [-Wstrict-prototypes]Karel Zak2012-09-041-1/+1
| | | | | | text-utils/col.c:142:43: warning: function declaration isn’t a prototype [-Wstrict-prototypes] Signed-off-by: Karel Zak <kzak@redhat.com>
* column: --separator segfaultsB Watson2012-08-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The --separator and --columns long options in util-linux-2.21.2 and in a git clone from 5 minutes ago, don't work: $ echo foobar | column -s x foobar $ echo foobar | column -c 10 foobar $ echo foobar | column --separator=x column: option '--separator' doesn't allow an argument $ echo foobar | column --separator x Segmentation fault $ echo foobar | column --columns 10 column: bad columns width value: '(null)': Invalid argument $ echo foobar | column --columns=10 column: option '--columns' doesn't allow an argument Looks like a simple case of missing has_arg flag in the "struct option" initialization for these two options. The patch just adds the flag. I haven't done thorough testing of the patched code, but it seems to work OK and it no longer segfaults or tries to dereference a null pointer. Signed-off-by: Karel Zak <kzak@redhat.com>
* more: add noreturn function attributeSami Kerola2012-07-261-1/+2
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* hexdump: fix shadow declarationSami Kerola2012-07-263-3/+3
| | | | | | | | | text-utils/hexdump.h:84:5: warning: shadowed declaration is here [-Wshadow] ./include/xalloc.h:23:28: warning: declaration of 'size' shadows a global declaration [-Wshadow] ./include/xalloc.h:33:40: warning: declaration of 'size' shadows a global declaration [-Wshadow] ./include/xalloc.h:43:49: warning: declaration of 'size' shadows a global declaration [-Wshadow] Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* ul: fix shadow declarationSami Kerola2012-07-261-3/+3
| | | | | | | text-utils/ul.c:641:25: warning: declaration of 'col' shadows a global declaration [-Wshadow] text-utils/ul.c:126:5: warning: shadowed declaration is here [-Wshadow] Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* more: fix shadow declarationSami Kerola2012-07-261-3/+3
| | | | | | | text-utils/more.c:1123:13: warning: declaration of 'state' shadows a previous local [-Wshadow] text-utils/more.c:1095:18: warning: shadowed declaration is here [-Wshadow] Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tailf: fix compiler warning [-Wmissing-prototypes]Karel Zak2012-07-161-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>