Skip to content

Commit

Permalink
Vendor import of less v643.
Browse files Browse the repository at this point in the history
  • Loading branch information
delphij committed Aug 13, 2023
1 parent 159d764 commit 448d114
Show file tree
Hide file tree
Showing 55 changed files with 12,273 additions and 2,419 deletions.
8 changes: 5 additions & 3 deletions Makefile.aut
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ DISTFILES = \
mkhelp.pl \
mkhelp.py \
mkutable $(UNICODE_FILES) \
$(shell ${MAKE} -s -f ${srcdir}/lesstest/Makefile echo_distfiles srcdir=${srcdir}/lesstest) \
${DISTFILES_W}


all: help.c funcs.h $(UNICODE_FILES) ${srcdir}/configure

release: .FORCE
Expand Down Expand Up @@ -138,8 +140,8 @@ dist: ${DISTFILES}
rm -rf $$RELDIR && mkdir $$RELDIR && \
echo "Preparing $$LESSREL" && \
rm -rf $$LESSREL && mkdir $$LESSREL && \
cp ${DISTFILES} $$LESSREL && \
cd $$LESSREL && chmod -w * && chmod +w ${DISTFILES_W} && chmod +x configure && cd .. && \
for f in ${DISTFILES}; do mkdir -p $$(dirname $$LESSREL/$$f); cp $$f $$LESSREL/$$f; done && \
cd $$LESSREL && chmod -w * && chmod +w ${DISTFILES_W} lesstest && chmod +x configure && cd .. && \
echo "Creating $$RELDIR/$$TARF" && \
tar -cf - $$LESSREL | gzip -c >$$RELDIR/$$TARF && \
echo "Signing $$RELDIR/$$TARF" && \
Expand All @@ -156,7 +158,7 @@ tagall:
gnu_upload:
@if [ -z "${REL}" ]; then echo "Please set REL=nnn"; exit 1; fi; \
LESSREL=less-${REL} && RELDIR=release/$$LESSREL && \
TARF=$$LESSREL.tar.gz && \
TARF=$$LESSREL.tar.gz && \
if [ ! -s $$RELDIR/$$TARF ]; then echo "$$RELDIR/$$TARF does not exist"; exit 1; fi; \
cd $$RELDIR && \
gpg -b $$TARF && \
Expand Down
38 changes: 38 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,44 @@
Report bugs, suggestions or comments at
https://github.com/gwsw/less/issues.

======================================================================

Major changes between "less" versions 633 and 643

* Fix problem when a program piping into less reads from the tty,
like sudo asking for password (github #368).

* Fix search modifier ^E after ^W.

* Fix bug using negated (^N) search (github #374).

* Fix bug setting colors with -D on Windows build (github #386).

* Fix reading special chars like PageDown on Windows (github #378).

* Fix mouse wheel scrolling on Windows (github #379).

* Fix erroneous EOF when terminal window size changes (github #372).

* Fix compile error with some definitions of ECHONL (github #395).

* Fix crash on Windows when writing logfile (github #405).

* Fix regression in exit code when stdin is /dev/null and
output is a file (github #373).

* Add lesstest test suite to production release (github #344).

* Change lesstest output to conform with
automake Simple Test Format (github #399).

======================================================================

Major changes between "less" versions 632 and 633

* Fix build on systems which have ncurses/termcap.h or
ncursesw/termcap.h but not termcap.h.

======================================================================

Major changes between "less" versions 608 and 632
Expand Down
2 changes: 2 additions & 0 deletions ch.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,8 @@ public void sync_logfile(void)
BLOCKNUM block;
BLOCKNUM nblocks;

if (logfile < 0)
return;
nblocks = (ch_fpos + LBUFSIZE - 1) / LBUFSIZE;
for (block = 0; block < nblocks; block++)
{
Expand Down
5 changes: 3 additions & 2 deletions command.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ static void mca_search1(void)
{
if (search_type & SRCH_SUBSEARCH(i))
{
char buf[8];
char buf[INT_STRLEN_BOUND(int)+8];
SNPRINTF1(buf, sizeof(buf), "Sub-%d ", i);
cmd_putstr(buf);
}
Expand Down Expand Up @@ -554,6 +554,7 @@ static int mca_search_char(int c)
case '*':
if (mca != A_FILTER)
flag = SRCH_PAST_EOF;
search_type &= ~SRCH_WRAP;
break;
case CONTROL('F'): /* FIRST file */
case '@':
Expand All @@ -565,7 +566,7 @@ static int mca_search_char(int c)
flag = SRCH_NO_MOVE;
break;
case CONTROL('S'): { /* SUBSEARCH */
char buf[32];
char buf[INT_STRLEN_BOUND(int)+24];
SNPRINTF1(buf, sizeof(buf), "Sub-pattern (1-%d):", NUM_SEARCH_COLORS);
clear_bot();
cmd_putstr(buf);
Expand Down
Loading

0 comments on commit 448d114

Please sign in to comment.