summaryrefslogtreecommitdiffstats
path: root/text-utils/colrm.c
Commit message (Collapse)AuthorAgeFilesLines
* misc: replaces atexit(close_stdout) with new close_stdout_atexit()Karel Zak2019-06-171-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* misc: consolidate version printing and close_stdout()Karel Zak2019-04-161-2/+1Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* misc: consolidate macro style USAGE_HELP_OPTIONSRuediger Meier2017-06-291-2/+2
| | | | | | | | | changed in include/c.h and applied via sed: sed -i 's/fprintf.*\(USAGE_MAN_TAIL.*\)/printf(\1/' $(git ls-files -- "*.c") sed -i 's/print_usage_help_options\(.*\);/printf(USAGE_HELP_OPTIONS\1);/' $(git ls-files -- "*.c") Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* misc: introduce print_usage_help_options()Ruediger Meier2017-06-271-2/+1Star
| | | | | | | | | | | | Consolidate --help and --version descriptions. We are now able to align them to the other options. We changed include/c.h. The rest of this patch was generated by sed, plus manually setting the right alignment numbers. We do not change anything but white spaces in the --help output. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* misc: cosmetics, remove argument from usage(FILE*)Ruediger Meier2017-06-261-3/+4
| | | | | | | | | | | | | | This patch is trivial and changes nothing, because we were always using usage(stdout) Now all our usage() functions look very similar. If wanted we could auto-generate another big cosmetical patch to remove all the useless "FILE *out" constants and use printf and puts rather than their f* friends. Such patch could be automatically synchronized with the translation project (newlines!) to not make the translators sick. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* misc: do not use plain 0 as NULL [smatch scan]Sami Kerola2017-02-201-3/+3
| | | | | | | | | | 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>
* build-sys: fix compilation with ncurses and uClibc or musl libcCarlos Santos2017-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compiling util-linux with musl and uClibc-ng toolchains when wide-char support is not enabled in ncurses results in compilation failures with the following message: error: two or more data types in declaration specifiers #define wchar_t char The problem occurs because util-linux #defines its own wchar_t (as char) when configured without widechar support. This conflicts with definition of wchar_t contained in stddef.h. This error can be reproduced running "<toolchain-cc -o test test.c" with the following test program: #include <ctype.h> #define wchar_t char #include <stddef.h> int main() { return 0; } The only way to avoid the problem it to reorder the inclusion of headers in some files under the text-utils directory. Addresses: http://autobuild.buildroot.net/results/3a2f228e0fa7b5cc28a13d49f48f1a6aef8d9d7a http://autobuild.buildroot.net/results/99e96069f652d511c6212a5bb6be29e68fb1747c http://autobuild.buildroot.net/results/2dc5721aef93b7b410153bafad78248fac3db941 http://autobuild.buildroot.net/results/8a9e197ba7a292b18f8c0c36dca974685556a38a Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
* Use --help suggestion on invalid optionKarel Zak2016-12-191-1/+1
| | | | | | | | The current default is to print all usage() output. This is overkill in many case. Addresses: https://github.com/karelzak/util-linux/issues/338 Signed-off-by: Karel Zak <kzak@redhat.com>
* textual: add a docstring to most of the utilitiesBenno Schulenberg2015-01-061-0/+4
| | | | | | | | | This adds a concise description of a tool to its usage text. A first form of this patch was proposed by Steven Honeyman (see http://www.spinics.net/lists/util-linux-ng/msg09994.html). Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: use usage() text element macrosSami Kerola2014-10-011-6/+3Star
| | | | | | | Translating these text elements should happen only once, which is more likely when the text macros are used properly. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* textual: use manual tail usage() macroSami Kerola2014-10-011-0/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* textual: use version printing macro everywhereSami Kerola2014-10-011-3/+1Star
| | | | | | | Only mount, umount, and blkid remains not using the macro because they are print also library references. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* textual: spell and encode the name of Arkadiusz Miƛkiewicz correctlyBenno Schulenberg2013-02-061-1/+1
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* colrm: fix compiler warning [-Wmissing-prototypes]Karel Zak2012-07-161-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* text-utils: verify writing to streams was successfulSami Kerola2012-04-041-2/+3
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* colrm: gotos, long options and argument checkingSami Kerola2011-06-081-46/+99
| | | | | | | | 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>
* build-sys: nls/locale handling in util-linux-ng generalMike Frysinger2007-09-191-1/+1
| | | | | | | | | | | | | | | On Monday 03 September 2007, Karel Zak wrote: > http://thread.gmane.org/gmane.linux.utilities.util-linux-ng/590/focus=592 > > I agree that we need a better support for compilation without > locales, but from my point of view NLS != all locales stuff. The NLS > support is subset only. thinking about the input from everyone, i'd propose the attached ... Only pull in locale.h as needed and move it to the common nls.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Imported from util-linux-2.11o tarball.Karel Zak2006-12-071-3/+3
|
* Imported from util-linux-2.11b tarball.Karel Zak2006-12-071-1/+1
|
* Imported from util-linux-2.10s tarball.Karel Zak2006-12-071-8/+29
|
* Imported from util-linux-2.10f tarball.Karel Zak2006-12-071-27/+25Star
|
* Imported from util-linux-2.9v tarball.Karel Zak2006-12-071-0/+4
|
* Imported from util-linux-2.9i tarball.Karel Zak2006-12-071-2/+3
|
* Imported from util-linux-2.8 tarball.Karel Zak2006-12-071-10/+1Star
|
* Imported from util-linux-2.7.1 tarball.Karel Zak2006-12-071-5/+4Star
|
* Imported from util-linux-2.2 tarball.Karel Zak2006-12-071-0/+126