summaryrefslogtreecommitdiffstats
path: root/text-utils/more.c
diff options
context:
space:
mode:
authorKarel Zak2006-12-07 00:26:33 +0100
committerKarel Zak2006-12-07 00:26:33 +0100
commitbf3baa99075f6df0bea4cd857aa340694339dd9d (patch)
tree9dba6996348ddc430c30fb9fa0737963c25f283b /text-utils/more.c
parentImported from util-linux-2.12o tarball. (diff)
downloadkernel-qcow2-util-linux-bf3baa99075f6df0bea4cd857aa340694339dd9d.tar.gz
kernel-qcow2-util-linux-bf3baa99075f6df0bea4cd857aa340694339dd9d.tar.xz
kernel-qcow2-util-linux-bf3baa99075f6df0bea4cd857aa340694339dd9d.zip
Imported from util-linux-2.12p tarball.
Diffstat (limited to 'text-utils/more.c')
-rw-r--r--text-utils/more.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/text-utils/more.c b/text-utils/more.c
index 63d46e8b1..5b2f5733b 100644
--- a/text-utils/more.c
+++ b/text-utils/more.c
@@ -318,8 +318,7 @@ int main(int argc, char **argv) {
/* allow clreol only if Home and eraseln and EodClr strings are
* defined, and in that case, make sure we are in noscroll mode
*/
- if(clreol)
- {
+ if (clreol) {
if((Home == NULL) || (*Home == '\0') ||
(eraseln == NULL) || (*eraseln == '\0') ||
(EodClr == NULL) || (*EodClr == '\0') )
@@ -327,7 +326,7 @@ int main(int argc, char **argv) {
else noscroll = 1;
}
if (dlines == 0)
- dlines = Lpp - (noscroll ? 1 : 2);
+ dlines = Lpp - 1; /* was: Lpp - (noscroll ? 1 : 2) */
left = dlines;
if (nfiles > 1)
prnames++;
@@ -681,7 +680,7 @@ void chgwinsz(int dummy) {
nscroll = Lpp/2 - 1;
if (nscroll <= 0)
nscroll = 1;
- dlines = Lpp - (noscroll ? 1 : 2);
+ dlines = Lpp - 1; /* was: Lpp - (noscroll ? 1 : 2) */
}
if (win.ws_col != 0)
Mcol = win.ws_col;