Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ugrep for openSUSE:Factory checked 
in at 2024-03-13 22:17:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ugrep (Old)
 and      /work/SRC/openSUSE:Factory/.ugrep.new.1770 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ugrep"

Wed Mar 13 22:17:57 2024 rev:66 rq:1157057 version:5.1.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/ugrep/ugrep.changes      2024-03-09 
20:56:47.163204380 +0100
+++ /work/SRC/openSUSE:Factory/.ugrep.new.1770/ugrep.changes    2024-03-13 
22:18:51.640895179 +0100
@@ -1,0 +2,7 @@
+Mon Mar 11 22:06:29 UTC 2024 - Andreas Stieger <andreas.stie...@gmx.de>
+
+- update to 5.1.1:
+  * fix a problem with POSIX lazy quantifier matching when combined
+    with anchors, causing longer pattern matches than expected
+
+-------------------------------------------------------------------

Old:
----
  ugrep-5.1.0.tar.gz

New:
----
  ugrep-5.1.1.tar.gz

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

Other differences:
------------------
++++++ ugrep.spec ++++++
--- /var/tmp/diff_new_pack.ycfIso/_old  2024-03-13 22:18:52.248917593 +0100
+++ /var/tmp/diff_new_pack.ycfIso/_new  2024-03-13 22:18:52.256917887 +0100
@@ -18,7 +18,7 @@
 
 
 Name:           ugrep
-Version:        5.1.0
+Version:        5.1.1
 Release:        0
 Summary:        Universal grep: a feature-rich grep implementation with focus 
on speed
 License:        BSD-3-Clause

++++++ ugrep-5.1.0.tar.gz -> ugrep-5.1.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ugrep-5.1.0/README.md new/ugrep-5.1.1/README.md
--- old/ugrep-5.1.0/README.md   2024-03-07 19:29:06.000000000 +0100
+++ new/ugrep-5.1.1/README.md   2024-03-11 18:51:17.000000000 +0100
@@ -917,10 +917,10 @@
 ### Advanced examples
 
 To search for `main` in source code while ignoring strings and comment blocks
-we can use *negative patterns* with option `-N` to skip unwanted matches in
+you can use *negative patterns* with option `-N` to skip unwanted matches in
 C/C++ quoted strings and comment blocks:
 
-    ug -r -nkw -e 'main' -N 
'"(\\.|\\\r?\n|[^\\\n"])*"|//.*|/\*([^*]|\n|(\*+([^*/]|\n)))*\*+\/' myproject
+    ug -r -nkw -e 'main' -N 
'"(\\.|\\\r?\n|[^\\\n"])*"|//.*|/\*(.*\n)*?.*\*+\/' myproject
 
 This is a lot of work to type in correctly!  If you are like me, I don't want
 to spend time fiddling with regex patterns when I am working on something more
@@ -936,21 +936,22 @@
 
     ug -R -tc,c++ -nkw 'main' -f c/zap_strings -f c/zap_comments myproject
 
-What if we are only looking for the identifier `main` but not as a function
-`main(`?  We can use a negative pattern for this to skip unwanted `main\h*(`
-pattern matches:
+What if you only want to look for the identifier `main` but not as a function
+`main(`?  In this case, use a negative pattern for this to skip unwanted
+`main\h*(` pattern matches:
 
     ug -R -tc,c++ -nkw -e 'main' -N 'main\h*\(' -f c/zap_strings -f 
c/zap_comments myproject
 
 This uses the `-e` and `-N` options to explicitly specify a pattern and a
 negative pattern, respectively, which is essentially forming the pattern
 `main|(?^main\h*\()`, where `\h` matches space and tab.  In general, negative
-patterns are useful to filter out pattern matches we are not interested in.
+patterns are useful to filter out pattern matches that we are not interested
+in.
 
-As another example, we may want to search for the word `FIXME` in C/C++ comment
-blocks.  To do so we can first select the comment blocks with **ugrep**'s
-predefined `c/comments` pattern AND THEN select lines with `FIXME` using a
-pipe:
+As another example, let's say we may want to search for the word `FIXME` in
+C/C++ comment blocks.  To do so we can first select the comment blocks with
+**ugrep**'s predefined `c/comments` pattern AND THEN select lines with `FIXME`
+using a pipe:
 
     ug -R -tc,c++ -nk -f c/comments myproject | ug -w 'FIXME'
 
@@ -958,8 +959,8 @@
 some search tools use.  This approach follows the Unix spirit to keep utilities
 simple and use them in combination for more complex tasks.
 
