Re: how could I write this cpp macro
- From: Ben Pfaff <blp@xxxxxxxxxxxxxxx>
- Date: Thu, 31 Aug 2006 09:19:45 -0700
Bilgehan.Balban@xxxxxxxxx writes:
I'm trying to convert this:
printf("format str %s, %s", "str arg 1", "str arg 2 etc.");
to this:
printf("%s: " "format str %s, %s", __FUNCTION__, "str arg 1", "str arg2
etc.");
It's ghastly, but
#define pdebug printf("%s:", __FUNCTION__), printf
might do what you want.
There are probably C99-specific solutions, and definitely
GCC-specific solutions, as well.
--
Just another C hacker.
.
- Follow-Ups:
- Re: how could I write this cpp macro
- From: David Resnick
- Re: how could I write this cpp macro
- References:
- how could I write this cpp macro
- From: Bilgehan . Balban
- how could I write this cpp macro
- Prev by Date: Re: c code reusability
- Next by Date: Re: General method for dynamically allocating memory for a string
- Previous by thread: how could I write this cpp macro
- Next by thread: Re: how could I write this cpp macro
- Index(es):