gawk-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gawk-diffs] [SCM] gawk branch, feature/gnulib-regex, updated. gawk-4.1.


From: Arnold Robbins
Subject: [gawk-diffs] [SCM] gawk branch, feature/gnulib-regex, updated. gawk-4.1.0-3017-g84b7162
Date: Fri, 10 Aug 2018 04:45:41 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, feature/gnulib-regex has been updated
       via  84b71627b3986acde819444a6644130e22309fc5 (commit)
       via  bdcad8e531d886fb0074b1239ced50ee1cd5252e (commit)
      from  710cbed410c7507e665af95b511a121ce044ccdc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=84b71627b3986acde819444a6644130e22309fc5

commit 84b71627b3986acde819444a6644130e22309fc5
Author: Arnold D. Robbins <address@hidden>
Date:   Fri Aug 10 11:45:16 2018 +0300

    Fix regcomp.c:parse_byte to get full RRI.

diff --git a/support/regcomp.c b/support/regcomp.c
index 3b0a3c6..e81652f 100644
--- a/support/regcomp.c
+++ b/support/regcomp.c
@@ -2684,15 +2684,14 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, 
re_dfa_t *dfa,
 
 # ifdef RE_ENABLE_I18N
 /* Convert the byte B to the corresponding wide character.  In a
-   unibyte locale, treat B as itself if it is an encoding error.
-   In a multibyte locale, return WEOF if B is an encoding error.  */
+   unibyte locale, treat B as itself.  In a multibyte locale, return
+   WEOF if B is an encoding error.  */
 static wint_t
 parse_byte (unsigned char b, re_charset_t *mbcset)
 {
-  wint_t wc = __btowc (b);
-  return wc == WEOF && !mbcset ? b : wc;
+  return mbcset == NULL ? b : __btowc (b);
 }
-#endif
+# endif
 
   /* Local function for parse_bracket_exp only used in case of NOT _LIBC.
      Build the range expression which starts from START_ELEM, and ends

http://git.sv.gnu.org/cgit/gawk.git/commit/?id=bdcad8e531d886fb0074b1239ced50ee1cd5252e

commit bdcad8e531d886fb0074b1239ced50ee1cd5252e
Author: Arnold D. Robbins <address@hidden>
Date:   Fri Aug 10 11:41:22 2018 +0300

    Sync with gnulib.

diff --git a/support/regcomp.c b/support/regcomp.c
index 7b5ddaa..3b0a3c6 100644
--- a/support/regcomp.c
+++ b/support/regcomp.c
@@ -3531,18 +3531,10 @@ build_equiv_class (bitset_t sbcset, const unsigned char 
*name)
            continue;
          /* Compare only if the length matches and the collation rule
             index is the same.  */
-         if (len == weights[idx2 & 0xffffff] && (idx1 >> 24) == (idx2 >> 24))
-           {
-             int cnt = 0;
-
-             while (cnt <= len &&
-                    weights[(idx1 & 0xffffff) + 1 + cnt]
-                    == weights[(idx2 & 0xffffff) + 1 + cnt])
-               ++cnt;
-
-             if (cnt > len)
-               bitset_set (sbcset, ch);
-           }
+         if (len == weights[idx2 & 0xffffff] && (idx1 >> 24) == (idx2 >> 24)
+             && memcmp (weights + (idx1 & 0xffffff) + 1,
+                        weights + (idx2 & 0xffffff) + 1, len) == 0)
+           bitset_set (sbcset, ch);
        }
       /* Check whether the array has enough space.  */
       if (BE (*equiv_class_alloc == mbcset->nequiv_classes, 0))
@@ -3802,9 +3794,9 @@ free_charset (re_charset_t *cset)
 # ifdef _LIBC
   re_free (cset->coll_syms);
   re_free (cset->equiv_classes);
+# endif
   re_free (cset->range_starts);
   re_free (cset->range_ends);
-# endif
   re_free (cset->char_classes);
   re_free (cset);
 }

-----------------------------------------------------------------------

Summary of changes:
 support/regcomp.c | 27 +++++++++------------------
 1 file changed, 9 insertions(+), 18 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]