grep-commit
[Top][All Lists]
Advanced

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

[SCM] UNNAMED PROJECT branch, master, updated. v2.5.4-186-g774d0ee


From: Paolo Bonzini
Subject: [SCM] UNNAMED PROJECT branch, master, updated. v2.5.4-186-g774d0ee
Date: Fri, 19 Mar 2010 11:51:52 +0000

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 "UNNAMED PROJECT".

The branch, master has been updated
       via  774d0ee8b680bc86cc563142e857c8cfa149cd28 (commit)
      from  4b9b8089f233e6996e05b49d70baca765c6fab1f (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.savannah.gnu.org/cgit/grep.git/commit/?id=774d0ee8b680bc86cc563142e857c8cfa149cd28


commit 774d0ee8b680bc86cc563142e857c8cfa149cd28
Author: Paolo Bonzini <address@hidden>
Date:   Fri Mar 19 12:40:07 2010 +0100

    dfa: fix wchar_t/wint_t type mismatch
    
    * src/dfa.c (FETCH_WC): Pass a local wchar_t variable to mbrtowc.
    (FETCH): Rename temporary second argument to FETCH_WC.
    (parse_bracket_exp): Always use FETCH_WC.

diff --git a/src/dfa.c b/src/dfa.c
index 98d7a91..8118aa2 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -350,17 +350,19 @@ static unsigned char const *buf_end;      /* reference to 
end in dfaexec().  */
       }                                                \
     else                                       \
       {                                                \
-        cur_mb_len = mbrtowc(&wc, lexptr, lexleft, &mbs); \
+        wchar_t _wc;                           \
+        cur_mb_len = mbrtowc(&_wc, lexptr, lexleft, &mbs); \
         if (cur_mb_len <= 0)                   \
           {                                    \
             cur_mb_len = 1;                    \
             --lexleft;                         \
-            wc = c = (unsigned char) *lexptr++;        \
+            (wc) = (c) = (unsigned char) *lexptr++; \
           }                                    \
         else                                   \
           {                                    \
             lexptr += cur_mb_len;              \
             lexleft -= cur_mb_len;             \
+            (wc) = _wc;                                \
             (c) = wctob(wc);                   \
           }                                    \
       }                                                \
@@ -368,8 +370,8 @@ static unsigned char const *buf_end;        /* reference to 
end in dfaexec().  */
 
 # define FETCH(c, eoferr)                      \
   do {                                         \
-    wint_t _wc;                                        \
-    FETCH_WC(c, _wc, eoferr);                  \
+    wint_t wc;                                 \
+    FETCH_WC(c, wc, eoferr);                   \
   } while(0)
 
 #else
@@ -525,7 +527,7 @@ parse_bracket_exp (void)
              int len = 0;
              for (;;)
                {
-                 FETCH (c, _("unbalanced ["));
+                 FETCH_WC (c, wc, _("unbalanced ["));
                  if ((c == c1 && *lexptr == ']') || lexleft == 0)
                    break;
                  if (len < BRACKET_BUFFER_SIZE)
@@ -537,7 +539,7 @@ parse_bracket_exp (void)
              str[len] = '\0';
 
               /* Fetch bracket.  */
-             FETCH (c, _("unbalanced ["));
+             FETCH_WC (c, wc, _("unbalanced ["));
              if (c1 == ':')
                /* build character class.  */
                {

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

Summary of changes:
 src/dfa.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
UNNAMED PROJECT




reply via email to

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