Hello community,

here is the log from the commit of package zsh for openSUSE:Factory checked in 
at 2014-09-10 07:27:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/zsh (Old)
 and      /work/SRC/openSUSE:Factory/.zsh.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "zsh"

Changes:
--------
--- /work/SRC/openSUSE:Factory/zsh/zsh.changes  2014-08-31 09:58:43.000000000 
+0200
+++ /work/SRC/openSUSE:Factory/.zsh.new/zsh.changes     2014-09-10 
07:27:38.000000000 +0200
@@ -1,0 +2,5 @@
+Sun Sep  7 20:05:41 UTC 2014 - [email protected]
+
+- Add zsh-fix-pcre-n.patch to fix pcre_match() -n option 
+
+-------------------------------------------------------------------

New:
----
  zsh-fix-pcre-n.patch

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

Other differences:
------------------
++++++ zsh.spec ++++++
--- /var/tmp/diff_new_pack.VciBaV/_old  2014-09-10 07:27:39.000000000 +0200
+++ /var/tmp/diff_new_pack.VciBaV/_new  2014-09-10 07:27:39.000000000 +0200
@@ -37,6 +37,8 @@
 Source17:       zshprompt.pl
 %endif
 Patch1:         trim-unneeded-completions.patch
+# PATCH-FIX-UPSTREAM Fix pcre_match() -n options
+Patch2:         zsh-fix-pcre-n.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 %if 0%{?suse_version}
 Requires(pre):  %{install_info_prereq}
@@ -95,6 +97,7 @@
 %if 0%{?suse_version}
 %patch1 -p1
 %endif
+%patch2 -p1
 
 # Remove executable bit
 chmod 0644 Etc/changelog2html.pl

++++++ zsh-fix-pcre-n.patch ++++++
commit 956829c18e8ade666083f1c69043a16a80f70b0d
Author: Barton E. Schaefer <[email protected]>
Date:   Sun Sep 7 10:48:32 2014 -0700

    33122: typo from 32891 caused incorrect matches for pcre_match -n

diff --git a/Src/Modules/pcre.c b/Src/Modules/pcre.c
index 040a33f..2393cd1 100644
--- a/Src/Modules/pcre.c
+++ b/Src/Modules/pcre.c
@@ -289,7 +289,7 @@ bin_pcre_match(char *nam, char **args, Options ops, 
UNUSED(int func))
        matched_portion = OPT_ARG(ops,c);
     }
     if(OPT_HASARG(ops,c='n')) { /* The offset position to start the search, in 
bytes. */
-       if ((offset_start = getposint(OPT_ARG(ops,c), nam) < 0))
+       if ((offset_start = getposint(OPT_ARG(ops,c), nam)) < 0)
            return 1;
     }
     /* For the entire match, 'Return' the offset byte positions instead of the 
matched string */
diff --git a/Test/V07pcre.ztst b/Test/V07pcre.ztst
index f5b05de..3a65331 100644
--- a/Test/V07pcre.ztst
+++ b/Test/V07pcre.ztst
@@ -108,3 +108,12 @@
 >1
 >0 xo→t →t
 >0 Xo→t →t
+
+  string="The following zip codes: 78884 90210 99513"
+  pcre_compile -m "\d{5}"
+  pcre_match -b -- $string && print "$MATCH; ZPCRE_OP: $ZPCRE_OP"
+  pcre_match -b -n $ZPCRE_OP[(w)2] -- $string || print failed
+  print "$MATCH; ZPCRE_OP: $ZPCRE_OP"
+0:pcre_match -b and pcre_match -n
+>78884; ZPCRE_OP: 25 30
+>90210; ZPCRE_OP: 31 36
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to