m4-commit
[Top][All Lists]
Advanced

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

[SCM] GNU M4 source repository branch, master, updated. cvs-readonly-193


From: Eric Blake
Subject: [SCM] GNU M4 source repository branch, master, updated. cvs-readonly-193-ga2cdd6b
Date: Mon, 16 Feb 2009 13:31:18 +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 "GNU M4 source repository".

http://git.sv.gnu.org/gitweb/?p=m4.git;a=commitdiff;h=a2cdd6be73989df7e62caa8bfc55327fee3c9fac

The branch, master has been updated
       via  a2cdd6be73989df7e62caa8bfc55327fee3c9fac (commit)
      from  efb88298e6f6933335f9cdfb1d96753271052efb (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 -----------------------------------------------------------------
commit a2cdd6be73989df7e62caa8bfc55327fee3c9fac
Author: Eric Blake <address@hidden>
Date:   Mon Feb 16 06:21:20 2009 -0700

    Fix regression in multicharacter quotes, from 2008-01-26.
    
    * m4/input.c (m4__next_token): Fix typo.
    * tests/builtins.at (changequote): Enhance test.
    
    Signed-off-by: Eric Blake <address@hidden>

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

Summary of changes:
 ChangeLog         |    6 ++++++
 m4/input.c        |   20 ++++++++++----------
 tests/builtins.at |    4 ++++
 3 files changed, 20 insertions(+), 10 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 6717a8a..90957fd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-02-16  Eric Blake  <address@hidden>
+
+       Fix regression in multicharacter quotes, from 2008-01-26.
+       * m4/input.c (m4__next_token): Fix typo.
+       * tests/builtins.at (changequote): Enhance test.
+
 2009-02-13  Eric Blake  <address@hidden>
 
        Speed up parsing when detecting input file change.
diff --git a/m4/input.c b/m4/input.c
index 2672386..ba2e467 100644
--- a/m4/input.c
+++ b/m4/input.c
@@ -1418,15 +1418,15 @@ match_input (m4 *context, const char *s, size_t len, 
bool consume)
 }
 
 /* The macro MATCH() is used to match a string S of length LEN against
-  the input.  The first character is handled inline for speed, and
-  S[LEN] must be safe to dereference (it is faster to do character
-  comparison prior to length checks).  This improves efficiency for
-  the common case of single character quotes and comment delimiters,
-  while being safe for disabled delimiters as well as longer
-  delimiters.  If CONSUME, then CH is the result of next_char, and a
-  successful match will discard the matched string.  Otherwise, CH is
-  the result of peek_char, and the input stream is effectively
-  unchanged.  */
+   the input.  The first character is handled inline for speed, and
+   S[LEN] must be safe to dereference (it is faster to do character
+   comparison prior to length checks).  This improves efficiency for
+   the common case of single character quotes and comment delimiters,
+   while being safe for disabled delimiters as well as longer
+   delimiters.  If CONSUME, then CH is the result of next_char, and a
+   successful match will discard the matched string.  Otherwise, CH is
+   the result of peek_char, and the input stream is effectively
+   unchanged.  */
 #define MATCH(C, ch, s, len, consume)                                  \
   (to_uchar ((s)[0]) == (ch)                                           \
    && ((len) >> 1 ? match_input (C, s, len, consume) : (len)))
@@ -1678,7 +1678,7 @@ m4__next_token (m4 *context, m4_symbol_value *token, int 
*line,
              {
                quote_level++;
                obstack_grow (obs_safe, context->syntax->quote.str1,
-                             context->syntax->quote.len2);
+                             context->syntax->quote.len1);
              }
            else
              obstack_1grow (obs_safe, ch);
diff --git a/tests/builtins.at b/tests/builtins.at
index 397f649..46ce548 100644
--- a/tests/builtins.at
+++ b/tests/builtins.at
@@ -133,11 +133,15 @@ AT_DATA([in.m4],
 [[define(`aaaaaaaaaaaaaaaaaaaa', `A')define(`q', `"$@"')
 changequote(`"', `"')
 q(q("aaaaaaaaaaaaaaaaaaaa", "a"))
+changequote`'define(`echo', `$@')dnl
+changequote(`<<<', `>>')dnl
+echo(<<<a<<<b>>>>)
 ]])
 
 AT_CHECK_M4([in.m4], [0], [[
 
 A,a
+a<<<b>>
 ]])
 
 AT_CLEANUP


hooks/post-receive
--
GNU M4 source repository




reply via email to

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