[Fwd: Re: Finding spurious spacing in m4 texts]

-------- Original Message -------- Subject: Re: Finding spurious spacing in m4 texts Date: Fri, 19 Sep 2008 07:51:57 -0600 From: Jack Woehr jax@well.com To: Roberto Bagnara bagnara@cs.unipr.it References: 48D35540.5090402@cs.unipr.it
Roberto Bagnara wrote:
we have a system composed by several m4 texts and quite often we end up with spurious spacing in the output.
I have had that problem, and sometimes spent a very long time debugging!
Over the years, the best help for me has been following coding patterns, such as
* never over-quote * always exactly one or no spaces in arguments after a comma before a backtick (`) * always no spaces after the closing tick (') of an argument * no dnl on lines where they are not needed (e.g. when the stream is diverted to null)
etc. etc.
If you do everything all the same, then it either works all the time or fails all the time!
For debugging, I suppose the easiest "trick" is to insert and obtrusive meaningless text such as `FOOBAR' here and there in the source and find its orientation in relation to the spurious spacing.
participants (1)
-
Roberto Bagnara