svn commit: r367005 - head/contrib/less

Xin LI delphij at FreeBSD.org
Sat Oct 24 15:58:47 UTC 2020


Author: delphij
Date: Sat Oct 24 15:58:42 2020
New Revision: 367005
URL: https://svnweb.freebsd.org/changeset/base/367005

Log:
  MFV r366990: less v563.
  
  MFC after:	2 weeks
  Relnotes:	yes

Modified:
  head/contrib/less/NEWS
  head/contrib/less/README
  head/contrib/less/brac.c
  head/contrib/less/ch.c
  head/contrib/less/charset.c
  head/contrib/less/charset.h
  head/contrib/less/cmd.h
  head/contrib/less/cmdbuf.c
  head/contrib/less/command.c
  head/contrib/less/compose.uni
  head/contrib/less/cvt.c
  head/contrib/less/decode.c
  head/contrib/less/edit.c
  head/contrib/less/filename.c
  head/contrib/less/fmt.uni
  head/contrib/less/forwback.c
  head/contrib/less/funcs.h
  head/contrib/less/help.c
  head/contrib/less/ifile.c
  head/contrib/less/input.c
  head/contrib/less/jump.c
  head/contrib/less/less.h
  head/contrib/less/less.nro
  head/contrib/less/lessecho.c
  head/contrib/less/lessecho.nro
  head/contrib/less/lesskey.c
  head/contrib/less/lesskey.h
  head/contrib/less/lesskey.nro
  head/contrib/less/lglob.h
  head/contrib/less/line.c
  head/contrib/less/linenum.c
  head/contrib/less/lsystem.c
  head/contrib/less/main.c
  head/contrib/less/mark.c
  head/contrib/less/mkutable
  head/contrib/less/optfunc.c
  head/contrib/less/option.c
  head/contrib/less/option.h
  head/contrib/less/opttbl.c
  head/contrib/less/os.c
  head/contrib/less/output.c
  head/contrib/less/pattern.c
  head/contrib/less/pattern.h
  head/contrib/less/pckeys.h
  head/contrib/less/position.c
  head/contrib/less/position.h
  head/contrib/less/prompt.c
  head/contrib/less/screen.c
  head/contrib/less/scrsize.c
  head/contrib/less/search.c
  head/contrib/less/signal.c
  head/contrib/less/tags.c
  head/contrib/less/ttyin.c
  head/contrib/less/ubin.uni
  head/contrib/less/version.c
  head/contrib/less/wide.uni
Directory Properties:
  head/contrib/less/   (props changed)

Modified: head/contrib/less/NEWS
==============================================================================
--- head/contrib/less/NEWS	Sat Oct 24 15:38:04 2020	(r367004)
+++ head/contrib/less/NEWS	Sat Oct 24 15:58:42 2020	(r367005)
@@ -11,6 +11,31 @@
 
 ======================================================================
 
+	Major changes between "less" versions 551 and 563
+
+* Update Unicode tables.
+
+* Treat Hangul Jamo medial vowels and final consonants as zero width.
+
+* Display error message immediately when -o is toggled and 
+  input is not a pipe.
+
+* Fix regression: make screen repaint when "squished" and 
+  a no-movement command is given.
+
+* Fix erroneous EOF calculation when F command is interrupted.
+
+* Make WIN32C version include this fix from 551:
+  Don't count lines in initial screen if using -X with -F.
+
+* Fix display bug in WIN32C version.
+
+* Fix memory corruption when built with libtermcap.
+
+* Support libtinfow.
+
+======================================================================
+
 	Major changes between "less" versions 530 and 551
 
 * Add --mouse option.

Modified: head/contrib/less/README
==============================================================================
--- head/contrib/less/README	Sat Oct 24 15:38:04 2020	(r367004)
+++ head/contrib/less/README	Sat Oct 24 15:58:42 2020	(r367005)
@@ -7,9 +7,9 @@
 **************************************************************************
 **************************************************************************
 
-                            Less, version 551
+                            Less, version 563
 
-    This is the distribution of less, version 551, released 11 Jun 2019.
+    This is the distribution of less, version 563, released 13 Jun 2020.
     This program is part of the GNU project (http://www.gnu.org).
 
     This program is free software.  You may redistribute it and/or
@@ -32,6 +32,14 @@ This is the distribution of "less", a paginator simila
 The formatted manual page is in less.man.
 The manual page nroff source is in less.nro.
 Major changes made since the last posted version are in NEWS.
+
+=======================================================================
+PRE-INSTALLATION (when using git)
+
+If you are building from a clone of a git repository,
+type "make -f Makefile.aut".
+If you are building from a numbered release package (a tar or zip file 
+with a name like less-999.tar.gz or less-999.zip), you should skip this step. 
 
 =======================================================================
 INSTALLATION (Unix systems only):

Modified: head/contrib/less/brac.c
==============================================================================
--- head/contrib/less/brac.c	Sat Oct 24 15:38:04 2020	(r367004)
+++ head/contrib/less/brac.c	Sat Oct 24 15:58:42 2020	(r367005)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2019  Mark Nudelman
+ * Copyright (C) 1984-2020  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.

Modified: head/contrib/less/ch.c
==============================================================================
--- head/contrib/less/ch.c	Sat Oct 24 15:38:04 2020	(r367004)
+++ head/contrib/less/ch.c	Sat Oct 24 15:58:42 2020	(r367005)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2019  Mark Nudelman
+ * Copyright (C) 1984-2020  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.
@@ -408,6 +408,7 @@ end_logfile(VOID_PARAM)
 	}
 	close(logfile);
 	logfile = -1;
+	free(namelogfile);
 	namelogfile = NULL;
 }
 
