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