X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/a942b40bd72b6c50a443abd4f5ca6b513614cff1..bc258617f323d737755d6043c64ffea2c59b69d4:/usr/src/usr.bin/more/input.c diff --git a/usr/src/usr.bin/more/input.c b/usr/src/usr.bin/more/input.c index 064c004613..a49b8e5182 100644 --- a/usr/src/usr.bin/more/input.c +++ b/usr/src/usr.bin/more/input.c @@ -18,7 +18,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)input.c 5.2 (Berkeley) %G%"; +static char sccsid[] = "@(#)input.c 5.3 (Berkeley) %G%"; #endif /* not lint */ /* @@ -31,12 +31,15 @@ static char sccsid[] = "@(#)input.c 5.2 (Berkeley) %G%"; * delimited by newlines; not processed with respect to screen width. */ -#include "less.h" +#include +#include extern int squeeze; extern int sigs; extern char *line; +off_t ch_tell(); + /* * Get the next line. * A "current" position is passed and a "new" position is returned. @@ -44,11 +47,11 @@ extern char *line; * a line. The new position is the position of the first character * of the NEXT line. The line obtained is the line starting at curr_pos. */ - public POSITION +off_t forw_line(curr_pos) - POSITION curr_pos; + off_t curr_pos; { - POSITION new_pos; + off_t new_pos; register int c; if (curr_pos == NULL_POSITION || ch_seek(curr_pos)) @@ -114,14 +117,14 @@ forw_line(curr_pos) * a line. The new position is the position of the first character * of the PREVIOUS line. The line obtained is the one starting at new_pos. */ - public POSITION +off_t back_line(curr_pos) - POSITION curr_pos; + off_t curr_pos; { - POSITION new_pos, begin_new_pos; + off_t new_pos, begin_new_pos; int c; - if (curr_pos == NULL_POSITION || curr_pos <= (POSITION)0 || + if (curr_pos == NULL_POSITION || curr_pos <= (off_t)0 || ch_seek(curr_pos-1)) return (NULL_POSITION);