@@ -842,7 +843,8 @@ seekable(f)
 	public void
 ch_set_eof(VOID_PARAM)
 {
-	ch_fsize = ch_fpos;
+	if (ch_fsize != NULL_POSITION && ch_fsize < ch_fpos)
+		ch_fsize = ch_fpos;
 }
 
 

Modified: head/contrib/less/charset.c
==============================================================================
--- head/contrib/less/charset.c	Sat Oct 24 15:38:04 2020	(r367004)
+++ head/contrib/less/charset.c	Sat Oct 24 15:58:42 2020	(r367005)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2019  Mark Nudelman
+ * Copyright (C) 1984-2020  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.
@@ -509,7 +509,7 @@ prutfchar(ch)
  */
 	public int
 utf_len(ch)
-	unsigned char ch;
+	int ch;
 {
 	if ((ch & 0x80) == 0)
 		return 1;

Modified: head/contrib/less/charset.h
==============================================================================
--- head/contrib/less/charset.h	Sat Oct 24 15:38:04 2020	(r367004)
+++ head/contrib/less/charset.h	Sat Oct 24 15:58:42 2020	(r367005)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2019  Mark Nudelman
+ * Copyright (C) 1984-2020  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.

Modified: head/contrib/less/cmd.h
==============================================================================
--- head/contrib/less/cmd.h	Sat Oct 24 15:38:04 2020	(r367004)
+++ head/contrib/less/cmd.h	Sat Oct 24 15:58:42 2020	(r367005)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2019  Mark Nudelman
+ * Copyright (C) 1984-2020  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.

Modified: head/contrib/less/cmdbuf.c
==============================================================================
--- head/contrib/less/cmdbuf.c	Sat Oct 24 15:38:04 2020	(r367004)
+++ head/contrib/less/cmdbuf.c	Sat Oct 24 15:58:42 2020	(r367005)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2019  Mark Nudelman
+ * Copyright (C) 1984-2020  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.
@@ -34,7 +34,7 @@ static int literal;		/* Next input char should not be 
 static int updown_match = -1;	/* Prefix length in up/down movement */
 
 #if TAB_COMPLETE_FILENAME
-static int cmd_complete();
+static int cmd_complete LESSPARAMS((int action));
 /*
  * These variables are statics used by cmd_complete.
  */
@@ -960,10 +960,7 @@ cmd_istr(str)
 		step_char(&s, +1, endline);
 		action = cmd_ichar(os, s - os);
 		if (action != CC_OK)
-		{
-			bell();
 			return (action);
-		}
 	}
 	return (CC_OK);
 }

Modified: head/contrib/less/command.c
==============================================================================
--- head/contrib/less/command.c	Sat Oct 24 15:38:04 2020	(r367004)
+++ head/contrib/less/command.c	Sat Oct 24 15:58:42 2020	(r367005)
@@ -1,6 +1,6 @@
 /* $FreeBSD$ */
 /*
- * Copyright (C) 1984-2019  Mark Nudelman
+ * Copyright (C) 1984-2020  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.
@@ -90,7 +90,7 @@ struct ungot {
 };
 static struct ungot* ungot = NULL;
 
-static void multi_search();
+static void multi_search LESSPARAMS((char *pattern, int n, int silent));
 
 /*
  * Move the cursor to start of prompt line before executing a command.
@@ -1806,6 +1806,12 @@ commands(VOID_PARAM)
 			optgetname = FALSE;
 			mca_opt_toggle();
 			c = getcc();
+			cbuf = opt_toggle_disallowed(c);
+			if (cbuf != NULL)
+			{
+				error(cbuf, NULL_PARG);
+				break;
+			}
 			goto again;
 
 		case A_DISP_OPTION:

Modified: head/contrib/less/compose.uni
==============================================================================
--- head/contrib/less/compose.uni	Sat Oct 24 15:38:04 2020	(r367004)
+++ head/contrib/less/compose.uni	Sat Oct 24 15:58:42 2020	(r367005)
@@ -1,4 +1,4 @@
-/* Generated by "./mkutable -f2 Mn Me -- unicode/UnicodeData.txt" on Wed Feb 13 17:57:05 PST 2019 */
+/* Generated by "./mkutable -f2 Mn Me -- unicode/UnicodeData.txt" on Tue May 19 14:47:34 PDT 2020 */
 	{ 0x0300, 0x036f }, /* Mn */
 	{ 0x0483, 0x0487 }, /* Mn */
 	{ 0x0488, 0x0489 }, /* Me */
@@ -58,7 +58,7 @@
 	{ 0x0b3f, 0x0b3f }, /* Mn */
 	{ 0x0b41, 0x0b44 }, /* Mn */
 	{ 0x0b4d, 0x0b4d }, /* Mn */
-	{ 0x0b56, 0x0b56 }, /* Mn */
+	{ 0x0b55, 0x0b56 }, /* Mn */
 	{ 0x0b62, 0x0b63 }, /* Mn */
 	{ 0x0b82, 0x0b82 }, /* Mn */
 	{ 0x0bc0, 0x0bc0 }, /* Mn */
@@ -81,6 +81,7 @@
 	{ 0x0d41, 0x0d44 }, /* Mn */
 	{ 0x0d4d, 0x0d4d }, /* Mn */
 	{ 0x0d62, 0x0d63 }, /* Mn */
+	{ 0x0d81, 0x0d81 }, /* Mn */
 	{ 0x0dca, 0x0dca }, /* Mn */
 	{ 0x0dd2, 0x0dd4 }, /* Mn */
 	{ 0x0dd6, 0x0dd6 }, /* Mn */
@@ -88,8 +89,7 @@
 	{ 0x0e34, 0x0e3a }, /* Mn */
 	{ 0x0e47, 0x0e4e }, /* Mn */
 	{ 0x0eb1, 0x0eb1 }, /* Mn */
