Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/less import less 381. changes:



details:   https://anonhg.NetBSD.org/src/rev/234986917adc
branches:  trunk
changeset: 545661:234986917adc
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Apr 14 02:09:56 2003 +0000

description:
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.

diffstat:

 usr.bin/less/less/LICENSE      |   2 +-
 usr.bin/less/less/NEWS         |  36 +++++++++++++++++++++++++++++++++++-
 usr.bin/less/less/README       |   4 ++--
 usr.bin/less/less/cmd.h        |   2 +-
 usr.bin/less/less/input.c      |   2 +-
 usr.bin/less/less/jump.c       |  14 +++++++-------
 usr.bin/less/less/lesskey.h    |  40 ++++++++++++++++++++++++++++++++++++++++
 usr.bin/less/less/lglob.h      |   2 +-
 usr.bin/less/less/optfunc.c    |  10 +++++-----
 usr.bin/less/less/pckeys.h     |   2 +-
 usr.bin/less/less/position.c   |   2 +-
 usr.bin/less/less/position.h   |   2 +-
 usr.bin/less/less/ttyin.c      |   4 ++--
 usr.bin/less/lesskey/lesskey.h |   2 +-
 14 files changed, 99 insertions(+), 25 deletions(-)

diffs (truncated from 303 to 300 lines):

diff -r 8cf0061ebee8 -r 234986917adc usr.bin/less/less/LICENSE
--- a/usr.bin/less/less/LICENSE Mon Apr 14 01:44:06 2003 +0000
+++ b/usr.bin/less/less/LICENSE Mon Apr 14 02:09:56 2003 +0000
@@ -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
diff -r 8cf0061ebee8 -r 234986917adc usr.bin/less/less/NEWS
--- a/usr.bin/less/less/NEWS    Mon Apr 14 01:44:06 2003 +0000
+++ b/usr.bin/less/less/NEWS    Mon Apr 14 02:09:56 2003 +0000
@@ -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.
diff -r 8cf0061ebee8 -r 234986917adc usr.bin/less/less/README
--- a/usr.bin/less/less/README  Mon Apr 14 01:44:06 2003 +0000
+++ b/usr.bin/less/less/README  Mon Apr 14 02:09:56 2003 +0000
@@ -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
diff -r 8cf0061ebee8 -r 234986917adc usr.bin/less/less/cmd.h
--- a/usr.bin/less/less/cmd.h   Mon Apr 14 01:44:06 2003 +0000
+++ b/usr.bin/less/less/cmd.h   Mon Apr 14 02:09:56 2003 +0000
@@ -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.
diff -r 8cf0061ebee8 -r 234986917adc usr.bin/less/less/input.c
--- a/usr.bin/less/less/input.c Mon Apr 14 01:44:06 2003 +0000
+++ b/usr.bin/less/less/input.c Mon Apr 14 02:09:56 2003 +0000
@@ -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.
diff -r 8cf0061ebee8 -r 234986917adc usr.bin/less/less/jump.c
--- a/usr.bin/less/less/jump.c  Mon Apr 14 01:44:06 2003 +0000
+++ b/usr.bin/less/less/jump.c  Mon Apr 14 02:09:56 2003 +0000
@@ -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 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 @@
         * 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);
        }
 }
 
diff -r 8cf0061ebee8 -r 234986917adc usr.bin/less/less/lesskey.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/usr.bin/less/less/lesskey.h       Mon Apr 14 02:09:56 2003 +0000
@@ -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
diff -r 8cf0061ebee8 -r 234986917adc usr.bin/less/less/lglob.h
--- a/usr.bin/less/less/lglob.h Mon Apr 14 01:44:06 2003 +0000
+++ b/usr.bin/less/less/lglob.h Mon Apr 14 02:09:56 2003 +0000
@@ -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.
diff -r 8cf0061ebee8 -r 234986917adc usr.bin/less/less/optfunc.c
--- a/usr.bin/less/less/optfunc.c       Mon Apr 14 01:44:06 2003 +0000
+++ b/usr.bin/less/less/optfunc.c       Mon Apr 14 02:09:56 2003 +0000
@@ -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 @@
        {
        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 @@
                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 @@
        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 @@
        else
        {
                s++;
-               bg = getnum(&s, 'D', &err);
+               bg = getnum(&s, "D", &err);
                if (err)
                {
                        error("Missing fg color in -D", NULL_PARG);
diff -r 8cf0061ebee8 -r 234986917adc usr.bin/less/less/pckeys.h
--- a/usr.bin/less/less/pckeys.h        Mon Apr 14 01:44:06 2003 +0000
+++ b/usr.bin/less/less/pckeys.h        Mon Apr 14 02:09:56 2003 +0000
@@ -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.
diff -r 8cf0061ebee8 -r 234986917adc usr.bin/less/less/position.c
--- a/usr.bin/less/less/position.c      Mon Apr 14 01:44:06 2003 +0000
+++ b/usr.bin/less/less/position.c      Mon Apr 14 02:09:56 2003 +0000
@@ -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.
diff -r 8cf0061ebee8 -r 234986917adc usr.bin/less/less/position.h
--- a/usr.bin/less/less/position.h      Mon Apr 14 01:44:06 2003 +0000
+++ b/usr.bin/less/less/position.h      Mon Apr 14 02:09:56 2003 +0000
@@ -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.
diff -r 8cf0061ebee8 -r 234986917adc usr.bin/less/less/ttyin.c
--- a/usr.bin/less/less/ttyin.c Mon Apr 14 01:44:06 2003 +0000
+++ b/usr.bin/less/less/ttyin.c Mon Apr 14 02:09:56 2003 +0000
@@ -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 @@
 static DWORD console_mode;
 #endif
 
-static int tty;
+public int tty;
 extern int sigs;
 
 /*
diff -r 8cf0061ebee8 -r 234986917adc usr.bin/less/lesskey/lesskey.h
--- a/usr.bin/less/lesskey/lesskey.h    Mon Apr 14 01:44:06 2003 +0000
+++ b/usr.bin/less/lesskey/lesskey.h    Mon Apr 14 02:09:56 2003 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2000  Mark Nudelman
+ * Copyright (C) 1984-2002  Mark Nudelman



Home | Main Index | Thread Index | Old Index