Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Oct 1995 10:37:18 +0100
From:      Poul-Henning Kamp <phk@critter.tfs.com>
To:        hackers@freebsd.org
Subject:   cpp question
Message-ID:  <673.814700238@critter.tfs.com>

next in thread | raw e-mail | index | archive | help

My new testament is at home, can somebody tell me in the meantime:

What do I write in a macro to make a token a string ?

I want to do something like this:

#define FOO(ptr,fmt,name) \
	printf("%s =" fmt "\n", XXXX, (ptr)->name)

What do I need to put at XXXX ? to convert the name to "name" ?

Thanks in advance,
--
Poul-Henning Kamp           | phk@FreeBSD.ORG       FreeBSD Core-team.
http://www.freebsd.org/~phk | phk@login.dknet.dk    Private mailbox.
whois: [PHK]                | phk@ref.tfs.com       TRW Financial Systems, Inc.
Just that: dried leaves in boiling water ?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?673.814700238>