Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ugrep for openSUSE:Factory checked 
in at 2023-01-15 17:58:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ugrep (Old)
 and      /work/SRC/openSUSE:Factory/.ugrep.new.32243 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ugrep"

Sun Jan 15 17:58:19 2023 rev:35 rq:1058454 version:3.9.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/ugrep/ugrep.changes      2023-01-05 
15:01:47.601349377 +0100
+++ /work/SRC/openSUSE:Factory/.ugrep.new.32243/ugrep.changes   2023-01-15 
17:58:26.318299958 +0100
@@ -1,0 +2,8 @@
+Sun Jan 15 12:18:22 UTC 2023 - Andreas Stieger <andreas.stie...@gmx.de>
+
+- update to 3.9.5:
+  * Fix option -l (files-with-matches) when used with option -z
+    (decompress) which would sometimes show duplicates when a
+    compressed files had many matches
+
+-------------------------------------------------------------------

Old:
----
  ugrep-3.9.4.tar.gz

New:
----
  ugrep-3.9.5.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ugrep.spec ++++++
--- /var/tmp/diff_new_pack.PIKslf/_old  2023-01-15 17:58:27.050304303 +0100
+++ /var/tmp/diff_new_pack.PIKslf/_new  2023-01-15 17:58:27.054304326 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           ugrep
-Version:        3.9.4
+Version:        3.9.5
 Release:        0
 Summary:        Universal grep: a feature-rich grep implementation with focus 
on speed
 License:        BSD-3-Clause

++++++ ugrep-3.9.4.tar.gz -> ugrep-3.9.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ugrep-3.9.4/README.md new/ugrep-3.9.5/README.md
--- old/ugrep-3.9.4/README.md   2023-01-04 20:55:10.000000000 +0100
+++ new/ugrep-3.9.5/README.md   2023-01-14 16:54:59.000000000 +0100
@@ -5510,7 +5510,5 @@
 
 [travis-image]: https://travis-ci.com/Genivia/ugrep.svg?branch=master
 [travis-url]: https://app.travis-ci.com/github/Genivia/ugrep
-[lgtm-image]: 
https://img.shields.io/lgtm/grade/cpp/g/Genivia/ugrep.svg?logo=lgtm&logoWidth=18
-[lgtm-url]: https://lgtm.com/projects/g/Genivia/ugrep/context:cpp
 [bsd-3-image]: https://img.shields.io/badge/license-BSD%203--Clause-blue.svg
 [bsd-3-url]: https://opensource.org/licenses/BSD-3-Clause
Binary files old/ugrep-3.9.4/bin/win32/ugrep.exe and 
new/ugrep-3.9.5/bin/win32/ugrep.exe differ
Binary files old/ugrep-3.9.4/bin/win64/ugrep.exe and 
new/ugrep-3.9.5/bin/win64/ugrep.exe differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ugrep-3.9.4/include/reflex/absmatcher.h 
new/ugrep-3.9.5/include/reflex/absmatcher.h
--- old/ugrep-3.9.4/include/reflex/absmatcher.h 2023-01-04 20:55:10.000000000 
+0100
+++ new/ugrep-3.9.5/include/reflex/absmatcher.h 2023-01-14 16:54:59.000000000 
+0100
@@ -38,13 +38,19 @@
 #define REFLEX_ABSMATCHER_H
 
 /// This compile-time option may speed up buffer reallocation with realloc() 
instead of new and delete.
-#define WITH_REALLOC
+#ifndef WITH_REALLOC
+#define WITH_REALLOC 1
+#endif
 
 /// This compile-time option speeds up matching, but slows input().
-#define WITH_FAST_GET
+#ifndef WITH_FAST_GET
+#define WITH_FAST_GET 1
+#endif
 
 /// This compile-time option adds span(), line(), wline(), bol(), eol()
-#define WITH_SPAN
+#ifndef WITH_SPAN
+#define WITH_SPAN 1
+#endif
 
 #include <reflex/convert.h>
 #include <reflex/debug.h>
@@ -328,8 +334,8 @@
     DBGLOG("AbstractMatcher::~AbstractMatcher()");
     if (own_)
     {
-#if defined(WITH_REALLOC)
-#if (defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || 
defined(_WIN64) || defined(__BORLANDC__)) && !defined(__CYGWIN__)
+#if WITH_REALLOC
+#if defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(_WIN64) 
|| defined(__BORLANDC__)
       _aligned_free(static_cast<void*>(buf_));
 #else
       std::free(static_cast<void*>(buf_));
