import less 381. changes:

v375   4/7/02   Fix searching for SGR sequences; fix SECURE build;
                add SGR support to DJGPP version (thanks to Eli Zaretskii).
v376  6/10/02   Fix bug in overstriking mulitbyte UTF-8 characters
                (thanks to Jungshik Shin).
                Posted to Web page.
-----------------------------------------------------------------
v377  9/10/02   Fix bug in Windows version when file contains CR;
                fix bug in search highlights with -R;
                make initial buffer limit really be 64K not unlimited.
v378  9/30/02   Misc bug fixes and compiler warning cleanup.
                Posted to Web page.
-----------------------------------------------------------------
v379 11/23/02   Add -L option; fix bug with ctrl-K in lesskey files;
                improve UTF-8 overstriking and underscore overstriking;
                fix minor man page problems; change to autoconf 2.54.
v380 11/24/02   Make LINENUM same as POSITION.
v381 11/28/02   Make -N use 7 columns for line number if possible.
This commit is contained in:
mrg 2003-04-14 02:09:56 +00:00
parent 488c2452ee
commit e0555382b4
14 changed files with 99 additions and 25 deletions

View File

@ -2,7 +2,7 @@
------------
Less
Copyright (C) 1984-2000 Mark Nudelman
Copyright (C) 1984-2002 Mark Nudelman
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions

View File

@ -13,7 +13,38 @@
======================================================================
Major changes between "less" versions 358 and 374
Major changes between "less" versions 378 and 381
* New -L option to disable LESSOPEN processing.
* Further support for large (64 bit) file addressing.
Large file support is now set up by the configure script.
* Use autoconf 2.54.
Replace configure.in, acconfig.h, defines.h.top with configure.ac.
* Overstriking underscore with underscore is now bold or underlined
depending on context.
* Use only 7 spaces for line numbers in -N mode, if possible.
* Fix some bugs in handling overstriking in UTF-8 files.
* Fix some nroff issues in the man page.
======================================================================
Major changes between "less" versions 376 and 378
* Bug fixes:
Default buffer space is now 64K as documented.
Search highlighting works properly when used with -R.
Windows version works properly when input file contains carriage returns.
Clean up some compiler warnings.
======================================================================
Major changes between "less" versions 358 and 376
* -x option can now specify multiple variable-width tab stops.
@ -41,6 +72,9 @@
* Default LESSCHARSET for MS-DOS versions is now "dos".
* Searching works better with ANSI (SGR) escape sequences.
ANSI color escape sequences are now supported in the MS-DOS (DJGPP) version.
* Improved performance in reading very large pipes.
* Eliminated some dependencies on file offets being 32 bits.

View File

@ -1,7 +1,7 @@
Less, version 374
Less, version 381
This is the distribution of less, version 374, released 19 Feb 2002.
This is the distribution of less, version 381, released 17 Jan 2003.
This program is part of the GNU project (http://www.gnu.org).
This program is free software. You may redistribute it and/or

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-2000 Mark Nudelman
* Copyright (C) 1984-2002 Mark Nudelman
*
* You may distribute under the terms of either the GNU General Public
* License or the Less License, as specified in the README file.

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-2000 Mark Nudelman
* Copyright (C) 1984-2002 Mark Nudelman
*
* You may distribute under the terms of either the GNU General Public
* License or the Less License, as specified in the README file.

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-2000 Mark Nudelman
* Copyright (C) 1984-2002 Mark Nudelman
*
* You may distribute under the terms of either the GNU General Public
* License or the Less License, as specified in the README file.
@ -52,8 +52,8 @@ jump_forw()
* Jump to line n in the file.
*/
public void
jump_back(n)
int n;
jump_back(linenum)
LINENUM linenum;
{
POSITION pos;
PARG parg;
@ -64,20 +64,20 @@ jump_back(n)
* If we can't seek, but we're trying to go to line number 1,
* use ch_beg_seek() to get as close as we can.
*/
pos = find_pos(n);
pos = find_pos(linenum);
if (pos != NULL_POSITION && ch_seek(pos) == 0)
{
if (show_attn)
set_attnpos(pos);
jump_loc(pos, jump_sline);
} else if (n <= 1 && ch_beg_seek() == 0)
} else if (linenum <= 1 && ch_beg_seek() == 0)
{
jump_loc(ch_tell(), jump_sline);
error("Cannot seek to beginning of file", NULL_PARG);
} else
{
parg.p_int = n;
error("Cannot seek to line number %d", &parg);
parg.p_linenum = linenum;
error("Cannot seek to line number %n", &parg);
}
}

