🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sources.bugs
Article #2375

Bug in "less" (unofficial fix)

#2375
From: viktor
Date: Thu, 08 Mar 1990 18:21
42 lines
1626 bytes
	Less incorrectly detects EOF when a file of greater than screen
height lines follows a short (<=sc_height lines) file.

	The problem is related to the varaible squished not being cleared
with the conclusion that the next file is also short.

	One fix is to reset squished in prepaint() instead of squish_check(),
since prepaint() is called by squis_check(),  the latter remains
essentially the same,  while we squash the squish bug since prepaint
is called early in the processing of each file.

===================================================================
RCS file: RCS/prim.c,v
retrieving revision 1.1
diff -c -r1.1 prim.c
*** /tmp/,RCSt1a05224	Thu Mar  8 12:58:36 1990
--- prim.c	Thu Mar  8 12:52:54 1990
***************
*** 100,106 ****
  {
  	if (!squished)
  		return;
- 	squished = 0;
  	repaint();
  }
  
--- 100,105 ----
***************
*** 356,361 ****
--- 355,361 ----
  	POSITION pos;
  {
  	hit_eof = 0;
+ 	squished = 0;
  	forw(sc_height-1, pos, 1, 0);
  	screen_trashed = 0;
  }
	Viktor Dukhovni <viktor@math.princeton.edu>	: ARPA
		<...!uunet!princeton!math!viktor>	: UUCP
	Fine Hall, Washington Rd., Princeton, NJ 08544  : US-Post
		+1-(609)-258-5792		 	: VOICE
Technical Details
Message-ID: <14371@phoenix.Princeton.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!wuarchive!udel!princeton!phoenix!math.princeton.edu!viktor

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!wuarchive!udel!princeton!phoenix!math.princeton.edu!viktor
From: viktor@math.princeton.edu
Newsgroups: comp.sources.bugs
Subject: Bug in "less" (unofficial fix)
Keywords: more or less
Message-ID: <14371@phoenix.Princeton.EDU>
Date: 8 Mar 90 18:21:18 GMT
Sender: news@phoenix.Princeton.EDU
Lines: 42