Less fix

Graham Carpenter graham at brueer.UUCP
Wed Sep 25 09:14:50 AEST 1985


Subsequent to posting my fix for 'less', I have been contacted by people
with different versions of it, for whom my posting was not verbose enough.
So here is the full listing of the modified function which can be found in
command.c


		case '/':
		case '?':
			/*
			 * Search for a pattern.
			 * Accept chars of the pattern until \n.
			 */
			n = cmd_int();
			if (n <= 0)
				n = 1;
			mcc = last_mcc = c;
		
			/*
			 * Brunel mod to fix bug - Graham Carpenter
			 * 17th September 1985
			 * Without this fix the number N is passed
			 * as part of the search pattern.
			cmd_reset();
			
			
			start_mcc();
			c = getcc();
			goto again;
-- 
================================================================================
Graham J Carpenter.                |
Dept of Electrical Engineering     | Preferred:
Brunel University                  | ARPANET & JANET: graham%brueer at ucl-cs
Kingston Lane                      | 
Uxbridge                           | UUCP: !ukc!reading!brueer!graham
UB8 3PH                            |
ENGLAND                            |
================================================================================



More information about the Comp.sources.bugs mailing list