-Say we want to produce a sorted list of all identifiers found in Java source
-code while skipping strings and comments:
+Let's produce a sorted list of all identifiers found in Java source code while
+skipping strings and comments:
 
     ug -R -tjava -f java/names myproject | sort -u
 
@@ -1832,7 +1833,7 @@
 
 To match C/C++ `/*...*/` multi-line comments:
 
-    ug '/\*([^*]|\n|(\*+([^*/]|\n)))*\*+\/' myfile.cpp
+    ug '/\*(.*\n)*?.*\*+\/' myfile.cpp
 
 To match C/C++ comments using the predefined `c/comments` patterns with
 `-f c/comments`, restricted to the matching part only with option `-o`:
@@ -5279,9 +5280,16 @@
 
                   $ ugrep -o -C20 -R -n -k -tjs FIXME
 
-           List the C/C++ comments in a file with line numbers:
 
-                  $ ugrep -n -e '//.*' -e '/\*([^*]|(\*+[^*/]))*\*+\/' 
myfile.cpp
+           Find blocks of text between lines matching BEGIN and END by using a 
lazy
+           quantifier `*?' to match only what is necessary and pattern `\n' to 
match
+           newlines:
+
+                  $ ugrep -n 'BEGIN.*\n(.*\n)*?.*END' myfile.txt
+
+           Likewise, list the C/C++ comments in a file and line numbers:
+
+                  $ ugrep -n -e '//.*' -e '/\*(.*\n)*?.*\*+\/' myfile.cpp
 
            The same, but using predefined pattern c++/comments:
 
@@ -5393,7 +5401,7 @@
 
 
 
-    ugrep 5.0.0                     February 15, 2024                       
UGREP(1)
+    ugrep 5.5.1                      March 11, 2024                         
UGREP(1)
 
 🔝 [Back to table of contents](#toc)
 
Binary files old/ugrep-5.1.0/bin/win32/ug.exe and 
new/ugrep-5.1.1/bin/win32/ug.exe differ
Binary files old/ugrep-5.1.0/bin/win32/ugrep.exe and 
new/ugrep-5.1.1/bin/win32/ugrep.exe differ
Binary files old/ugrep-5.1.0/bin/win64/ug.exe and 
new/ugrep-5.1.1/bin/win64/ug.exe differ
Binary files old/ugrep-5.1.0/bin/win64/ugrep.exe and 
new/ugrep-5.1.1/bin/win64/ugrep.exe differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ugrep-5.1.0/lib/pattern.cpp 
new/ugrep-5.1.1/lib/pattern.cpp
--- old/ugrep-5.1.0/lib/pattern.cpp     2024-03-07 19:29:06.000000000 +0100
+++ new/ugrep-5.1.1/lib/pattern.cpp     2024-03-11 18:51:17.000000000 +0100
@@ -944,13 +944,23 @@
         iter = iter1;
     }
   }
-  for (Positions::const_iterator p = a_pos.begin(); p != a_pos.end(); ++p)
+  for (Positions::iterator p = a_pos.begin(); p != a_pos.end(); ++p)
   {
     for (Positions::const_iterator k = lastpos.begin(); k != lastpos.end(); 
++k)
       if (at(k->loc()) == ')' && lookahead.find(k->loc()) != lookahead.end())
         pos_add(followpos[p->pos()], *k);
-    for (Positions::const_iterator k = lastpos.begin(); k != lastpos.end(); 
++k)
-      pos_add(followpos[k->pos()], p->anchor(!nullable || k->pos() != 
p->pos()));
+    if (lazypos.empty())
+    {
+      for (Positions::const_iterator k = lastpos.begin(); k != lastpos.end(); 
++k)
+        pos_add(followpos[k->pos()], p->anchor(!nullable || k->pos() != 
p->pos()));
+    }
+    else
+    {
+      // make the starting anchors at positions a_pos lazy
+      for (Lazypos::const_iterator l = lazypos.begin(); l != lazypos.end(); 
++l)
+        for (Positions::const_iterator k = lastpos.begin(); k != 
lastpos.end(); ++k)
+          pos_add(followpos[k->pos()], p->lazy(l->lazy()).anchor(!nullable || 
k->pos() != p->pos()));
+    }
     lastpos.clear();
     pos_add(lastpos, *p);
     if (nullable || firstpos.empty())
@@ -2179,9 +2189,10 @@
         if (p->lazy() == l->lazy())
           if (max < l->loc())
             max = l->loc();
-    for (Positions::iterator p = pos->begin(); p != pos->end(); ++p)
-      if (p->loc() > max)
-        *p = p->lazy(0);
+    if (max > 0)
+      for (Positions::iterator p = pos->begin(); p != pos->end(); ++p)
+        if (p->loc() > max)
+          *p = p->lazy(0);
   }
 #ifdef DEBUG
   DBGLOG("END trim_lazy({");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ugrep-5.1.0/man/ugrep.1 new/ugrep-5.1.1/man/ugrep.1
