summaryrefslogtreecommitdiffstats
path: root/misc-utils/look.c
Commit message (Collapse)AuthorAgeFilesLines
* misc: consolidate version printing and close_stdout()Karel Zak2019-04-161-3/+2Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* look: use WORDLIST environment variable to find word listSami Kerola2017-08-211-1/+5
| | | | | | | | | | The WORDLIST is the same hunspell(1) and ispell(1) uses to achieve the same. Apparently aspell(1) does not work with files like traditional dict lists. Reference: https://github.com/hunspell/hunspell/blob/master/man/hunspell.1#L388 Reference: http://www.skrenta.com/rt/man/ispell.1.html Reference: http://aspell.net/man-html/Creating-an-Individual-Word-List.html#Creating-an-Individual-Word-List Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* 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: never use usage(stderr)Ruediger Meier2017-06-261-5/+7
| | | | | | | Here we fix all cases where we have usage(FILE*) functions. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* misc: add static keyword to where needed [smatch scan]Sami Kerola2017-02-201-9/+9
| | | | | | | text-utils/rev.c:68:9: warning: symbol 'buf' was not declared. Should it be static? Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: Fix word repetitionsYuri Chornoivan2017-02-131-1/+1
|
* Use --help suggestion on invalid optionKarel Zak2016-12-191-2/+1Star
| | | | | | | | 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>
* libmount, look: remove dead code [oclint]Sami Kerola2016-07-211-2/+0Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* look: consider blanks as directory charactersKarel Zak2016-03-091-3/+3
| | | | | | | | | | | | This change introduces regression, but it seems better than to be incompatible with "sort -d" if we assume that "sort -d" is the right way how to prepare files for look(1). It seems (from man page) that the original goal has been compatibility with sort -d, but this feature has never been fully implemented. Addresses: https://github.com/karelzak/util-linux/issues/284 Signed-off-by: Karel Zak <kzak@redhat.com>
* look: remove dead codeSami Kerola2015-01-071-10/+0Star
| | | | | | | MAP_FILE is ignored compatibility flag. Reference: http://man7.org/linux/man-pages/man2/mmap.2.html Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* look: slice up the usage text for ease of translationBenno Schulenberg2015-01-061-8/+9
| | | | | | | Also use the standard macros, and correct the synopsis: use angular brackets and show that look accepts multiple files. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* 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-3/+2Star
| | | | | | | 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: spell and encode the name of Arkadiusz Miƛkiewicz correctlyBenno Schulenberg2013-02-061-1/+1
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: use UTIL_LINUX_VERSION everywhereKarel Zak2013-01-251-3/+1Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* textual: fix a few typos in some of the usage help textsBenno Schulenberg2013-01-251-3/+3
| | | | | | Also improve clarity of some other lines of those texts. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* look: remove extra semicolonSami Kerola2012-07-161-1/+1
| | | | | | | The both macro SKIP_PAST_NEWLINE and location where macro is used will not need semicolon at the end of line. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* misc-utils: verify writing to streams was successfulSami Kerola2012-04-041-0/+2
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* look: cleanup usage()Karel Zak2011-08-161-10/+11
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* look: add long optionsSami Kerola2011-06-251-14/+37
| | | | | | | Including new help screen. Additionally unused includes are removed. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* look: fix conflict between locally defined err() and glibc's versionDavidlohr Bueso2010-10-211-40/+10Star
| | | | | Signed-off-by: Davidlohr Bueso <dave@gnu.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* look: fix memory leak in look(1)Davidlohr Bueso2010-07-291-0/+3
| | | | Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* build-sys: nls/locale handling in util-linux-ng generalMike Frysinger2007-09-191-1/+0Star
| | | | | | | | | | | | | | | 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>
* look: remove tailing white-spacesKarel Zak2007-03-071-29/+29
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* look: fix problem with !isalnum() wordsKarel Zak2007-03-061-1/+4
| | | | | | for example "$ look apple-pie" Signed-off-by: Karel Zak <kzak@redhat.com>
* Imported from util-linux-2.12d tarball.Karel Zak2006-12-071-0/+1
|
* Imported from util-linux-2.11o tarball.Karel Zak2006-12-071-1/+1
|
* Imported from util-linux-2.11b tarball.Karel Zak2006-12-071-1/+1
|
* Imported from util-linux-2.10s tarball.Karel Zak2006-12-071-6/+18
|
* Imported from util-linux-2.10f tarball.Karel Zak2006-12-071-11/+7Star
|
* Imported from util-linux-2.9v tarball.Karel Zak2006-12-071-2/+11
|
* Imported from util-linux-2.9i tarball.Karel Zak2006-12-071-80/+83
|
* Imported from util-linux-2.8 tarball.Karel Zak2006-12-071-10/+0Star
|
* Imported from util-linux-2.7.1 tarball.Karel Zak2006-12-071-1/+5
|
* Imported from util-linux-2.2 tarball.Karel Zak2006-12-071-0/+365