-	{ 0x0eb4, 0x0eb9 }, /* Mn */
-	{ 0x0ebb, 0x0ebc }, /* Mn */
+	{ 0x0eb4, 0x0ebc }, /* Mn */
 	{ 0x0ec8, 0x0ecd }, /* Mn */
 	{ 0x0f18, 0x0f19 }, /* Mn */
 	{ 0x0f35, 0x0f35 }, /* Mn */
@@ -112,6 +112,7 @@
 	{ 0x1085, 0x1086 }, /* Mn */
 	{ 0x108d, 0x108d }, /* Mn */
 	{ 0x109d, 0x109d }, /* Mn */
+	{ 0x1160, 0x11ff }, /* Mn */
 	{ 0x135d, 0x135f }, /* Mn */
 	{ 0x1712, 0x1714 }, /* Mn */
 	{ 0x1732, 0x1734 }, /* Mn */
@@ -140,6 +141,7 @@
 	{ 0x1a7f, 0x1a7f }, /* Mn */
 	{ 0x1ab0, 0x1abd }, /* Mn */
 	{ 0x1abe, 0x1abe }, /* Me */
+	{ 0x1abf, 0x1ac0 }, /* Mn */
 	{ 0x1b00, 0x1b03 }, /* Mn */
 	{ 0x1b34, 0x1b34 }, /* Mn */
 	{ 0x1b36, 0x1b3a }, /* Mn */
@@ -183,6 +185,7 @@
 	{ 0xa806, 0xa806 }, /* Mn */
 	{ 0xa80b, 0xa80b }, /* Mn */
 	{ 0xa825, 0xa826 }, /* Mn */
+	{ 0xa82c, 0xa82c }, /* Mn */
 	{ 0xa8c4, 0xa8c5 }, /* Mn */
 	{ 0xa8e0, 0xa8f1 }, /* Mn */
 	{ 0xa8ff, 0xa8ff }, /* Mn */
@@ -191,7 +194,7 @@
 	{ 0xa980, 0xa982 }, /* Mn */
 	{ 0xa9b3, 0xa9b3 }, /* Mn */
 	{ 0xa9b6, 0xa9b9 }, /* Mn */
-	{ 0xa9bc, 0xa9bc }, /* Mn */
+	{ 0xa9bc, 0xa9bd }, /* Mn */
 	{ 0xa9e5, 0xa9e5 }, /* Mn */
 	{ 0xaa29, 0xaa2e }, /* Mn */
 	{ 0xaa31, 0xaa32 }, /* Mn */
@@ -209,6 +212,8 @@
 	{ 0xabe5, 0xabe5 }, /* Mn */
 	{ 0xabe8, 0xabe8 }, /* Mn */
 	{ 0xabed, 0xabed }, /* Mn */
+	{ 0xd7b0, 0xd7c6 }, /* Mn */
+	{ 0xd7cb, 0xd7fb }, /* Mn */
 	{ 0xfb1e, 0xfb1e }, /* Mn */
 	{ 0xfe00, 0xfe0f }, /* Mn */
 	{ 0xfe20, 0xfe2f }, /* Mn */
@@ -222,6 +227,7 @@
 	{ 0x10a3f, 0x10a3f }, /* Mn */
 	{ 0x10ae5, 0x10ae6 }, /* Mn */
 	{ 0x10d24, 0x10d27 }, /* Mn */
+	{ 0x10eab, 0x10eac }, /* Mn */
 	{ 0x10f46, 0x10f50 }, /* Mn */
 	{ 0x11001, 0x11001 }, /* Mn */
 	{ 0x11038, 0x11046 }, /* Mn */
@@ -235,6 +241,7 @@
 	{ 0x11180, 0x11181 }, /* Mn */
 	{ 0x111b6, 0x111be }, /* Mn */
 	{ 0x111c9, 0x111cc }, /* Mn */
+	{ 0x111cf, 0x111cf }, /* Mn */
 	{ 0x1122f, 0x11231 }, /* Mn */
 	{ 0x11234, 0x11234 }, /* Mn */
 	{ 0x11236, 0x11237 }, /* Mn */
@@ -270,6 +277,12 @@
 	{ 0x11727, 0x1172b }, /* Mn */
 	{ 0x1182f, 0x11837 }, /* Mn */
 	{ 0x11839, 0x1183a }, /* Mn */
+	{ 0x1193b, 0x1193c }, /* Mn */
+	{ 0x1193e, 0x1193e }, /* Mn */
+	{ 0x11943, 0x11943 }, /* Mn */
+	{ 0x119d4, 0x119d7 }, /* Mn */
+	{ 0x119da, 0x119db }, /* Mn */
+	{ 0x119e0, 0x119e0 }, /* Mn */
 	{ 0x11a01, 0x11a0a }, /* Mn */
 	{ 0x11a33, 0x11a38 }, /* Mn */
 	{ 0x11a3b, 0x11a3e }, /* Mn */
@@ -296,7 +309,9 @@
 	{ 0x11ef3, 0x11ef4 }, /* Mn */
 	{ 0x16af0, 0x16af4 }, /* Mn */
 	{ 0x16b30, 0x16b36 }, /* Mn */
+	{ 0x16f4f, 0x16f4f }, /* Mn */
 	{ 0x16f8f, 0x16f92 }, /* Mn */
+	{ 0x16fe4, 0x16fe4 }, /* Mn */
 	{ 0x1bc9d, 0x1bc9e }, /* Mn */
 	{ 0x1d167, 0x1d169 }, /* Mn */
 	{ 0x1d17b, 0x1d182 }, /* Mn */
@@ -314,6 +329,9 @@
 	{ 0x1e01b, 0x1e021 }, /* Mn */
 	{ 0x1e023, 0x1e024 }, /* Mn */
 	{ 0x1e026, 0x1e02a }, /* Mn */