--- old/ugrep-5.1.0/man/ugrep.1 2024-03-07 19:29:06.000000000 +0100
+++ new/ugrep-5.1.1/man/ugrep.1 2024-03-11 18:51:17.000000000 +0100
@@ -1,4 +1,4 @@
-.TH UGREP "1" "March 07, 2024" "ugrep 5.1.0" "User Commands"
+.TH UGREP "1" "March 11, 2024" "ugrep 5.5.1" "User Commands"
 .SH NAME
 \fBugrep\fR, \fBug\fR -- file pattern searcher
 .SH SYNOPSIS
@@ -1353,10 +1353,17 @@
 before and after:
 .IP
 $ ugrep -o -C20 -R -n -k -tjs FIXME
+
 .PP
-List the C/C++ comments in a file with line numbers:
+Find blocks of text between lines matching BEGIN and END by using a lazy
+quantifier `*?' to match only what is necessary and pattern `\\n' to match
+newlines:
 .IP
-$ ugrep -n -e '//.*' -e '/\\*([^*]|(\\*+[^*/]))*\\*+\\/' myfile.cpp
+$ ugrep -n 'BEGIN.*\\n(.*\\n)*?.*END' myfile.txt
+.PP
+Likewise, list the C/C++ comments in a file and line numbers:
+.IP
+$ ugrep -n -e '//.*' -e '/\\*(.*\\n)*?.*\\*+\\/' myfile.cpp
 .PP
 The same, but using predefined pattern c++/comments:
 .IP
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ugrep-5.1.0/man.sh new/ugrep-5.1.1/man.sh
--- old/ugrep-5.1.0/man.sh      2024-03-07 19:29:06.000000000 +0100
+++ new/ugrep-5.1.1/man.sh      2024-03-11 18:51:17.000000000 +0100
@@ -577,10 +577,17 @@
 before and after:
 .IP
 $ ugrep -o -C20 -R -n -k -tjs FIXME
+
 .PP
-List the C/C++ comments in a file with line numbers:
+Find blocks of text between lines matching BEGIN and END by using a lazy
+quantifier `*?' to match only what is necessary and pattern `\\n' to match
+newlines:
 .IP
-$ ugrep -n -e '//.*' -e '/\\*([^*]|(\\*+[^*/]))*\\*+\\/' myfile.cpp
+$ ugrep -n 'BEGIN.*\\n(.*\\n)*?.*END' myfile.txt
+.PP
+Likewise, list the C/C++ comments in a file and line numbers:
+.IP
+$ ugrep -n -e '//.*' -e '/\\*(.*\\n)*?.*\\*+\\/' myfile.cpp
 .PP
 The same, but using predefined pattern c++/comments:
 .IP
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ugrep-5.1.0/patterns/c/comments 
new/ugrep-5.1.1/patterns/c/comments
--- old/ugrep-5.1.0/patterns/c/comments 2024-03-07 19:29:06.000000000 +0100
+++ new/ugrep-5.1.1/patterns/c/comments 2024-03-11 18:51:17.000000000 +0100
@@ -1,2 +1,2 @@
 //.*
-/\*([^*]|\n|(\*+([^*/]|\n)))*\*+\/
+/\*(.*\n)*?.*\*+\/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ugrep-5.1.0/patterns/c++/comments 
new/ugrep-5.1.1/patterns/c++/comments
--- old/ugrep-5.1.0/patterns/c++/comments       2024-03-07 19:29:06.000000000 
+0100
+++ new/ugrep-5.1.1/patterns/c++/comments       2024-03-11 18:51:17.000000000 
+0100
@@ -1,2 +1,2 @@
 //.*
-/\*([^*]|\n|(\*+([^*/]|\n)))*\*+\/
+/\*(.*\n)*?.*\*+\/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ugrep-5.1.0/patterns/cpp/comments 
new/ugrep-5.1.1/patterns/cpp/comments
--- old/ugrep-5.1.0/patterns/cpp/comments       2024-03-07 19:29:06.000000000 
+0100
+++ new/ugrep-5.1.1/patterns/cpp/comments       2024-03-11 18:51:17.000000000 
+0100
@@ -1,2 +1,2 @@
 //.*
