Need help with quoting and the CPP
Brett Bergquist
bergquis at nms.gdc.portal.com
Mon Apr 22 08:22:54 AEST 1991
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). For example if
STRING is defined as:
#define STRING test string
Is there any way to define a macro "QUOTE" so that:
char* s = QUOTE(STRING);
while produce:
char *s = "test string";
The reason that I need this is that the *%$# ESQL preprocessor that I am
using needs table names unquoted, by my C applications need them quoted.
I'm using SunOS 4.1.1's CPP.
Thanks in advance.
--
Brett M. Bergquist, Principal Engineer | "Remind me" ... "to write an
General DataComm, Inc., | "article on the compulsive reading
Middlebury, CT 06762 | of news." - Stranger in a Strange Land
Email: bergquis at nms.gdc.portal.com or ...!portal!gdc!nms!bergquis
More information about the Comp.lang.c
mailing list