summaryrefslogtreecommitdiffstats
path: root/text-utils
Commit message (Collapse)AuthorAgeFilesLines
...
* | 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>
* | hexdump: rewrite rewrite()Ondrej Oprala2013-11-081-105/+122
| | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* | hexdump:rewrite add()Ondrej Oprala2013-11-081-5/+3Star
| | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* | hexdump: rewrite next()Ondrej Oprala2013-11-081-1/+1
| | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* | hexdump: rewrite get()Ondrej Oprala2013-11-081-1/+2
| | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* | hexdump: rewrite addfile()Ondrej Oprala2013-11-081-6/+8
| | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* | hexdump: cleanup of redundant symbols/repeating literalsOndrej Oprala2013-11-083-26/+27
| | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* | hexdump: use list.h queues and rewrite redundant for cyclesOndrej Oprala2013-11-085-104/+141
| | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* | pg: use LC_ALLKarel Zak2013-10-181-1/+1
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | more: fix warning when compiled --without-ncursesKarel Zak2013-10-151-1/+1
| | | | | | | | | | Reported-by: Benno Schulenberg <bensberg@justemail.net> Signed-off-by: Karel Zak <kzak@redhat.com>
* | docs: standardize the phrases for --help and --version in all man pagesBenno Schulenberg2013-10-157-12/+12
| | | | | | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* | textual: use the standard angular brackets for non-literal argumentsBenno Schulenberg2013-10-081-1/+1
| | | | | | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>