@@ -376,8 +382,8 @@
     if (!own_)
     {
       max_ = Const::BUFSZ;
-#if defined(WITH_REALLOC)
-#if (defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || 
defined(_WIN64) || defined(__BORLANDC__)) && !defined(__CYGWIN__)
+#if WITH_REALLOC
+#if defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(_WIN64) 
|| defined(__BORLANDC__)
       buf_ = static_cast<char*>(_aligned_malloc(max_, 4096));
       if (buf_ == NULL)
         throw std::bad_alloc();
@@ -401,13 +407,13 @@
     blk_ = 0;
     got_ = Const::BOB;
     chr_ = '\0';
-#if defined(WITH_SPAN)
+#if WITH_SPAN
     bol_ = buf_;
     evh_ = NULL;
 #endif
     lpb_ = buf_;
     lno_ = 1;
-#if defined(WITH_SPAN)
+#if WITH_SPAN
     cpb_ = buf_;
 #endif
     cno_ = 0;
@@ -445,7 +451,7 @@
     eof_ = in.eof();
     return eof_;
   }
-#if defined(WITH_SPAN)
+#if WITH_SPAN
   /// Set event handler functor to invoke when the buffer contents are shifted 
out, e.g. for logging the data searched.
   void set_handler(Handler *handler)
   {
@@ -517,8 +523,8 @@
     {
       if (own_)
       {
-#if defined(WITH_REALLOC)
-#if (defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || 
defined(_WIN64) || defined(__BORLANDC__)) && !defined(__CYGWIN__)
+#if WITH_REALLOC
+#if defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(_WIN64) 
|| defined(__BORLANDC__)
         _aligned_free(static_cast<void*>(buf_));
 #else
         std::free(static_cast<void*>(buf_));
@@ -539,13 +545,13 @@
       blk_ = 0;
       got_ = Const::BOB;
       chr_ = '\0';
-#if defined(WITH_SPAN)
+#if WITH_SPAN
       bol_ = buf_;
       evh_ = NULL;
 #endif
       lpb_ = buf_;
       lno_ = 1;
-#if defined(WITH_SPAN)
+#if WITH_SPAN
       cpb_ = buf_;
 #endif
       cno_ = 0;
@@ -648,7 +654,7 @@
   inline size_t lineno()
     /// @returns line number
   {
-#if defined(WITH_SPAN)
+#if WITH_SPAN
     if (lpb_ < txt_)
     {
       const char *s = lpb_;
@@ -802,7 +808,7 @@
   inline void columno(size_t n) ///< new column number
   {
     (void)lineno(); // update lno_ and bol_ (or cno_) before overriding lno_
-#if defined(WITH_SPAN)
+#if WITH_SPAN
     cpb_ = txt_;
 #else
     lpb_ = txt_;
@@ -814,7 +820,7 @@
     /// @returns column number
   {
     (void)lineno();
-#if defined(WITH_SPAN)
+#if WITH_SPAN
     const char *s = cpb_;
     const char *e = txt_;
     size_t k = cno_;
@@ -837,7 +843,7 @@
     /// @returns number of columns
   {
     // count columns in tabs and UTF-8 chars
-#if defined(WITH_SPAN)
+#if WITH_SPAN
     const char *s = txt_;
     const char *e = txt_ + len_;
     size_t n = columno();
@@ -878,7 +884,7 @@
     return n - m;
 #endif
   }
-#if defined(WITH_SPAN)
+#if WITH_SPAN
   /// Returns the inclusive ending column number of the matched text on the 
ending matching line, taking tab spacing into account and counting wide 
characters as one character each
   inline size_t columno_end()
     /// @returns column number
@@ -1002,7 +1008,7 @@
     }
     else
     {
-#if defined(WITH_FAST_GET)
+#if WITH_FAST_GET
       got_ = get_more();
 #else
       got_ = get();
@@ -1076,7 +1082,7 @@
     /// @returns the character (unsigned char 0..255) or EOF (-1)
   {
     DBGLOG("AbstractMatcher::peek()");
-#if defined(WITH_FAST_GET)
+#if WITH_FAST_GET
     return pos_ < end_ ? static_cast<unsigned char>(buf_[pos_]) : peek_more();
 #else
     if (pos_ < end_)
@@ -1099,7 +1105,7 @@
     }
 #endif
   }
-#if defined(WITH_SPAN)
+#if WITH_SPAN
   /// Returns pointer to the begin of the line in the buffer containing the 
matched text.
   inline const char *bol()
     /// @returns pointer to the begin of line
@@ -1419,7 +1425,7 @@
   {
     if (max_ - end_ >= need + 1)
       return false;
-#if defined(WITH_SPAN)
+#if WITH_SPAN
     (void)lineno();
     cno_ = 0;
     if (bol_ + Const::BOLSZ - buf_ < txt_ - bol_ && evh_ == NULL)
@@ -1454,8 +1460,8 @@
       while (max_ < newmax)
         max_ *= 2;
       DBGLOG("Expand buffer to %zu bytes", max_);
-#if defined(WITH_REALLOC)
-#if (defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || 
defined(_WIN64) || defined(__BORLANDC__)) && !defined(__CYGWIN__)
+#if WITH_REALLOC
+#if defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(_WIN64) 
|| defined(__BORLANDC__)
       char *newbuf = 
static_cast<char*>(_aligned_realloc(static_cast<void*>(buf_), max_, 4096));
 #else
       char *newbuf = static_cast<char*>(std::realloc(static_cast<void*>(buf_), 
max_));
@@ -1504,9 +1510,9 @@
         pos_ -= gap;
         end_ -= gap;
         num_ += gap;
-#if defined(WITH_REALLOC)
+#if WITH_REALLOC
         std::memmove(buf_, txt_, end_);
-#if (defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || 
defined(_WIN64) || defined(__BORLANDC__)) && !defined(__CYGWIN__)
+#if defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(_WIN64) 
|| defined(__BORLANDC__)
         char *newbuf = 
static_cast<char*>(_aligned_realloc(static_cast<void*>(buf_), max_, 4096));
 #else
         char *newbuf = 
static_cast<char*>(std::realloc(static_cast<void*>(buf_), max_));
@@ -1531,7 +1537,7 @@
     /// @returns the character read (unsigned char 0..255) or EOF (-1)
   {
     DBGLOG("AbstractMatcher::get()");
-#if defined(WITH_FAST_GET)
+#if WITH_FAST_GET
     return pos_ < end_ ? static_cast<unsigned char>(buf_[pos_++]) : get_more();
 #else
     if (pos_ < end_)
@@ -1568,7 +1574,7 @@
   {
     DBGCHK(loc <= end_);
     pos_ = cur_ = loc;
-#if defined(WITH_SPAN)
+#if WITH_SPAN
     got_ = loc > 0 ? static_cast<unsigned char>(buf_[loc - 1]) : '\n';
 #else
     got_ = loc > 0 ? static_cast<unsigned char>(buf_[loc - 1]) : Const::UNK;
@@ -1637,13 +1643,13 @@
   size_t      blk_; ///< block size for block-based input reading, as set by 
AbstractMatcher::buffer
   int         got_; ///< last unsigned character we looked at (to determine 
anchors and boundaries)
   int         chr_; ///< the character located at 
AbstractMatcher::txt_[AbstractMatcher::len_]
-#if defined(WITH_SPAN)
+#if WITH_SPAN
   const char *bol_; ///< begin of line pointer in buffer
   Handler    *evh_; ///< event handler functor to invoke when buffer contents 
are shifted out
 #endif
   const char *lpb_; ///< line pointer in buffer, updated when counting line 
numbers with lineno()
   size_t      lno_; ///< line number count (cached)
-#if defined(WITH_SPAN)
+#if WITH_SPAN
   const char *cpb_; ///< column pointer in buffer, updated when counting 
column numbers with columno()
 #endif
   size_t      cno_; ///< column number count (cached)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ugrep-3.9.4/include/reflex/flexlexer.h 
new/ugrep-3.9.5/include/reflex/flexlexer.h
--- old/ugrep-3.9.4/include/reflex/flexlexer.h  2023-01-04 20:55:10.000000000 
+0100
+++ new/ugrep-3.9.5/include/reflex/flexlexer.h  2023-01-14 16:54:59.000000000 
+0100
@@ -367,6 +367,9 @@
 /// Flex-compatible macro: set the lineno accessor of a reentrant scanner.
 #define yyset_lineno(n,s)       static_cast<FlexLexer*>(s)->lineno(n)
 
+/// Flex-compatible macro: set the column accessor of a reentrant scanner.
+#define yyset_columno(n,s)      static_cast<FlexLexer*>(s)->columno(n)
+
 /// Flex-compatible macro: the reflex::Input in accessor of a reentrant 
scanner.
 #define yyget_in(s)             static_cast<FlexLexer*>(s)->in()
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ugrep-3.9.4/lib/pattern.cpp 
new/ugrep-3.9.5/lib/pattern.cpp
--- old/ugrep-3.9.4/lib/pattern.cpp     2023-01-04 20:55:10.000000000 +0100
+++ new/ugrep-3.9.5/lib/pattern.cpp     2023-01-14 16:54:59.000000000 +0100
@@ -2061,8 +2061,12 @@
         state->accept = accept;
       if (k->negate())
         state->redo = true;
+      DBGLOG("ACCEPT %u STATE %u REDO %d", accept, state->accept, state->redo);
     }
-    else
+  }
+  for (Positions::const_iterator k = state->begin(); k != end; ++k)
+  {
+    if (!k->accept())
     {
       Location loc = k->loc();
       Char c = at(loc);
@@ -2091,9 +2095,7 @@
       }
       else if (c == ')' && !literal)
       {
-        /* CHECKED algorithmic options: 7/18 do no longer check for accept 
state, assume we are at an accept state
         if (state->accept > 0)
-        */
         {
           Lookahead n = 0;
           DBGLOG("LOOKAHEAD TAIL");
@@ -2101,7 +2103,8 @@
           {
             Locations::const_iterator j = i->second.find(loc);
             DBGLOGN("%d %d (%d) %u", state->accept, i->first, j != 
i->second.end(), n);
-            if (j != i->second.end() /* CHECKED algorithmic options: 7/18 && 
state->accept == i->first */ ) // only add lookstop when part of the proper 
accept state
+            // only add lookstop when part of the proper accept state
+            if (j != i->second.end() && static_cast<int>(state->accept) == 
i->first)
             {
               Lookahead l = n + 
static_cast<Lookahead>(std::distance(i->second.begin(), j));
               if (l < n)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ugrep-3.9.4/src/ugrep.cpp 
new/ugrep-3.9.5/src/ugrep.cpp
--- old/ugrep-3.9.4/src/ugrep.cpp       2023-01-04 20:55:10.000000000 +0100
+++ new/ugrep-3.9.5/src/ugrep.cpp       2023-01-14 16:54:59.000000000 +0100
@@ -1045,11 +1045,12 @@
           }
 
           // push decompressed data into pipe
+          bool drain = false;
           while (len > 0 && !stop)
           {
-            // write buffer data to the pipe, if the pipe is broken then the 
receiver is waiting for this thread to join
-            if (is_selected && write(pipe_fd[1], buf, 
static_cast<size_t>(len)) < len)
-              break;
+            // write buffer data to the pipe, if the pipe is broken then the 
receiver is waiting for this thread to join so we drain the rest of the 
decompressed data
+            if (is_selected && !drain && write(pipe_fd[1], buf, 
static_cast<size_t>(len)) < len)
+              drain = true;
 
             // decompress the next block of data into the buffer
             len = zstream->decompress(buf, maxlen);
@@ -7087,6 +7088,8 @@
   {
     unsigned int cores = std::thread::hardware_concurrency();
     unsigned int concurrency = cores > 2 ? cores : 2;
+    // reduce concurrency by one for 8+ core CPUs
+    concurrency -= concurrency / 9;
     flag_jobs = std::min(concurrency, MAX_JOBS);
   }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ugrep-3.9.4/src/ugrep.hpp 
new/ugrep-3.9.5/src/ugrep.hpp
--- old/ugrep-3.9.4/src/ugrep.hpp       2023-01-04 20:55:10.000000000 +0100
+++ new/ugrep-3.9.5/src/ugrep.hpp       2023-01-14 16:54:59.000000000 +0100
@@ -38,7 +38,7 @@
 #define UGREP_HPP
 
 // ugrep version
-#define UGREP_VERSION "3.9.4"
+#define UGREP_VERSION "3.9.5"
 
 // disable mmap because mmap is almost always slower than the file reading 
speed improvements since 3.0.0
 #define WITH_NO_MMAP

Reply via email to