File: 01-434417-LESS_IS_MORE.patch

package info (click to toggle)
less 436-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 1,452 kB
  • ctags: 1,479
  • sloc: ansic: 17,858; sh: 311; makefile: 151; awk: 7
file content (26 lines) | stat: -rw-r--r-- 738 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=434417

Patch by Jim Paris <jim@jtan.com>

--- a/main.c	2009-07-01 05:27:09.000000000 +1000
+++ b/main.c	2009-07-04 13:34:28.000000000 +1000
@@ -129,7 +129,7 @@ main(argc, argv)
 		if (s[-1] == PATHNAME_SEP[0])
 			break;
 	}
-	if (strcmp(s, "more") == 0)
+	if (strcmp(s, "more") == 0 && lgetenv("LESS_IS_MORE") == NULL)
 		less_is_more = 1;
 
 	init_prompt();
--- a/opttbl.c	2009-07-01 05:27:09.000000000 +1000
+++ b/opttbl.c	2009-07-04 13:34:28.000000000 +1000
@@ -465,7 +465,7 @@ init_option()
 	char *p;
 
 	p = lgetenv("LESS_IS_MORE");
-	if (p != NULL && *p != '\0')
+	if (p != NULL && p[0] == '1' && p[1] == '\0')
 		less_is_more = 1;
 
 	for (o = option;  o->oletter != '\0';  o++)