gawk-diffs
[Top][All Lists]
Advanced

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

[gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-2581-ga702a6


From: Arnold Robbins
Subject: [gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-2581-ga702a6b
Date: Thu, 22 Jun 2017 15:15:04 -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, master has been updated
       via  a702a6b6d6009068f4608a865bdd06a07259cf67 (commit)
      from  0ac746db72a0879bbd44325fe15b3ae33c63ecef (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=a702a6b6d6009068f4608a865bdd06a07259cf67

commit a702a6b6d6009068f4608a865bdd06a07259cf67
Author: Arnold D. Robbins <address@hidden>
Date:   Thu Jun 22 22:14:49 2017 +0300

    Update regex routines from GLIBC.

diff --git a/support/ChangeLog b/support/ChangeLog
index 5475604..ec54675 100644
--- a/support/ChangeLog
+++ b/support/ChangeLog
@@ -1,3 +1,8 @@
+2017-06-22         Arnold D. Robbins     <address@hidden>
+
+       * regcomp.c, regex.c, regex.h, regex_internal.c, regex_internal.h,
+       regexec.c: Sync with GLIBC.
+
 2017-06-18         Arnold D. Robbins     <address@hidden>
 
        * intprops.h: Sync with GNULIB.
diff --git a/support/regcomp.c b/support/regcomp.c
index 5ac5370..c45e91f 100644
--- a/support/regcomp.c
+++ b/support/regcomp.c
@@ -1,5 +1,5 @@
 /* Extended regular expression matching and search library.
-   Copyright (C) 2002-2016 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Isamu Hasegawa <address@hidden>.
 
@@ -961,8 +961,9 @@ static void
 internal_function
 init_word_char (re_dfa_t *dfa)
 {
-  int i, j, ch;
   dfa->word_ops_used = 1;
+  int i = 0;
+  int ch = 0;
 #ifndef GAWK
   if (BE (dfa->map_notascii == 0, 1))
     {
@@ -996,8 +997,8 @@ init_word_char (re_dfa_t *dfa)
     }
 #endif
 
-  for (i = 0, ch = 0; i < BITSET_WORDS; ++i)
-    for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch)
+  for (; i < BITSET_WORDS; ++i)
+    for (int j = 0; j < BITSET_WORD_BITS; ++j, ++ch)
       if (isalnum (ch) || ch == '_')
        dfa->word_char[i] |= (bitset_word_t) 1 << j;
 }
diff --git a/support/regex.c b/support/regex.c
index 9f133fa..d3a4485 100644
--- a/support/regex.c
+++ b/support/regex.c
@@ -1,5 +1,5 @@
 /* Extended regular expression matching and search library.
-   Copyright (C) 2002-2016 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Isamu Hasegawa <address@hidden>.
 
diff --git a/support/regex.h b/support/regex.h
index 143b3af..adddd9e 100644
--- a/support/regex.h
+++ b/support/regex.h
@@ -1,6 +1,6 @@
 /* Definitions for data structures and routines for the regular
    expression library.
-   Copyright (C) 1985, 1989-2016 Free Software Foundation, Inc.
+   Copyright (C) 1985, 1989-2017 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
diff --git a/support/regex_internal.c b/support/regex_internal.c
index 18641ef..2b3120c 100644
--- a/support/regex_internal.c
+++ b/support/regex_internal.c
@@ -840,7 +840,7 @@ re_string_reconstruct (re_string_t *pstr, int idx, int 
eflags)
 }
 
 static unsigned char
-internal_function __attribute__ ((__pure__))
+internal_function __attribute ((pure))
 re_string_peek_byte_case (const re_string_t *pstr, int idx)
 {
   int ch, off;
@@ -1372,7 +1372,7 @@ re_node_set_insert_last (re_node_set *set, int elem)
    return 1 if SET1 and SET2 are equivalent, return 0 otherwise.  */
 
 static int
-internal_function __attribute__ ((__pure__))
+internal_function __attribute ((pure))
 re_node_set_compare (const re_node_set *set1, const re_node_set *set2)
 {
   int i;
@@ -1387,7 +1387,7 @@ re_node_set_compare (const re_node_set *set1, const 
re_node_set *set2)
 /* Return (idx + 1) if SET contains the element ELEM, return 0 otherwise.  */
 
 static int
-internal_function __attribute__ ((__pure__))
+internal_function __attribute ((pure))
 re_node_set_contains (const re_node_set *set, int elem)
 {
   unsigned int idx, right, mid;
diff --git a/support/regex_internal.h b/support/regex_internal.h
index 01465e7..9f4ff07 100644
--- a/support/regex_internal.h
+++ b/support/regex_internal.h
@@ -1,5 +1,5 @@
 /* Extended regular expression matching and search library.
-   Copyright (C) 2002-2016 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Isamu Hasegawa <address@hidden>.
 
@@ -44,9 +44,6 @@
 #if defined HAVE_STDINT_H || defined _LIBC
 # include <stdint.h>
 #endif /* HAVE_STDINT_H || _LIBC */
- 
-#include "intprops.h"
-
 #if defined _LIBC
 # include <libc-lock.h>
 #else
diff --git a/support/regexec.c b/support/regexec.c
index c8f11e5..1481359 100644
--- a/support/regexec.c
+++ b/support/regexec.c
@@ -1,5 +1,5 @@
 /* Extended regular expression matching and search library.
-   Copyright (C) 2002-2016 Free Software Foundation, Inc.
+   Copyright (C) 2002-2017 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Isamu Hasegawa <address@hidden>.
 
@@ -55,7 +55,8 @@ static int re_search_stub (struct re_pattern_buffer *bufp,
                           int ret_len) internal_function;
 static unsigned re_copy_regs (struct re_registers *regs, regmatch_t *pmatch,
                              int nregs, int regs_allocated) internal_function;
-static reg_errcode_t prune_impossible_nodes (re_match_context_t *mctx);
+static reg_errcode_t prune_impossible_nodes (re_match_context_t *mctx)
+     internal_function;
 static int check_matching (re_match_context_t *mctx, int fl_longest_match,
                           int *p_match_first) internal_function;
 static int check_halt_state_context (const re_match_context_t *mctx,
@@ -362,12 +363,10 @@ re_search_2_stub (struct re_pattern_buffer *bufp, const 
char *string1,
 {
   const char *str;
   int rval;
-  int len;
+  int len = length1 + length2;
   char *s = NULL;
 
-  if (BE ((length1 < 0 || length2 < 0 || stop < 0
-           || INT_ADD_WRAPV (length1, length2, &len)),
-          0))
+  if (BE (length1 < 0 || length2 < 0 || stop < 0 || len < length1, 0))
     return -2;
 
   /* Concatenate the strings.  */
@@ -939,6 +938,7 @@ re_search_internal (const regex_t *preg, const char 
*string, int length,
 }
 
 static reg_errcode_t
+internal_function __attribute_warn_unused_result__
 prune_impossible_nodes (re_match_context_t *mctx)
 {
   const re_dfa_t *const dfa = mctx->dfa;
@@ -1034,7 +1034,7 @@ prune_impossible_nodes (re_match_context_t *mctx)
    since initial states may have constraints like "\<", "^", etc..  */
 
 static inline re_dfastate_t *
-__attribute__ ((always_inline)) internal_function
+__attribute ((always_inline)) internal_function
 acquire_init_state_context (reg_errcode_t *err, const re_match_context_t *mctx,
                            int idx)
 {
@@ -2395,7 +2395,7 @@ merge_state_with_log (reg_errcode_t *err, 
re_match_context_t *mctx,
 /* Skip bytes in the input that correspond to part of a
    multi-byte match, then look in the log for a state
    from which to restart matching.  */
-static re_dfastate_t *
+re_dfastate_t *
 internal_function
 find_recover_state (reg_errcode_t *err, re_match_context_t *mctx)
 {

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

Summary of changes:
 support/ChangeLog        |  5 +++++
 support/regcomp.c        |  9 +++++----
 support/regex.c          |  2 +-
 support/regex.h          |  2 +-
 support/regex_internal.c |  6 +++---
 support/regex_internal.h |  5 +----
 support/regexec.c        | 16 ++++++++--------
 7 files changed, 24 insertions(+), 21 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

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