Skip to content

Commit 8a42226

Browse files
committed
released 1.0
- refactored autotools usage - updated manual page - changed default accuracy to 4 from 5 - loads a .ugrep-indexer configuration file from the working or home directory - outputs current indexing settings/options - improved final indexing stats reporting - option --check when used with --quiet is now quiet
1 parent d988560 commit 8a42226

20 files changed

+3328
-1329
lines changed

Makefile.in

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_brotlilib.m4 \
9898
$(top_srcdir)/m4/ax_check_zlib.m4 \
9999
$(top_srcdir)/m4/ax_check_zstdlib.m4 \
100100
$(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \
101-
$(top_srcdir)/m4/ax_cxx_compile_stdcxx_11.m4 \
102-
$(top_srcdir)/configure.ac
101+
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/configure.ac
103102
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
104103
$(ACLOCAL_M4)
105104
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
@@ -233,9 +232,9 @@ am__relativize = \
233232
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
234233
done; \
235234
reldir="$$dir2"
236-
DIST_ARCHIVES = $(distdir).tar.gz
237235
GZIP_ENV = --best
238-
DIST_TARGETS = dist-gzip
236+
DIST_ARCHIVES = $(distdir).tar.xz
237+
DIST_TARGETS = dist-xz
239238
# Exists only to be overridden by the user if desired.
240239
AM_DISTCHECK_DVI_TARGET = dvi
241240
distuninstallcheck_listfiles = find . -type f -print
@@ -253,6 +252,7 @@ AWK = @AWK@
253252
CC = @CC@
254253
CCDEPMODE = @CCDEPMODE@
255254
CFLAGS = @CFLAGS@
255+
CPP = @CPP@
256256
CPPFLAGS = @CPPFLAGS@
257257
CSCOPE = @CSCOPE@
258258
CTAGS = @CTAGS@
@@ -265,9 +265,11 @@ DEPDIR = @DEPDIR@
265265
ECHO_C = @ECHO_C@
266266
ECHO_N = @ECHO_N@
267267
ECHO_T = @ECHO_T@
268+
EGREP = @EGREP@
268269
ETAGS = @ETAGS@
269270
EXEEXT = @EXEEXT@
270271
EXTRA_CFLAGS = @EXTRA_CFLAGS@
272+
GREP = @GREP@
271273
HAVE_CXX11 = @HAVE_CXX11@
272274
INSTALL = @INSTALL@
273275
INSTALL_DATA = @INSTALL_DATA@
@@ -291,9 +293,12 @@ PACKAGE_URL = @PACKAGE_URL@
291293
PACKAGE_VERSION = @PACKAGE_VERSION@
292294
PATH_SEPARATOR = @PATH_SEPARATOR@
293295
PLATFORM = @PLATFORM@
296+
PTHREAD_CC = @PTHREAD_CC@
294297
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
298+
PTHREAD_CXX = @PTHREAD_CXX@
295299
PTHREAD_LIBS = @PTHREAD_LIBS@
296300
RANLIB = @RANLIB@
301+
SED = @SED@
297302
SET_MAKE = @SET_MAKE@
298303
SHELL = @SHELL@
299304
STRIP = @STRIP@
@@ -310,6 +315,7 @@ am__leading_dot = @am__leading_dot@
310315
am__quote = @am__quote@
311316
am__tar = @am__tar@
312317
am__untar = @am__untar@
318+
ax_pthread_config = @ax_pthread_config@
313319
bindir = @bindir@
314320
build = @build@
315321
build_alias = @build_alias@
@@ -631,7 +637,6 @@ dist-bzip2: distdir
631637
dist-lzip: distdir
632638
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
633639
$(am__post_remove_distdir)
634-
635640
dist-xz: distdir
636641
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
637642
$(am__post_remove_distdir)

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ mounting again to clear FS cache to record the effect of indexing:
6969
src/ugrep.cpp
7070

7171
Searched 1317 files in 28 directories in 0.0487 seconds with 8 threads: 1 matching (0.07593%)
72-
Skipped 1316 of 1317 files with indexes not matching any search patterns
72+
Skipped 1316 of 1317 files with non-matching indexes
7373

7474
There is always some variance in the elapsed time with 0.0487 seconds the best
7575
time of four search runs that produced a search time range of 0.0487 (21x speed
@@ -107,7 +107,7 @@ Indexed search is still a lot faster by 12x than non-indexed for this example,
107107
with 16 files actually searched (15 false positives):
108108

109109
Searched 1317 files in 28 directories in 0.0722 seconds with 8 threads: 1 matching (0.07593%)
110-
Skipped 1301 of 1317 files with indexes not matching any search patterns
110+
Skipped 1301 of 1317 files with non-matching indexes
111111

112112
Regex patterns that are more complex than this example may have a higher false
113113
positive rate naturally, which is the rate of files that are considered
@@ -149,8 +149,8 @@ slightly longer search times:
149149
| `-8` | 0 | unch |
150150
| `-9` | 0 | unch |
151151

152-
Accucacy `-5` is the default, which tends to work very well to search with
153-
regex patterns of modest complexity.
152+
Accuracy `-4` is the default (from `-5` previously in older releases), which
153+
tends to work very well to search with regex patterns of modest complexity.
154154

155155
One word of caution. There is always a tiny bit of overhead to check the
156156
indexes. This means that if all files are already cached in RAM, because files
@@ -255,7 +255,7 @@ files.
255255

256256
The size of the index files depends on the specified accuracy, with `-0` the
257257
lowest (small index files) and `-9` the highest (large index files). The
258-
default accuracy is `-5`. See the next Q for details on the impact of accuracy
258+
default accuracy is `-4`. See the next Q for details on the impact of accuracy
259259
on indexing size versus search speed.
260260

261261
Indexing *never follows symbolic links to directories*, because symbolically

aclocal.m4

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -20,44 +20,6 @@ You have another version of autoconf. It may work, but is not guaranteed to.
2020
If you have problems, you may need to regenerate the build system entirely.
2121
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
2222

23-
# ===========================================================================
24-
# https://www.gnu.org/software/autoconf-archive/ax_require_defined.html
25-
# ===========================================================================
26-
#
27-
# SYNOPSIS
28-
#
29-
# AX_REQUIRE_DEFINED(MACRO)
30-
#
31-
# DESCRIPTION
32-
#
33-
# AX_REQUIRE_DEFINED is a simple helper for making sure other macros have
34-
# been defined and thus are available for use. This avoids random issues
35-
# where a macro isn't expanded. Instead the configure script emits a
36-
# non-fatal:
37-
#
38-
# ./configure: line 1673: AX_CFLAGS_WARN_ALL: command not found
39-
#
40-
# It's like AC_REQUIRE except it doesn't expand the required macro.
41-
#
42-
# Here's an example:
43-
#
44-
# AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
45-
#
46-
# LICENSE
47-
#
48-
# Copyright (c) 2014 Mike Frysinger <vapier@gentoo.org>
49-
#
50-
# Copying and distribution of this file, with or without modification, are
51-
# permitted in any medium without royalty provided the copyright notice
52-
# and this notice are preserved. This file is offered as-is, without any
53-
# warranty.
54-
55-
#serial 2
56-
57-
AC_DEFUN([AX_REQUIRE_DEFINED], [dnl
58-
m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])])
59-
])dnl AX_REQUIRE_DEFINED
60-
6123
# Copyright (C) 2002-2021 Free Software Foundation, Inc.
6224
#
6325
# This file is free software; the Free Software Foundation
@@ -1254,4 +1216,4 @@ m4_include([m4/ax_check_lzmalib.m4])
12541216
m4_include([m4/ax_check_zlib.m4])
12551217
m4_include([m4/ax_check_zstdlib.m4])
12561218
m4_include([m4/ax_cxx_compile_stdcxx.m4])
1257-
m4_include([m4/ax_cxx_compile_stdcxx_11.m4])
1219+
m4_include([m4/ax_pthread.m4])

bin/win32/ugrep-indexer.exe

5 KB
Binary file not shown.

bin/win64/ugrep-indexer.exe

3.5 KB
Binary file not shown.

config.h.in

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@
3434
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
3535
#undef HAVE_NDIR_H
3636

37+
/* Define if you have POSIX threads libraries and header files. */
38+
#undef HAVE_PTHREAD
39+
40+
/* Have PTHREAD_PRIO_INHERIT. */
41+
#undef HAVE_PTHREAD_PRIO_INHERIT
42+
3743
/* Define to 1 if you have the <stdint.h> header file. */
3844
#undef HAVE_STDINT_H
3945

@@ -111,6 +117,10 @@
111117
/* Define to the version of this package. */
112118
#undef PACKAGE_VERSION
113119

120+
/* Define to necessary symbol if this constant uses a non-standard name on
121+
your system. */
122+
#undef PTHREAD_CREATE_JOINABLE
123+
114124
/* Define to 1 if all of the C90 standard headers exist (not just the ones
115125
required in a freestanding environment). This macro is provided for
116126
backward compatibility; new code need not use it. */

0 commit comments

Comments
 (0)