expansion - m4 expand macro inside words -



expansion - m4 expand macro inside words -

i new m4 cannot find simple thing:

is possible expand macro in middle of word? (i utilize counter used in c symbol name in low-level code)

i mean like:

define(`foo',`bar') happy fooday!

the expected output be:

happy barday!

it ok this:

happy expand(foo)day!

sorry if easy question googling attempts failed on 'm4 expand macro in word, m4 expand substring', etc...

thanks

edit 1:

stackoverflow recommended this: expansion of macro not working in m4 ...which indeed looking for.

edit 2:

ok, not easy:

define(`foo',`bar') happy asdfoo()day!

this fails, might normal. however, in c symbol names have substitute these macros in middle of words. way go that?

i believe looking for:

define(`foo',`bar') happy `'foo`'day!

that is, utilize m4 quotes indicate word boundary. or, more accurately, utilize empty string on either side of word wish have expanded, , indicate boundaries of empty string quotes.

macros expansion m4

Comments

Popular posts from this blog

javascript - mongodb won't find my schema method in nested container -

Hibernate criteria by a list of natural ids -

ios - Lagging ScrollView with UIWebview inside -