reimplemented feature in less
    pwolfe at kailand.KAI.COM 
    pwolfe at kailand.KAI.COM
       
    Thu Sep 22 22:51:00 AEST 1988
    
    
  
Version 73 of less (-: Why the new version number scheme, Mark?  Trying to
confuse us? :-) had a feature that was eliminated in the recent posting.  The
"e" option still quits the second time you reach end of file, but now if a
single file being displayed that is less than one screen length, less doesn't
exit immediately, but displays it's prompt instead.  I prefered the old
action.
The following patch adds four lines to prim.c to re-implement this feature.
Feed to patch or hand implement if you like.
Patrick J. Wolfe  (pwolfe at kai.com,  uunet!kailand!pwolfe)
System Manager, Kuck and Associates Inc.
*** oldprim.c	Thu Sep 22 07:30:29 1988
--- prim.c	Thu Sep 22 07:29:48 1988
***************
*** 21,26
  extern int linenums;
  extern int plusoption;
  extern char *line;
  extern char *first_cmd;
  #if TAGS
  extern int tagoption;
--- 21,27 -----
  extern int linenums;
  extern int plusoption;
  extern char *line;
+ extern int ac;
  extern char *first_cmd;
  #if TAGS
  extern int tagoption;
***************
*** 198,203
  		eof_bell();
  	else if (do_repaint)
  		repaint();
  	first_time = 0;
  	(void) currline(BOTTOM);
  }
--- 199,207 -----
  		eof_bell();
  	else if (do_repaint)
  		repaint();
+ 	if (first_time && hit_eof && quit_at_eof && ac <= 1) {
+ 		quit ();
+ 		}
  	first_time = 0;
  	(void) currline(BOTTOM);
  }
    
    
More information about the Comp.sources.bugs
mailing list