[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: m4 and newlines?
From: |
Mike |
Subject: |
Re: m4 and newlines? |
Date: |
Fri, 29 Oct 2004 18:01:38 -0000 |
User-agent: |
slrn/0.9.7.4 (Linux) |
In article <10o4n6u8e13sf41@corp.supernews.com>, Mike wrote:
> I have a macro working:
>
> define(`domain', `ifelse($#, 0, , $#, 1, ``domain $1'', ``domain' $1
> domain(shift($@))')')
> domain(`a', `b', `c')
>
> that returns:
>
> domain a domain b domain c
>
> I want it to return:
>
> domain a
> domain b
> domain c
>
> How do I cause a newline? I tried define(`newline', `esyscmd(echo)'), but
> that didn't seem to do right.
>
> Mike
One solution I found is to change the define like:
define(`domain', `ifelse($#, 0, , $#, 1, ``domain $1'',
``domain' $1
domain(shift($@))')
So the string 'domain $1 domain()' has an embedded newline.
Mike