[comp.sources.bugs] less

bullard@trwrb.UUCP (Drew D. Bullard) (12/01/87)

NAME
     less - problem with the "c" option

DATE ENACTED
     TBD

KEYWORDS
     less

PROBLEM DESCRIPTION
     When the "c" option is in effect and the termcap entry has
     "am" set (automatic margins), characters in column 80 are
     deleted and "clear to end of line" does not work.

RESOLUTION
     In the file  output.c , in the routine  putline() change:
                  ------ -                   -------

          if (column < sc_width || !auto_wrap || ignaw)

     to

          if (column < sc_width || auto_wrap || ignaw)

FILES
     /usr/local/src/cmd/less/output.c

REQUESTOR
     Drew Bullard






















4.2bsd                    TRW (12/1/87)                         1



-- 
----
Drew Bullard
{ihnp4,ucbvax,sdcrdcf}!trwrb!bullard

krc@arthur.cs.purdue.edu (Kenny "RoboBrother" Crudup) (12/03/87)

In article <3828@trwrb.UUCP>, bullard@trwrb.UUCP (Drew D. Bullard) writes:
> 
> 
> NAME
>      less - problem with the "c" option
> 
> PROBLEM DESCRIPTION
>      When the "c" option is in effect and the termcap entry has
>      "am" set (automatic margins), characters in column 80 are
>      deleted and "clear to end of line" does not work.
> REQUESTOR
>      Drew Bullard

Since 'less' is one of my 'favorite' programs, I made the fix immediately,
(despite that fact that I have never had a problem with it, and do not
use the 'c' option). Afterwards, when I tested it on a file with
long lines, they wrapped, but also took up another line (of blanks). Since
less apparantly does not know this, it spits out 24 lines, when you now
actually have less availiable (no pun intended), and the topmost lines
scroll off the top of the screen. This is a wyse50, which does have
'am', on a BSD4.3 system. When I used the old version of the binary
the problem dissappears, and it works as reliably as before. I never
noticed col 80 going away before the mod.

(I kinda wondered about this fix when the change was a simple negation
of a bool)

(This is not a flame- just a bug report.)

-- 
Kenny "RoboBrother" Crudup		krc@arthur.cs.purdue.edu
Purdue University CS Dept.		
W. Lafayette, IN 47906			A mind IS a terrible thing to waste,
+1 317 494 7842				but I AM having fun at it!

david@dhw68k.UUCP (David H. Wolfskill) (12/05/87)

In article <3828@trwrb.UUCP> bullard@trwrb.UUCP (Drew D. Bullard) writes:
[condensed quoting]
>     less
>PROBLEM DESCRIPTION
>     When the "c" option is in effect and the termcap entry has
>     "am" set (automatic margins), characters in column 80 are
>     deleted and "clear to end of line" does not work.
>RESOLUTION
>     In the file  output.c , in the routine  putline() change:
>          if (column < sc_width || !auto_wrap || ignaw)
>     to
>          if (column < sc_width || auto_wrap || ignaw)

I tried the above change with the result that an attempt to display a
first line of a file, when that line is > 80 characters long, will not
display the first 80 characters in the line.

I am using the "window" program (which uses a termcap definition of
"window", which I have defined as having the "am" attribute) on a
Wyse-50 terminal; the wy50 termcap entry that I use also has the "am"
attribute.

Also, I have not perceived an occurrence of the stated problem.

I have backed out the proposed change.

(I just noted that the author specified the "-c" option, which I had
never used.  I verified that the program still works, even though "-c"
is specified, without the change in question.  It does -- in the above-
described environment, at least.)

david
-- 
David H. Wolfskill
uucp: ...{trwrb,hplabs}!felix!dhw68k!david	InterNet: david@dhw68k.cts.com

bullard@trwrb.UUCP (Drew D. Bullard) (12/11/87)

 The mod is false. Back it out, throw it out, flame me.

 Further investigation has turned up a hardware bug in Citoh
terminals (cit-101, cit-101e). On these terminals the cursor
waits in column 80 for the next character before wrapping.

-- 
----
Drew Bullard
{ihnp4,ucbvax,sdcrdcf}!trwrb!bullard

gwyn@brl-smoke.ARPA (Doug Gwyn ) (12/13/87)

In article <4024@trwrb.UUCP> bullard@trwrb.dsd.trw.com.UUCP (Drew D. Bullard) writes:
- Further investigation has turned up a hardware bug in Citoh
-terminals (cit-101, cit-101e). On these terminals the cursor
-waits in column 80 for the next character before wrapping.

That's not a bug, that's how a VT100 works.