m4-discuss
[Top][All Lists]
Advanced

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

Re: New Feature : Divert2 to custom named file


From: Denis Valois
Subject: Re: New Feature : Divert2 to custom named file
Date: Fri, 27 Jan 2023 19:33:35 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

Hello André,

If I understand well, the function you request is already available.

Ref GM4 documentation section "10.2 Undiverting output".
It states "As a GNU extension, diversions may contain non-numeric strings, which are treated as the names of files to copy into the output without expansion. A warning is issued if a file could not be opened."

In short, you divert as usual, into one or several divnum.  Then after you undivert into your specific files.

Regards,

Denis/

On 27/01/2023 16:44, André Miville wrote:
Hello
I would like to have a divert2 function where one could write to a file, not a temp file.
I use M4 for CPPP C prepreprocessing
For instance one could use the divert2 function to transform a matrix.m4 into a matrix.h and a matrix.c

I am quite confused by sources and can't manage to do it by myself, anyone to help me ?

Cordially
André

-- 
Denis Valois/
PGP KeyID 0xB5418E1A

reply via email to

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