[Top][All Lists]

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

Re: m4_chomp [was: Use newer m4_map_args_{w,sep}]

From: Eric Blake
Subject: Re: m4_chomp [was: Use newer m4_map_args_{w,sep}]
Date: Fri, 14 Nov 2008 07:14:55 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20080914 Thunderbird/ Mnenhy/

Hash: SHA1

According to Paolo Bonzini on 11/14/2008 1:02 AM:
>> I'm probably going to commit this series soon; it provides m4_chomp and a 
>> first 
>> use case for it (you can now declare an autotest title with underquoted #).
> Given the limited uses of m4_expand (almost all of them involving C or
> shell code where pounds may be possible), why not always making it do
> m4_chomp and adding a trailing newline?

I thought about that; it means m4_expand would be slower, and it will be
able to strip intentional newlines, but it would make m4_expand easier to
use in isolation.  Maybe I go for m4_expand (current semantics, faster,
and only safe if input doesn't end in unquoted # or dnl) and m4_expand_s
(always safe, but slower and might strip trailing newlines provided by the
argument), to mirror m4_esyscmd/m4_esyscmd_s?  On the other hand, the user
can supply @&t@ if that trailing newline is important, so maybe making
m4_expand always supply/strip an extra newline is the way to go?

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at
Comment: Using GnuPG with Mozilla -


reply via email to

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