+	{ 0x1e130, 0x1e136 }, /* Mn */
+	{ 0x1e2ae, 0x1e2ae }, /* Mn */
+	{ 0x1e2ec, 0x1e2ef }, /* Mn */
 	{ 0x1e8d0, 0x1e8d6 }, /* Mn */
 	{ 0x1e944, 0x1e94a }, /* Mn */
 	{ 0xe0100, 0xe01ef }, /* Mn */

Modified: head/contrib/less/cvt.c
==============================================================================
--- head/contrib/less/cvt.c	Sat Oct 24 15:38:04 2020	(r367004)
+++ head/contrib/less/cvt.c	Sat Oct 24 15:58:42 2020	(r367005)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2019  Mark Nudelman
+ * Copyright (C) 1984-2020  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.

Modified: head/contrib/less/decode.c
==============================================================================
--- head/contrib/less/decode.c	Sat Oct 24 15:38:04 2020	(r367004)
+++ head/contrib/less/decode.c	Sat Oct 24 15:58:42 2020	(r367005)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2019  Mark Nudelman
+ * Copyright (C) 1984-2020  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.

Modified: head/contrib/less/edit.c
==============================================================================
--- head/contrib/less/edit.c	Sat Oct 24 15:38:04 2020	(r367004)
+++ head/contrib/less/edit.c	Sat Oct 24 15:58:42 2020	(r367005)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2019  Mark Nudelman
+ * Copyright (C) 1984-2020  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.
@@ -854,7 +854,6 @@ loop:
 		/*
 		 * Don't do anything.
 		 */
-		free(filename);
 		return;
 	case 'q':
 		quit(QUIT_OK);

Modified: head/contrib/less/filename.c
==============================================================================
--- head/contrib/less/filename.c	Sat Oct 24 15:38:04 2020	(r367004)
+++ head/contrib/less/filename.c	Sat Oct 24 15:58:42 2020	(r367005)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2019  Mark Nudelman
+ * Copyright (C) 1984-2020  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.
@@ -795,7 +795,7 @@ lglob(filename)
 }
 
 /*
- * @@@
+ * Return canonical pathname.
  */
 	public char *
 lrealpath(path)

Modified: head/contrib/less/fmt.uni
==============================================================================
--- head/contrib/less/fmt.uni	Sat Oct 24 15:38:04 2020	(r367004)
+++ head/contrib/less/fmt.uni	Sat Oct 24 15:58:42 2020	(r367005)
@@ -1,4 +1,4 @@
-/* Generated by "./mkutable -f2 Cf -- unicode/UnicodeData.txt" on Wed Feb 13 17:57:05 PST 2019 */
+/* Generated by "./mkutable -f2 Cf -- unicode/UnicodeData.txt" on Tue May 19 14:47:34 PDT 2020 */
 	{ 0x00ad, 0x00ad }, /* Cf */
 	{ 0x0600, 0x0605 }, /* Cf */
 	{ 0x061c, 0x061c }, /* Cf */
@@ -14,6 +14,7 @@
 	{ 0xfff9, 0xfffb }, /* Cf */
 	{ 0x110bd, 0x110bd }, /* Cf */
 	{ 0x110cd, 0x110cd }, /* Cf */
+	{ 0x13430, 0x13438 }, /* Cf */
 	{ 0x1bca0, 0x1bca3 }, /* Cf */
 	{ 0x1d173, 0x1d17a }, /* Cf */
 	{ 0xe0001, 0xe0001 }, /* Cf */

