This commit was generated by cvs2svn to compensate for changes in r172468,
which included commits to RCS files with non-trunk default branches.
This commit is contained in:
commit
e62cd27f64
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=172469
@ -13,6 +13,18 @@
|
|||||||
======================================================================
|
======================================================================
|
||||||
|
|
||||||
|
|
||||||
|
Major changes between "less" versions 406 and 408
|
||||||
|
|
||||||
|
* Support CSI escape sequences, like SGR escape sequences.
|
||||||
|
|
||||||
|
* Fix bug which caused screen to fail to repaint when window is resized.
|
||||||
|
|
||||||
|
* Fix bug in using -i and -I flags with non-ASCII text.
|
||||||
|
|
||||||
|
* Fix configure bug on systems which don't support langinfo.h.
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
|
||||||
Major changes between "less" versions 394 and 406
|
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 406
|
Less, version 408
|
||||||
|
|
||||||
This is the distribution of less, version 406, released 19 Jun 2007.
|
This is the distribution of less, version 408, released 01 Oct 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
|
||||||
|
@ -128,6 +128,9 @@ fch_get()
|
|||||||
POSITION pos;
|
POSITION pos;
|
||||||
POSITION len;
|
POSITION len;
|
||||||
|
|
||||||
|
if (thisfile == NULL)
|
||||||
|
return (EOI);
|
||||||
|
|
||||||
slept = FALSE;
|
slept = FALSE;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -416,6 +419,9 @@ ch_seek(pos)
|
|||||||
BLOCKNUM new_block;
|
BLOCKNUM new_block;
|
||||||
POSITION len;
|
POSITION len;
|
||||||
|
|
||||||
|
if (thisfile == NULL)
|
||||||
|
return (0);
|
||||||
|
|
||||||
len = ch_length();
|
len = ch_length();
|
||||||
if (pos < ch_zero() || (len != NULL_POSITION && pos > len))
|
if (pos < ch_zero() || (len != NULL_POSITION && pos > len))
|
||||||
return (1);
|
return (1);
|
||||||
@ -450,6 +456,9 @@ ch_end_seek()
|
|||||||
{
|
{
|
||||||
POSITION len;
|
POSITION len;
|
||||||
|
|
||||||
|
if (thisfile == NULL)
|
||||||
|
return (0);
|
||||||
|
|
||||||
if (ch_flags & CH_CANSEEK)
|
if (ch_flags & CH_CANSEEK)
|
||||||
ch_fsize = filesize(ch_file);
|
ch_fsize = filesize(ch_file);
|
||||||
|
|
||||||
@ -503,6 +512,8 @@ ch_beg_seek()
|
|||||||
public POSITION
|
public POSITION
|
||||||
ch_length()
|
ch_length()
|
||||||
{
|
{
|
||||||
|
if (thisfile == NULL)
|
||||||
|
return (NULL_POSITION);
|
||||||
if (ignore_eoi)
|
if (ignore_eoi)
|
||||||
return (NULL_POSITION);
|
return (NULL_POSITION);
|
||||||
if (ch_flags & CH_HELPFILE)
|
if (ch_flags & CH_HELPFILE)
|
||||||
@ -516,6 +527,8 @@ ch_length()
|
|||||||
public POSITION
|
public POSITION
|
||||||
ch_tell()
|
ch_tell()
|
||||||
{
|
{
|
||||||
|
if (thisfile == NULL)
|
||||||
|
return (NULL_POSITION);
|
||||||
return (ch_block * LBUFSIZE) + ch_offset;
|
return (ch_block * LBUFSIZE) + ch_offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -527,6 +540,8 @@ ch_forw_get()
|
|||||||
{
|
{
|
||||||
register int c;
|
register int c;
|
||||||
|
|
||||||
|
if (thisfile == NULL)
|
||||||
|
return (EOI);
|
||||||
c = ch_get();
|
c = ch_get();
|
||||||
if (c == EOI)
|
if (c == EOI)
|
||||||
return (EOI);
|
return (EOI);
|
||||||
@ -546,6 +561,8 @@ ch_forw_get()
|
|||||||
public int
|
public int
|
||||||
ch_back_get()
|
ch_back_get()
|
||||||
{
|
{
|
||||||
|
if (thisfile == NULL)
|
||||||
|
return (EOI);
|
||||||
if (ch_offset > 0)
|
if (ch_offset > 0)
|
||||||
ch_offset --;
|
ch_offset --;
|
||||||
else
|
else
|
||||||
@ -586,6 +603,9 @@ ch_flush()
|
|||||||
{
|
{
|
||||||
register struct buf *bp;
|
register struct buf *bp;
|
||||||
|
|
||||||
|
if (thisfile == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!(ch_flags & CH_CANSEEK))
|
if (!(ch_flags & CH_CANSEEK))
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@ -769,6 +789,9 @@ ch_close()
|
|||||||
{
|
{
|
||||||
int keepstate = FALSE;
|
int keepstate = FALSE;
|
||||||
|
|
||||||
|
if (thisfile == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
if (ch_flags & (CH_CANSEEK|CH_POPENED|CH_HELPFILE))
|
if (ch_flags & (CH_CANSEEK|CH_POPENED|CH_HELPFILE))
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@ -807,6 +830,8 @@ ch_close()
|
|||||||
public int
|
public int
|
||||||
ch_getflags()
|
ch_getflags()
|
||||||
{
|
{
|
||||||
|
if (thisfile == NULL)
|
||||||
|
return (0);
|
||||||
return (ch_flags);
|
return (ch_flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -567,24 +567,29 @@ get_wchar(p)
|
|||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
default:
|
default:
|
||||||
|
/* 0xxxxxxx */
|
||||||
return (LWCHAR)
|
return (LWCHAR)
|
||||||
(p[0] & 0xFF);
|
(p[0] & 0xFF);
|
||||||
case 2:
|
case 2:
|
||||||
|
/* 110xxxxx 10xxxxxx */
|
||||||
return (LWCHAR) (
|
return (LWCHAR) (
|
||||||
((p[0] & 0x1F) << 6) |
|
((p[0] & 0x1F) << 6) |
|
||||||
(p[1] & 0x3F));
|
(p[1] & 0x3F));
|
||||||
case 3:
|
case 3:
|
||||||
|
/* 1110xxxx 10xxxxxx 10xxxxxx */
|
||||||
return (LWCHAR) (
|
return (LWCHAR) (
|
||||||
((p[0] & 0x0F) << 12) |
|
((p[0] & 0x0F) << 12) |
|
||||||
((p[1] & 0x3F) << 6) |
|
((p[1] & 0x3F) << 6) |
|
||||||
(p[2] & 0x3F));
|
(p[2] & 0x3F));
|
||||||
case 4:
|
case 4:
|
||||||
|
/* 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx */
|
||||||
return (LWCHAR) (
|
return (LWCHAR) (
|
||||||
((p[0] & 0x07) << 18) |
|
((p[0] & 0x07) << 18) |
|
||||||
((p[1] & 0x3F) << 12) |
|
((p[1] & 0x3F) << 12) |
|
||||||
((p[2] & 0x3F) << 6) |
|
((p[2] & 0x3F) << 6) |
|
||||||
(p[3] & 0x3F));
|
(p[3] & 0x3F));
|
||||||
case 5:
|
case 5:
|
||||||
|
/* 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx */
|
||||||
return (LWCHAR) (
|
return (LWCHAR) (
|
||||||
((p[0] & 0x03) << 24) |
|
((p[0] & 0x03) << 24) |
|
||||||
((p[1] & 0x3F) << 18) |
|
((p[1] & 0x3F) << 18) |
|
||||||
@ -592,6 +597,7 @@ get_wchar(p)
|
|||||||
((p[3] & 0x3F) << 6) |
|
((p[3] & 0x3F) << 6) |
|
||||||
(p[4] & 0x3F));
|
(p[4] & 0x3F));
|
||||||
case 6:
|
case 6:
|
||||||
|
/* 1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx */
|
||||||
return (LWCHAR) (
|
return (LWCHAR) (
|
||||||
((p[0] & 0x01) << 30) |
|
((p[0] & 0x01) << 30) |
|
||||||
((p[1] & 0x3F) << 24) |
|
((p[1] & 0x3F) << 24) |
|
||||||
@ -602,6 +608,56 @@ get_wchar(p)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Store a character into a UTF-8 string.
|
||||||
|
*/
|
||||||
|
public void
|
||||||
|
put_wchar(pp, ch)
|
||||||
|
char **pp;
|
||||||
|
LWCHAR ch;
|
||||||
|
{
|
||||||
|
if (!utf_mode || ch < 0x80)
|
||||||
|
{
|
||||||
|
/* 0xxxxxxx */
|
||||||
|
*(*pp)++ = (char) ch;
|
||||||
|
} else if (ch < 0x800)
|
||||||
|
{
|
||||||
|
/* 110xxxxx 10xxxxxx */
|
||||||
|
*(*pp)++ = (char) (0xC0 | ((ch >> 6) & 0x1F));
|
||||||
|
*(*pp)++ = (char) (0x80 | (ch & 0x3F));
|
||||||
|
} else if (ch < 0x10000)
|
||||||
|
{
|
||||||
|
/* 1110xxxx 10xxxxxx 10xxxxxx */
|
||||||
|
*(*pp)++ = (char) (0xE0 | ((ch >> 12) & 0x0F));
|
||||||
|
*(*pp)++ = (char) (0x80 | ((ch >> 6) & 0x3F));
|
||||||
|
*(*pp)++ = (char) (0x80 | (ch & 0x3F));
|
||||||
|
} else if (ch < 0x200000)
|
||||||
|
{
|
||||||
|
/* 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx */
|
||||||
|
*(*pp)++ = (char) (0xF0 | ((ch >> 18) & 0x07));
|
||||||
|
*(*pp)++ = (char) (0x80 | ((ch >> 12) & 0x3F));
|
||||||
|
*(*pp)++ = (char) (0x80 | ((ch >> 6) & 0x3F));
|
||||||
|
*(*pp)++ = (char) (0x80 | (ch & 0x3F));
|
||||||
|
} else if (ch < 0x4000000)
|
||||||
|
{
|
||||||
|
/* 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx */
|
||||||
|
*(*pp)++ = (char) (0xF0 | ((ch >> 24) & 0x03));
|
||||||
|
*(*pp)++ = (char) (0x80 | ((ch >> 18) & 0x3F));
|
||||||
|
*(*pp)++ = (char) (0x80 | ((ch >> 12) & 0x3F));
|
||||||
|
*(*pp)++ = (char) (0x80 | ((ch >> 6) & 0x3F));
|
||||||
|
*(*pp)++ = (char) (0x80 | (ch & 0x3F));
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
/* 1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx */
|
||||||
|
*(*pp)++ = (char) (0xF0 | ((ch >> 30) & 0x01));
|
||||||
|
*(*pp)++ = (char) (0x80 | ((ch >> 24) & 0x3F));
|
||||||
|
*(*pp)++ = (char) (0x80 | ((ch >> 18) & 0x3F));
|
||||||
|
*(*pp)++ = (char) (0x80 | ((ch >> 12) & 0x3F));
|
||||||
|
*(*pp)++ = (char) (0x80 | ((ch >> 6) & 0x3F));
|
||||||
|
*(*pp)++ = (char) (0x80 | (ch & 0x3F));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Step forward or backward one character in a string.
|
* Step forward or backward one character in a string.
|
||||||
*/
|
*/
|
||||||
|
1
contrib/less/configure
vendored
1
contrib/less/configure
vendored
@ -6473,6 +6473,7 @@ cat >>conftest.$ac_ext <<_ACEOF
|
|||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
#include <langinfo.h>
|
||||||
int
|
int
|
||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
|
@ -304,7 +304,8 @@ fi
|
|||||||
|
|
||||||
AC_MSG_CHECKING(for locale)
|
AC_MSG_CHECKING(for locale)
|
||||||
AC_TRY_LINK([#include <locale.h>
|
AC_TRY_LINK([#include <locale.h>
|
||||||
#include <ctype.h>], [setlocale(LC_CTYPE,""); isprint(0); iscntrl(0);],
|
#include <ctype.h>
|
||||||
|
#include <langinfo.h>], [setlocale(LC_CTYPE,""); isprint(0); iscntrl(0);],
|
||||||
[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_LOCALE)], [AC_MSG_RESULT(no)])
|
[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_LOCALE)], [AC_MSG_RESULT(no)])
|
||||||
AC_MSG_CHECKING(for ctype functions)
|
AC_MSG_CHECKING(for ctype functions)
|
||||||
AC_TRY_LINK([
|
AC_TRY_LINK([
|
||||||
|
@ -482,7 +482,7 @@ bin_file(f)
|
|||||||
for (i = 0; i < n; i++)
|
for (i = 0; i < n; i++)
|
||||||
{
|
{
|
||||||
char c = data[i];
|
char c = data[i];
|
||||||
if (ctldisp == OPT_ONPLUS && c == ESC)
|
if (ctldisp == OPT_ONPLUS && IS_CSI_START(c))
|
||||||
{
|
{
|
||||||
while (++i < n && is_ansi_middle(data[i]))
|
while (++i < n && is_ansi_middle(data[i]))
|
||||||
continue;
|
continue;
|
||||||
|
@ -56,6 +56,7 @@
|
|||||||
public int utf_len ();
|
public int utf_len ();
|
||||||
public int is_utf8_well_formed ();
|
public int is_utf8_well_formed ();
|
||||||
public LWCHAR get_wchar ();
|
public LWCHAR get_wchar ();
|
||||||
|
public void put_wchar ();
|
||||||
public LWCHAR step_char ();
|
public LWCHAR step_char ();
|
||||||
public int is_composing_char ();
|
public int is_composing_char ();
|
||||||
public int is_ubin_char ();
|
public int is_ubin_char ();
|
||||||
|
@ -31,6 +31,7 @@ extern int top_scroll;
|
|||||||
jump_forw()
|
jump_forw()
|
||||||
{
|
{
|
||||||
POSITION pos;
|
POSITION pos;
|
||||||
|
POSITION end_pos;
|
||||||
|
|
||||||
if (ch_end_seek())
|
if (ch_end_seek())
|
||||||
{
|
{
|
||||||
@ -42,11 +43,17 @@ jump_forw()
|
|||||||
* Go back one line from the end of the file
|
* Go back one line from the end of the file
|
||||||
* to get to the beginning of the last line.
|
* to get to the beginning of the last line.
|
||||||
*/
|
*/
|
||||||
pos = back_line(ch_tell());
|
pos_clear();
|
||||||
|
end_pos = ch_tell();
|
||||||
|
pos = back_line(end_pos);
|
||||||
if (pos == NULL_POSITION)
|
if (pos == NULL_POSITION)
|
||||||
jump_loc((POSITION)0, sc_height-1);
|
jump_loc((POSITION)0, sc_height-1);
|
||||||
else
|
else
|
||||||
|
{
|
||||||
jump_loc(pos, sc_height-1);
|
jump_loc(pos, sc_height-1);
|
||||||
|
if (position(sc_height-1) != end_pos)
|
||||||
|
repaint();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1544,4 +1544,4 @@ LESS(1) LESS(1)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Version 406: 19 Jun 2007 LESS(1)
|
Version 408: 01 Oct 2007 LESS(1)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.TH LESS 1 "Version 406: 19 Jun 2007"
|
.TH LESS 1 "Version 408: 01 Oct 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 406: 19 Jun 2007 LESSECHO(1)
|
Version 408: 01 Oct 2007 LESSECHO(1)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.TH LESSECHO 1 "Version 406: 19 Jun 2007"
|
.TH LESSECHO 1 "Version 408: 01 Oct 2007"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
lessecho \- expand metacharacters
|
lessecho \- expand metacharacters
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
@ -357,4 +357,4 @@ LESSKEY(1) LESSKEY(1)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Version 406: 19 Jun 2007 LESSKEY(1)
|
Version 408: 01 Oct 2007 LESSKEY(1)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.TH LESSKEY 1 "Version 406: 19 Jun 2007"
|
.TH LESSKEY 1 "Version 408: 01 Oct 2007"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
lesskey \- specify key bindings for less
|
lesskey \- specify key bindings for less
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
@ -693,6 +693,8 @@ v403 5/25/07 Fix Windows build.
|
|||||||
v404 6/5/07 Fix display bug with F command and long lines.
|
v404 6/5/07 Fix display bug with F command and long lines.
|
||||||
v405 6/17/07 Fix display bug when using -w option.
|
v405 6/17/07 Fix display bug when using -w option.
|
||||||
v406 6/17/07 Fix secure build.
|
v406 6/17/07 Fix secure build.
|
||||||
|
v407 8/16/07 Fix bugs; support CSI chars.
|
||||||
|
v408 10/1/07 Fix bug in -i with non-ASCII chars.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
char version[] = "406";
|
char version[] = "408";
|
||||||
|
Loading…
Reference in New Issue
Block a user