summaryrefslogtreecommitdiffstats
path: root/text-utils
Commit message (Collapse)AuthorAgeFilesLines
* fdisk, display, hexdump.h: Use standard C types instead of u_int, u_char, ↵Josiah Worcester2011-06-142-18/+18
| | | | | | u_long, etc. Signed-off-by: Josiah Worcester <josiahw@gmail.com>
* colrm: manual updateSami Kerola2011-06-081-0/+8
| | | | | | Inform about long, help & version and options. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* colrm: gotos, long options and argument checkingSami Kerola2011-06-082-46/+101
| | | | | | | | Unnecessary goto jumps where replaced by a simple function, and two loops. Long options support help and version, and the two arguments this command has are now validated with strtoul_or_err. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* col: check with strtol_or_err option argumentSami Kerola2011-06-082-7/+14
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: colcrt manual updateSami Kerola2011-06-011-2/+6
| | | | | | Inform about long, help & version and options. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* colctr: use long options and clean coding styleSami Kerola2011-06-011-26/+64
| | | | | | This commit introduces help & version options. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* col: coding style changesSami Kerola2011-06-011-13/+11Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: col manual updateSami Kerola2011-06-011-6/+12
| | | | | | | | Long options, with help & version, added. The commint also has previously undocumented switch `-h convert spaces to tabs' as a part of col.1 man page. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* col: use long optionsSami Kerola2011-06-011-7/+44
| | | | | | This commit introduces help & version options. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* pg: return value warning fixSami Kerola2011-06-011-2/+4
| | | | | | void function 'makeprint' should not return void expression Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* rev: mark signo unused in sig_handlerSami Kerola2011-06-011-1/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* pg: use size_t for wcstombs() return codeSami Kerola2011-06-011-2/+2
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* build-sys: stop building line(1) by defaultSami Kerola2011-05-261-2/+7
| | | | | | Align build system behaviour with DEPRECATED file. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* column: fix problems with uninitialized variablesKarel Zak2011-05-261-8/+9
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'column' of git://github.com/kerolasa/lelux-utiliteetit into columnKarel Zak2011-05-262-96/+120
|\ | | | | | | | | | | | | | | | | | | | | | | * 'column' of git://github.com/kerolasa/lelux-utiliteetit: tests: add column tests column.c: global variables removed column.c: validate numeric user inputs column.c: free memory before exit column.c: make table function clarification column.c: coding style fixes column.c: add version printing column.c: replace emalloc with xcalloc
| * column.c: global variables removedSami Kerola2011-05-191-50/+63
| | | | | | | | | | | | | | Variables from global scope are moved to main, and passed as function arguments where ever they are needed. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * column.c: validate numeric user inputsSami Kerola2011-05-192-3/+11
| | | | | | | | | | | | | | Use strtol_or_err from strutils.h to check numeric user input is sane. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * column.c: free memory before exitSami Kerola2011-05-191-0/+13
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * column.c: make table function clarificationSami Kerola2011-05-191-14/+17
| | | | | | | | | | | | | | Readability enchancement, and few variable type changes to be more proper. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * column.c: coding style fixesSami Kerola2011-05-011-23/+17Star
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * column.c: add version printingSami Kerola2011-05-011-2/+7
| | | | | | | | | | | | | | The patch makes return value to be non-zero when command line short option is unknown. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * column.c: replace emalloc with xcallocSami Kerola2011-05-011-20/+8Star
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | ul.c: warn user when command chooses term typeSami Kerola2011-05-171-2/+5
| | | | | | | | | | | | | | Happens usually when user specifies garbage as -t argument. Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* | ul.c: escape handling refactoredSami Kerola2011-05-171-34/+42
| | | | | | | | | | | | | | Separate function for escape handling to make switch statement more readable. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | ul.c: close files and free memory after usageSami Kerola2011-05-171-0/+2
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | ul.c: code style and comment fixesSami Kerola2011-05-171-72/+94
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | ul.c: fix compier warningsSami Kerola2011-05-171-2/+2
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | ul.c: magic constant removalSami Kerola2011-05-171-8/+7Star
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | ul.c: use long optionsSami Kerola2011-05-171-5/+35
| | | | | | | | | | | | This commit introduces help & version options. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | ul.c: convert definition to functionSami Kerola2011-05-171-16/+22
|/ | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* hexdump: don't include err.h directlyKarel Zak2011-04-121-1/+2
|
* column: use xalloc libSami Kerola2011-04-061-10/+6Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* rev: mention long options in man pageSami Kerola2011-04-061-0/+7
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* rev: option parsing bug fixed & long options addedSami Kerola2011-04-061-5/+19
| | | | | | | | | | | | | The former getopts segment gave impression unknown options will cause the program to exit with error and help is available with -h. Neither work quite as designed, all unknown options made the program to exit with success; and none of the options where known. The fix also has support for long options, and new --version switch. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* rev: memory leak fixSami Kerola2011-04-061-2/+2
| | | | | | | | Moving the malloc out of loop will make leak to disappear, and the command might run few jiffie quicker when there are 1+N arguments. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* rev: use xrealloc from xalloc.hSami Kerola2011-04-061-9/+1Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tailf: support --lines 0Karel Zak2011-03-181-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tailf: fix open() return value check [coverity scan]Karel Zak2011-03-111-1/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tailf: fix memmove() usageKarel Zak2011-03-081-1/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tailf: tailf mention new help & version options in man pageSami Kerola2011-03-081-0/+7
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tailf: use long optionsSami Kerola2011-03-082-19/+71
| | | | | | | | | | This was TODO item from commit 947a7c9c. The patch also introduces version and help switches. [kzak@redhat.com: rewrite old_style_option()] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* man page syntax fixesVille Skyttä2011-03-071-1/+1
| | | | Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
* move struct option to .rodataKarel Zak2011-03-031-1/+1
| | | | | | | It does not make sense to have writable large arrays of "struct option" on the stack. Signed-off-by: Karel Zak <kzak@redhat.com>
* hexdump: new usage(), xalloc and err.h stuffSami Kerola2011-02-216-86/+72Star
| | | | | | | | | | | New usage help screen and print version switch. Also fixes to exit codes, util linux xmalloc replaced emalloc and every error print is using libc error function. [kzak@redhat.com: - minor changes in formatting and coding style] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* more: new usage output, and some trivial fixesSami Kerola2011-02-152-188/+210
| | | | | | | | | | | | | | | | | | | | | Usage output screen got to be completely rewrote. Aim is to assist user to determe which switches to use without reading manual page. The change also introduced new option to see command version. Determination if the executable name is `page' is now easy to see in source, and effect of using the name is mentioned in manual page. Rest of the change is trivial; exit values to compiler warning removals, magic constants to preprocessor definitions, symbolic exit values, comment pretty printing and #endif markups. [kzak@redhat.com: - coding style - add __unused__ attribute to signal handlers] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: provide alternatives for err, errx, warn and warnxFabian Groffen2011-02-144-4/+4
| | | | | | | | Solaris lacks err, errx, warn and warnx. This also means the err.h header doesn't exist. Removed err.h include from all files, and included err.h from c.h instead if it exists, otherwise alternatives are provided. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* column: data type mismatch compiler warning fixesSami Kerola2011-01-251-2/+3
| | | | | | | | | | Following warnings will longer appear when one will compile with gcc flags -Wall -Wextra -pedantic column.c:364:2: warning: comparison of unsigned expression < 0 is always false column.c:369:2: warning: comparison of unsigned expression < 0 is always false Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* don't declare usage() without parametrKarel Zak2011-01-212-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* column: fix column.1 typoDavidlohr Bueso2011-01-171-1/+1
| | | | Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* hexdump: remove od functionality in favor to GNU coreutils odSami Kerola2010-12-306-358/+8Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>