Skip to content

Commit

Permalink
Merge 'dev' ~ v608 + fix errors/lints/warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
rivy committed Oct 14, 2023
2 parents 522e5dc + ed637db commit 0b0f8b2
Show file tree
Hide file tree
Showing 23 changed files with 583 additions and 497 deletions.
8 changes: 5 additions & 3 deletions Makefile.aut
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,17 @@ wide.uni: unicode/EastAsianWidth.txt

unicode/UnicodeData.txt:
mkdir -p unicode
curl -s -u 'anonymous:${EMAIL}' -o $@ ftp://ftp.unicode.org/Public/UNIDATA/UnicodeData.txt
lftp -c 'open -u "anonymous:${EMAIL}" ftp.unicode.org ; get Public/UNIDATA/UnicodeData.txt -o $@'
touch $@
unicode/EastAsianWidth.txt:
mkdir -p unicode
curl -s -u 'anonymous:${EMAIL}' -o $@ ftp://ftp.unicode.org/Public/UNIDATA/EastAsianWidth.txt
lftp -c 'open -u "anonymous:${EMAIL}" ftp.unicode.org ; get Public/UNIDATA/EastAsianWidth.txt -o $@'
touch $@

distfiles: ${DISTFILES}

echo_distfiles:
@echo ${DISTFILES}
@echo $(subst .nro,.nro.VER,${DISTFILES})

dist: ${DISTFILES}
if [ ! -d ${srcdir}/release ]; then mkdir ${srcdir}/release; fi
Expand Down
10 changes: 5 additions & 5 deletions Makefile.wng
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ MINGW_ROOT_PATH = /mingw-w64/mingw64
#
REGEX_PACKAGE ?= posix
ifeq (${REGEX_PACKAGE},regcomp-local)
MINGW_DEFINES += -DUSE_REGEXP_C
MINGW_DEFINES += -DUSE_REGEXP_C
else ifeq (${REGEX_PACKAGE},posix)
MINGW_DEFINES += -DUSE_POSIX_REGCOMP
MINGW_DEFINES += -DUSE_POSIX_REGCOMP
else ifeq (${REGEX_PACKAGE},gnu)
MINGW_DEFINES += -DUSE_GNU_REGEX
MINGW_DEFINES += -DUSE_GNU_REGEX
else
$(error REGEX_PACKAGE must be posix, gnu or regcomp-local)
$(error REGEX_PACKAGE must be posix, gnu or regcomp-local)
endif

MINGW_REGEX_IPATH = -I${MINGW_ROOT_PATH}/opt/include
Expand Down Expand Up @@ -80,7 +80,7 @@ LESS_SRC = brac.c ch.c charset.c cmdbuf.c command.c \
ifile.c input.c jump.c line.c linenum.c \
lsystem.c main.c mark.c optfunc.c option.c \
opttbl.c os.c output.c pattern.c position.c \
prompt.c screen.c scrsize.c search.c \
prompt.c screen.c scrsize.c search.c \
signal.c tags.c ttyin.c version.c xbuf.c
ifeq (${REGEX_PACKAGE},regcomp-local)
LESS_SRC += regexp.c
Expand Down
14 changes: 13 additions & 1 deletion NEWS.upstream
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

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

Major changes between "less" versions 590 and 603
Major changes between "less" versions 590 and 608

