summaryrefslogtreecommitdiffstats
path: root/contrib/less
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2007-06-21 10:42:55 +0000
committerdelphij <delphij@FreeBSD.org>2007-06-21 10:42:55 +0000
commitbb6dbdf2f382ed564a935433f1553a0c588e0f5f (patch)
tree9b5ee02031fe0fca0fb931dda88350d289afe238 /contrib/less
parent7672cb6e48e2ed472cbd72caaa0eb155608a644d (diff)
downloadFreeBSD-src-bb6dbdf2f382ed564a935433f1553a0c588e0f5f.zip
FreeBSD-src-bb6dbdf2f382ed564a935433f1553a0c588e0f5f.tar.gz
Virgin import of less v406.
Approved by: re (hrs)
Diffstat (limited to 'contrib/less')
-rw-r--r--contrib/less/NEWS2
-rw-r--r--contrib/less/README4
-rw-r--r--contrib/less/cmdbuf.c16
-rw-r--r--contrib/less/command.c2
-rw-r--r--contrib/less/forwback.c3
-rw-r--r--contrib/less/less.man2
-rw-r--r--contrib/less/less.nro2
-rw-r--r--contrib/less/lessecho.man2
-rw-r--r--contrib/less/lessecho.nro2
-rw-r--r--contrib/less/lesskey.man2
-rw-r--r--contrib/less/lesskey.nro2
-rw-r--r--contrib/less/optfunc.c6
-rw-r--r--contrib/less/screen.c18
-rw-r--r--contrib/less/search.c4
-rw-r--r--contrib/less/version.c5
15 files changed, 52 insertions, 20 deletions
diff --git a/contrib/less/NEWS b/contrib/less/NEWS
index ddd3137..ccb14ba 100644
--- a/contrib/less/NEWS
+++ b/contrib/less/NEWS
@@ -13,7 +13,7 @@
======================================================================
- Major changes between "less" versions 394 and 403
+ Major changes between "less" versions 394 and 406
* Allow decimal point in number for % (percent) command.
diff --git a/contrib/less/README b/contrib/less/README
index ac2d46e..848fe4d 100644
--- a/contrib/less/README
+++ b/contrib/less/README
@@ -1,7 +1,7 @@
- Less, version 403
+ Less, version 406
- This is the distribution of less, version 403, released 25 May 2007.
+ This is the distribution of less, version 406, released 19 Jun 2007.
This program is part of the GNU project (http://www.gnu.org).
This program is free software. You may redistribute it and/or
diff --git a/contrib/less/cmdbuf.c b/contrib/less/cmdbuf.c
index 6effb60..ad79ce9 100644
--- a/contrib/less/cmdbuf.c
+++ b/contrib/less/cmdbuf.c
@@ -1390,11 +1390,14 @@ init_cmdhist()
}
if (strcmp(line, HISTFILE_SEARCH_SECTION) == 0)
ml = &mlist_search;
-#if SHELL_ESCAPE || PIPEC
else if (strcmp(line, HISTFILE_SHELL_SECTION) == 0)
+ {
+#if SHELL_ESCAPE || PIPEC
ml = &mlist_shell;
+#else
+ ml = NULL;
#endif
- else if (*line == '"')
+ } else if (*line == '"')
{
if (ml != NULL)
cmd_addhist(ml, line+1);
@@ -1444,11 +1447,18 @@ save_cmdhist()
#if CMD_HISTORY
char *filename;
FILE *f;
+ int modified = 0;
filename = histfile_name();
if (filename == NULL)
return;
- if (!mlist_search.modified && !mlist_shell.modified)
+ if (mlist_search.modified)
+ modified = 1;
+#if SHELL_ESCAPE || PIPEC
+ if (mlist_shell.modified)
+ modified = 1;
+#endif
+ if (!modified)
return;
f = fopen(filename, "w");
free(filename);
diff --git a/contrib/less/command.c b/contrib/less/command.c
index da0f3ea..ff48909 100644
--- a/contrib/less/command.c
+++ b/contrib/less/command.c
@@ -85,7 +85,7 @@ static void multi_search();
cmd_exec()
{
clear_attn();
- line_left();
+ clear_bot();
flush();
}
diff --git a/contrib/less/forwback.c b/contrib/less/forwback.c
index 1eafd6a..7b5bb2d 100644
--- a/contrib/less/forwback.c
+++ b/contrib/less/forwback.c
@@ -138,9 +138,6 @@ forw(n, pos, force, only_last, nblank)
force = 1;
clear();
home();
- } else
- {
- clear_bot();
}
if (pos != position(BOTTOM_PLUS_ONE) || empty_screen())
diff --git a/contrib/less/less.man b/contrib/less/less.man
index 18a1227..2efc49d 100644
--- a/contrib/less/less.man
+++ b/contrib/less/less.man
@@ -1544,4 +1544,4 @@ LESS(1) LESS(1)
- Version 403: 25 May 2007 LESS(1)
+ Version 406: 19 Jun 2007 LESS(1)
diff --git a/contrib/less/less.nro b/contrib/less/less.nro
index 85d05e9..ddba6d8 100644
--- a/contrib/less/less.nro
+++ b/contrib/less/less.nro
@@ -1,4 +1,4 @@
-.TH LESS 1 "Version 403: 25 May 2007"
+.TH LESS 1 "Version 406: 19 Jun 2007"
.SH NAME
less \- opposite of more
.SH SYNOPSIS
diff --git a/contrib/less/lessecho.man b/contrib/less/lessecho.man
index b21f2c0..49c863a 100644
--- a/contrib/less/lessecho.man
+++ b/contrib/less/lessecho.man
@@ -46,4 +46,4 @@ LESSECHO(1) LESSECHO(1)
- Version 403: 25 May 2007 LESSECHO(1)
+ Version 406: 19 Jun 2007 LESSECHO(1)
diff --git a/contrib/less/lessecho.nro b/contrib/less/lessecho.nro
index 6a08e9b..297a732 100644
--- a/contrib/less/lessecho.nro
+++ b/contrib/less/lessecho.nro
@@ -1,4 +1,4 @@
-.TH LESSECHO 1 "Version 403: 25 May 2007"
+.TH LESSECHO 1 "Version 406: 19 Jun 2007"
.SH NAME
lessecho \- expand metacharacters
.SH SYNOPSIS
diff --git a/contrib/less/lesskey.man b/contrib/less/lesskey.man
index 2b614a5..ffad2c3 100644
--- a/contrib/less/lesskey.man
+++ b/contrib/less/lesskey.man
@@ -357,4 +357,4 @@ LESSKEY(1) LESSKEY(1)
- Version 403: 25 May 2007 LESSKEY(1)
+ Version 406: 19 Jun 2007 LESSKEY(1)
diff --git a/contrib/less/lesskey.nro b/contrib/less/lesskey.nro
index ebb5066..63cb39a 100644
--- a/contrib/less/lesskey.nro
+++ b/contrib/less/lesskey.nro
@@ -1,4 +1,4 @@
-.TH LESSKEY 1 "Version 403: 25 May 2007"
+.TH LESSKEY 1 "Version 406: 19 Jun 2007"
.SH NAME
lesskey \- specify key bindings for less
.SH SYNOPSIS
diff --git a/contrib/less/optfunc.c b/contrib/less/optfunc.c
index 8cb9aa3..4ca5142 100644
--- a/contrib/less/optfunc.c
+++ b/contrib/less/optfunc.c
@@ -45,6 +45,9 @@ extern char *hproto;
extern char *wproto;
extern IFILE curr_ifile;
extern char version[];
+extern int jump_sline;
+extern int jump_sline_fraction;
+extern int less_is_more;
#if LOGFILE
extern char *namelogfile;
extern int force_logfile;
@@ -53,9 +56,6 @@ extern int logfile;
#if TAGS
public char *tagoption = NULL;
extern char *tags;
-extern int jump_sline;
-extern int jump_sline_fraction;
-extern int less_is_more;
#endif
#if MSDOS_COMPILER
extern int nm_fg_color, nm_bg_color;
diff --git a/contrib/less/screen.c b/contrib/less/screen.c
index 6c4fc84..51ab799 100644
--- a/contrib/less/screen.c
+++ b/contrib/less/screen.c
@@ -623,7 +623,25 @@ ltget_env(capname)
char *capname;
{
char name[16];
+ char *s;
+ s = lgetenv("LESS_TERMCAP_DEBUG");
+ if (s != NULL && *s != '\0')
+ {
+ struct env { struct env *next; char *name; char *value; };
+ static struct env *envs = NULL;
+ struct env *p;
+ for (p = envs; p != NULL; p = p->next)
+ if (strcmp(p->name, capname) == 0)
+ return p->value;
+ p = (struct env *) ecalloc(1, sizeof(struct env));
+ p->name = save(capname);
+ p->value = (char *) ecalloc(strlen(capname)+3, sizeof(char));
+ sprintf(p->value, "<%s>", capname);
+ p->next = envs;
+ envs = p;
+ return p->value;
+ }
strcpy(name, "LESS_TERMCAP_");
strcat(name, capname);
return (lgetenv(name));
diff --git a/contrib/less/search.c b/contrib/less/search.c
index e098578..380d278 100644
--- a/contrib/less/search.c
+++ b/contrib/less/search.c
@@ -292,6 +292,7 @@ clear_attn()
POSITION old_end_attnpos;
POSITION pos;
POSITION epos;
+ int moved = 0;
if (start_attnpos == NULL_POSITION)
return;
@@ -319,8 +320,11 @@ clear_attn()
(void) forw_line(pos);
goto_line(slinenum);
put_line();
+ moved = 1;
}
}
+ if (moved)
+ lower_left();
}
#endif
diff --git a/contrib/less/version.c b/contrib/less/version.c
index 30efdde..df74e04 100644
--- a/contrib/less/version.c
+++ b/contrib/less/version.c
@@ -690,6 +690,9 @@ v401 3/24/07 Minor documentation fixes.
v402 3/30/07 Fix autoconf bug when memcpy etc are inline;
fix bug in terminating number following -j option.
v403 5/25/07 Fix Windows build.
+v404 6/5/07 Fix display bug with F command and long lines.
+v405 6/17/07 Fix display bug when using -w option.
+v406 6/17/07 Fix secure build.
*/
-char version[] = "403";
+char version[] = "406";
OpenPOWER on IntegriCloud