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=ccc1379c1360edc29e6f8d3ee3a88756e4fe1b44 The branch, branch-1.4 has been updated via ccc1379c1360edc29e6f8d3ee3a88756e4fe1b44 (commit) from 786893619c348defafe09d4653846cf0834e8c86 (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 ccc1379c1360edc29e6f8d3ee3a88756e4fe1b44 Author: Eric Blake <[email protected]> Date: Thu Feb 19 16:26:55 2009 -0700 Fix regression in translit. * src/builtin.c (m4_translit): Use correct comparison. * doc/m4.texinfo (Translit): Enhance test. Signed-off-by: Eric Blake <[email protected]> ----------------------------------------------------------------------- Summary of changes: ChangeLog | 8 +++++++- doc/m4.texinfo | 6 ++++++ src/builtin.c | 4 ++-- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index edff0b8..1124a5e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,8 @@ -2009-02-18 Eric Blake <[email protected]> +2009-02-19 Eric Blake <[email protected]> + + Fix regression in translit. + * src/builtin.c (m4_translit): Use correct comparison. + * doc/m4.texinfo (Translit): Enhance test. Speed up input engine, by searching for quotes by buffer. * src/input.c (struct input_block): Add end pointer to string. @@ -6,6 +10,8 @@ (next_token): For quotes, attempt a buffer search. * NEWS: Document this. +2009-02-18 Eric Blake <[email protected]> + Speed up translit when from argument is short. * m4/gnulib-cache.m4: Import memchr2 module. * src/builtin.c (m4_translit): Use memchr2 when possible. diff --git a/doc/m4.texinfo b/doc/m4.texinfo index 10e63ef..6877ecc 100644 --- a/doc/m4.texinfo +++ b/doc/m4.texinfo @@ -5800,6 +5800,12 @@ translit(`abcdeabcde', `ab', `fg') @result{}fgcdefgcde translit(`abcdeabcde', `ab', `ba') @result{}bacdebacde +translit(`abcdeabcde', `e', `f') +...@result{}abcdfabcdf +translit(`abc', `', `cde') +...@result{}abc +translit(`', `a', `bc') +...@result{} @end example @end ignore diff --git a/src/builtin.c b/src/builtin.c index 504075a..6378fb7 100644 --- a/src/builtin.c +++ b/src/builtin.c @@ -1824,10 +1824,10 @@ m4_translit (struct obstack *obs, int argc, token_data **argv) char found[UCHAR_MAX + 1]; unsigned char ch; - if (bad_argc (argv[0], argc, 3, 4) || !*from) + if (bad_argc (argv[0], argc, 3, 4) || !*data || !*from) { /* builtin(`translit') is blank, but translit(`abc') is abc. */ - if (argc <= 2) + if (2 <= argc) obstack_grow (obs, data, strlen (data)); return; } hooks/post-receive -- GNU M4 source repository
