diff options
Diffstat (limited to 'forwback.c')
-rw-r--r-- | forwback.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/forwback.c b/forwback.c index 680fa251b12e3..1e0397c9a7651 100644 --- a/forwback.c +++ b/forwback.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2017 Mark Nudelman + * Copyright (C) 1984-2019 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. @@ -46,7 +46,7 @@ extern char *tagoption; * Sound the bell to indicate user is trying to move past end of file. */ static void -eof_bell() +eof_bell(VOID_PARAM) { if (quiet == NOT_QUIET) bell(); @@ -58,7 +58,7 @@ eof_bell() * Check to see if the end of file is currently displayed. */ public int -eof_displayed() +eof_displayed(VOID_PARAM) { POSITION pos; @@ -85,7 +85,7 @@ eof_displayed() * Check to see if the entire file is currently displayed. */ public int -entire_file_displayed() +entire_file_displayed(VOID_PARAM) { POSITION pos; @@ -105,7 +105,7 @@ entire_file_displayed() * for the first time. */ public void -squish_check() +squish_check(VOID_PARAM) { if (!squished) return; @@ -434,7 +434,7 @@ backward(n, force, only_last) * top_scroll, as well as back_scroll. */ public int -get_back_scroll() +get_back_scroll(VOID_PARAM) { if (no_back_scroll) return (0); @@ -446,19 +446,18 @@ get_back_scroll() } /* - * Return number of displayable lines in the file. - * Stop counting at screen height + 1. + * Will the entire file fit on one screen? */ public int -get_line_count() +get_one_screen(VOID_PARAM) { int nlines; POSITION pos = ch_zero(); - for (nlines = 0; nlines <= sc_height; nlines++) + for (nlines = 0; nlines < sc_height; nlines++) { pos = forw_line(pos); if (pos == NULL_POSITION) break; } - return nlines; + return (nlines < sc_height); } |