autoconf-patches
[Top][All Lists]
Advanced

[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:1.8.1.17) Gecko/20080914 Thunderbird/2.0.0.17 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkdh98ACgkQ84KuGfSFAYD+/gCfW+LuO/8Jl3OVI8E4w0atJmw5
Sw0AnRuorMTK9twujSsR6mCQCEzjX3T1
=x03b
-----END PGP SIGNATURE-----




reply via email to

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