[1150] in Athena Bugs

home help back first fref pref prev next nref lref last post

/usr/ucb/more (all versions)

daemon@ATHENA.MIT.EDU (probe@ATHENA.MIT.EDU)
Mon Oct 10 06:50:46 1988

From: <probe@ATHENA.MIT.EDU>
Date: Mon, 10 Oct 88 06:50:24 EDT
To: bugs@ATHENA.MIT.EDU
Reply-To: Richard Basch   <probe@ATHENA.MIT.EDU>

When /etc/termcap has :am: defined (auto-margins), 'more' incorrectly
displays long lines...  (This has been reported before).

I propose that we put a new version of "more" out with the final 6.0R
release in /srvd/patch.  Here is a set of patches that seems to fix the
problem:

-Richard

*** /tmp/,RCSt1014217	Mon Oct 10 06:44:26 1988
--- more.c	Mon Oct 10 06:41:38 1988
***************
*** 870,876 ****
  	}
  	else if (c >= ' ' && c != RUBOUT)
  	    column++;
! 	if (column >= Mcol && fold_opt) break;
  	c = Getc (f);
      }
      if (column >= Mcol && Mcol > 0) {
--- 870,876 ----
  	}
  	else if (c >= ' ' && c != RUBOUT)
  	    column++;
! 	if (column >= Mcol && fold_opt && !Wrap) break;
  	c = Getc (f);
      }
      if (column >= Mcol && Mcol > 0) {
***************
*** 878,884 ****
  	    *p++ = '\n';
  	}
      }
!     colflg = column == Mcol && fold_opt;
      *length = p - Line;
      *p = 0;
      return (column);
--- 878,884 ----
  	    *p++ = '\n';
  	}
      }
!     colflg = column == Mcol && (fold_opt || Wrap);
      *length = p - Line;
      *p = 0;
      return (column);

home help back first fref pref prev next nref lref last post