Skip to content

Commit

Permalink
released 4.5.0
Browse files Browse the repository at this point in the history
- add 7zip archive search with option -z, fix #185
- apply Unicode normalization to combining characters in regex patterns, fix #298
- improved TUI TAB directory navigation when searching from the FS root
- updated ugrep.exe option -P to use PCRE2 10.42
  • Loading branch information
genivia-inc committed Jan 5, 2024
1 parent 339a7cd commit 383f4f5
Show file tree
Hide file tree
Showing 70 changed files with 15,942 additions and 289 deletions.
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SUBDIRS = lib src
SUBDIRS = lib lzma/C src

man1_MANS = man/ugrep.1

Expand Down
2 changes: 1 addition & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = lib src
SUBDIRS = lib lzma/C src
man1_MANS = man/ugrep.1
EXTRA_DIST = README.md LICENSE.txt CONTRIBUTING.md CODE_OF_CONDUCT.md
UGREP = $(shell pwd)/$(top_builddir)/bin/ugrep$(EXEEXT)
Expand Down
141 changes: 73 additions & 68 deletions README.md

Large diffs are not rendered by default.

Binary file modified bin/win32/ug.exe
Binary file not shown.
Binary file modified bin/win32/ugrep.exe
Binary file not shown.
Binary file modified bin/win64/ug.exe
Binary file not shown.
Binary file modified bin/win64/ugrep.exe
Binary file not shown.
52 changes: 41 additions & 11 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.71 for ugrep 4.4.
# Generated by GNU Autoconf 2.71 for ugrep 4.5.
#
#
# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
Expand Down Expand Up @@ -610,8 +610,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='ugrep'
PACKAGE_TARNAME='ugrep'
PACKAGE_VERSION='4.4'
PACKAGE_STRING='ugrep 4.4'
PACKAGE_VERSION='4.5'
PACKAGE_STRING='ugrep 4.5'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''

