Skip to content

Commit

Permalink
Vendor import of less v632.
Browse files Browse the repository at this point in the history
  • Loading branch information
delphij committed May 1, 2023
1 parent 2b6624f commit 159d764
Show file tree
Hide file tree
Showing 76 changed files with 4,529 additions and 4,448 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
------------

Less
Copyright (C) 1984-2022 Mark Nudelman
Copyright (C) 1984-2023 Mark Nudelman

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
Expand Down
22 changes: 13 additions & 9 deletions Makefile.aut
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ REL := $(shell sed -e '/char version/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q $

ifeq ($(USE_PYTHON),1)
MKHELP = mkhelp.py
MKFUNCS = mkfuncs.py
else
MKHELP = mkhelp.pl
MKFUNCS = mkfuncs.pl
endif

SRC = \
Expand All @@ -41,15 +39,15 @@ DISTFILES = \
install.sh defines.h.in mkinstalldirs \
less.nro less.man lesskey.nro lesskey.man lessecho.nro lessecho.man \
less.hlp \
mkfuncs.pl mkhelp.pl \
mkfuncs.py mkhelp.py \
mkhelp.pl \
mkhelp.py \
mkutable $(UNICODE_FILES) \
${DISTFILES_W}

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

release: .FORCE
@if grep -s 'Major changes between .*${REL}' NEWS ; then :; else echo '*** NEWS is not updated for ${REL}'; exit 1; fi
@if ${srcdir}/ready_to_release -d ${srcdir}; then :; else exit 1; fi
${MAKE} -f Makefile.aut tagall
${MAKE} -f Makefile.aut all
${MAKE} -f Makefile.aut clean
Expand All @@ -68,7 +66,7 @@ ${srcdir}/configure ${srcdir}/defines.h.in: ${srcdir}/configure.ac ${srcdir}/Mak

funcs.h: ${SRC:%=${srcdir}/%}
-mv -f ${srcdir}/funcs.h ${srcdir}/funcs.h.old
${srcdir}/${MKFUNCS} ${SRC:%=${srcdir}/%} >${srcdir}/funcs.h
grep -h '^public [^;]*$$' ${SRC:%=${srcdir}/%} | sed 's/$$/;/' >${srcdir}/funcs.h

lint:
lint -I. ${CPPFLAGS} ${SRC}
Expand Down Expand Up @@ -112,6 +110,12 @@ ubin.uni: unicode/UnicodeData.txt
wide.uni: unicode/EastAsianWidth.txt
./mkutable -f1 W F -- unicode/EastAsianWidth.txt > $@

unicode-check:
rm -rf unicode-old
mv -f unicode unicode-old
${MAKE} -f Makefile.aut unicode/UnicodeData.txt unicode/EastAsianWidth.txt
@if diff -q unicode-old unicode >/dev/null; then rm -rf unicode; mv -f unicode-old unicode; echo "unicode files already up to date"; else echo "unicode files updated"; fi

unicode/UnicodeData.txt:
mkdir -p unicode
lftp -c 'open -u "anonymous:${EMAIL}" ftp.unicode.org ; get Public/UNIDATA/UnicodeData.txt -o $@'
Expand Down Expand Up @@ -152,10 +156,10 @@ tagall:
gnu_upload:
@if [ -z "${REL}" ]; then echo "Please set REL=nnn"; exit 1; fi; \
LESSREL=less-${REL} && RELDIR=release/$$LESSREL && \
TARF=$$LESSREL-release.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 && \
( echo "version: 1.2"; echo "directory: less"; echo "filename: $$TARF" ) > $$TARF.directive && \
gpg --clearsign $$TARF.directive
@echo "upload ready: cd $$RELDIR; ftp ftp-upload.gnu.org; cd /incoming/ftp; put $$TARF $$TARF.sig $$TARF.directive.asc"
gpg --clearsign $$TARF.directive && \
echo "upload ready: cd $$RELDIR; ftp ftp-upload.gnu.org; cd /incoming/ftp; put $$TARF $$TARF.sig $$TARF.directive.asc"
9 changes: 7 additions & 2 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ LDFLAGS = @LDFLAGS@
CPPFLAGS = @CPPFLAGS@
EXEEXT = @EXEEXT@
O=o
ifneq ($(strip $(LESSTEST)),)
CPPFLAGS += -DLESSTEST
endif

LIBS = @LIBS@

Expand Down Expand Up @@ -96,9 +99,12 @@ uninstall:
info:
install-info:
dvi:
check:
installcheck:

check:
if [ -x less$(EXEEXT) ] && ./less$(EXEEXT) -V | grep -q LESSTEST; then :; else ${MAKE} clean; ${MAKE} LESSTEST=1; fi
objdir=$$(pwd); rflags=""; if [ -z "${VERBOSE}" ]; then rflags=-e; fi; cd $(srcdir)/lesstest && ${MAKE} && ./runtest $$rflags -l "$$objdir/less" lt

TAGS:
cd ${srcdir} && etags *.c *.h

Expand Down Expand Up @@ -126,4 +132,3 @@ distclean: clean

realclean: distclean
rm -f TAGS

5 changes: 3 additions & 2 deletions Makefile.wng
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,9 @@ lessecho: lessecho.o version.o
defines.h: defines.wn
copy $< $@

funcs.h:
perl mkfuncs.pl ${LESS_SRC} > $@
funcs.h: ${LESS_SRC}
-move funcs.h funcs.h.old
grep -h "^public [^;]*$$" ${LESS_SRC} | sed "s/$$/;/" >funcs.h

help.c: less.hlp
perl mkhelp.pl < $< > $@
Expand Down
79 changes: 75 additions & 4 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,77 @@
Report bugs, suggestions or comments at
https://github.com/gwsw/less/issues.

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

Major changes between "less" versions 608 and 632

* Add LESSUTFCHARDEF environment variable (github #275).

* Add # command (github #330).

* Add ^S search modifier (github #196).

* Add --wordwrap option (github #113).

* Add --no-vbell option (github #304).

* Add --no-search-headers option (github #44).

* Add --modelines option (github #89).

* Add --intr option (github #224).

* Add --proc-backspace, --proc-tab and --proc-return options (github #335).

* Add --show-preproc-errors option (github #258).

* Add LESS_LINES and LESS_COLUMNS environment variables (github #84).

* Add LESS_DATA_DELAY environment variable (github #337).

* Allow empty "lines" field in --header option.

* Update Unicode tables.

* Improve ability of ^X to interrupt F command (github #49).

* Status column (-J) shows off-screen matches.

* Parenthesized sub-patterns in searches are colored with unique colors,
if supported by the regular expression library (github #196).

* Don't allow opening a tty as file input unless -f is set (github #309).

* Don't require newline input after +&... option (github #339).

* Fix incorrect handling of some Private Use Unicode characters.

* Fix ANSI color bug when overstriking with colored chars (github #276).

* Fix compiler const warning (github #279).

* Fix signal race in iread (github #280).

* Fix reading procfs files on Linux (github #282).

* Fix --ignore-case with ctrl-R (no regex) search (github #300).

* Fix bug doing repeat search after setting & filter (github #299).

* Fix bug doing repeat search before non-repeat search.

* Fix crash with -R and certain line lengths (github #338).

* Fix input of Windows dead keys (github #352).

* Don't retain search options from a cancelled search (github #302).

* Don't call realpath on fake filenames like "-" (github #289).

* Implement lesstest test suite.

* Convert function parameter definitions from K&R to C89 (github #316).

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

Major changes between "less" versions 590 and 608
Expand Down Expand Up @@ -241,7 +312,7 @@

* Update Unicode tables to 2017-03-08.

* Pass-thru Unicode formating chars (Cf type) instead of treating them
* Pass-thru Unicode formatting chars (Cf type) instead of treating them
as binary chars. But treat them as binary if -U is set.

* Fix erroneous binary file warning when UTF-8 file contains ANSI SGR sequences.
Expand Down Expand Up @@ -433,7 +504,7 @@

* Fix problem interrupting the line number calculation for initial prompt.

* Fix SGR emulation when dealing with multiple attributes (eg. bold+underline).
* Fix SGR emulation when dealing with multiple attributes (e.g. bold+underline).

* Fix highlight bug when searching for underlined/overstruck text.

Expand Down Expand Up @@ -515,7 +586,7 @@

* The -c option has been made identical with the -C option.

* Allow "/dev/null" as synomym for "-" in LESSHISTFILE to indicate
* Allow "/dev/null" as synonym for "-" in LESSHISTFILE to indicate
that no history file should be used.

* Search can now find text which follows a null byte, if the PCRE
Expand Down Expand Up @@ -665,7 +736,7 @@

* Improved performance in reading very large pipes.

* Eliminated some dependencies on file offets being 32 bits.
* Eliminated some dependencies on file offsets being 32 bits.

* Fixed problems when viewing files with very long lines.

Expand Down
9 changes: 2 additions & 7 deletions brac.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-2022 Mark Nudelman
* Copyright (C) 1984-2023 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.
Expand All @@ -23,12 +23,7 @@
* The characters which serve as "open bracket" and
* "close bracket" are given.
*/
public void
match_brac(obrac, cbrac, forwdir, n)
int obrac;
int cbrac;
int forwdir;
int n;
public void match_brac(char obrac, char cbrac, int forwdir, int n)
{
int c;
int nest;
Expand Down
Loading

0 comments on commit 159d764

Please sign in to comment.