diff --git a/README.md b/README.md index 41c7e0b3..da3c46f9 100644 --- a/README.md +++ b/README.md @@ -5401,7 +5401,7 @@ in markdown: - ugrep 5.1.3 April 4, 2024 UGREP(1) + ugrep 5.1.4 April 9, 2024 UGREP(1) 🔝 [Back to table of contents](#toc) diff --git a/bin/win32/ug.exe b/bin/win32/ug.exe index 8ba013dd..b926354f 100755 Binary files a/bin/win32/ug.exe and b/bin/win32/ug.exe differ diff --git a/bin/win32/ugrep.exe b/bin/win32/ugrep.exe index 8ba013dd..b926354f 100755 Binary files a/bin/win32/ugrep.exe and b/bin/win32/ugrep.exe differ diff --git a/bin/win64/ug.exe b/bin/win64/ug.exe index e2f782df..94f50de5 100755 Binary files a/bin/win64/ug.exe and b/bin/win64/ug.exe differ diff --git a/bin/win64/ugrep.exe b/bin/win64/ugrep.exe index e2f782df..94f50de5 100755 Binary files a/bin/win64/ugrep.exe and b/bin/win64/ugrep.exe differ diff --git a/configure b/configure index 800252d4..e074ccd5 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for ugrep 5.1.3. +# Generated by GNU Autoconf 2.71 for ugrep 5.1.4. # # Report bugs to . # @@ -613,8 +613,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='ugrep' PACKAGE_TARNAME='ugrep' -PACKAGE_VERSION='5.1.3' -PACKAGE_STRING='ugrep 5.1.3' +PACKAGE_VERSION='5.1.4' +PACKAGE_STRING='ugrep 5.1.4' PACKAGE_BUGREPORT='https://github.com/Genivia/ugrep/issues' PACKAGE_URL='https://ugrep.com' @@ -1390,7 +1390,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures ugrep 5.1.3 to adapt to many kinds of systems. +\`configure' configures ugrep 5.1.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1461,7 +1461,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of ugrep 5.1.3:";; + short | recursive ) echo "Configuration of ugrep 5.1.4:";; esac cat <<\_ACEOF @@ -1637,7 +1637,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -ugrep configure 5.1.3 +ugrep configure 5.1.4 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2174,7 +2174,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by ugrep $as_me 5.1.3, which was +It was created by ugrep $as_me 5.1.4, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3661,7 +3661,7 @@ fi # Define the identity of the package. PACKAGE='ugrep' - VERSION='5.1.3' + VERSION='5.1.4' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -10931,7 +10931,7 @@ fi -# Allow the manpage be accessed as either ug or ugrep +# Allow the manpage to be accessed as either ug or ugrep ac_config_links="$ac_config_links man/ug.1:man/ugrep.1" @@ -11485,7 +11485,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by ugrep $as_me 5.1.3, which was +This file was extended by ugrep $as_me 5.1.4, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -11558,7 +11558,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -ugrep config.status 5.1.3 +ugrep config.status 5.1.4 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 97456f24..ea19a807 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([ugrep],[5.1.3],[https://github.com/Genivia/ugrep/issues],[ugrep],[https://ugrep.com]) +AC_INIT([ugrep],[5.1.4],[https://github.com/Genivia/ugrep/issues],[ugrep],[https://ugrep.com]) AM_INIT_AUTOMAKE([foreign subdir-objects dist-xz no-dist-gzip]) AC_CONFIG_HEADERS([config.h]) AC_COPYRIGHT([Copyright (C) 2019-2024 Robert van Engelen, Genivia Inc.]) @@ -500,7 +500,7 @@ fi AC_SUBST(EXTRA_CFLAGS) -# Allow the manpage be accessed as either ug or ugrep +# Allow the manpage to be accessed as either ug or ugrep AC_CONFIG_LINKS([man/ug.1:man/ugrep.1]) AC_CONFIG_FILES([Makefile lib/Makefile src/Makefile lzma/C/Makefile]) diff --git a/lib/matcher.cpp b/lib/matcher.cpp index 3918c00f..46e2704e 100644 --- a/lib/matcher.cpp +++ b/lib/matcher.cpp @@ -503,9 +503,12 @@ size_t Matcher::match(Method method) if (cap_ == 0 && pos_ > cur_ && method == Const::FIND) { // use bit_[] to check each char in buf_[cur_+1..pos_-1] if it is a starting char, if not then increase cur_ - while (++cur_ < pos_ && !pat_->fst_.test(static_cast(buf_[cur_]))) + while (cur_ + 1 < pos_ && !pat_->fst_.test(static_cast(buf_[cur_ + 1]))) + { + ++cur_; if (retry > 0) --retry; + } } } else if (jump >= Pattern::Const::LONG) diff --git a/man/ug.1 b/man/ug.1 index 166bfde1..ec05929d 100644 --- a/man/ug.1 +++ b/man/ug.1 @@ -1,4 +1,4 @@ -.TH UGREP "1" "April 04, 2024" "ugrep 5.1.3" "User Commands" +.TH UGREP "1" "April 09, 2024" "ugrep 5.1.4" "User Commands" .SH NAME \fBugrep\fR, \fBug\fR -- file pattern searcher .SH SYNOPSIS diff --git a/man/ugrep.1 b/man/ugrep.1 index 166bfde1..ec05929d 100644 --- a/man/ugrep.1 +++ b/man/ugrep.1 @@ -1,4 +1,4 @@ -.TH UGREP "1" "April 04, 2024" "ugrep 5.1.3" "User Commands" +.TH UGREP "1" "April 09, 2024" "ugrep 5.1.4" "User Commands" .SH NAME \fBugrep\fR, \fBug\fR -- file pattern searcher .SH SYNOPSIS diff --git a/src/ugrep.hpp b/src/ugrep.hpp index b7f2a292..e59c7991 100644 --- a/src/ugrep.hpp +++ b/src/ugrep.hpp @@ -38,7 +38,7 @@ #define UGREP_HPP // DO NOT ALTER THIS LINE: updated by makemake.sh and we need it physically here for MSVC++ build from source -#define UGREP_VERSION "5.1.3" +#define UGREP_VERSION "5.1.4" // disable mmap because mmap is almost always slower than the file reading speed improvements since 3.0.0 #define WITH_NO_MMAP