diff --git a/Makefile.wnm b/Makefile.wnm index 7b33833..2e1cb60 100644 --- a/Makefile.wnm +++ b/Makefile.wnm @@ -6,7 +6,7 @@ CC = cl # Normal flags -CFLAGS = /nologo /ML /W3 /GX /O2 /I "." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /c +CFLAGS = /nologo /MD /W3 /EHsc /O2 /I "." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /c LDFLAGS = /nologo /subsystem:console /incremental:no /machine:I386 # Debugging flags diff --git a/NEWS b/NEWS index 9203bbd..43f1247 100644 --- a/NEWS +++ b/NEWS @@ -11,7 +11,7 @@ ====================================================================== - Major changes between "less" versions 458 and 479 + Major changes between "less" versions 458 and 481 * Don't overwrite history file; just append to it. diff --git a/README b/README index 9c95796..726904d 100644 --- a/README +++ b/README @@ -1,7 +1,7 @@ - Less, version 479 + Less, version 481 - This is the distribution of less, version 479, released 06 Jul 2015. + This is the distribution of less, version 481, released 31 Aug 2015. This program is part of the GNU project (http://www.gnu.org). This program is free software. You may redistribute it and/or diff --git a/defines.wn b/defines.wn index 9b07897..f37911d 100644 --- a/defines.wn +++ b/defines.wn @@ -345,6 +345,8 @@ #define popen _popen #define pclose _pclose +#if !defined(_MSC_VER) || (_MSC_VER < 1900) #define snprintf _snprintf +#endif #pragma warning(disable:4996) diff --git a/forwback.c b/forwback.c index 00d6600..721a028 100644 --- a/forwback.c +++ b/forwback.c @@ -35,6 +35,8 @@ extern int final_attr; extern int oldbot; #if HILITE_SEARCH extern int size_linebuf; +extern int hilite_search; +extern int status_col; #endif #if TAGS extern char *tagoption; @@ -147,8 +149,10 @@ forw(n, pos, force, only_last, nblank) (forw_scroll >= 0 && n > forw_scroll && n != sc_height-1); #if HILITE_SEARCH - prep_hilite(pos, pos + 3*size_linebuf, ignore_eoi ? 1 : -1); - pos = next_unfiltered(pos); + if (hilite_search == OPT_ONPLUS || is_filtering() || status_col) { + prep_hilite(pos, pos + 4*size_linebuf, ignore_eoi ? 1 : -1); + pos = next_unfiltered(pos); + } #endif if (!do_repaint) @@ -305,7 +309,9 @@ back(n, pos, force, only_last) squish_check(); do_repaint = (n > get_back_scroll() || (only_last && n > sc_height-1)); #if HILITE_SEARCH - prep_hilite((pos < 3*size_linebuf) ? 0 : pos - 3*size_linebuf, pos, -1); + if (hilite_search == OPT_ONPLUS || is_filtering() || status_col) { + prep_hilite((pos < 3*size_linebuf) ? 0 : pos - 3*size_linebuf, pos, -1); + } #endif while (--n >= 0) { diff --git a/less.man b/less.man index 5a9e8c5..151816a 100644 --- a/less.man +++ b/less.man @@ -1637,4 +1637,4 @@ LESS(1) General Commands Manual LESS(1) - Version 479: 06 Jul 2015 LESS(1) + Version 481: 31 Aug 2015 LESS(1) diff --git a/less.nro b/less.nro index 7b7612a..b3d9874 100644 --- a/less.nro +++ b/less.nro @@ -1,4 +1,4 @@ -.TH LESS 1 "Version 479: 06 Jul 2015" +.TH LESS 1 "Version 481: 31 Aug 2015" .SH NAME less \- opposite of more .SH SYNOPSIS diff --git a/lessecho.man b/lessecho.man index 88a4c3b..56ba943 100644 --- a/lessecho.man +++ b/lessecho.man @@ -51,4 +51,4 @@ LESSECHO(1) General Commands Manual LESSECHO(1) - Version 479: 06 Jul 2015 LESSECHO(1) + Version 481: 31 Aug 2015 LESSECHO(1) diff --git a/lessecho.nro b/lessecho.nro index 972215d..78b893f 100644 --- a/lessecho.nro +++ b/lessecho.nro @@ -1,4 +1,4 @@ -.TH LESSECHO 1 "Version 479: 06 Jul 2015" +.TH LESSECHO 1 "Version 481: 31 Aug 2015" .SH NAME lessecho \- expand metacharacters .SH SYNOPSIS diff --git a/lesskey.man b/lesskey.man index 1fec327..2e9000f 100644 --- a/lesskey.man +++ b/lesskey.man @@ -357,4 +357,4 @@ LESSKEY(1) General Commands Manual LESSKEY(1) - Version 479: 06 Jul 2015 LESSKEY(1) + Version 481: 31 Aug 2015 LESSKEY(1) diff --git a/lesskey.nro b/lesskey.nro index 3b566d7..826332d 100644 --- a/lesskey.nro +++ b/lesskey.nro @@ -1,4 +1,4 @@ -.TH LESSKEY 1 "Version 479: 06 Jul 2015" +.TH LESSKEY 1 "Version 481: 31 Aug 2015" .SH NAME lesskey \- specify key bindings for less .SH SYNOPSIS diff --git a/pattern.c b/pattern.c index e5200cf..71141c7 100644 --- a/pattern.c +++ b/pattern.c @@ -257,9 +257,17 @@ match(pattern, pattern_len, buf, buf_len, pfound, pend) for ( ; buf < buf_end; buf++) { - for (pp = pattern, lp = buf; *pp == *lp; pp++, lp++) + for (pp = pattern, lp = buf; ; pp++, lp++) + { + char cp = *pp; + char cl = *lp; + if (caseless == OPT_ONPLUS && ASCII_IS_UPPER(cp)) + cp = ASCII_TO_LOWER(cp); + if (cp != cl) + break; if (pp == pattern_end || lp == buf_end) break; + } if (pp == pattern_end) { if (pfound != NULL) diff --git a/version.c b/version.c index 1ca7c48..87b0b42 100644 --- a/version.c +++ b/version.c @@ -789,6 +789,8 @@ v477 5/19/15 Fix off-by-one in jump_forw_buffered; don't add FAKE_* files to cmd history. v478 5/21/15 Fix nonportable pointer usage in hilite tree. v479 7/6/15 Allow %% escapes in LESSOPEN variable. +v480 7/24/15 Fix bug in no-regex searches; support MSVC v1900. +v481 8/20/15 Fix broken -g option. */ -char version[] = "479"; +char version[] = "481";