Modified: head/contrib/less/forwback.c
==============================================================================
--- head/contrib/less/forwback.c	Sat Oct 24 15:38:04 2020	(r367004)
+++ head/contrib/less/forwback.c	Sat Oct 24 15:58:42 2020	(r367005)
@@ -1,6 +1,6 @@
 /* $FreeBSD$ */
 /*
- * Copyright (C) 1984-2019  Mark Nudelman
+ * Copyright (C) 1984-2020  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.
@@ -21,7 +21,6 @@ public int screen_trashed;
 public int squished;
 public int no_back_scroll = 0;
 public int forw_prompt;
-public int same_pos_bell = 1;
 
 extern int sigs;
 extern int top_scroll;
@@ -290,7 +289,7 @@ forw(n, pos, force, only_last, nblank)
 		forw_prompt = 1;
 	}
 
-	if (nlines == 0 && !ignore_eoi && same_pos_bell)
+	if (nlines == 0 && !ignore_eoi)
 		eof_bell();
 	else if (do_repaint)
 		repaint();
@@ -350,7 +349,7 @@ back(n, pos, force, only_last)
 		}
 	}
 
-	if (nlines == 0 && same_pos_bell)
+	if (nlines == 0)
 		eof_bell();
 	else if (do_repaint)
 		repaint();

Modified: head/contrib/less/funcs.h
==============================================================================
--- head/contrib/less/funcs.h	Sat Oct 24 15:38:04 2020	(r367004)
+++ head/contrib/less/funcs.h	Sat Oct 24 15:58:42 2020	(r367005)
@@ -61,7 +61,7 @@ public int binary_char LESSPARAMS ((LWCHAR c));
 public int control_char LESSPARAMS ((LWCHAR c));
 public char * prchar LESSPARAMS ((LWCHAR c));
 public char * prutfchar LESSPARAMS ((LWCHAR ch));
-public int utf_len LESSPARAMS ((unsigned char ch));
+public int utf_len LESSPARAMS ((int ch));
 public int is_utf8_well_formed LESSPARAMS ((char *ss, int slen));
 public void utf_skip_to_lead LESSPARAMS ((char **pp, char *limit));
 public LWCHAR get_wchar LESSPARAMS ((constant char *p));
@@ -187,10 +187,10 @@ public void pshift_all LESSPARAMS ((VOID_PARAM));
 public int is_ansi_end LESSPARAMS ((LWCHAR ch));
 public int is_ansi_middle LESSPARAMS ((LWCHAR ch));
 public void skip_ansi LESSPARAMS ((char **pp, constant char *limit));
-public int pappend LESSPARAMS ((unsigned char c, POSITION pos));
+public int pappend LESSPARAMS ((int c, POSITION pos));
 public int pflushmbc LESSPARAMS ((VOID_PARAM));
 public void pdone LESSPARAMS ((int endline, int chopped, int forw));
-public void set_status_col LESSPARAMS ((char c));
+public void set_status_col LESSPARAMS ((int c));
 public int gline LESSPARAMS ((int i, int *ap));
 public void null_line LESSPARAMS ((VOID_PARAM));
 public POSITION forw_raw_line LESSPARAMS ((POSITION curr_pos, char **linep, int *line_lenp));
@@ -243,6 +243,7 @@ public void scan_option LESSPARAMS ((char *s));
 public void toggle_option LESSPARAMS ((struct loption *o, int lower, char *s, int how_toggle));
 public int opt_has_param LESSPARAMS ((struct loption *o));
 public char * opt_prompt LESSPARAMS ((struct loption *o));
+public char * opt_toggle_disallowed LESSPARAMS ((int c));
 public int isoptpending LESSPARAMS ((VOID_PARAM));
 public void nopendopt LESSPARAMS ((VOID_PARAM));
 public int getnum LESSPARAMS ((char **sp, char *printopt, int *errp));

Modified: head/contrib/less/help.c
==============================================================================
--- head/contrib/less/help.c	Sat Oct 24 15:38:04 2020	(r367004)
+++ head/contrib/less/help.c	Sat Oct 24 15:58:42 2020	(r367005)
@@ -1,4 +1,4 @@
-/* This file was generated by mkhelp.pl from less.hlp at 18:12 on 2019/6/11 */
+/* This file was generated by mkhelp.pl from less.hlp at 3:34 on 2020/6/14 */
 #include "less.h"
 constant char helpdata[] = {
 '\n',

Modified: head/contrib/less/ifile.c
==============================================================================
--- head/contrib/less/ifile.c	Sat Oct 24 15:38:04 2020	(r367004)
+++ head/contrib/less/ifile.c	Sat Oct 24 15:58:42 2020	(r367005)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2019  Mark Nudelman
+ * Copyright (C) 1984-2020  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.

Modified: head/contrib/less/input.c
==============================================================================
--- head/contrib/less/input.c	Sat Oct 24 15:38:04 2020	(r367004)
+++ head/contrib/less/input.c	Sat Oct 24 15:58:42 2020	(r367005)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2019  Mark Nudelman
+ * Copyright (C) 1984-2020  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.

Modified: head/contrib/less/jump.c
==============================================================================
--- head/contrib/less/jump.c	Sat Oct 24 15:38:04 2020	(r367004)
+++ head/contrib/less/jump.c	Sat Oct 24 15:58:42 2020	(r367005)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2019  Mark Nudelman
+ * Copyright (C) 1984-2020  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.
@@ -219,7 +219,7 @@ jump_loc(pos, sline)
 		nline -= sindex;
 		if (nline > 0)
 			forw(nline, position(BOTTOM_PLUS_ONE), 1, 0, 0);
-		else if (nline < 0)
+		else
 			back(-nline, position(TOP), 1, 0);
 #if HILITE_SEARCH
 		if (show_attn)

Modified: head/contrib/less/less.h
==============================================================================
--- head/contrib/less/less.h	Sat Oct 24 15:38:04 2020	(r367004)
+++ head/contrib/less/less.h	Sat Oct 24 15:58:42 2020	(r367005)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2019  Mark Nudelman
+ * Copyright (C) 1984-2020  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.

Modified: head/contrib/less/less.nro
==============================================================================
--- head/contrib/less/less.nro	Sat Oct 24 15:38:04 2020	(r367004)
+++ head/contrib/less/less.nro	Sat Oct 24 15:58:42 2020	(r367005)
@@ -1,4 +1,5 @@
-.TH LESS 1 "Version 551: 11 Jun 2019"
+'\" t
+.TH LESS 1 "Version 563: 13 Jun 2020"
 .SH NAME
 less \- opposite of more
 .SH SYNOPSIS
@@ -21,19 +22,18 @@ less \- opposite of more
 .B "     [\-# \fIshift\/\fP] [+[+]\fIcmd\/\fP] [\-\-] [\fIfilename\/\fP]..."
 .br
 (See the OPTIONS section for alternate option syntax with long option names.)
-
+.
 .SH DESCRIPTION
 .I Less
 is a program similar to
-.I more
-(1), but which allows backward movement
+.IR more (1),
+but which allows backward movement
 in the file as well as forward movement.
 Also,
 .I less
 does not have to read the entire input file before starting,
 so with large input files it starts up faster than text editors like
-.I vi
-(1).
+.IR vi (1).
 .I Less
 uses termcap (or terminfo on some systems),
 so it can run on a variety of terminals.
@@ -48,7 +48,7 @@ and
 Commands may be preceded by a decimal number,
 called N in the descriptions below.
 The number is used by some commands, as indicated.
-
+.
 .SH COMMANDS
 In the following descriptions, ^X means control-X.
 ESC stands for the ESCAPE key; for example ESC-v means the
@@ -229,7 +229,7 @@ that is, do a simple textual comparison.
 .RE
 .IP ?pattern
 Search backward in the file for the N-th line containing the pattern.
-The search starts at the last line displayed 
+The search starts at the last line displayed
 (but see the \-a and \-j options, which change this).
 .sp
 Certain characters are special as in the / command:
@@ -376,7 +376,7 @@ this will reset the option to the "opposite" of its de
 and print a message describing the new setting.
 This does not work for numeric or string-valued options.
 .IP \-\-!
-Like the \-! command, but takes a long option name
+Like the \-!\& command, but takes a long option name
 rather than a single option letter.
 .IP _
 (Underscore.)
@@ -405,7 +405,7 @@ Exits
 The following
 four
 commands may or may not be valid, depending on your particular installation.
-.PP
+.
 .IP v
 Invokes an editor to edit the current file being viewed.
 The editor is taken from the environment variable VISUAL if defined,
@@ -425,7 +425,7 @@ On MS-DOS and OS/2 systems, the shell is the normal co
 .IP "| <m> shell-command"
 <m> represents any mark letter.
 Pipes a section of the input file to the given shell command.
-The section of the file to be piped is between the position marked by 
+The section of the file to be piped is between the position marked by
 the letter and the current screen.
 The entire current screen is included, regardless of whether the
 marked position is before or after the current screen.
@@ -434,7 +434,7 @@ If <m> is \&.\& or newline, the current screen is pipe
 .IP "s filename"
 Save the input to a file.
 This only works if the input is a pipe, not an ordinary file.
-.PP
+.
 .SH OPTIONS
 Command line options are described below.
 Most options may be changed while
@@ -518,7 +518,7 @@ This was the default behavior in less versions prior t
 Specifies the amount of buffer space
 .I less
 will use for each file, in units of kilobytes (1024 bytes).
-By default 64\ K of buffer space is used for each file
+By default 64\ KB of buffer space is used for each file
 (unless the file is a pipe; see the \-B option).
 The \-b option specifies instead that \fIn\fP kilobytes of
 buffer space should be used for each file.
@@ -530,7 +530,7 @@ buffers are allocated automatically as needed.
 If a large amount of data is read from the pipe, this can cause
 a large amount of memory to be allocated.
 The \-B option disables this automatic allocation of buffers for pipes,
-so that only 64\ K
+so that only 64\ KB
 (or the amount of space specified by the \-b option)
 is used for the pipe.
 Warning: use of \-B can result in erroneous display, since only the
@@ -563,8 +563,9 @@ A single number \fIN\fP is the same as \fIN.M\fP,
 where \fIM\fP is the normal background color.
 The color may start or end with \fBu\fP to use underline (with the normal
 color, if by itself), if the system supports it (Windows only).
-\fBx\fP may also be \fBa\fP to toggle strict ANSI sequence rendering (SGR mode).
-
+\fBx\fP may also be \fBa\fP to toggle strict ANSI sequence rendering
+(SGR mode).
+.
 .IP "\-e or \-\-quit-at-eof"
 Causes
 .I less
@@ -654,8 +655,8 @@ The status column is also used if the \-w or \-W optio
 Causes
 .I less
 to open and interpret the named file as a
-.I lesskey
-(1) file.
+.IR lesskey (1)
+file.
 Multiple \-k options may be specified.
 If the LESSKEY or LESSKEY_SYSTEM environment variable is set, or
 if a lesskey file is found in a standard place (see KEY BINDINGS),
@@ -746,7 +747,7 @@ to that string.
  \-Ph changes the prompt for the help screen.
  \-P= changes the message printed by the = command.
  \-Pw changes the message printed while waiting for data (in the F command).
-
+.sp 1
 All prompt strings consist of a sequence of
 letters and special escape sequences.
 See the section on PROMPTS for more details.
@@ -762,7 +763,7 @@ The default is to ring the terminal bell in all such c
 .IP "\-Q or \-\-QUIET or \-\-SILENT"
 Causes totally "quiet" operation:
 the terminal bell is never rung.
-If the terminal has a "visual bell", it is used in all cases 
+If the terminal has a "visual bell", it is used in all cases
 where the terminal bell would have been rung.
 .IP "\-r or \-\-raw-control-chars"
 Causes "raw" control characters to be displayed.
@@ -804,7 +805,7 @@ output.
 Causes lines longer than the screen width to be
 chopped (truncated) rather than wrapped.
 That is, the portion of a long line that does not fit in
-the screen width is not shown.
+the screen width is not displayed until you press RIGHT-ARROW.
 The default is to wrap long lines; that is, display the remainder
 on the next line.
 .IP "\-t\fItag\fP or \-\-tag=\fItag\fP"
@@ -813,12 +814,12 @@ will edit the file containing that tag.
 For this to work, tag information must be available;
 for example, there may be a file in the current directory called "tags",
 which was previously built by
-.I ctags
-(1) or an equivalent command.
+.IR ctags (1)
+or an equivalent command.
 If the environment variable LESSGLOBALTAGS is set, it is taken to be
 the name of a command compatible with
-.I global
-(1), and that command is executed to find the tag.
+.IR global (1),
+and that command is executed to find the tag.
 (See http://www.gnu.org/software/global/global.html).
 The \-t option may also be specified from within
 .I less
@@ -870,7 +871,7 @@ If only one \fIn\fP is specified, tab stops are set at
 If multiple values separated by commas are specified, tab stops
 are set at those positions, and then continue with the same spacing as the
 last two.
-For example, \fI-x9,17\fP will set tabs at positions 9, 17, 25, 33, etc.
+For example, \fI\-x9,17\fP will set tabs at positions 9, 17, 25, 33, etc.
 The default for \fIn\fP is 8.
 .IP "\-X or \-\-no-init"
 Disables sending the termcap initialization and deinitialization strings
@@ -944,15 +945,15 @@ will display the contents of that new file.
 Enables mouse input:
 scrolling the mouse wheel down moves forward in the file,
 scrolling the mouse wheel up moves backwards in the file,
-and clicking the mouse sets the "#" mark to the line 
+and clicking the mouse sets the "#" mark to the line
 where the mouse is clicked.
-The number of lines to scroll when the wheel is moved 
+The number of lines to scroll when the wheel is moved
 can be set by the \-\-wheel-lines option.
 Mouse input works only on terminals which support X11 mouse reporting,
-and on the Windows version of 
+and on the Windows version of
 .IR less .
 .IP "\-\-MOUSE"
-Like \-\-mouse, except the direction scrolled 
+Like \-\-mouse, except the direction scrolled
 on mouse wheel movement is reversed.
 .IP "\-\-no-keypad"
 Disables sending the keypad initialization and deinitialization strings
@@ -961,7 +962,7 @@ This is sometimes useful if the keypad strings make th
 keypad behave in an undesirable manner.
 .IP "\-\-no-histdups"
 This option changes the behavior so that if a search string or
-file name is typed in, and the same string is already in the history list, 
+file name is typed in, and the same string is already in the history list,
 the existing copy is removed from the history list before the new one is added.
 Thus, a given string will appear only once in the history list.
 Normally, a string may appear multiple times.
@@ -969,7 +970,7 @@ Normally, a string may appear multiple times.
 This option changes the character used to mark truncated lines.
 It may begin with a two-character attribute indicator like LESSBINFMT does.
 If there is no attribute indicator, standout is used.
-If set to "-", truncated lines are not marked.
+If set to "\-", truncated lines are not marked.
 .IP "\-\-save-marks"
 Save marks in the history file, so marks are retained
 across different invocations of \fIless\fP.
@@ -1001,7 +1002,7 @@ If the option starts with ++, the initial command appl
 every file being viewed, not just the first one.
 The + command described previously
 may also be used to set (or change) an initial command for every file.
-
+.
 .SH "LINE EDITING"
 When entering command line at the bottom of the screen
 (for example, a filename for the :e command,
@@ -1069,13 +1070,12 @@ If you have changed your line-kill character in Unix t
 other than ^U, that character is used instead of ^U.
 .IP "^G"
 Delete the entire command line and return to the main prompt.
-
+.
 .SH "KEY BINDINGS"
 You may define your own
 .I less
 commands by using the program
-.I lesskey
-(1)
+.IR lesskey (1)
 to create a lesskey file.
 This file specifies a set of command keys and an action
 associated with each key.
@@ -1125,7 +1125,7 @@ was built with a different sysconf directory than /usr
 that directory is where the sysless file is found.)
 On MS-DOS and Windows systems, the system-wide lesskey file is c:\e_sysless.
 On OS/2 systems, the system-wide lesskey file is c:\esysless.ini.
-
+.
 .SH "INPUT PREPROCESSOR"
 You may define an "input preprocessor" for
 .IR less .
@@ -1294,7 +1294,7 @@ Similarly, if the first two characters of LESSOPEN are
 the input pipe is used on standard input as well as other files.
 Again, in this case the dash is not considered to be part of
 the input pipe command.
-
+.
 .SH "NATIONAL CHARACTER SETS"
 There are three types of characters in the input file:
 .IP "normal characters"
@@ -1349,7 +1349,7 @@ In this case, the environment variable LESSCHARDEF can
 to define a character set.
 It should be set to a string where each character in the string represents
 one character in the character set.
-The character "." is used for a normal character, "c" for control,
+The character ".\&" is used for a normal character, "c" for control,
 and "b" for binary.
 A decimal number may be used for repetition.
 For example, "bccc4b.\&" would mean character 0 is binary,
@@ -1361,26 +1361,22 @@ represent any real character set.)
 .PP
 This table shows the value of LESSCHARDEF which is equivalent
 to each of the possible values for LESSCHARSET:
-.sp
-	ascii\ 	8bcccbcc18b95.b
-.br
-	dos\ \ \ 	8bcccbcc12bc5b95.b.
-.br
-	ebcdic	5bc6bcc7bcc41b.9b7.9b5.b..8b6.10b6.b9.7b
-.br
-	\ \ \ \ \ \ 	9.8b8.17b3.3b9.7b9.8b8.6b10.b.b.b.
-.br
-	IBM-1047	4cbcbc3b9cbccbccbb4c6bcc5b3cbbc4bc4bccbc
-.br
-	\ \ \ \ \ \ 	191.b
-.br
-	iso8859	8bcccbcc18b95.33b.
-.br
-	koi8-r	8bcccbcc18b95.b128.
-.br
-	latin1	8bcccbcc18b95.33b.
-.br
-	next\ \ 	8bcccbcc18b95.bb125.bb
+.
+.RS 5m
+.TS
+l l.
+ascii	8bcccbcc18b95.b
+dos	8bcccbcc12bc5b95.b.
+ebcdic	5bc6bcc7bcc41b.9b7.9b5.b..8b6.10b6.b9.7b
+	9.8b8.17b3.3b9.7b9.8b8.6b10.b.b.b.
+IBM-1047	4cbcbc3b9cbccbccbb4c6bcc5b3cbbc4bc4bccbc
+	191.b
+iso8859	8bcccbcc18b95.33b.
+koi8-r	8bcccbcc18b95.b128.
+latin1	8bcccbcc18b95.33b.
+next	8bcccbcc18b95.bb125.bb
+.TE
+.RE
 .PP
 If neither LESSCHARSET nor LESSCHARDEF is set,
 but any of the strings "UTF-8", "UTF8", "utf-8" or "utf8"
@@ -1429,11 +1425,11 @@ setting ("*x") so specifying one will affect both;
 LESSUTFBINFMT is read after LESSBINFMT so its setting, if any,
 will have priority.
 Problematic octets in a UTF-8 file (octets of a truncated sequence,
-octets of a complete but non-shortest form sequence, illegal octets,
+octets of a complete but non-shortest form sequence, invalid octets,
 and stray trailing octets)
 are displayed individually using LESSBINFMT so as to facilitate diagnostic
 of how the UTF-8 file is ill-formed.
-
+.
 .SH "PROMPTS"
 The \-P option allows you to tailor the prompt to your preference.
 The string given to the \-P option replaces the specified prompt string.
@@ -1500,7 +1496,8 @@ Causes any trailing spaces to be removed.
 Usually used at the end of the string, but may appear anywhere.
 .IP "%T"
 Normally expands to the word "file".
-However if viewing files via a tags list using the \-t option, it expands to the word "tag".
+However if viewing files via a tags list using the \-t option,
+it expands to the word "tag".
 .IP "%x"
 Replaced by the name of the next input file in the list.
 .PP
@@ -1620,7 +1617,7 @@ line number, followed by the shell-escaped file name.
 If your editor does not accept the "+linenumber" syntax, or has other
 differences in invocation syntax, the LESSEDIT variable can be
 changed to modify this default.
-
+.
 .SH SECURITY
 When the environment variable LESSSECURE is set to 1,
 .I less
@@ -1641,14 +1638,14 @@ log files
 use of lesskey files
 .IP "\-t"
 use of tags files
-.IP " "
+.IP
 metacharacters in filenames, such as *
-.IP " "
+.IP
 filename completion (TAB, ^L)
 .RE
 .PP
 Less can also be compiled to be permanently in "secure" mode.
-
+.
 .SH "COMPATIBILITY WITH MORE"
 If the environment variable LESS_IS_MORE is set to 1,
 or if the program is invoked via a file link named "more",
@@ -1666,7 +1663,7 @@ behaves as if the \-E option were set.
 .PP
 The \-m option works differently.
 If the \-m option is not set, the medium prompt is used,
-and it is prefixed with the string "--More--".
+and it is prefixed with the string "\-\-More\-\-".
 If the \-m option is set, the short prompt is used.
 .PP
 The \-n option acts like the \-z option.
@@ -1678,12 +1675,12 @@ command rather than a search pattern.
 .PP
 The LESS environment variable is ignored,
 and the MORE environment variable is used in its place.
-
+.
 .SH "ENVIRONMENT VARIABLES"
 Environment variables may be specified either in the system environment
 as usual, or in a
-.I lesskey
-(1) file.
+.IR lesskey (1)
+file.
 If environment variables are defined in more than one place,
 variables defined in a local lesskey file take precedence over
 variables defined in the system environment, which take precedence
@@ -1738,8 +1735,8 @@ See discussion under PROMPTS.
 .IP LESSGLOBALTAGS
 Name of the command used by the \-t option to find global tags.
 Normally should be set to "global" if your system has the
-.I global
-(1) command.  If not set, global tags are not used.
+.IR global (1)
+command.  If not set, global tags are not used.
 .IP LESSHISTFILE
 Name of the history file used to remember search commands and
 shell commands between invocations of
@@ -1752,9 +1749,13 @@ on OS/2 systems.
 The maximum number of commands to save in the history file.
 The default is 100.
 .IP LESSKEY
-Name of the default lesskey(1) file.
+Name of the default
+.IR lesskey (1)
+file.
 .IP LESSKEY_SYSTEM
-Name of the default system-wide lesskey(1) file.
+Name of the default system-wide
+.IR lesskey (1)
+file.
 .IP LESSMETACHARS
 List of characters which are considered "metacharacters" by the shell.
 .IP LESSMETAESCAPE
@@ -1773,8 +1774,8 @@ String to be appended to a directory name in filename 
 Format for displaying non-printable Unicode code points.
 .IP LESS_IS_MORE
 Emulate the
-.I more
-(1) command.
+.IR more (1)
+command.
 .IP LINES
 Sets the number of lines on the screen.
 Takes precedence over the number of lines specified by the TERM variable.
@@ -1791,19 +1792,19 @@ compatible mode.
 User's search path (used to find a lesskey file
 on MS-DOS and OS/2 systems).
 .IP SHELL
