summaryrefslogtreecommitdiffstats
path: root/text-utils/more.c
Commit message (Collapse)AuthorAgeFilesLines
...
* textual: standardize reporting of program name plus package versionBenno Schulenberg2013-01-251-1/+2
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: fix a few typos in some of the usage help textsBenno Schulenberg2013-01-251-2/+2
| | | | | | Also improve clarity of some other lines of those texts. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* more: allow to compile as non-interactive test_more programKarel Zak2013-01-241-0/+7
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* more: remove unnecessary variableSami Kerola2012-12-191-2/+2
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* more: remove few memory leaksSami Kerola2012-10-151-1/+7
| | | | | | | The remaining memory leaks are related to ncurses internals, or the one open file descriptor when user users 'q' to exit. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* more: align void in functions with prototypes, and remove void castsSami Kerola2012-10-151-14/+14
| | | | | | | | If there is void in argument list at function prototype it is reasonable to expect to see it also where the function is wrote. This change also removes unnecessary return value void casting. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* more: fix coding styleSami Kerola2012-10-151-1714/+1694Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* more: add noreturn function attributeSami Kerola2012-07-261-1/+2
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* more: fix shadow declarationSami Kerola2012-07-261-3/+3
| | | | | | | text-utils/more.c:1123:13: warning: declaration of 'state' shadows a previous local [-Wshadow] text-utils/more.c:1095:18: warning: shadowed declaration is here [-Wshadow] Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* more: fix pointer wrap around compiler warningsSami Kerola2012-06-171-5/+3Star
| | | | | | | more.c:318:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow] more.c:362:3: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow] Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* more: fix search repetition regressionSami Kerola2012-06-171-1/+13
| | | | | | | Commit 596007ef6a37b708f44286932eed667b316e5f70 introduced a bug crashing more always when a text search was repeated with 'n' command. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* Fix typos in comments and wall's man pageBernhard Voelker2012-06-051-1/+1
| | | | | | | | | | | Culprits identified again by (newer) misspellings: $ git ls-files | misspellings -f - | grep -v '^po/' * wall: Fix typo in man page. * Fix typos in source code comments. Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
* more: fix regex error messages printingKarel Zak2012-06-051-2/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* more: remove a meaningless testJeremy Huntwork2012-06-051-2/+1Star
| | | | | | | regexec only returns 0 or REG_NOMATCH so remove a meaningless test Signed-off-by: Jeremy Huntwork <jhuntwork@lightcubesolutions.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* Use POSIX regcomp and regexec over obsolete BSD re_comp and re_execJeremy Huntwork2012-05-131-6/+7
|
* Fix typos found by misspellingsBernhard Voelker2012-04-231-2/+2
| | | | | | | | | | | | | | | The tool misspellings (https://github.com/lyda/misspell-check) detected several typos. Command used: $ git ls-files | grep -v ^po/ | misspellings -f - * isosize: Fix typo in usage string. * configure.ac: Fix typo in help string of --enable-most-builds option. * fdisk: Fix typo in man page. * libblkid, blkid, mount: Likewise. * Fix various typos in docs and in source code comments. Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
* text-utils: verify writing to streams was successfulSami Kerola2012-04-041-8/+10
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* more: fix typosDavidlohr Bueso2012-02-241-1/+1
| | | | Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* more: add commentKarel Zak2012-01-311-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* more: new usage output, and some trivial fixesSami Kerola2011-02-151-188/+208
| | | | | | | | | | | | | | | | | | | | | 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>
* rename util-linux-ng back to util-linuxKarel Zak2010-11-301-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lib: [strutils] general purpose string handling functionsDavidlohr Bueso2010-11-231-1/+1
| | | | | | | | | | | | | This patch replaces a few functions used throughout the source: * Renames getnum (from schedutils) to strtol_or_err * Moves strtosize (from lib/strtosize.c) * Moves xstrncpy (from include/xstrncpy.h) * Adds strnlen, strnchr and strndup if not available (remove it from libmount utils) A few Makefile.am files were modified to compile accordingly along with trivial renaming in schedutils source code. Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* more: use xalloc for memory allocationDavidlohr Bueso2010-11-011-10/+6Star
| | | | Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* portability: use standard constantsFrançois Revol2010-07-261-0/+4
| | | | | Signed-off-by: François Revol <revol@free.fr> Signed-off-by: Karel Zak <kzak@redhat.com>
* po: fix msgid bugsKarel Zak2009-12-101-1/+1
| | | | | Reported-by: Petr Pisar <petr.pisar@atlas.cz> Signed-off-by: Karel Zak <kzak@redhat.com>
* more: limited line buffer length results in corrupted UTF-8 textKarel Zak2009-11-161-7/+43
| | | | | | Addresses-Debian-Bug: #552608 Reported-By: Roger Leigh <rleigh@debian.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* more: dont use a.out.hMike Frysinger2008-06-161-4/+3Star
| | | | | | | | The a.out.h header is not friendly to portable systems (iow, those that lack a.out support), and since the defines are only used in a cheesy magic, just use the magic constants. It's not like they're ever going to change. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* more: minor fixes to magic()James Youngman2008-06-161-5/+5
| | | | | | | | | Read the magic bytes into signed chars instead of vanilla chars in order to ensure consistent results even on systems whose char type has no sign. Eliminate spurious parentheses in return statements. Correct grammatical errors in comments. Signed-off-by: James Youngman <jay@gnu.org>
* more: use HAVE_WIDECHAR instead ENABLE_WIDECHARKarel Zak2008-04-161-2/+2
| | | | | | This problem has been detected by tools/codecheck-config. Signed-off-by: Karel Zak <kzak@redhat.com>
* more: replace CBAUD with cfgetispeed()Samuel Thibault2008-01-031-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* more: non-linux supportSamuel Thibault2007-11-081-4/+0Star
| | | | Signed-Off-By: Samuel Thibault <samuel.thibault@ens-lyon.org>
* more: cleanup gcc warningsRandy Dunlap2007-11-051-8/+8
| | | | | | | | | | | | | | | Fix strict gcc warnings that come from using: ("-Wall -Wp,-D_FORTIFY_SOURCE=2") more.c:185: warning: passing argument 1 of 'setupterm' discards qualifiers from pointer target type more.c:205: warning: passing argument 1 of 'tparm' discards qualifiers from pointer target type more.c:812: warning: pointer targets in passing argument 2 of 'mbrtowc' differ in signedness more.c:931: warning: pointer targets in passing argument 2 of 'mbrtowc' differ in signedness more.c:1285: warning: pointer targets in passing argument 1 of 'ttyin' differ in signedness more.c:1486: warning: pointer targets in passing argument 1 of 'ttyin' differ in signedness more.c:1879: warning: pointer targets in passing argument 2 of 'mbrtowc' differ in signedness Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
* 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>
* more: fix underlining for multibyte charsKarel Zak2007-08-141-0/+16
| | | | | | | | | | Try: $ printf "aaa _\bŽ_\bŽ_\bŽ bbb\n" | more aaa ŽŽŽ bbb (ŽŽŽ has to be three underlined chars on terminal). Signed-off-by: Karel Zak <kzak@redhat.com>
* text-utils: fix the more command compilation against termcapKarel Zak2007-06-051-3/+44
| | | | | | | The build-sys (text-utils/Makefile.am) allows to compile against ncurses and termcap. The termcap version is broken in more.c. Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: fix ifdef ENABLE_WIDECHAR usageKarel Zak2007-01-301-4/+4
| | | | | | | | There has been unexpected mix of HAVE_WIDECHAR and ENABLE_WIDECHAR macros. The ENABLE_WIDECHAR is old version and has to be replaced everywhere otherwise we will see bugs with multibyte stuff. Signed-off-by: Karel Zak <kzak@redhat.com>
* more: fix file descriptor leakKarel Zak2007-01-041-0/+2
| | | | | | | | | | | When you view a file with the more command and run a shell, the file descriptor for reading the file is leaked to that process. To test, more any file. Then do !/bin/sh. At the prompt do "ls -l /proc/$$/fd" and you'll see the leaked fd. From: Steve Grubb <sgrubb@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* Imported from util-linux-2.13-pre1 tarball.Karel Zak2006-12-071-49/+4Star
|
* Imported from util-linux-2.12p tarball.Karel Zak2006-12-071-4/+3Star
|
* Imported from util-linux-2.12j tarball.Karel Zak2006-12-071-202/+74Star
|
* Imported from util-linux-2.12 tarball.Karel Zak2006-12-071-37/+62
|
* Imported from util-linux-2.11y tarball.Karel Zak2006-12-071-27/+31
|
* Imported from util-linux-2.11w tarball.Karel Zak2006-12-071-9/+8Star
|
* Imported from util-linux-2.11v tarball.Karel Zak2006-12-071-4/+3Star
|
* Imported from util-linux-2.11t tarball.Karel Zak2006-12-071-7/+8
|
* Imported from util-linux-2.11q tarball.Karel Zak2006-12-071-44/+172
|
* Imported from util-linux-2.11m tarball.Karel Zak2006-12-071-8/+8
|
* Imported from util-linux-2.11f tarball.Karel Zak2006-12-071-1/+5
|
* Imported from util-linux-2.11b tarball.Karel Zak2006-12-071-6/+5Star
|
* Imported from util-linux-2.10s tarball.Karel Zak2006-12-071-94/+167
|