Virgin import of less v406.
Approved by: re (hrs)
This commit is contained in:
parent
7f074f9c8f
commit
efd72c2eb6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/vendor/less/dist/; revision=170964
@ -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.
|
* Allow decimal point in number for % (percent) command.
|
||||||
|
|
||||||
|
@ -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 part of the GNU project (http://www.gnu.org).
|
||||||
|
|
||||||
This program is free software. You may redistribute it and/or
|
This program is free software. You may redistribute it and/or
|
||||||
|
@ -1390,11 +1390,14 @@ init_cmdhist()
|
|||||||
}
|
}
|
||||||
if (strcmp(line, HISTFILE_SEARCH_SECTION) == 0)
|
if (strcmp(line, HISTFILE_SEARCH_SECTION) == 0)
|
||||||
ml = &mlist_search;
|
ml = &mlist_search;
|
||||||
#if SHELL_ESCAPE || PIPEC
|
|
||||||
else if (strcmp(line, HISTFILE_SHELL_SECTION) == 0)
|
else if (strcmp(line, HISTFILE_SHELL_SECTION) == 0)
|
||||||
|
{
|
||||||
|
#if SHELL_ESCAPE || PIPEC
|
||||||
ml = &mlist_shell;
|
ml = &mlist_shell;
|
||||||
|
#else
|
||||||
|
ml = NULL;
|
||||||
#endif
|
#endif
|
||||||
else if (*line == '"')
|
} else if (*line == '"')
|
||||||
{
|
{
|
||||||
if (ml != NULL)
|
if (ml != NULL)
|
||||||
cmd_addhist(ml, line+1);
|
cmd_addhist(ml, line+1);
|
||||||
@ -1444,11 +1447,18 @@ save_cmdhist()
|
|||||||
#if CMD_HISTORY
|
#if CMD_HISTORY
|
||||||
char *filename;
|
char *filename;
|
||||||
FILE *f;
|
FILE *f;
|
||||||
|
int modified = 0;
|
||||||
|
|
||||||
filename = histfile_name();
|
filename = histfile_name();
|
||||||
if (filename == NULL)
|
if (filename == NULL)
|
||||||
return;
|
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;
|
return;
|
||||||
f = fopen(filename, "w");
|
f = fopen(filename, "w");
|
||||||
free(filename);
|
free(filename);
|
||||||
|
@ -85,7 +85,7 @@ static void multi_search();
|
|||||||
cmd_exec()
|
cmd_exec()
|
||||||
{
|
{
|
||||||
clear_attn();
|
clear_attn();
|
||||||
line_left();
|
clear_bot();
|
||||||
flush();
|
flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,9 +138,6 @@ forw(n, pos, force, only_last, nblank)
|
|||||||
force = 1;
|
force = 1;
|
||||||
clear();
|
clear();
|
||||||
home();
|
home();
|
||||||
} else
|
|
||||||
{
|
|
||||||
clear_bot();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pos != position(BOTTOM_PLUS_ONE) || empty_screen())
|
if (pos != position(BOTTOM_PLUS_ONE) || empty_screen())
|
||||||
|
@ -1544,4 +1544,4 @@ LESS(1) LESS(1)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Version 403: 25 May 2007 LESS(1)
|
Version 406: 19 Jun 2007 LESS(1)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.TH LESS 1 "Version 403: 25 May 2007"
|
.TH LESS 1 "Version 406: 19 Jun 2007"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
less \- opposite of more
|
less \- opposite of more
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
@ -46,4 +46,4 @@ LESSECHO(1) LESSECHO(1)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Version 403: 25 May 2007 LESSECHO(1)
|
Version 406: 19 Jun 2007 LESSECHO(1)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.TH LESSECHO 1 "Version 403: 25 May 2007"
|
.TH LESSECHO 1 "Version 406: 19 Jun 2007"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
lessecho \- expand metacharacters
|
lessecho \- expand metacharacters
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
@ -357,4 +357,4 @@ LESSKEY(1) LESSKEY(1)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Version 403: 25 May 2007 LESSKEY(1)
|
Version 406: 19 Jun 2007 LESSKEY(1)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.TH LESSKEY 1 "Version 403: 25 May 2007"
|
.TH LESSKEY 1 "Version 406: 19 Jun 2007"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
lesskey \- specify key bindings for less
|
lesskey \- specify key bindings for less
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
@ -45,6 +45,9 @@ extern char *hproto;
|
|||||||
extern char *wproto;
|
extern char *wproto;
|
||||||
extern IFILE curr_ifile;
|
extern IFILE curr_ifile;
|
||||||
extern char version[];
|
extern char version[];
|
||||||
|
extern int jump_sline;
|
||||||
|
extern int jump_sline_fraction;
|
||||||
|
extern int less_is_more;
|
||||||
#if LOGFILE
|
#if LOGFILE
|
||||||
extern char *namelogfile;
|
extern char *namelogfile;
|
||||||
extern int force_logfile;
|
extern int force_logfile;
|
||||||
@ -53,9 +56,6 @@ extern int logfile;
|
|||||||
#if TAGS
|
#if TAGS
|
||||||
public char *tagoption = NULL;
|
public char *tagoption = NULL;
|
||||||
extern char *tags;
|
extern char *tags;
|
||||||
extern int jump_sline;
|
|
||||||
extern int jump_sline_fraction;
|
|
||||||
extern int less_is_more;
|
|
||||||
#endif
|
#endif
|
||||||
#if MSDOS_COMPILER
|
#if MSDOS_COMPILER
|
||||||
extern int nm_fg_color, nm_bg_color;
|
extern int nm_fg_color, nm_bg_color;
|
||||||
|
@ -623,7 +623,25 @@ ltget_env(capname)
|
|||||||
char *capname;
|
char *capname;
|
||||||
{
|
{
|
||||||
char name[16];
|
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_");
|
strcpy(name, "LESS_TERMCAP_");
|
||||||
strcat(name, capname);
|
strcat(name, capname);
|
||||||
return (lgetenv(name));
|
return (lgetenv(name));
|
||||||
|
@ -292,6 +292,7 @@ clear_attn()
|
|||||||
POSITION old_end_attnpos;
|
POSITION old_end_attnpos;
|
||||||
POSITION pos;
|
POSITION pos;
|
||||||
POSITION epos;
|
POSITION epos;
|
||||||
|
int moved = 0;
|
||||||
|
|
||||||
if (start_attnpos == NULL_POSITION)
|
if (start_attnpos == NULL_POSITION)
|
||||||
return;
|
return;
|
||||||
@ -319,8 +320,11 @@ clear_attn()
|
|||||||
(void) forw_line(pos);
|
(void) forw_line(pos);
|
||||||
goto_line(slinenum);
|
goto_line(slinenum);
|
||||||
put_line();
|
put_line();
|
||||||
|
moved = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (moved)
|
||||||
|
lower_left();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -690,6 +690,9 @@ v401 3/24/07 Minor documentation fixes.
|
|||||||
v402 3/30/07 Fix autoconf bug when memcpy etc are inline;
|
v402 3/30/07 Fix autoconf bug when memcpy etc are inline;
|
||||||
fix bug in terminating number following -j option.
|
fix bug in terminating number following -j option.
|
||||||
v403 5/25/07 Fix Windows build.
|
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";
|
||||||
|
Loading…
Reference in New Issue
Block a user