250428.1 · c4c9fa0e0d035223369588d8db63a082a8d0f289
released 7.4.2
reading declarations
@@ -5512,7 +5512,7 @@ in markdown: - ugrep 7.4.0 April 21, 2025 UGREP(1)+ ugrep 7.4.2 April 27, 2025 UGREP(1) 🔝 [Back to table of contents](#toc)
@@ -36,7 +36,7 @@ exit 1 fi echo-echo "make -j clean all"+echo "make clean all" echo make clean
@@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles.-# Generated by GNU Autoconf 2.72 for ugrep 7.4.1.+# Generated by GNU Autoconf 2.72 for ugrep 7.4.2. # # Report bugs to <https://github.com/Genivia/ugrep/issues>. #@@ -606,8 +606,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='ugrep' PACKAGE_TARNAME='ugrep'-PACKAGE_VERSION='7.4.1'-PACKAGE_STRING='ugrep 7.4.1'+PACKAGE_VERSION='7.4.2'+PACKAGE_STRING='ugrep 7.4.2' PACKAGE_BUGREPORT='https://github.com/Genivia/ugrep/issues' PACKAGE_URL='https://ugrep.com' @@ -1382,7 +1382,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 7.4.1 to adapt to many kinds of systems.+'configure' configures ugrep 7.4.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1453,7 +1453,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in- short | recursive ) echo "Configuration of ugrep 7.4.1:";;+ short | recursive ) echo "Configuration of ugrep 7.4.2:";; esac cat <<\_ACEOF @@ -1630,7 +1630,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF-ugrep configure 7.4.1+ugrep configure 7.4.2 generated by GNU Autoconf 2.72 Copyright (C) 2023 Free Software Foundation, Inc.@@ -2184,7 +2184,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 7.4.1, which was+It was created by ugrep $as_me 7.4.2, which was generated by GNU Autoconf 2.72. Invocation command line was $ $0$ac_configure_args_raw@@ -3694,7 +3694,7 @@ fi # Define the identity of the package. PACKAGE='ugrep'- VERSION='7.4.1'+ VERSION='7.4.2' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h@@ -11808,7 +11808,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 7.4.1, which was+This file was extended by ugrep $as_me 7.4.2, which was generated by GNU Autoconf 2.72. Invocation command line was CONFIG_FILES = $CONFIG_FILES@@ -11881,7 +11881,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 7.4.1+ugrep config.status 7.4.2 configured by $0, generated by GNU Autoconf 2.72, with options \\"\$ac_cs_config\\"
@@ -1,4 +1,4 @@-AC_INIT([ugrep],[7.4.1],[https://github.com/Genivia/ugrep/issues],[ugrep],[https://ugrep.com])+AC_INIT([ugrep],[7.4.2],[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-2025 Robert van Engelen, Genivia Inc.])
@@ -362,7 +362,7 @@ class Pattern { { return ams_; }- /// Returns true when match is predicted, based on s[0..3..e-1] (e >= s + 4).+ /// Returns true when match is predicted, based on s[0..3..e-1] (e >= s + 4 and n >= 4). inline bool predict_match(const char *s, size_t n) const { uint32_t h = static_cast<uint8_t>(*s);
@@ -1606,7 +1606,7 @@ std::string convert(const char *pattern, const char *signature, convert_flag_typ if (!is_modified(mod, 'u') || !supports_escape(signature, 'R')) { // translate \R to match Unicode line break U+000D U+000A | [U+000A - U+000D] | U+0085 | U+2028 | U+2029- regex.append(&pattern[loc], pos - loc - 1).append(par).append("\\r\\n|[\\x0a-\\x0d]|\\xc2\\x85|\\xe2\\x80[\\xa8\\xa9]").push_back(')');+ regex.append(&pattern[loc], pos - loc - 1).append(par).append("\\r\\n|[\\x0a-\\x0d]|\\xc2\\x85|\\xe2\\x80[\\xa8\\xa9])"); loc = pos + 1; } beg = false;@@ -1616,12 +1616,12 @@ std::string convert(const char *pattern, const char *signature, convert_flag_typ { if (!is_modified(mod, 'u') || !supports_escape(signature, 'X')) {-#ifndef WITH_UTF8_UNRESTRICTED- // translate \X to match any valid UTF-8 even beyond- regex.append(&pattern[loc], pos - loc - 1).append(par).append("[\\x00-\\x7f]|[\\xc2-\\xdf][\\x80-\\xbf]|\\xe0[\\xa0-\\xbf][\\x80-\\xbf]|[\\xe1-\\xec][\\x80-\\xbf][\\x80-\\xbf]|\\xed[\\x80-\\x9f][\\x80-\\xbf]|[\\xee\\xef][\\x80-\\xbf][\\x80-\\xbf]|\\xf0[\\x90-\\xbf][\\x80-\\xbf][\\x80-\\xbf]|[\\xf1-\\xf3][\\x80-\\xbf][\\x80-\\xbf][\\x80-\\xbf]|\\xf4[\\x80-\\x8f][\\x80-\\xbf][\\x80-\\xbf]").push_back(')');+#ifdef WITH_UTF8_UNRESTRICTED+ // translate \X to match any valid UTF-8 encoding (more loose, includes overruns)+ regex.append(&pattern[loc], pos - loc - 1).append(par).append("[\\x00-\\x7f]|[\\xc2-\\xf4][\\x80-\\xbf]+)"); #else- // translate \X to match any valid UTF-8 encoding (including overruns)- regex.append(&pattern[loc], pos - loc - 1).append(par).append("[\\x00-\\x7f]|[\\xc2-\\xf4][\\x80-\\xbf]+").push_back(')');+ // translate \X to match valid UTF-8+ regex.append(&pattern[loc], pos - loc - 1).append(par).append("[\\x00-\\x7f]|[\\xc2-\\xdf][\\x80-\\xbf]|\\xe0[\\xa0-\\xbf][\\x80-\\xbf]|[\\xe1-\\xec][\\x80-\\xbf][\\x80-\\xbf]|\\xed[\\x80-\\x9f][\\x80-\\xbf]|[\\xee\\xef][\\x80-\\xbf][\\x80-\\xbf]|\\xf0[\\x90-\\xbf][\\x80-\\xbf][\\x80-\\xbf]|[\\xf1-\\xf3][\\x80-\\xbf][\\x80-\\xbf][\\x80-\\xbf]|\\xf4[\\x80-\\x8f][\\x80-\\xbf][\\x80-\\xbf])"); #endif loc = pos + 1; }@@ -1988,7 +1988,7 @@ std::string convert(const char *pattern, const char *signature, convert_flag_typ } ++pos; }- regex.append(&pattern[loc], pos - loc).append("\\E").push_back(')');+ regex.append(&pattern[loc], pos - loc).append("\\E)"); if (k < pos) beg = false; }
@@ -4063,11 +4063,12 @@ void Pattern::analyze_dfa(DFA::State *start) cut_fin_count = best_cut_fin_count; } }-#ifdef WITH_CUT_CYCLE // perhaps for future improvements, experimental, needs marking of states to run in linear time+#ifdef WITH_CUT_CYCLE // TODO perhaps for future improvements, experimental: needs marking of states to run in linear time! bool cut_cycle = false; if (cut_backedge) { // depth-first search up to cut_depth to detect cycles, this improves lbk_ = 0xffff for actual cycles, not loops+ // important: DFA::MetaEdgesClosure should be used instead of edge iterator, because we could have cycles via matas std::vector<std::pair<DFA::State*,DFA::State::Edges::iterator> > visit; // depth-first states visited visit.emplace_back(start, start->edges.begin()); while (!cut_cycle && !visit.empty())@@ -4082,7 +4083,7 @@ void Pattern::analyze_dfa(DFA::State *start) continue; for (std::vector<std::pair<DFA::State*,DFA::State::Edges::iterator> >::iterator it = visit.begin(); it != visit.end(); ++it) if (next_state == it->first)- cut_cycle = true;+ cut_cycle = true; // cycle detected if (visit.size() <= cut_depth + 1 && !next_state->edges.empty()) visit.emplace_back(next_state, next_state->edges.begin()); }
@@ -1,4 +1,4 @@-.TH UGREP "1" "April 24, 2025" "ugrep 7.4.1" "User Commands"+.TH UGREP "1" "April 27, 2025" "ugrep 7.4.2" "User Commands" .SH NAME \fBugrep\fR, \fBug\fR -- file pattern searcher .SH SYNOPSIS
@@ -1,4 +1,4 @@-.TH UGREP-INDEXER "1" "April 24, 2025" "ugrep-indexer 7.4.1" "User Commands"+.TH UGREP-INDEXER "1" "April 27, 2025" "ugrep-indexer 7.4.2" "User Commands" .SH NAME \fBugrep-indexer\fR -- file indexer to accelerate recursive searching .SH SYNOPSIS
@@ -1,4 +1,4 @@-.TH UGREP "1" "April 24, 2025" "ugrep 7.4.1" "User Commands"+.TH UGREP "1" "April 27, 2025" "ugrep 7.4.2" "User Commands" .SH NAME \fBugrep\fR, \fBug\fR -- file pattern searcher .SH SYNOPSIS
@@ -35,7 +35,7 @@ */ // DO NOT ALTER THIS LINE: updated by makemake.sh and we need it physically here for MSVC++ build from source-#define UGREP_VERSION "7.4.1"+#define UGREP_VERSION "7.4.2" // use a task-parallel thread to decompress the stream into a pipe to search, also handles nested archives #define WITH_DECOMPRESSION_THREAD
@@ -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 "7.4.1"+#define UGREP_VERSION "7.4.2" // disable mmap because mmap is almost always slower than the file reading speed improvements since 3.0.0 #define WITH_NO_MMAP