Update to new upstream release
This commit is contained in:
parent
e9205c1584
commit
b334dd7640
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,3 +5,4 @@
|
||||
/less-575.tar.gz
|
||||
/less-581.2.tar.gz
|
||||
/less-590.tar.gz
|
||||
/less-608.tar.gz
|
||||
|
@ -1,50 +0,0 @@
|
||||
diff --git a/help.c b/help.c
|
||||
index 531aa16..0de6f0f 100644
|
||||
--- a/help.c
|
||||
+++ b/help.c
|
||||
@@ -119,7 +119,7 @@ constant char helpdata[] = {
|
||||
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','N','u','m','b','e','r',' ','o','f',' ','b','u','f','f','e','r','s','.','\n',
|
||||
' ',' ','-','B',' ',' ','.','.','.','.','.','.','.','.',' ',' ','-','-','a','u','t','o','-','b','u','f','f','e','r','s','\n',
|
||||
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','D','o','n','\'','t',' ','a','u','t','o','m','a','t','i','c','a','l','l','y',' ','a','l','l','o','c','a','t','e',' ','b','u','f','f','e','r','s',' ','f','o','r',' ','p','i','p','e','s','.','\n',
|
||||
-' ',' ','-','c',' ',' ','.','.','.','.','.','.','.','.',' ',' ','-','-','c','l','e','a','r','-','s','c','r','e','e','n','\n',
|
||||
+' ',' ','-','c',' ',' ','-','C',' ',' ','.','.','.','.',' ',' ','-','-','c','l','e','a','r','-','s','c','r','e','e','n',' ','-','-','C','L','E','A','R','-','S','C','R','E','E','N','\n',
|
||||
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','R','e','p','a','i','n','t',' ','b','y',' ','c','l','e','a','r','i','n','g',' ','r','a','t','h','e','r',' ','t','h','a','n',' ','s','c','r','o','l','l','i','n','g','.','\n',
|
||||
' ',' ','-','d',' ',' ','.','.','.','.','.','.','.','.',' ',' ','-','-','d','u','m','b','\n',
|
||||
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','D','u','m','b',' ','t','e','r','m','i','n','a','l','.','\n',
|
||||
@@ -151,8 +151,10 @@ constant char helpdata[] = {
|
||||
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','I','g','n','o','r','e',' ','t','h','e',' ','L','E','S','S','O','P','E','N',' ','e','n','v','i','r','o','n','m','e','n','t',' ','v','a','r','i','a','b','l','e','.','\n',
|
||||
' ',' ','-','m',' ',' ','-','M',' ',' ','.','.','.','.',' ',' ','-','-','l','o','n','g','-','p','r','o','m','p','t',' ',' ','-','-','L','O','N','G','-','P','R','O','M','P','T','\n',
|
||||
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','S','e','t',' ','p','r','o','m','p','t',' ','s','t','y','l','e','.','\n',
|
||||
-' ',' ','-','n',' ',' ','-','N',' ',' ','.','.','.','.',' ',' ','-','-','l','i','n','e','-','n','u','m','b','e','r','s',' ',' ','-','-','L','I','N','E','-','N','U','M','B','E','R','S','\n',
|
||||
+' ',' ','-','n',' ',' ','.','.','.','.','.','.','.','.',' ',' ','-','-','l','i','n','e','-','n','u','m','b','e','r','s','\n',
|
||||
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','D','o','n','\'','t',' ','u','s','e',' ','l','i','n','e',' ','n','u','m','b','e','r','s','.','\n',
|
||||
+' ',' ','-','N',' ',' ','.','.','.','.','.','.','.','.',' ',' ','-','-','L','I','N','E','-','N','U','M','B','E','R','S','\n',
|
||||
+' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','U','s','e',' ','l','i','n','e',' ','n','u','m','b','e','r','s','.','\n',
|
||||
' ',' ','-','o',' ','[','_','\b','f','_','\b','i','_','\b','l','_','\b','e',']',' ',' ','.',' ',' ','-','-','l','o','g','-','f','i','l','e','=','[','_','\b','f','_','\b','i','_','\b','l','_','\b','e',']','\n',
|
||||
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','C','o','p','y',' ','t','o',' ','l','o','g',' ','f','i','l','e',' ','(','s','t','a','n','d','a','r','d',' ','i','n','p','u','t',' ','o','n','l','y',')','.','\n',
|
||||
' ',' ','-','O',' ','[','_','\b','f','_','\b','i','_','\b','l','_','\b','e',']',' ',' ','.',' ',' ','-','-','L','O','G','-','F','I','L','E','=','[','_','\b','f','_','\b','i','_','\b','l','_','\b','e',']','\n',
|
||||
diff --git a/less.hlp b/less.hlp
|
||||
index 15ece5a..186e409 100644
|
||||
--- a/less.hlp
|
||||
+++ b/less.hlp
|
||||
@@ -116,7 +116,7 @@
|
||||
Number of buffers.
|
||||
-B ........ --auto-buffers
|
||||
Don't automatically allocate buffers for pipes.
|
||||
- -c ........ --clear-screen
|
||||
+ -c -C .... --clear-screen --CLEAR-SCREEN
|
||||
Repaint by clearing rather than scrolling.
|
||||
-d ........ --dumb
|
||||
Dumb terminal.
|
||||
@@ -148,8 +148,10 @@
|
||||
Ignore the LESSOPEN environment variable.
|
||||
-m -M .... --long-prompt --LONG-PROMPT
|
||||
Set prompt style.
|
||||
- -n -N .... --line-numbers --LINE-NUMBERS
|
||||
+ -n ........ --line-numbers
|
||||
Don't use line numbers.
|
||||
+ -N ........ --LINE-NUMBERS
|
||||
+ Use line numbers.
|
||||
-o [_f_i_l_e] . --log-file=[_f_i_l_e]
|
||||
Copy to log file (standard input only).
|
||||
-O [_f_i_l_e] . --LOG-FILE=[_f_i_l_e]
|
@ -1,77 +0,0 @@
|
||||
From a99bf3bf475057a2562bf89860c60b0c2a000d4a Mon Sep 17 00:00:00 2001
|
||||
From: "FeRD (Frank Dana)" <ferdnyc@gmail.com>
|
||||
Date: Fri, 22 Oct 2021 14:22:23 -0400
|
||||
Subject: [PATCH] Backport of 089d6651 to less 590
|
||||
|
||||
---
|
||||
line.c | 24 ++++++++++++++++++++----
|
||||
1 file changed, 20 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/line.c b/line.c
|
||||
index b8f609e..a587f71 100644
|
||||
--- a/line.c
|
||||
+++ b/line.c
|
||||
@@ -38,6 +38,7 @@ struct xbuffer last_ansi;
|
||||
|
||||
public int size_linebuf = 0; /* Size of line buffer (and attr buffer) */
|
||||
static struct ansi_state *line_ansi = NULL;
|
||||
+static int hlink_in_line;
|
||||
static int cshift; /* Current left-shift of output line buffer */
|
||||
public int hshift; /* Desired left-shift of output line buffer */
|
||||
public int tabstops[TABSTOP_MAX] = { 0 }; /* Custom tabstops */
|
||||
@@ -221,6 +222,7 @@ prewind(VOID_PARAM)
|
||||
is_null_line = 0;
|
||||
pendc = '\0';
|
||||
in_hilite = 0;
|
||||
+ hlink_in_line = 0;
|
||||
xbuf_reset(&shifted_ansi);
|
||||
xbuf_reset(&last_ansi);
|
||||
}
|
||||
@@ -251,6 +253,19 @@ add_linebuf(ch, attr, w)
|
||||
inc_end_column(w);
|
||||
}
|
||||
|
||||
+/*
|
||||
+ * Append a string to the line buffer.
|
||||
+ */
|
||||
+ static void
|
||||
+addstr_linebuf(s, attr, cw)
|
||||
+ char *s;
|
||||
+ int attr;
|
||||
+ int cw;
|
||||
+{
|
||||
+ for ( ; *s != '\0'; s++)
|
||||
+ add_linebuf(*s, attr, cw);
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* Set a character in the line prefix buffer.
|
||||
*/
|
||||
@@ -958,6 +973,8 @@ store_ansi(ch, rep, pos)
|
||||
case ANSI_MID:
|
||||
if (!in_hilite)
|
||||
STORE_CHAR(ch, AT_ANSI, rep, pos);
|
||||
+ if (line_ansi->hlink)
|
||||
+ hlink_in_line = 1;
|
||||
break;
|
||||
case ANSI_END:
|
||||
if (!in_hilite)
|
||||
@@ -1138,12 +1155,11 @@ pflushmbc(VOID_PARAM)
|
||||
static void
|
||||
add_attr_normal(VOID_PARAM)
|
||||
{
|
||||
- char *p = "\033[m";
|
||||
-
|
||||
if (ctldisp != OPT_ONPLUS || !is_ansi_end('m'))
|
||||
return;
|
||||
- for ( ; *p != '\0'; p++)
|
||||
- add_linebuf(*p, AT_ANSI, 0);
|
||||
+ addstr_linebuf("\033[m", AT_ANSI, 0);
|
||||
+ if (hlink_in_line) /* Don't send hyperlink clear if we know we don't need to. */
|
||||
+ addstr_linebuf("\033]8;;\033\\", AT_ANSI, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
--
|
||||
2.31.1
|
||||
|
@ -1,25 +0,0 @@
|
||||
From 31a14b8124e551f9028c5a2785fbbcb5839c491d Mon Sep 17 00:00:00 2001
|
||||
From: Mark Nudelman <markn@greenwoodsoftware.com>
|
||||
Date: Fri, 8 Oct 2021 15:25:30 -0700
|
||||
Subject: [PATCH] Remove unnecessary memory allocation.
|
||||
|
||||
---
|
||||
main.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/main.c b/main.c
|
||||
index 190ca6c..5934eb9 100644
|
||||
--- a/main.c
|
||||
+++ b/main.c
|
||||
@@ -140,7 +140,7 @@ main(argc, argv)
|
||||
|
||||
s = lgetenv(less_is_more ? "MORE" : "LESS");
|
||||
if (s != NULL)
|
||||
- scan_option(save(s));
|
||||
+ scan_option(s);
|
||||
|
||||
#define isoptstring(s) (((s)[0] == '-' || (s)[0] == '+') && (s)[1] != '\0')
|
||||
while (argc > 0 && (isoptstring(*argv) || isoptpending()))
|
||||
--
|
||||
2.36.1
|
||||
|
17
less.spec
17
less.spec
@ -1,7 +1,7 @@
|
||||
Summary: A text file browser similar to more, but better
|
||||
Name: less
|
||||
Version: 590
|
||||
Release: 5%{?dist}
|
||||
Version: 608
|
||||
Release: 1%{?dist}
|
||||
License: GPLv3+ or BSD
|
||||
Source0: https://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz
|
||||
Source1: lesspipe.sh
|
||||
@ -10,17 +10,10 @@ Source3: less.csh
|
||||
Patch4: less-394-time.patch
|
||||
Patch5: less-475-fsync.patch
|
||||
Patch6: less-436-manpage-add-old-bot-option.patch
|
||||
Patch7: less-436-help.patch
|
||||
Patch8: less-458-lessecho-usage.patch
|
||||
Patch9: less-458-less-filters-man.patch
|
||||
Patch10: less-458-lesskey-usage.patch
|
||||
Patch11: less-458-old-bot-in-help.patch
|
||||
# Backported version of upstream commit d21820c
|
||||
# https://github.com/gwsw/less/commit/d21820c9d8501b5814d33d4fb8a621c6c563e102
|
||||
Patch12: less-590-hyperlink-bleed.patch
|
||||
# Backported version of upstream commit 31a14b8
|
||||
# https://github.com/gwsw/less/commit/31a14b8124e551f9028c5a2785fbbcb5839c491d
|
||||
Patch13: less-590-memory-leak.patch
|
||||
URL: https://www.greenwoodsoftware.com/less/
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: autoconf automake libtool
|
||||
@ -41,13 +34,10 @@ files, and you'll use it frequently.
|
||||
%patch4 -p1 -b .time
|
||||
%patch5 -p1 -b .fsync
|
||||
%patch6 -p1 -b .manpage-add-old-bot-option
|
||||
%patch7 -p1 -b .help
|
||||
%patch8 -p1 -b .lessecho-usage
|
||||
%patch9 -p1 -b .less-filters-man
|
||||
%patch10 -p1 -b .lesskey-usage
|
||||
%patch11 -p1 -b .old-bot
|
||||
%patch12 -p1 -b .hyperlinks
|
||||
%patch13 -p1 -b .memory-leak
|
||||
|
||||
|
||||
%build
|
||||
@ -71,6 +61,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d
|
||||
%{_mandir}/man1/*
|
||||
|
||||
%changelog
|
||||
* Thu Nov 24 2022 Matej Mužila <mmuzila@redhat.com> - 608-1
|
||||
- Update to new upstream release
|
||||
|
||||
* Mon Jul 25 2022 Daan De Meyer <daan.j.demeyer@gmail.com> - 590-5
|
||||
- Backport patch from upstream to fix memory leak
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (less-590.tar.gz) = 426fa5840fd43c17bd5a452ad35ad24f2d6684623c6914403fd0059af62266bf2138e6828c7d73a1cef26a736c0d2b8ed4ab180eea8297281dae79a4228eb903
|
||||
SHA512 (less-608.tar.gz) = 7945b7f88921832ebb1b45fba8cbb449ee0133342796b654a52c146dfff3d84db18724ee84e53349eeea6017a0ebe2d8eb5366210275981dde7bb7190118fa66
|
||||
|
Loading…
Reference in New Issue
Block a user