m4-discuss
[Top][All Lists]
Advanced

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

Re: Finding spurious spacing in m4 texts


From: Eric Blake
Subject: Re: Finding spurious spacing in m4 texts
Date: Fri, 19 Sep 2008 17:50:22 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080708 Thunderbird/2.0.0.16 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Roberto Bagnara on 9/19/2008 1:31 AM:
> 
> Hi there,

Hello Roberto,

> 
> I hope this mailing list is appropriate for a question about
> how to debug m4 texts.

Yes, this is the right list.

>  The problem is simple: we have
> a system composed by several m4 texts and quite often
> we end up with spurious spacing in the output.
> The problem is that we don't know, of the many m4 texts
> included by the main one, which one(s) is(are) causing
> the spurious spacing.
> 
> Is there a trick that could be used in order to debug this?

Have you used 'traceon'?  If you want really verbose output, I like using
the '-daeqt' command-line option (or debugmode(`aeqt') from within the
input file); that shows what macros expand to, and includes quotes, so
that you can spot the extra whitespace in your macro expansions.

Remember, m4 strips leading spaces during argument collection, but not
trailing spaces.  It may be that you have trailing spaces in your macro
arguments, which result in the extra whitespace in your output.

- --
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

iEYEARECAAYFAkjUOr4ACgkQ84KuGfSFAYABMwCeMUReNZsHIq/hfVKoI3/vFp92
vkwAoMyCvzdpZPheRcIEqQ/Th5KRH8Y4
=1nvu
-----END PGP SIGNATURE-----




reply via email to

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