View File

@ -0,0 +1,40 @@
/*
* Copyright (C) 1984-2002 Mark Nudelman
*
* You may distribute under the terms of either the GNU General Public
* License or the Less License, as specified in the README file.
*
* For more information about less, or for information on how to
* contact the author, see the README file.
*/
/*
* Format of a lesskey file:
*
* LESSKEY_MAGIC (4 bytes)
* sections...
* END_LESSKEY_MAGIC (4 bytes)
*
* Each section is:
*
* section_MAGIC (1 byte)
* section_length (2 bytes)
* key table (section_length bytes)
*/
#define C0_LESSKEY_MAGIC '\0'
#define C1_LESSKEY_MAGIC 'M'
#define C2_LESSKEY_MAGIC '+'
#define C3_LESSKEY_MAGIC 'G'
#define CMD_SECTION 'c'
#define EDIT_SECTION 'e'
#define VAR_SECTION 'v'
#define END_SECTION 'x'
#define C0_END_LESSKEY_MAGIC 'E'
#define C1_END_LESSKEY_MAGIC 'n'
#define C2_END_LESSKEY_MAGIC 'd'
/* */
#define KRADIX 64

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-2000 Mark Nudelman
* Copyright (C) 1984-2002 Mark Nudelman
*
* You may distribute under the terms of either the GNU General Public
* License or the Less License, as specified in the README file.

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-2000 Mark Nudelman
* Copyright (C) 1984-2002 Mark Nudelman
*
* You may distribute under the terms of either the GNU General Public
* License or the Less License, as specified in the README file.
@ -142,7 +142,7 @@ opt_l(type, s)
{
case INIT:
t = s;
n = getnum(&t, 'l', &err);
n = getnum(&t, "l", &err);
if (err || n <= 0)
{
error("Line number is required after -l", NULL_PARG);
@ -367,7 +367,7 @@ opt__V(type, s)
any_display = 1;
putstr("less ");
putstr(version);
putstr("\nCopyright (C) 2001 Mark Nudelman\n\n");
putstr("\nCopyright (C) 2002 Mark Nudelman\n\n");
putstr("less comes with NO WARRANTY, to the extent permitted by law.\n");
putstr("For information about the terms of redistribution,\n");
putstr("see the file named README in the less distribution.\n");
@ -390,7 +390,7 @@ colordesc(s, fg_color, bg_color)
int fg, bg;
int err;
fg = getnum(&s, 'D', &err);
fg = getnum(&s, "D", &err);
if (err)
{
error("Missing fg color in -D", NULL_PARG);
@ -401,7 +401,7 @@ colordesc(s, fg_color, bg_color)
else
{
s++;
bg = getnum(&s, 'D', &err);
bg = getnum(&s, "D", &err);
if (err)
{
error("Missing fg color in -D", NULL_PARG);

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-2000 Mark Nudelman
* Copyright (C) 1984-2002 Mark Nudelman
*
* You may distribute under the terms of either the GNU General Public
* License or the Less License, as specified in the README file.

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-2000 Mark Nudelman
* Copyright (C) 1984-2002 Mark Nudelman
*
* You may distribute under the terms of either the GNU General Public
* License or the Less License, as specified in the README file.

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-2000 Mark Nudelman
* Copyright (C) 1984-2002 Mark Nudelman
*
* You may distribute under the terms of either the GNU General Public
* License or the Less License, as specified in the README file.

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-2000 Mark Nudelman
* Copyright (C) 1984-2002 Mark Nudelman
*
* You may distribute under the terms of either the GNU General Public
* License or the Less License, as specified in the README file.
@ -24,7 +24,7 @@ extern char WIN32getch();
static DWORD console_mode;
#endif
static int tty;
public int tty;
extern int sigs;
/*

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-2000 Mark Nudelman
* Copyright (C) 1984-2002 Mark Nudelman
*
* You may distribute under the terms of either the GNU General Public
* License or the Less License, as specified in the README file.