m4-commit
[Top][All Lists]
Advanced

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

[SCM] GNU M4 source repository branch, branch-1_4, updated. branch-cvs-r


From: Eric Blake
Subject: [SCM] GNU M4 source repository branch, branch-1_4, updated. branch-cvs-readonly-38-gbf1bf74
Date: Mon, 14 Jan 2008 20:36:07 +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=bf1bf749de4df7dcee7214ea01111b94be0db31e

The branch, branch-1_4 has been updated
       via  bf1bf749de4df7dcee7214ea01111b94be0db31e (commit)
      from  b164d1eaaa7c9591fa85c815b38c727c1e9921ac (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 bf1bf749de4df7dcee7214ea01111b94be0db31e
Author: Eric Blake <address@hidden>
Date:   Mon Jan 14 11:49:03 2008 -0700

    Fix --warn-macro-sequence regression from 2007-11-29.
    
    * src/builtin.c (define_user_macro): Use correct length.
    * doc/m4.texinfo (Arguments): Test the fix.
    (History): Reword to account for new year and eventual result of
    the argv_ref branch.
    
    Signed-off-by: Eric Blake <address@hidden>

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

Summary of changes:
 ChangeLog      |    8 ++++++++
 doc/m4.texinfo |   12 +++++++-----
 src/builtin.c  |   10 ++++++----
 3 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f3ed17f..4a20b00 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-01-14  Eric Blake  <address@hidden>
+
+       Fix --warn-macro-sequence regression from 2007-11-29.
+       * src/builtin.c (define_user_macro): Use correct length.
+       * doc/m4.texinfo (Arguments): Test the fix.
+       (History): Reword to account for new year and eventual result of
+       the argv_ref branch.
+
 2008-01-08  Eric Blake  <address@hidden>
 
        Bump copyright year.
diff --git a/doc/m4.texinfo b/doc/m4.texinfo
index bfdb6f2..b24cc90 100644
--- a/doc/m4.texinfo
+++ b/doc/m4.texinfo
@@ -43,7 +43,7 @@ This manual is for @acronym{GNU} M4 (version @value{VERSION}, 
@value{UPDATED}),
 a package containing an implementation of the m4 macro language.
 
 Copyright @copyright{} 1989, 1990, 1991, 1992, 1993, 1994, 2004, 2005,
-2006, 2007 Free Software Foundation, Inc.
+2006, 2007, 2008 Free Software Foundation, Inc.
 
 @quotation
 Permission is granted to copy, distribute and/or modify this document
@@ -391,9 +391,11 @@ addressed some long standing bugs in the venerable 1.4 
release.  Then in
 2005, Gary V. Vaughan collected together the many patches to
 @acronym{GNU} @code{m4} 1.4 that were floating around the net and
 released 1.4.3 and 1.4.4.  And in 2006, Eric Blake joined the team and
-prepared patches for the release of 1.4.5, 1.4.6, 1.4.7, and 1.4.8.  The
-1.4.x series remains open for bug fixes, including releases 1.4.9,
-1.4.10, and 1.4.11 in 2007.
+prepared patches for the release of 1.4.5, 1.4.6, 1.4.7, and 1.4.8.
+More bug fixes were incorporated in 2007, with releases 1.4.9 and
+1.4.10.  In 2008, Eric additionally rewrote the scanning engine to
+reduce recursive evaluation from quadratic to linear complexity for
+1.4.11.  The 1.4.x branch remains open for bug fixes.
 
 Meanwhile, development has continued on new features for @code{m4}, such
 as dynamic module loading and additional builtins.  When complete,
@@ -1830,7 +1832,7 @@ default, because it triggers a number of warnings in 
Autoconf 2.61 (and
 Autoconf uses @option{-E} to treat warnings as errors), and because it
 will still be possible to restore older behavior in M4 2.0.
 
address@hidden ignore
address@hidden options: --warn-macro-sequence
 @example
 $ @kbd{m4 --warn-macro-sequence}
 define(`foo', `$001 address@hidden@} $1')
diff --git a/src/builtin.c b/src/builtin.c
index cb5f274..e873061 100644
--- a/src/builtin.c
+++ b/src/builtin.c
@@ -1,7 +1,7 @@
 /* GNU m4 -- A simple macro processor
 
-   Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 2000, 2004, 2006, 2007
-   Free Software Foundation, Inc.
+   Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 2000, 2004, 2006, 2007,
+   2008 Free Software Foundation, Inc.
 
    This file is part of GNU M4.
 
@@ -424,9 +424,11 @@ define_user_macro (const char *name, size_t len, const 
char *text,
   if (macro_sequence_inuse && text)
     {
       regoff_t offset = 0;
+      len = strlen (defn);
 
-      while ((offset = re_search (&macro_sequence_buf, defn, len, offset,
-                                 len - offset, &macro_sequence_regs)) >= 0)
+      while (offset < len
+            && (offset = re_search (&macro_sequence_buf, defn, len, offset,
+                                    len - offset, &macro_sequence_regs)) >= 0)
        {
          /* Skip empty matches.  */
          if (macro_sequence_regs.start[0] == macro_sequence_regs.end[0])


hooks/post-receive
--
GNU M4 source repository




reply via email to

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