Re: Can an M4-program read data out of an C-program?

"Raphael 'kena' Poss" <[email protected]>
Newsgroups gmane.comp.gnu.m4.general
Message-ID <[email protected]>
Op 22 mrt 2010, om 10:40 heeft Amaury Ampe het volgende geschreven:

> Thanks a lot for your respons! It helps me a great deal on the way to a solution.
> The problem is that I have to transfer about a 120 values. Is it possible to do this with arrays or so? Or do I have to give each one an individual name and transfer them individualy?

you can dump the values in a file, with the following format:

m4_define([NAME1], [val1...])
m4_define([NAME2], [val2...])
m4_define([NAME3], [val3...])


Then in your m4 code you can m4_include() this file, and it will make the macros visible to your generating macros.

Hope this helps

-- 
Raphael 'kena' Poss · [email protected] · +31 20 525 7559
UvA · FNWI · IvI · CSA · 1098XG 107 Amsterdam (NL)
z = \f. (\x. f (\y. x x y)) (\x. f (\y. x x y))
There is no spoon, only fork() and vfork().
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.