* Add the --header option (github #43).

Expand Down Expand Up @@ -56,6 +56,8 @@
* Fix buffer overflow when invoking lessecho with more than 63 -m/-n
options (github #198).

* Fix buffer overflow in bin_file (github #271).

* Fix bug restoring color at end of highlighted text.

* Fix bug in parsing lesskey file.
Expand All @@ -64,6 +66,16 @@

* Suppress TAB filename expansion in some cases where it doesn't make sense.

* Fix termlib detection when compiler doesn't accept
calls to undeclared functions.

* Fix bug in input of non-ASCII characters on Windows (github #247)

* Escape filenames when invoking LESSCLOSE.

* Fix bug using multibyte UTF-8 char in search string
with --incsearch (github #273).

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

Major changes between "less" versions 581 and 590
Expand Down
3 changes: 3 additions & 0 deletions cmdbuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1378,6 +1378,9 @@ cmd_int(frac)
public char *
get_cmdbuf(VOID_PARAM)
{
if (cmd_mbc_buf_index < cmd_mbc_buf_len)
/* Don't return buffer containing an incomplete multibyte char. */
return (NULL);
return (cmdbuf);
}

Expand Down
13 changes: 12 additions & 1 deletion command.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ exec_mca(VOID_PARAM)

cmd_exec();
cbuf = get_cmdbuf();
if (cbuf == NULL)
return;

switch (mca)
{
Expand Down Expand Up @@ -423,6 +425,8 @@ mca_opt_nonfirst_char(c)
if (cmd_char(c) == CC_QUIT)
return (MCA_DONE);
p = get_cmdbuf();
if (p == NULL)
return (MCA_MORE);
opt_lower = ASCII_IS_LOWER(p[0]);
err = 0;
curropt = findopt_name(&p, &oname, &err);
Expand Down Expand Up @@ -478,6 +482,8 @@ mca_opt_char(c)
if (curropt == NULL)
{
parg.p_string = get_cmdbuf();
if (parg.p_string == NULL)
return (MCA_MORE);
error("There is no --%s option", &parg);
return (MCA_DONE);
}
Expand Down Expand Up @@ -699,15 +705,18 @@ mca_char(c)
case A_B_SEARCH:
if (incr_search)
{
int save_updown_match = 0;
/* Incremental search: do a search after every input char. */
int st = (search_type & (SRCH_FORW|SRCH_BACK|SRCH_NO_MATCH|SRCH_NO_REGEX|SRCH_NO_MOVE|SRCH_WRAP));
char *pattern = get_cmdbuf();
if (pattern == NULL)
return (MCA_MORE);
/*
* Must save updown_match because mca_search
* reinits it. That breaks history scrolling.
* {{ This is ugly. mca_search probably shouldn't call set_mlist. }}
*/
int save_updown_match = updown_match;
save_updown_match = updown_match;
cmd_exec();
if (*pattern == '\0')
{
Expand Down Expand Up @@ -1308,6 +1317,8 @@ commands(VOID_PARAM)
if (cmd_char(c) == CC_QUIT || len_cmdbuf() == 0)
continue;
cbuf = get_cmdbuf();
if (cbuf == NULL)
continue;
} else
{
/*
Expand Down
20 changes: 14 additions & 6 deletions compose.uni
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Generated by "./mkutable -f2 Mn Me -- unicode/UnicodeData.txt" on Tue May 19 14:47:34 PDT 2020 */
/* Generated by "./mkutable -f2 Mn Me -- unicode/UnicodeData.txt" on Tue Jul 19 12:45:16 PDT 2022 */
{ 0x0300, 0x036f }, /* Mn */
{ 0x0483, 0x0487 }, /* Mn */
{ 0x0488, 0x0489 }, /* Me */
Expand All @@ -24,7 +24,8 @@
{ 0x0825, 0x0827 }, /* Mn */
{ 0x0829, 0x082d }, /* Mn */
{ 0x0859, 0x085b }, /* Mn */
{ 0x08d3, 0x08e1 }, /* Mn */
{ 0x0898, 0x089f }, /* Mn */
{ 0x08ca, 0x08e1 }, /* Mn */
{ 0x08e3, 0x0902 }, /* Mn */
{ 0x093a, 0x093a }, /* Mn */
{ 0x093c, 0x093c }, /* Mn */
Expand Down Expand Up @@ -65,6 +66,7 @@
{ 0x0bcd, 0x0bcd }, /* Mn */
{ 0x0c00, 0x0c00 }, /* Mn */
{ 0x0c04, 0x0c04 }, /* Mn */
{ 0x0c3c, 0x0c3c }, /* Mn */
{ 0x0c3e, 0x0c40 }, /* Mn */
{ 0x0c46, 0x0c48 }, /* Mn */
{ 0x0c4a, 0x0c4d }, /* Mn */
Expand Down Expand Up @@ -115,7 +117,7 @@
{ 0x1160, 0x11ff }, /* Mn */
{ 0x135d, 0x135f }, /* Mn */
{ 0x1712, 0x1714 }, /* Mn */
{ 0x1732, 0x1734 }, /* Mn */
{ 0x1732, 0x1733 }, /* Mn */
{ 0x1752, 0x1753 }, /* Mn */
{ 0x1772, 0x1773 }, /* Mn */
{ 0x17b4, 0x17b5 }, /* Mn */
Expand All @@ -124,6 +126,7 @@
{ 0x17c9, 0x17d3 }, /* Mn */
{ 0x17dd, 0x17dd }, /* Mn */
{ 0x180b, 0x180d }, /* Mn */
{ 0x180f, 0x180f }, /* Mn */
{ 0x1885, 0x1886 }, /* Mn */
{ 0x18a9, 0x18a9 }, /* Mn */
{ 0x1920, 0x1922 }, /* Mn */
Expand All @@ -141,7 +144,7 @@
{ 0x1a7f, 0x1a7f }, /* Mn */
{ 0x1ab0, 0x1abd }, /* Mn */
{ 0x1abe, 0x1abe }, /* Me */
{ 0x1abf, 0x1ac0 }, /* Mn */
{ 0x1abf, 0x1ace }, /* Mn */
{ 0x1b00, 0x1b03 }, /* Mn */
{ 0x1b34, 0x1b34 }, /* Mn */
{ 0x1b36, 0x1b3a }, /* Mn */
Expand All @@ -164,8 +167,7 @@
{ 0x1ced, 0x1ced }, /* Mn */
{ 0x1cf4, 0x1cf4 }, /* Mn */
{ 0x1cf8, 0x1cf9 }, /* Mn */
{ 0x1dc0, 0x1df9 }, /* Mn */
{ 0x1dfb, 0x1dff }, /* Mn */
{ 0x1dc0, 0x1dff }, /* Mn */
{ 0x20d0, 0x20dc }, /* Mn */
{ 0x20dd, 0x20e0 }, /* Me */
{ 0x20e1, 0x20e1 }, /* Mn */
Expand Down Expand Up @@ -229,11 +231,15 @@
{ 0x10d24, 0x10d27 }, /* Mn */
{ 0x10eab, 0x10eac }, /* Mn */
{ 0x10f46, 0x10f50 }, /* Mn */
{ 0x10f82, 0x10f85 }, /* Mn */
{ 0x11001, 0x11001 }, /* Mn */
{ 0x11038, 0x11046 }, /* Mn */
{ 0x11070, 0x11070 }, /* Mn */
{ 0x11073, 0x11074 }, /* Mn */
{ 0x1107f, 0x11081 }, /* Mn */
{ 0x110b3, 0x110b6 }, /* Mn */
{ 0x110b9, 0x110ba }, /* Mn */
{ 0x110c2, 0x110c2 }, /* Mn */
{ 0x11100, 0x11102 }, /* Mn */
{ 0x11127, 0x1112b }, /* Mn */
{ 0x1112d, 0x11134 }, /* Mn */
Expand Down Expand Up @@ -313,6 +319,8 @@
{ 0x16f8f, 0x16f92 }, /* Mn */
{ 0x16fe4, 0x16fe4 }, /* Mn */
{ 0x1bc9d, 0x1bc9e }, /* Mn */
{ 0x1cf00, 0x1cf2d }, /* Mn */
{ 0x1cf30, 0x1cf46 }, /* Mn */
{ 0x1d167, 0x1d169 }, /* Mn */
{ 0x1d17b, 0x1d182 }, /* Mn */
{ 0x1d185, 0x1d18b }, /* Mn */
Expand Down

0 comments on commit 0b0f8b2

Please sign in to comment.