Need help with quoting and the CPP

Dave Corcoran dave at aspect.UUCP
Tue Apr 30 08:44:10 AEST 1991


In article <230 at wimpy.nms.gdc.portal.com>, bergquis at nms.gdc.portal.com (Brett Bergquist) writes:
> Is there any way to expand an argument to a macro and at the same time
> surround it with quotes (making is a quoted string).

So I've got this fetish for m4 solutions!


--------------------------------8<--------------------------------
define(string,`QUOTE_ME')
define(quote_,`"$1"')
char *q=quote_(string)
char *s=quote_(Hey there hi there ho there)
--------------------------------8<--------------------------------
-- 
David Corcoran		      -@@
uunet!aspect!dave	        ~
In a society where anything goes eventually everything will.



More information about the Comp.lang.c mailing list