Hello community,
here is the log from the commit of package the_silver_searcher for openSUSE:Factory checked in at 2015-09-24 06:14:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/the_silver_searcher (Old)
and /work/SRC/openSUSE:Factory/.the_silver_searcher.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "the_silver_searcher"
Changes:
--------
--- /work/SRC/openSUSE:Factory/the_silver_searcher/the_silver_searcher.changes 2015-05-18 22:21:40.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.the_silver_searcher.new/the_silver_searcher.changes 2015-09-24 06:14:42.000000000 +0200
@@ -1,0 +2,8 @@
+Sat Sep 19 12:27:24 UTC 2015 - fcrozat@suse.com
+
+- Update to version 0.31.0:
+ * Improve bash completion.
+ * Add support for Elixir, Mako, Racket and Standard ML file types.
+ * various bugfixes.
+
+-------------------------------------------------------------------
Old:
----
the_silver_searcher-0.30.0.tar.gz
the_silver_searcher-0.30.0.tar.gz.asc
New:
----
the_silver_searcher-0.31.0.tar.gz
the_silver_searcher-0.31.0.tar.gz.asc
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ the_silver_searcher.spec ++++++
--- /var/tmp/diff_new_pack.bkem7e/_old 2015-09-24 06:14:43.000000000 +0200
+++ /var/tmp/diff_new_pack.bkem7e/_new 2015-09-24 06:14:43.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package the_silver_searcher
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: the_silver_searcher
-Version: 0.30.0
+Version: 0.31.0
Release: 0
Summary: A code-searching tool similar to ack, but faster
License: Apache-2.0
++++++ the_silver_searcher-0.30.0.tar.gz -> the_silver_searcher-0.31.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/the_silver_searcher-0.30.0/README.md new/the_silver_searcher-0.31.0/README.md
--- old/the_silver_searcher-0.30.0/README.md 2015-04-22 19:41:53.000000000 +0200
+++ new/the_silver_searcher-0.31.0/README.md 2015-09-01 23:07:51.000000000 +0200
@@ -4,7 +4,7 @@
[![Build Status](https://travis-ci.org/ggreer/the_silver_searcher.svg?branch=master)](https://travis-ci.org/ggreer/the_silver_searcher)
-[![Floobits Status](https://floobits.com/ggreer/ag.png)](https://floobits.com/ggreer/ag/redirect)
+[![Floobits Status](https://floobits.com/ggreer/ag.svg)](https://floobits.com/ggreer/ag/redirect)
[![#ag on Freenode](http://img.shields.io/Freenode/%23ag.png)](https://webchat.freenode.net/?channels=ag)
@@ -122,6 +122,8 @@
### Building a release tarball
+GPG-signed releases are available [here](http://geoff.greer.fm/ag).
+
Building release tarballs requires the same dependencies, except for automake and pkg-config. Once you've installed the dependencies, just run:
./configure
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/the_silver_searcher-0.30.0/aclocal.m4 new/the_silver_searcher-0.31.0/aclocal.m4
--- old/the_silver_searcher-0.30.0/aclocal.m4 2015-04-28 13:30:12.000000000 +0200
+++ new/the_silver_searcher-0.31.0/aclocal.m4 2015-09-07 07:29:00.000000000 +0200
@@ -20,221 +20,6 @@
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
-# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
-# serial 1 (pkg-config-0.24)
-#
-# Copyright © 2004 Scott James Remnant .
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# PKG_PROG_PKG_CONFIG([MIN-VERSION])
-# ----------------------------------
-AC_DEFUN([PKG_PROG_PKG_CONFIG],
-[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
-m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
-m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
-AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
-AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
-AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
-
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
- AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
-fi
-if test -n "$PKG_CONFIG"; then
- _pkg_min_version=m4_default([$1], [0.9.0])
- AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
- if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- PKG_CONFIG=""
- fi
-fi[]dnl
-])# PKG_PROG_PKG_CONFIG
-
-# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-#
-# Check to see whether a particular set of modules exists. Similar
-# to PKG_CHECK_MODULES(), but does not set variables or print errors.
-#
-# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-# only at the first occurence in configure.ac, so if the first place
-# it's called might be skipped (such as if it is within an "if", you
-# have to call PKG_CHECK_EXISTS manually
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_EXISTS],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-if test -n "$PKG_CONFIG" && \
- AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
- m4_default([$2], [:])
-m4_ifvaln([$3], [else
- $3])dnl
-fi])
-
-# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
-# ---------------------------------------------
-m4_define([_PKG_CONFIG],
-[if test -n "$$1"; then
- pkg_cv_[]$1="$$1"
- elif test -n "$PKG_CONFIG"; then
- PKG_CHECK_EXISTS([$3],
- [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
- test "x$?" != "x0" && pkg_failed=yes ],
- [pkg_failed=yes])
- else
- pkg_failed=untried
-fi[]dnl
-])# _PKG_CONFIG
-
-# _PKG_SHORT_ERRORS_SUPPORTED
-# -----------------------------
-AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
- _pkg_short_errors_supported=yes
-else
- _pkg_short_errors_supported=no
-fi[]dnl
-])# _PKG_SHORT_ERRORS_SUPPORTED
-
-
-# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
-# [ACTION-IF-NOT-FOUND])
-#
-#
-# Note that if there is a possibility the first call to
-# PKG_CHECK_MODULES might not happen, you should be sure to include an
-# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
-#
-#
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_MODULES],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
-AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
-
-pkg_failed=no
-AC_MSG_CHECKING([for $1])
-
-_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
-_PKG_CONFIG([$1][_LIBS], [libs], [$2])
-
-m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
-and $1[]_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.])
-
-if test $pkg_failed = yes; then
- AC_MSG_RESULT([no])
- _PKG_SHORT_ERRORS_SUPPORTED
- if test $_pkg_short_errors_supported = yes; then
- $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
- else
- $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
- fi
- # Put the nasty error message in config.log where it belongs
- echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
-
- m4_default([$4], [AC_MSG_ERROR(
-[Package requirements ($2) were not met:
-
-$$1_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-_PKG_TEXT])[]dnl
- ])
-elif test $pkg_failed = untried; then
- AC_MSG_RESULT([no])
- m4_default([$4], [AC_MSG_FAILURE(
-[The pkg-config script could not be found or is too old. Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-_PKG_TEXT
-
-To get pkg-config, see http://pkg-config.freedesktop.org/.])[]dnl
- ])
-else
- $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
- $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
- AC_MSG_RESULT([yes])
- $3
-fi[]dnl
-])# PKG_CHECK_MODULES
-
-
-# PKG_INSTALLDIR(DIRECTORY)
-# -------------------------
-# Substitutes the variable pkgconfigdir as the location where a module
-# should install pkg-config .pc files. By default the directory is
-# $libdir/pkgconfig, but the default can be changed by passing
-# DIRECTORY. The user can override through the --with-pkgconfigdir
-# parameter.
-AC_DEFUN([PKG_INSTALLDIR],
-[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
-m4_pushdef([pkg_description],
- [pkg-config installation directory @<:@]pkg_default[@:>@])
-AC_ARG_WITH([pkgconfigdir],
- [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
- [with_pkgconfigdir=]pkg_default)
-AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
-m4_popdef([pkg_default])
-m4_popdef([pkg_description])
-]) dnl PKG_INSTALLDIR
-
-
-# PKG_NOARCH_INSTALLDIR(DIRECTORY)
-# -------------------------
-# Substitutes the variable noarch_pkgconfigdir as the location where a
-# module should install arch-independent pkg-config .pc files. By
-# default the directory is $datadir/pkgconfig, but the default can be
-# changed by passing DIRECTORY. The user can override through the
-# --with-noarch-pkgconfigdir parameter.
-AC_DEFUN([PKG_NOARCH_INSTALLDIR],
-[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
-m4_pushdef([pkg_description],
- [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
-AC_ARG_WITH([noarch-pkgconfigdir],
- [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
- [with_noarch_pkgconfigdir=]pkg_default)
-AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
-m4_popdef([pkg_default])
-m4_popdef([pkg_description])
-]) dnl PKG_NOARCH_INSTALLDIR
-
-
-# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
-# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-# -------------------------------------------
-# Retrieves the value of the pkg-config variable for the given module.
-AC_DEFUN([PKG_CHECK_VAR],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
-
-_PKG_CONFIG([$1], [variable="][$3]["], [$2])
-AS_VAR_COPY([$1], [pkg_cv_][$1])
-
-AS_VAR_IF([$1], [""], [$5], [$4])dnl
-])# PKG_CHECK_VAR
-
# Copyright (C) 2002-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
@@ -1402,3 +1187,218 @@
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
+# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
+# serial 1 (pkg-config-0.24)
+#
+# Copyright © 2004 Scott James Remnant .
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
+m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
+AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
+AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=m4_default([$1], [0.9.0])
+ AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ PKG_CONFIG=""
+ fi
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
+
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check to see whether a particular set of modules exists. Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+# only at the first occurence in configure.ac, so if the first place
+# it's called might be skipped (such as if it is within an "if", you
+# have to call PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+ m4_default([$2], [:])
+m4_ifvaln([$3], [else
+ $3])dnl
+fi])
+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$$1"; then
+ pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+ PKG_CHECK_EXISTS([$3],
+ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes ],
+ [pkg_failed=yes])
+ else
+ pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
+
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
+
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+ AC_MSG_RESULT([no])
+ _PKG_SHORT_ERRORS_SUPPORTED
+ if test $_pkg_short_errors_supported = yes; then
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
+ else
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+ m4_default([$4], [AC_MSG_ERROR(
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT])[]dnl
+ ])
+elif test $pkg_failed = untried; then
+ AC_MSG_RESULT([no])
+ m4_default([$4], [AC_MSG_FAILURE(
+[The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see http://pkg-config.freedesktop.org/.])[]dnl
+ ])
+else
+ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+ AC_MSG_RESULT([yes])
+ $3
+fi[]dnl
+])# PKG_CHECK_MODULES
+
+
+# PKG_INSTALLDIR(DIRECTORY)
+# -------------------------
+# Substitutes the variable pkgconfigdir as the location where a module
+# should install pkg-config .pc files. By default the directory is
+# $libdir/pkgconfig, but the default can be changed by passing
+# DIRECTORY. The user can override through the --with-pkgconfigdir
+# parameter.
+AC_DEFUN([PKG_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+ [pkg-config installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([pkgconfigdir],
+ [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
+ [with_pkgconfigdir=]pkg_default)
+AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+]) dnl PKG_INSTALLDIR
+
+
+# PKG_NOARCH_INSTALLDIR(DIRECTORY)
+# -------------------------
+# Substitutes the variable noarch_pkgconfigdir as the location where a
+# module should install arch-independent pkg-config .pc files. By
+# default the directory is $datadir/pkgconfig, but the default can be
+# changed by passing DIRECTORY. The user can override through the
+# --with-noarch-pkgconfigdir parameter.
+AC_DEFUN([PKG_NOARCH_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+ [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([noarch-pkgconfigdir],
+ [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
+ [with_noarch_pkgconfigdir=]pkg_default)
+AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+]) dnl PKG_NOARCH_INSTALLDIR
+
+
+# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
+# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# -------------------------------------------
+# Retrieves the value of the pkg-config variable for the given module.
+AC_DEFUN([PKG_CHECK_VAR],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
+
+_PKG_CONFIG([$1], [variable="][$3]["], [$2])
+AS_VAR_COPY([$1], [pkg_cv_][$1])
+
+AS_VAR_IF([$1], [""], [$5], [$4])dnl
+])# PKG_CHECK_VAR
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/the_silver_searcher-0.30.0/ag.bashcomp.sh new/the_silver_searcher-0.31.0/ag.bashcomp.sh
--- old/the_silver_searcher-0.30.0/ag.bashcomp.sh 2015-04-16 03:54:01.000000000 +0200
+++ new/the_silver_searcher-0.31.0/ag.bashcomp.sh 2015-08-28 22:32:42.000000000 +0200
@@ -1,4 +1,3 @@
-have ag &&
_ag() {
local lngopt shtopt split=false
local cur prev
@@ -11,31 +10,32 @@
lngopt='
--ackmate
+ --ackmate-dir-filter
+ --affinity
+ --after
--all-text
--all-types
- --after
--before
--break
- --nobreak
--case-sensitive
+ --color
--color-line-number
--color-match
--color-path
- --color
- --nocolor
+ --color-win-ansi
--column
--context
+ --count
--debug
--depth
--file-search-regex
+ --filename
--files-with-matches
--files-without-matches
--fixed-strings
--follow
--group
- --nogroup
--heading
- --noheading
--help
--hidden
--ignore
@@ -45,15 +45,32 @@
--line-numbers
--list-file-types
--literal
+ --match
--max-count
--no-numbers
- --pager
+ --no-recurse
+ --noaffinity
+ --nobreak
+ --nocolor
+ --nofilename
+ --nofollow
+ --nogroup
+ --noheading
+ --nonumbers
--nopager
+ --norecurse
+ --null
+ --numbers
+ --one-device
+ --only-matching
+ --pager
--parallel
+ --passthrough
+ --passthru
--path-to-agignore
--print-long-lines
+ --print0
--recurse
- --no-recurse
--search-binary
--search-files
--search-zip
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/the_silver_searcher-0.30.0/configure new/the_silver_searcher-0.31.0/configure
--- old/the_silver_searcher-0.30.0/configure 2015-04-28 13:30:16.000000000 +0200
+++ new/the_silver_searcher-0.31.0/configure 2015-09-07 07:29:01.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for the_silver_searcher 0.30.0.
+# Generated by GNU Autoconf 2.69 for the_silver_searcher 0.31.0.
#
# Report bugs to https://github.com/ggreer/the_silver_searcher/issues.
#
@@ -581,8 +581,8 @@
# Identity of this package.
PACKAGE_NAME='the_silver_searcher'
PACKAGE_TARNAME='the_silver_searcher'
-PACKAGE_VERSION='0.30.0'
-PACKAGE_STRING='the_silver_searcher 0.30.0'
+PACKAGE_VERSION='0.31.0'
+PACKAGE_STRING='the_silver_searcher 0.31.0'
PACKAGE_BUGREPORT='https://github.com/ggreer/the_silver_searcher/issues'
PACKAGE_URL='https://github.com/ggreer/the_silver_searcher'
@@ -1297,7 +1297,7 @@
# 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 the_silver_searcher 0.30.0 to adapt to many kinds of systems.
+\`configure' configures the_silver_searcher 0.31.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1368,7 +1368,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of the_silver_searcher 0.30.0:";;
+ short | recursive ) echo "Configuration of the_silver_searcher 0.31.0:";;
esac
cat <<\_ACEOF
@@ -1471,7 +1471,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-the_silver_searcher configure 0.30.0
+the_silver_searcher configure 0.31.0
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1943,7 +1943,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by the_silver_searcher $as_me 0.30.0, which was
+It was created by the_silver_searcher $as_me 0.31.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2807,7 +2807,7 @@
# Define the identity of the package.
PACKAGE='the_silver_searcher'
- VERSION='0.30.0'
+ VERSION='0.31.0'
# Some tools Automake needs.
@@ -6107,7 +6107,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by the_silver_searcher $as_me 0.30.0, which was
+This file was extended by the_silver_searcher $as_me 0.31.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -6174,7 +6174,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-the_silver_searcher config.status 0.30.0
+the_silver_searcher config.status 0.31.0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/the_silver_searcher-0.30.0/configure.ac new/the_silver_searcher-0.31.0/configure.ac
--- old/the_silver_searcher-0.30.0/configure.ac 2015-04-28 13:28:19.000000000 +0200
+++ new/the_silver_searcher-0.31.0/configure.ac 2015-09-07 07:28:47.000000000 +0200
@@ -1,6 +1,6 @@
AC_INIT(
[the_silver_searcher],
- [0.30.0],
+ [0.31.0],
[https://github.com/ggreer/the_silver_searcher/issues],
[the_silver_searcher],
[https://github.com/ggreer/the_silver_searcher])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/the_silver_searcher-0.30.0/doc/ag.1 new/the_silver_searcher-0.31.0/doc/ag.1
--- old/the_silver_searcher-0.30.0/doc/ag.1 2015-04-16 03:54:01.000000000 +0200
+++ new/the_silver_searcher-0.31.0/doc/ag.1 2015-08-28 22:32:44.000000000 +0200
@@ -100,7 +100,7 @@
.
.TP
\fB\-\-hidden\fR
-Search hidden files\. This option obeys ignore files\.
+Search hidden files\. This option obeys ignored files\.
.
.TP
\fB\-\-ignore PATTERN\fR
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/the_silver_searcher-0.30.0/src/decompress.c new/the_silver_searcher-0.31.0/src/decompress.c
--- old/the_silver_searcher-0.30.0/src/decompress.c 2015-04-20 22:45:13.000000000 +0200
+++ new/the_silver_searcher-0.31.0/src/decompress.c 2015-08-28 22:32:44.000000000 +0200
@@ -48,7 +48,8 @@
}
stream.avail_in = buf_len;
- stream.next_in = buf;
+ /* Explicitly cast away the const-ness of buf */
+ stream.next_in = (Bytef *)buf;
pagesize = getpagesize();
result_size = ((buf_len + pagesize - 1) & ~(pagesize - 1));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/the_silver_searcher-0.30.0/src/ignore.c new/the_silver_searcher-0.31.0/src/ignore.c
--- old/the_silver_searcher-0.30.0/src/ignore.c 2015-04-16 03:54:01.000000000 +0200
+++ new/the_silver_searcher-0.31.0/src/ignore.c 2015-08-28 22:32:44.000000000 +0200
@@ -381,7 +381,7 @@
}
log_debug("path_start %s filename %s", path_start, filename);
- const char *extension = strrchr(filename, '.');
+ const char *extension = strchr(filename, '.');
if (extension) {
if (extension[1]) {
// The dot is not the last character, extension starts at the next one
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/the_silver_searcher-0.30.0/src/lang.c new/the_silver_searcher-0.31.0/src/lang.c
--- old/the_silver_searcher-0.30.0/src/lang.c 2015-04-20 01:02:19.000000000 +0200
+++ new/the_silver_searcher-0.31.0/src/lang.c 2015-08-28 22:32:44.000000000 +0200
@@ -12,13 +12,14 @@
{ "cc", { "c", "h", "xs" } },
{ "cfmx", { "cfc", "cfm", "cfml" } },
{ "clojure", { "clj", "cljs", "cljc", "cljx" } },
- { "coffee", { "coffee" } },
+ { "coffee", { "coffee", "cjsx" } },
{ "cpp", { "cpp", "cc", "C", "cxx", "m", "hpp", "hh", "h", "H", "hxx" } },
{ "csharp", { "cs" } },
{ "css", { "css" } },
{ "delphi", { "pas", "int", "dfm", "nfm", "dof", "dpk", "dproj", "groupproj", "bdsgroup", "bdsproj" } },
{ "ebuild", { "ebuild", "eclass" } },
{ "elisp", { "el" } },
+ { "elixir", { "ex", "exs" } },
{ "erlang", { "erl", "hrl" } },
{ "fortran", { "f", "f77", "f90", "f95", "f03", "for", "ftn", "fpp" } },
{ "fsharp", { "fs", "fsi", "fsx" } },
@@ -41,6 +42,7 @@
{ "lua", { "lua" } },
{ "m4", { "m4" } },
{ "make", { "Makefiles", "mk", "mak" } },
+ { "mako", { "mako" } },
{ "markdown", { "markdown", "mdown", "mdwn", "mkdn", "mkd", "md" } },
{ "mason", { "mas", "mhtml", "mpl", "mtxt" } },
{ "matlab", { "m" } },
@@ -58,6 +60,7 @@
{ "plone", { "pt", "cpt", "metadata", "cpy", "py" } },
{ "puppet", { "pp" } },
{ "python", { "py" } },
+ { "racket", { "rkt", "ss", "scm" } },
{ "rake", { "Rakefiles" } },
{ "rs", { "rs" } },
{ "r", { "R", "Rmd", "Rnw", "Rtex", "Rrst" } },
@@ -69,6 +72,7 @@
{ "scheme", { "scm", "ss" } },
{ "shell", { "sh", "bash", "csh", "tcsh", "ksh", "zsh" } },
{ "smalltalk", { "st" } },
+ { "sml", { "sml", "fun", "mlb", "sig" } },
{ "sql", { "sql", "ctl" } },
{ "stylus", { "styl" } },
{ "swift", { "swift" } },
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/the_silver_searcher-0.30.0/src/main.c new/the_silver_searcher-0.31.0/src/main.c
--- old/the_silver_searcher-0.30.0/src/main.c 2015-04-16 03:54:01.000000000 +0200
+++ new/the_silver_searcher-0.31.0/src/main.c 2015-09-06 06:29:27.000000000 +0200
@@ -31,7 +31,6 @@
int i;
int pcre_opts = PCRE_MULTILINE;
int study_opts = 0;
- double time_diff;
worker_t *workers = NULL;
int workers_len;
int num_cores;
@@ -40,9 +39,16 @@
work_queue = NULL;
work_queue_tail = NULL;
- memset(&stats, 0, sizeof(stats));
root_ignores = init_ignore(NULL, "", 0);
out_fd = stdout;
+
+ parse_options(argc, argv, &base_paths, &paths);
+ log_debug("PCRE Version: %s", pcre_version());
+ if (opts.stats) {
+ memset(&stats, 0, sizeof(stats));
+ gettimeofday(&(stats.time_start), NULL);
+ }
+
#ifdef USE_PCRE_JIT
int has_jit = 0;
pcre_config(PCRE_CONFIG_JIT, &has_jit);
@@ -51,11 +57,6 @@
}
#endif
- gettimeofday(&(stats.time_start), NULL);
-
- parse_options(argc, argv, &base_paths, &paths);
- log_debug("PCRE Version: %s", pcre_version());
-
#ifdef _WIN32
{
SYSTEM_INFO si;
@@ -86,7 +87,7 @@
if (pthread_mutex_init(&print_mtx, NULL)) {
die("pthread_mutex_init failed!");
}
- if (pthread_mutex_init(&stats_mtx, NULL)) {
+ if (opts.stats && pthread_mutex_init(&stats_mtx, NULL)) {
die("pthread_mutex_init failed!");
}
if (pthread_mutex_init(&work_queue_mtx, NULL)) {
@@ -134,7 +135,7 @@
workers[i].id = i;
int rv = pthread_create(&(workers[i].thread), NULL, &search_file_worker, &(workers[i].id));
if (rv != 0) {
- die("error in pthread_create(): %s", strerror(rv));
+ die("Error in pthread_create(): %s", strerror(rv));
}
#if defined(HAVE_PTHREAD_SETAFFINITY_NP) && defined(USE_CPU_SET)
if (opts.use_thread_affinity) {
@@ -142,10 +143,12 @@
CPU_ZERO(&cpu_set);
CPU_SET(i % num_cores, &cpu_set);
rv = pthread_setaffinity_np(workers[i].thread, sizeof(cpu_set), &cpu_set);
- if (rv != 0) {
- die("error in pthread_setaffinity_np(): %s", strerror(rv));
+ if (rv) {
+ log_err("Error in pthread_setaffinity_np(): %s", strerror(rv));
+ log_err("Performance may be affected. Use --noaffinity to suppress this message.");
+ } else {
+ log_debug("Thread %i set to CPU %i", i, i);
}
- log_debug("Thread %i set to CPU %i", i, i);
} else {
log_debug("Thread affinity disabled.");
}
@@ -182,11 +185,12 @@
if (opts.stats) {
gettimeofday(&(stats.time_end), NULL);
- time_diff = ((long)stats.time_end.tv_sec * 1000000 + stats.time_end.tv_usec) -
- ((long)stats.time_start.tv_sec * 1000000 + stats.time_start.tv_usec);
+ double time_diff = ((long)stats.time_end.tv_sec * 1000000 + stats.time_end.tv_usec) -
+ ((long)stats.time_start.tv_sec * 1000000 + stats.time_start.tv_usec);
time_diff /= 1000000;
-
- printf("%ld matches\n%ld files searched\n%ld bytes searched\n%f seconds\n", stats.total_matches, stats.total_files, stats.total_bytes, time_diff);
+ printf("%ld matches\n%ld files contained matches\n%ld files searched\n%ld bytes searched\n%f seconds\n",
+ stats.total_matches, stats.total_file_matches, stats.total_files, stats.total_bytes, time_diff);
+ pthread_mutex_destroy(&stats_mtx);
}
if (opts.pager) {
@@ -195,7 +199,6 @@
cleanup_options();
pthread_cond_destroy(&files_ready);
pthread_mutex_destroy(&work_queue_mtx);
- pthread_mutex_destroy(&stats_mtx);
pthread_mutex_destroy(&print_mtx);
cleanup_ignore(root_ignores);
free(workers);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/the_silver_searcher-0.30.0/src/options.c new/the_silver_searcher-0.31.0/src/options.c
--- old/the_silver_searcher-0.30.0/src/options.c 2015-04-16 03:54:01.000000000 +0200
+++ new/the_silver_searcher-0.31.0/src/options.c 2015-09-06 08:20:35.000000000 +0200
@@ -141,6 +141,7 @@
opts.color_win_ansi = FALSE;
opts.max_matches_per_file = 0;
opts.max_search_depth = DEFAULT_MAX_SEARCH_DEPTH;
+ opts.multiline = TRUE;
opts.path_sep = '\n';
opts.print_break = TRUE;
opts.print_path = PATH_PRINT_DEFAULT;
@@ -251,6 +252,7 @@
{ "literal", no_argument, NULL, 'Q' },
{ "match", no_argument, &useless, 0 },
{ "max-count", required_argument, NULL, 'm' },
+ { "multiline", no_argument, &opts.multiline, TRUE },
/* "no-" is deprecated. Remove these eventually. */
{ "no-numbers", no_argument, &opts.print_line_numbers, FALSE },
{ "no-recurse", no_argument, NULL, 'n' },
@@ -261,6 +263,7 @@
{ "nofollow", no_argument, &opts.follow_symlinks, 0 },
{ "nogroup", no_argument, &group, 0 },
{ "noheading", no_argument, &opts.print_path, PATH_PRINT_EACH_LINE },
+ { "nomultiline", no_argument, &opts.multiline, FALSE },
{ "nonumbers", no_argument, &opts.print_line_numbers, FALSE },
{ "nopager", no_argument, NULL, 0 },
{ "norecurse", no_argument, NULL, 'n' },
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/the_silver_searcher-0.30.0/src/options.h new/the_silver_searcher-0.31.0/src/options.h
--- old/the_silver_searcher-0.30.0/src/options.h 2015-04-16 03:54:01.000000000 +0200
+++ new/the_silver_searcher-0.31.0/src/options.h 2015-09-06 08:20:35.000000000 +0200
@@ -51,6 +51,7 @@
int literal_ends_wordchar;
size_t max_matches_per_file;
int max_search_depth;
+ int multiline;
int one_dev;
int only_matching;
char path_sep;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/the_silver_searcher-0.30.0/src/print.c new/the_silver_searcher-0.31.0/src/print.c
--- old/the_silver_searcher-0.30.0/src/print.c 2015-04-16 03:54:01.000000000 +0200
+++ new/the_silver_searcher-0.31.0/src/print.c 2015-09-02 00:45:01.000000000 +0200
@@ -18,6 +18,9 @@
const char *color_reset = "\033[0m\033[K";
void print_path(const char *path, const char sep) {
+ if (opts.print_path == PATH_PRINT_NOTHING && !opts.vimgrep) {
+ return;
+ }
path = normalize_path(path);
if (opts.ackmate) {
@@ -148,9 +151,14 @@
/* print headers for ackmate to parse */
print_line_number(line, ';');
for (; last_printed_match < cur_match; last_printed_match++) {
- fprintf(out_fd, "%lu %lu",
- (unsigned long)(matches[last_printed_match].start - prev_line_offset),
- (unsigned long)(matches[last_printed_match].end - matches[last_printed_match].start));
+ /* Don't print negative offsets. This isn't quite right, but not many people use --ackmate */
+ long start = (long)(matches[last_printed_match].start - prev_line_offset);
+ if (start < 0) {
+ start = 0;
+ }
+ fprintf(out_fd, "%li %li",
+ start,
+ (long)(matches[last_printed_match].end - matches[last_printed_match].start));
last_printed_match == cur_match - 1 ? fputc(':', out_fd) : fputc(',', out_fd);
}
print_line(buf, i, prev_line_offset);
@@ -259,9 +267,11 @@
void print_column_number(const match_t matches[], size_t last_printed_match,
size_t prev_line_offset, const char sep) {
- fprintf(out_fd, "%lu%c",
- (unsigned long)(matches[last_printed_match].start - prev_line_offset) + 1,
- sep);
+ size_t column = 0;
+ if (prev_line_offset <= matches[last_printed_match].start) {
+ column = (matches[last_printed_match].start - prev_line_offset) + 1;
+ }
+ fprintf(out_fd, "%lu%c", (unsigned long)column, sep);
}
void print_file_separator(void) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/the_silver_searcher-0.30.0/src/search.c new/the_silver_searcher-0.31.0/src/search.c
--- old/the_silver_searcher-0.30.0/src/search.c 2015-04-16 03:54:01.000000000 +0200
+++ new/the_silver_searcher-0.31.0/src/search.c 2015-09-07 07:25:31.000000000 +0200
@@ -72,11 +72,7 @@
}
}
- if (matches_len + matches_spare >= matches_size) {
- /* TODO: benchmark initial size of matches. 100 may be too small/big */
- matches_size = matches ? matches_size * 2 : 100;
- matches = ag_realloc(matches, matches_size * sizeof(match_t));
- }
+ realloc_matches(&matches, &matches_size, matches_len + matches_spare);
matches[matches_len].start = match_ptr - buf;
matches[matches_len].end = matches[matches_len].start + opts.query_len;
@@ -92,32 +88,66 @@
}
} else {
int offset_vector[3];
- while (buf_offset < buf_len &&
- (pcre_exec(opts.re, opts.re_extra, buf, buf_len, buf_offset, 0, offset_vector, 3)) >= 0) {
- log_debug("Regex match found. File %s, offset %i bytes.", dir_full_path, offset_vector[0]);
- buf_offset = offset_vector[1];
- if (offset_vector[0] == offset_vector[1]) {
- ++buf_offset;
- log_debug("Regex match is of length zero. Advancing offset one byte.");
- }
-
- /* TODO: copy-pasted from above. FIXME */
- if (matches_len + matches_spare >= matches_size) {
- matches_size = matches ? matches_size * 2 : 100;
- matches = ag_realloc(matches, matches_size * sizeof(match_t));
- }
+ if (opts.multiline) {
+ while (buf_offset < buf_len &&
+ (pcre_exec(opts.re, opts.re_extra, buf, buf_len, buf_offset, 0, offset_vector, 3)) >= 0) {
+ log_debug("Regex match found. File %s, offset %i bytes.", dir_full_path, offset_vector[0]);
+ buf_offset = offset_vector[1];
+ if (offset_vector[0] == offset_vector[1]) {
+ ++buf_offset;
+ log_debug("Regex match is of length zero. Advancing offset one byte.");
+ }
- matches[matches_len].start = offset_vector[0];
- matches[matches_len].end = offset_vector[1];
- matches_len++;
+ realloc_matches(&matches, &matches_size, matches_len + matches_spare);
- if (opts.max_matches_per_file > 0 && matches_len >= opts.max_matches_per_file) {
- log_err("Too many matches in %s. Skipping the rest of this file.", dir_full_path);
- break;
+ matches[matches_len].start = offset_vector[0];
+ matches[matches_len].end = offset_vector[1];
+ matches_len++;
+
+ if (opts.max_matches_per_file > 0 && matches_len >= opts.max_matches_per_file) {
+ log_err("Too many matches in %s. Skipping the rest of this file.", dir_full_path);
+ break;
+ }
+ }
+ } else {
+ while (buf_offset < buf_len) {
+ const char *line;
+ size_t line_len = buf_getline(&line, buf, buf_len, buf_offset);
+ if (!line) {
+ break;
+ }
+ size_t line_offset = 0;
+ while (line_offset < line_len) {
+ int rv = pcre_exec(opts.re, opts.re_extra, line, line_len, line_offset, 0, offset_vector, 3);
+ if (rv < 0) {
+ break;
+ }
+ size_t line_to_buf = buf_offset + line_offset;
+ log_debug("Regex match found. File %s, offset %i bytes.", dir_full_path, offset_vector[0]);
+ line_offset = offset_vector[1];
+ if (offset_vector[0] == offset_vector[1]) {
+ ++line_offset;
+ log_debug("Regex match is of length zero. Advancing offset one byte.");
+ }
+
+ realloc_matches(&matches, &matches_size, matches_len + matches_spare);
+
+ matches[matches_len].start = offset_vector[0] + line_to_buf;
+ matches[matches_len].end = offset_vector[1] + line_to_buf;
+ matches_len++;
+
+ if (opts.max_matches_per_file > 0 && matches_len >= opts.max_matches_per_file) {
+ log_err("Too many matches in %s. Skipping the rest of this file.", dir_full_path);
+ goto multiline_done;
+ }
+ }
+ buf_offset += line_len + 1;
}
}
}
+multiline_done:
+
if (opts.invert_match) {
matches_len = invert_matches(buf, buf_len, matches, matches_len);
}
@@ -127,6 +157,9 @@
stats.total_bytes += buf_len;
stats.total_files++;
stats.total_matches += matches_len;
+ if (matches_len > 0) {
+ stats.total_file_matches++;
+ }
pthread_mutex_unlock(&stats_mtx);
}
@@ -189,7 +222,7 @@
char *buf = NULL;
struct stat statbuf;
int rv = 0;
- FILE *pipe = NULL;
+ FILE *fp = NULL;
fd = open(file_full_path, O_RDONLY);
if (fd < 0) {
@@ -216,9 +249,9 @@
if (statbuf.st_mode & S_IFIFO) {
log_debug("%s is a named pipe. stream searching", file_full_path);
- pipe = fdopen(fd, "r");
- search_stream(pipe, file_full_path);
- fclose(pipe);
+ fp = fdopen(fd, "r");
+ search_stream(fp, file_full_path);
+ fclose(fp);
goto cleanup;
}
@@ -522,7 +555,7 @@
* If the user didn't intentionally specify a particular depth,
* this is a warning...
*/
- log_warn("Skipping %s. Use the --depth option to search deeper.", dir_full_path);
+ log_err("Skipping %s. Use the --depth option to search deeper.", dir_full_path);
} else {
/* ... if they did, let's settle for debug. */
log_debug("Skipping %s. Use the --depth option to search deeper.", dir_full_path);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/the_silver_searcher-0.30.0/src/util.c new/the_silver_searcher-0.31.0/src/util.c
--- old/the_silver_searcher-0.30.0/src/util.c 2015-04-22 09:56:01.000000000 +0200
+++ new/the_silver_searcher-0.31.0/src/util.c 2015-09-07 07:25:29.000000000 +0200
@@ -258,6 +258,15 @@
return inverted_match_count;
}
+void realloc_matches(match_t **matches, size_t *matches_size, size_t matches_len) {
+ if (matches_len < *matches_size) {
+ return;
+ }
+ /* TODO: benchmark initial size of matches. 100 may be too small/big */
+ *matches_size = *matches ? *matches_size * 2 : 100;
+ *matches = ag_realloc(*matches, *matches_size * sizeof(match_t));
+}
+
void compile_study(pcre **re, pcre_extra **re_extra, char *q, const int pcre_opts, const int study_opts) {
const char *pcre_err = NULL;
int pcre_err_offset = 0;
@@ -556,6 +565,15 @@
}
#endif
+ssize_t buf_getline(const char **line, const char *buf, const size_t buf_len, const size_t buf_offset) {
+ const char *cur = buf + buf_offset;
+ ssize_t i;
+ for (i = 0; cur[i] != '\n' && (buf_offset + i < buf_len); i++) {
+ }
+ *line = cur;
+ return i;
+}
+
#ifndef HAVE_REALPATH
/*
* realpath() for Windows. Turns slashes into backslashes and calls _fullpath
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/the_silver_searcher-0.30.0/src/util.h new/the_silver_searcher-0.31.0/src/util.h
--- old/the_silver_searcher-0.30.0/src/util.h 2015-04-16 03:54:01.000000000 +0200
+++ new/the_silver_searcher-0.31.0/src/util.h 2015-09-07 07:25:29.000000000 +0200
@@ -37,6 +37,7 @@
long total_bytes;
long total_files;
long total_matches;
+ long total_file_matches;
struct timeval time_start;
struct timeval time_end;
} ag_stats;
@@ -70,6 +71,7 @@
strncmp_fp get_strstr(enum case_behavior opts);
size_t invert_matches(const char *buf, const size_t buf_len, match_t matches[], size_t matches_len);
+void realloc_matches(match_t **matches, size_t *matches_size, size_t matches_len);
void compile_study(pcre **re, pcre_extra **re_extra, char *q, const int pcre_opts, const int study_opts);
void *decompress(const ag_compression_type zip_type, const void *buf, const int buf_len, const char *dir_full_path, int *new_buf_len);
@@ -93,6 +95,8 @@
void ag_asprintf(char **ret, const char *fmt, ...);
+ssize_t buf_getline(const char **line, const char *buf, const size_t buf_len, const size_t buf_offset);
+
#ifndef HAVE_FGETLN
char *fgetln(FILE *fp, size_t *lenp);
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/the_silver_searcher-0.30.0/the_silver_searcher.spec new/the_silver_searcher-0.31.0/the_silver_searcher.spec
--- old/the_silver_searcher-0.30.0/the_silver_searcher.spec 2015-04-28 13:30:37.000000000 +0200
+++ new/the_silver_searcher-0.31.0/the_silver_searcher.spec 2015-09-07 07:31:13.000000000 +0200
@@ -2,7 +2,7 @@
Name: the_silver_searcher
-Version: 0.30.0
+Version: 0.31.0
Release: 1%{?dist}
Summary: A code-searching tool similar to ack, but faster