-The shell used to execute the ! command, as well as to expand filenames.
+The shell used to execute the !\& command, as well as to expand filenames.
 .IP TERM
 The type of terminal on which
 .I less
 is being run.
 .IP VISUAL
 The name of the editor (used for the v command).
-
+.
 .SH "SEE ALSO"
-lesskey(1)
-
+.BR lesskey (1)
+.
 .SH COPYRIGHT
-Copyright (C) 1984-2019  Mark Nudelman
+Copyright (C) 1984-2020  Mark Nudelman
 .PP
 less is part of the GNU project and is free software.
 You can redistribute it and/or modify it
@@ -1823,9 +1824,9 @@ less is distributed in the hope that it will be useful
 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 or FITNESS FOR A PARTICULAR PURPOSE.
 See the GNU General Public License for more details.
-
+.
 .SH AUTHOR
-.PP
+.
 Mark Nudelman
 .br
 Report bugs at https://github.com/gwsw/less/issues.

Modified: head/contrib/less/lessecho.c
==============================================================================
--- head/contrib/less/lessecho.c	Sat Oct 24 15:38:04 2020	(r367004)
+++ head/contrib/less/lessecho.c	Sat Oct 24 15:58:42 2020	(r367005)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2019  Mark Nudelman
+ * Copyright (C) 1984-2020  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.

Modified: head/contrib/less/lessecho.nro
==============================================================================
--- head/contrib/less/lessecho.nro	Sat Oct 24 15:38:04 2020	(r367004)
+++ head/contrib/less/lessecho.nro	Sat Oct 24 15:58:42 2020	(r367005)
@@ -1,4 +1,4 @@
-.TH LESSECHO 1 "Version 551: 11 Jun 2019"
+.TH LESSECHO 1 "Version 563: 13 Jun 2020"
 .SH NAME
 lessecho \- expand metacharacters
 .SH SYNOPSIS
@@ -44,7 +44,7 @@ Specifies "n" to be the escape char for metachars, as 
 Specifies that all arguments are to be quoted.
 The default is that only arguments containing metacharacters are quoted
 .SH "SEE ALSO"
-less(1)
+.BR less (1)

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-src-all mailing list