-/\*([^*]|\n|(\*+([^*/]|\n)))*\*+\/
+/\*(.*\n)*?.*\*+\/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ugrep-5.1.0/patterns/cs/comments 
new/ugrep-5.1.1/patterns/cs/comments
--- old/ugrep-5.1.0/patterns/cs/comments        2024-03-07 19:29:06.000000000 
+0100
+++ new/ugrep-5.1.1/patterns/cs/comments        2024-03-11 18:51:17.000000000 
+0100
@@ -1,2 +1,2 @@
 //.*
-/\*([^*]|\n|(\*+([^*/]|\n)))*\*+\/
+/\*(.*\n)*?.*\*+\/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ugrep-5.1.0/patterns/java/comments 
new/ugrep-5.1.1/patterns/java/comments
--- old/ugrep-5.1.0/patterns/java/comments      2024-03-07 19:29:06.000000000 
+0100
+++ new/ugrep-5.1.1/patterns/java/comments      2024-03-11 18:51:17.000000000 
+0100
@@ -1,2 +1,2 @@
 //.*
-/\*([^*]|\n|(\*+([^*/]|\n)))*\*+\/
+/\*(.*\n)*?.*\*+\/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ugrep-5.1.0/patterns/js/comments 
new/ugrep-5.1.1/patterns/js/comments
--- old/ugrep-5.1.0/patterns/js/comments        2024-03-07 19:29:06.000000000 
+0100
+++ new/ugrep-5.1.1/patterns/js/comments        2024-03-11 18:51:17.000000000 
+0100
@@ -1,2 +1,2 @@
 //.*
-/\*([^*]|\n|(\*+([^*/]|\n)))*\*+\/
+/\*(.*\n)*?.*\*+\/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ugrep-5.1.0/patterns/php/comments 
new/ugrep-5.1.1/patterns/php/comments
--- old/ugrep-5.1.0/patterns/php/comments       2024-03-07 19:29:06.000000000 
+0100
+++ new/ugrep-5.1.1/patterns/php/comments       2024-03-11 18:51:17.000000000 
+0100
@@ -1,3 +1,3 @@
 #.*
 //.*
-/\*([^*]|\n|(\*+([^*/]|\n)))*\*+\/
+/\*(.*\n)*?.*\*+\/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ugrep-5.1.0/patterns/rust/comments 
new/ugrep-5.1.1/patterns/rust/comments
--- old/ugrep-5.1.0/patterns/rust/comments      2024-03-07 19:29:06.000000000 
+0100
+++ new/ugrep-5.1.1/patterns/rust/comments      2024-03-11 18:51:17.000000000 
+0100
@@ -1,2 +1,2 @@
 //.*
-/\*([^*]|\n|(\*+([^*/]|\n)))*\*+\/
+/\*(.*\n)*?.*\*+\/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ugrep-5.1.0/patterns/scala/comments 
new/ugrep-5.1.1/patterns/scala/comments
--- old/ugrep-5.1.0/patterns/scala/comments     2024-03-07 19:29:06.000000000 
+0100
+++ new/ugrep-5.1.1/patterns/scala/comments     2024-03-11 18:51:17.000000000 
+0100
@@ -1,2 +1,2 @@
 //.*
-/\*([^*]|\n|(\*+([^*/]|\n)))*\*+\/
+/\*(.*\n)*?.*\*+\/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ugrep-5.1.0/patterns/swift/comments 
new/ugrep-5.1.1/patterns/swift/comments
--- old/ugrep-5.1.0/patterns/swift/comments     2024-03-07 19:29:06.000000000 
+0100
+++ new/ugrep-5.1.1/patterns/swift/comments     2024-03-11 18:51:17.000000000 
+0100
@@ -1,2 +1,2 @@
 //.*
-/\*([^*]|\n|(\*+([^*/]|\n)))*\*+\/
+/\*(.*\n)*?.*\*+\/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ugrep-5.1.0/src/ugrep.hpp 
new/ugrep-5.1.1/src/ugrep.hpp
--- old/ugrep-5.1.0/src/ugrep.hpp       2024-03-07 19:29:06.000000000 +0100
+++ new/ugrep-5.1.1/src/ugrep.hpp       2024-03-11 18:51:17.000000000 +0100
@@ -38,7 +38,7 @@
 #define UGREP_HPP
 
 // ugrep version
-#define UGREP_VERSION "5.1.0"
+#define UGREP_VERSION "5.1.1"
 
 // 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