Expand Down Expand Up @@ -796,6 +796,7 @@ with_lzma
with_lz4
with_zstd
with_brotli
enable_7zip
with_bzip3
with_bash_completion_dir
with_fish_completion_dir
Expand Down Expand Up @@ -1379,7 +1380,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 4.4 to adapt to many kinds of systems.
\`configure' configures ugrep 4.5 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
Expand Down Expand Up @@ -1450,7 +1451,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of ugrep 4.4:";;
short | recursive ) echo "Configuration of ugrep 4.5:";;
esac
cat <<\_ACEOF
Expand All @@ -1464,6 +1465,8 @@ Optional Features:
do not reject slow dependency extractors
--disable-dependency-tracking
speeds up one-time build
--disable-7zip to disable 7zip and no longer search .7z files (7z
requires more memory and takes long to decompress)
--disable-auto-color disable automatic colors, otherwise colors are
enabled by default
--enable-color deprecated, use --disable-auto-color
Expand Down Expand Up @@ -1623,7 +1626,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
ugrep configure 4.4
ugrep configure 4.5
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
Expand Down Expand Up @@ -2160,7 +2163,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 4.4, which was
It was created by ugrep $as_me 4.5, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
Expand Down Expand Up @@ -3647,7 +3650,7 @@ fi

# Define the identity of the package.
PACKAGE='ugrep'
VERSION='4.4'
VERSION='4.5'


printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
Expand Down Expand Up @@ -8094,6 +8097,8 @@ printf "%s\n" "#define HAVE_LIBZ 1" >>confdefs.h
fi


if test -n "${zlib_places}"; then

#
# Handle user hints
#
Expand Down Expand Up @@ -8759,6 +8764,28 @@ printf "%s\n" "#define HAVE_LIBBROTLI 1" >>confdefs.h
fi


# Check whether --enable-7zip was given.
if test ${enable_7zip+y}
then :
enableval=$enable_7zip; with_no_7zip="yes"
else $as_nop
with_no_7zip="no"
fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --disable-7zip" >&5
printf %s "checking for --disable-7zip... " >&6; }
if test "x$with_no_7zip" = "xno"; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
CPPFLAGS="$CPPFLAGS -I../lzma/C"
LDFLAGS="$LDFLAGS -L../lzma/C"
LIBS="-lviiz $LIBS"
else
EXTRA_CFLAGS="-DWITH_NO_7ZIP ${EXTRA_CFLAGS}"
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
fi


# Check whether --with-bzip3 was given.
if test ${with_bzip3+y}
Expand Down Expand Up @@ -8906,6 +8933,8 @@ fi

fi

fi


# Check whether --with-bash-completion-dir was given.
if test ${with_bash_completion_dir+y}
Expand Down Expand Up @@ -9642,7 +9671,7 @@ PTHREAD_CFLAGS=""
PTHREAD_LIBS="-lpthread"


ac_config_files="$ac_config_files Makefile lib/Makefile src/Makefile"
ac_config_files="$ac_config_files Makefile lib/Makefile src/Makefile lzma/C/Makefile"


cat >confcache <<\_ACEOF
Expand Down Expand Up @@ -10188,7 +10217,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 4.4, which was
This file was extended by ugrep $as_me 4.5, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -10256,7 +10285,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 4.4
ugrep config.status 4.5
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
Expand Down Expand Up @@ -10390,6 +10419,7 @@ do
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
"src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
"lzma/C/Makefile") CONFIG_FILES="$CONFIG_FILES lzma/C/Makefile" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
Expand Down
24 changes: 22 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AC_INIT([ugrep],[4.4])
AC_INIT([ugrep],[4.5])
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_HEADERS([config.h])
AC_COPYRIGHT([Copyright (C) 2019-2023 Robert van Engelen, Genivia Inc.])
Expand Down Expand Up @@ -70,6 +70,8 @@ fi

AX_CHECK_ZLIB([], [echo "recommended zlib not found: ugrep option -z is disabled"])

if test -n "${zlib_places}"; then

AX_CHECK_BZ2LIB([], [echo "recommended libbz2 not found: ugrep option -z cannot search .bz and .bz2 files"])

AX_CHECK_LZMALIB([], [echo "recommended liblzma not found: ugrep option -z cannot search .lzma and .xz files"])
Expand All @@ -80,6 +82,22 @@ AX_CHECK_ZSTDLIB([], [echo "optional libzstd not found: install if you want ugre

AX_CHECK_BROTLILIB([], [echo "optional brotli library not found: install if you want ugrep option -z to search .br files"])

AC_ARG_ENABLE(7zip,
[AS_HELP_STRING([--disable-7zip],
[to disable 7zip and no longer search .7z files (7z requires more memory and takes long to decompress)])],
[with_no_7zip="yes"],
[with_no_7zip="no"])
AC_MSG_CHECKING(for --disable-7zip)
if test "x$with_no_7zip" = "xno"; then
AC_MSG_RESULT(no)
CPPFLAGS="$CPPFLAGS -I../lzma/C"
LDFLAGS="$LDFLAGS -L../lzma/C"
LIBS="-lviiz $LIBS"
else
EXTRA_CFLAGS="-DWITH_NO_7ZIP ${EXTRA_CFLAGS}"
AC_MSG_RESULT(yes)
fi

AC_ARG_WITH(bzip3,
[AS_HELP_STRING([--with-bzip3],
[to enable bzip3 library to decompress .bz3 files])],
Expand All @@ -92,6 +110,8 @@ if test "x$with_bzip3_library" != "x"; then
AX_CHECK_BZIP3LIB([], [echo "optional libbzip3 not found: install if you want ugrep option -z to search .bz3 files"])
fi

fi

AC_ARG_WITH([bash-completion-dir],
[AS_HELP_STRING([--with-bash-completion-dir[=PATH]],
[install the bash auto-completion script in this directory. @<:@default=yes@:>@])],
Expand Down Expand Up @@ -353,6 +373,6 @@ AC_SUBST(SIMD_AVX512BW_FLAGS)
AC_SUBST([PTHREAD_CFLAGS], [""])
AC_SUBST([PTHREAD_LIBS], ["-lpthread"])

AC_CONFIG_FILES([Makefile lib/Makefile src/Makefile])
AC_CONFIG_FILES([Makefile lib/Makefile src/Makefile lzma/C/Makefile])

AC_OUTPUT
4 changes: 2 additions & 2 deletions include/reflex/posix.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ class Tables {

const int * range(const char *);

}
} // namespace Posix

}
} // namesapce reflex

#endif
16 changes: 8 additions & 8 deletions include/reflex/setop.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ struct lazy_intersection {
{
return !operator==(rhs);
}
void find(void)
void find()
{
while (i1 != i1_end && i2 != i2_end)
{
Expand All @@ -277,7 +277,7 @@ struct lazy_intersection {
break;
}
}
void next(void)
void next()
{
if (i1 != i1_end)
i1++;
Expand All @@ -295,11 +295,11 @@ struct lazy_intersection {
s1(s1),
s2(s2)
{ }
const_iterator begin(void) const
const_iterator begin() const
{
return const_iterator(s1, s2);
}
const_iterator end(void) const
const_iterator end() const
{
return const_iterator(s1.end(), s2.end());
}
Expand Down Expand Up @@ -358,7 +358,7 @@ struct lazy_union {
{
return !operator==(rhs);
}
void find(void)
void find()
{
if (i1 == i1_end)
{
Expand All @@ -370,7 +370,7 @@ struct lazy_union {
++i2;
}
}
void next(void)
void next()
{
if (i1 == i1_end)
{
Expand Down Expand Up @@ -428,11 +428,11 @@ struct lazy_union {
s1(s1),
s2(s2)
{ }
const_iterator begin(void) const
const_iterator begin() const
{
return const_iterator(s1, s2);
}
const_iterator end(void) const
const_iterator end() const
{
return const_iterator(s1.end(), s2.end());
}
Expand Down
12 changes: 8 additions & 4 deletions include/reflex/unicode.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,20 @@ namespace Unicode {
class Tables : public Posix::Tables {
public:
Tables();
typedef std::map<int,const int*> Compose;
Compose compose;
private:
void block_scripts(void);
void language_scripts(void);
void letter_scripts(void);
void block_scripts();
void language_scripts();
void letter_scripts();
void composer();
};

const int * range(const char *);
int compose(int, int);

} // namespace Unicode

} // namespace reflex;
} // namespace reflex

#endif
2 changes: 1 addition & 1 deletion lib/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
noinst_LIBRARIES = libreflex.a
libreflex_a_CPPFLAGS = -I$(top_srcdir)/include $(SIMD_FLAGS) -DWITH_NO_INDENT -DWITH_NO_CODEGEN
libreflex_a_SOURCES = $(top_srcdir)/include/reflex/abslexer.h $(top_srcdir)/include/reflex/absmatcher.h $(top_srcdir)/include/reflex/bits.h $(top_srcdir)/include/reflex/boostmatcher.h $(top_srcdir)/include/reflex/convert.h $(top_srcdir)/include/reflex/debug.h $(top_srcdir)/include/reflex/error.h $(top_srcdir)/include/reflex/flexlexer.h $(top_srcdir)/include/reflex/input.h $(top_srcdir)/include/reflex/matcher.h $(top_srcdir)/include/reflex/pattern.h $(top_srcdir)/include/reflex/posix.h $(top_srcdir)/include/reflex/ranges.h $(top_srcdir)/include/reflex/setop.h $(top_srcdir)/include/reflex/simd.h $(top_srcdir)/include/reflex/stdmatcher.h $(top_srcdir)/include/reflex/timer.h $(top_srcdir)/include/reflex/traits.h $(top_srcdir)/include/reflex/unicode.h $(top_srcdir)/include/reflex/utf8.h convert.cpp debug.cpp error.cpp input.cpp matcher.cpp matcher_avx2.cpp matcher_avx512bw.cpp pattern.cpp posix.cpp simd_avx2.cpp simd_avx512bw.cpp unicode.cpp utf8.cpp block_scripts.cpp language_scripts.cpp letter_scripts.cpp
libreflex_a_SOURCES = $(top_srcdir)/include/reflex/abslexer.h $(top_srcdir)/include/reflex/absmatcher.h $(top_srcdir)/include/reflex/bits.h $(top_srcdir)/include/reflex/boostmatcher.h $(top_srcdir)/include/reflex/convert.h $(top_srcdir)/include/reflex/debug.h $(top_srcdir)/include/reflex/error.h $(top_srcdir)/include/reflex/flexlexer.h $(top_srcdir)/include/reflex/input.h $(top_srcdir)/include/reflex/matcher.h $(top_srcdir)/include/reflex/pattern.h $(top_srcdir)/include/reflex/posix.h $(top_srcdir)/include/reflex/ranges.h $(top_srcdir)/include/reflex/setop.h $(top_srcdir)/include/reflex/simd.h $(top_srcdir)/include/reflex/stdmatcher.h $(top_srcdir)/include/reflex/timer.h $(top_srcdir)/include/reflex/traits.h $(top_srcdir)/include/reflex/unicode.h $(top_srcdir)/include/reflex/utf8.h convert.cpp debug.cpp error.cpp input.cpp matcher.cpp matcher_avx2.cpp matcher_avx512bw.cpp pattern.cpp posix.cpp simd_avx2.cpp simd_avx512bw.cpp unicode.cpp utf8.cpp block_scripts.cpp language_scripts.cpp letter_scripts.cpp composer.cpp

# separately compile matcher_avx2.cpp and matcher_avx512bw (with the same content as matcher.cpp) with AVX optimizations enabled
libreflex_a-matcher_avx2.$(OBJEXT) : CXXFLAGS += $(SIMD_AVX2_FLAGS)
Expand Down

0 comments on commit 383f4f5

Please sign in to comment.