summaryrefslogtreecommitdiffstats
path: root/text-utils
Commit message (Collapse)AuthorAgeFilesLines
* docs: fix "behaviour" vs. "behavior"Karel Zak2014-06-061-1/+1
| | | | | | | | Sometimes we use "behaviour" and "behavior" in the same text, let's use "behavior" only everywhere. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1011068 Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: add BUILD_{COL,COLCRT,COLRM,COLUMN,HEXDUMP,REV,TAILF}Karel Zak2014-05-211-20/+28
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* hexdump: add --color to the man pageKarel Zak2014-05-131-9/+8Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* hexdump: use new colors APIKarel Zak2014-05-131-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* column: inform user when multibyte conversion error occursSami Kerola2014-05-071-1/+7
| | | | | | | | | The column(1) read input until conversion error, and used incomplete input when outputing, that made at least me to wonder where the rest disappeared without explanation. IMHO it is better to fail immediately rather than do only half of the task. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* textual: remove square brackets from around three dotsBenno Schulenberg2014-05-061-1/+1
| | | | | | Also improve some option descriptions here and there. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* Merge branch 'pg-manual-page-long-options' of ↵Karel Zak2014-04-011-6/+12
|\ | | | | | | | | | | | | | | https://github.com/jaalto/util-linux * 'pg-manual-page-long-options' of https://github.com/jaalto/util-linux: pg.1: Move (plus) options near (minus) option at the beginning pg.1: Add -h, --help, -V, --version
| * pg.1: Move (plus) options near (minus) option at the beginningJari Aalto2013-06-181-8/+8
| |
| * pg.1: Add -h, --help, -V, --versionJari Aalto2013-06-181-0/+6
| |
* | lib/colors: add info to man pages, add terminal-colors.d.5Karel Zak2014-03-111-0/+11
| | | | | | | | | | Co-Author: Ondrej Oprala <ooprala@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* | lib/colors: check for /etc/terminal-colors.d/[util].disableOndrej Oprala2014-03-111-2/+2
| | | | | | | | | | | | | | | | [kzak@redhat.com: - move paths to pathnames.h, - use static path buffer] Signed-off-by: Ondrej Oprala <ooprala@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* | docs: fix two command representations in the man page of moreBenno Schulenberg2014-03-041-24/+14Star
| | | | | | | | | | | | | | | | The previous-file command is not :P but :p, and the back-to-where command is not an acute accent but an apostrophe. Also condense some of the descriptions and remove some useless comments. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* | hexdump: color unit may now be longer than the corresponding format unitOndrej Oprala2014-03-042-3/+16
| | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* | more: fix double free crashSami Kerola2014-02-211-1/+0Star
| | | | | | | | | | | | | | | | Commit b9579f1f44b46c9f12f1e01b01c02d82ae1cf728 moved fclose() to checkf(), but missed removing file closure in magic(). Ironically the cause of regression is in previous commit message. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | more: improve formatting and wording of man page and help textBenno Schulenberg2014-02-212-34/+35
| | | | | | | | | | | | | | Also, slice up the usage text for ease of translation. Reported-by: Phillip Susi <psusi@ubuntu.com> Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* | docs: make hexdump.1 color specification easier to understandSami Kerola2014-02-171-36/+36
| | | | | | | | | | | | | | Fix also spacing, input line lenghts, and troff table for data that is a table. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | hexdump: add highlighting supportOndrej Oprala2014-02-105-1/+281
| | | | | | | | | | | | | | | | | | [kzak@redhat.com: - fix coding style, - use xalloc in all code, - fix strtol usage] Signed-off-by: Ondrej Oprala <ooprala@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* | include/c.h: prefer nanosleep() over usleep()Karel Zak2014-01-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Let's use nanosleep() although if usleep() exists. The nanosleep function does no interact with signals and other timers. The patch introduces xusleep() as replacement to libc (or our fallback) usleep(). Yes, we don't want to use struct timespec + nanosleep() everywhere in code as nano-time resolution is useless for us. The patch also enlarges delays in some busy wait loops. It seems enough to try read/write 4x per second. Signed-off-by: Karel Zak <kzak@redhat.com>
* | column: fix mem leak [coverity scan]Karel Zak2014-01-141-1/+3
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | more: fix mem leak [coverity scan]Karel Zak2014-01-141-1/+3
| | | | | | | | | | | | ... the code is so soo ugly. Signed-off-by: Karel Zak <kzak@redhat.com>
* | hexdump: convert a variable type according with fmtAndrew Vagin2014-01-061-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hexdump works uncorrectly on Rassberry Pi (raspbian wheezy): 0000000 3200000000 3400000000 3600000000 3800000000 a00000000 000000a The problem is that the %qx format is used for printing the (short int) variable. Here is the output from hexdump with this patch: 0000000 3231 3433 3635 3837 0a39 000000a Currently raspbian uses hexdump from bsdmainutils. bsdmainutils: /usr/bin/hexdump Signed-off-by: Andrew Vagin <avagin@openvz.org>
* | hexdump: don't access hex after freeing itAndrew Vagin2014-01-061-1/+5
| | | | | | | | | | | | | | [kzak@redhat.com: - remove unnecessary code] Signed-off-by: Andrew Vagin <avagin@openvz.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* | hexdump: use xcalloc()Karel Zak2014-01-061-1/+2
| | | | | | | | | | Reported-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* | hexdump: Create struct hexdump containing previously global variables.Ondrej Oprala2013-12-024-89/+90
| | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* | hexdump: add __attribute__ ((__noreturn__)) to bad*() functionsOndrej Oprala2013-12-021-24/+20Star
| | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* | hexdump: rename struct _fs to struct hexdump_fs and remove its typedefOndrej Oprala2013-12-024-15/+15
| | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* | hexdump: rename struct _fu to struct hexdump_fu and remove its typedefOndrej Oprala2013-12-024-15/+15
| | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* | hexdump: Rename struct _pr to struct hexdump_pr and remove it's typedefOndrej Oprala2013-12-025-18/+20
| | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* | hexdump: rename rewrite to rewrite_rulesOndrej Oprala2013-12-023-3/+3
| | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* | hexdump: rename add to add_fmtOndrej Oprala2013-12-023-19/+19
| | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* | hexdump: Merge hexsyntax.c into hexdump.cOndrej Oprala2013-12-024-163/+117Star
| | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* | hexdump: add the prefix 'hexdump-' to {conv,display,parse}.cOndrej Oprala2013-12-024-3/+3
| | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* | hexdump: catch memory leaksOndrej Oprala2013-11-083-4/+32
| | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* | hexdump: make addfile() variable names more hinting of their purposeOndrej Oprala2013-11-081-6/+6
| | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* | hexdump: use skip_space() in add()Ondrej Oprala2013-11-081-9/+4Star
| | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* | hexdump: rename in() to first_letter()Ondrej Oprala2013-11-081-8/+8
| | | | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* | hexdump: get rid of redundant typecastsOndrej Oprala2013-11-082-10/+10
| | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* | hexdump: minor formatting improvements in display()Ondrej Oprala2013-11-081-13/+22
| | | | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* | hexdump: rewrite cluttered case statementsOndrej Oprala2013-11-081-133/+104Star
| | | | | | | | | | | | | | [kzak@redhat.com: - use strchr() for in() macro] Signed-off-by: Ondrej Oprala <ooprala@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* | hexdump: use xasprintf in conv_c()Ondrej Oprala2013-11-081-2/+4
| | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* | hexdump: delete redundant typecastsOndrej Oprala2013-11-081-10/+10
| | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* | hexdump: use GNU case ranges where possibleOndrej Oprala2013-11-081-4/+4
| | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* | hexdump: use xstrncpy in add()Ondrej Oprala2013-11-081-2/+2
| | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* | hexdump: simplify newsyntax argumentsOndrej Oprala2013-11-083-7/+5Star
| | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* | hexdump: minor formatting improvementsOndrej Oprala2013-11-081-18/+18
| | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* | hexdump: rename next{fs,fu,pr} to {fs,fu,pr}listOndrej Oprala2013-11-084-33/+33
| | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* | hexdump: rewrite addfile() to use getline()Ondrej Oprala2013-11-081-9/+8Star
| | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* | hexdump: formatting and variable name cleanupOndrej Oprala2013-11-085-27/+33
| | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* | hexdump: rewrite() formatting improvementsOndrej Oprala2013-11-081-29/+28Star
| | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* | hexdump: rewrite escape()Ondrej Oprala2013-11-081-1/+3
| | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>