diff options
Diffstat (limited to 'contrib/less/line.c')
-rw-r--r-- | contrib/less/line.c | 31 |
1 files changed, 5 insertions, 26 deletions
diff --git a/contrib/less/line.c b/contrib/less/line.c index e4b9731..42a2ea3 100644 --- a/contrib/less/line.c +++ b/contrib/less/line.c @@ -1,5 +1,6 @@ +/* $FreeBSD$ */ /* - * Copyright (C) 1984-2007 Mark Nudelman + * Copyright (C) 1984-2005 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. @@ -59,7 +60,6 @@ extern int bl_s_width, bl_e_width; extern int so_s_width, so_e_width; extern int sc_width, sc_height; extern int utf_mode; -extern int oldbot; extern POSITION start_attnpos; extern POSITION end_attnpos; @@ -995,8 +995,6 @@ pflushmbc() pdone(endline) int endline; { - int nl; - (void) pflushmbc(); if (pendc && (pendc != '\r' || !endline)) @@ -1027,21 +1025,8 @@ pdone(endline) /* * Add a newline if necessary, * and append a '\0' to the end of the line. - * We output a newline if we're not at the right edge of the screen, - * or if the terminal doesn't auto wrap, - * or if this is really the end of the line AND the terminal ignores - * a newline at the right edge. - * (In the last case we don't want to output a newline if the terminal - * doesn't ignore it since that would produce an extra blank line. - * But we do want to output a newline if the terminal ignores it in case - * the next line is blank. In that case the single newline output for - * that blank line would be ignored!) */ - if (!oldbot) - nl = (column < sc_width || !auto_wrap || (endline && ignaw) || ctldisp == OPT_ON); - else - nl = (column < sc_width || !auto_wrap || ignaw || ctldisp == OPT_ON); - if (nl) + if (column < sc_width || !auto_wrap || ignaw || ctldisp == OPT_ON) { linebuf[curr] = '\n'; attr[curr] = AT_NORMAL; @@ -1109,10 +1094,9 @@ null_line() * {{ This is supposed to be more efficient than forw_line(). }} */ public POSITION -forw_raw_line(curr_pos, linep, line_lenp) +forw_raw_line(curr_pos, linep) POSITION curr_pos; char **linep; - int *line_lenp; { register int n; register int c; @@ -1148,8 +1132,6 @@ forw_raw_line(curr_pos, linep, line_lenp) linebuf[n] = '\0'; if (linep != NULL) *linep = linebuf; - if (line_lenp != NULL) - *line_lenp = n; return (new_pos); } @@ -1158,10 +1140,9 @@ forw_raw_line(curr_pos, linep, line_lenp) * {{ This is supposed to be more efficient than back_line(). }} */ public POSITION -back_raw_line(curr_pos, linep, line_lenp) +back_raw_line(curr_pos, linep) POSITION curr_pos; char **linep; - int *line_lenp; { register int n; register int c; @@ -1222,7 +1203,5 @@ back_raw_line(curr_pos, linep, line_lenp) } if (linep != NULL) *linep = &linebuf[n]; - if (line_lenp != NULL) - *line_lenp = size_linebuf - 1 - n; return (new_pos); } |