Hello Filipe,
Am Montag, 2. April 2007 22:56 schrieb Filipe Sousa:
> Eric Noulard wrote:
> > 2007/4/2, Manfred Rebentisch <[EMAIL PROTECTED]>:
> >
> > May be.
> >
> > May be you can use predefined
> > C99 __func__ or GCC specific __FUNCTION__ macros
> > and then you should be able to use:
> >
>
Eric Noulard wrote:
> 2007/4/2, Manfred Rebentisch <[EMAIL PROTECTED]>:
>
> May be.
>
> May be you can use predefined
> C99 __func__ or GCC specific __FUNCTION__ macros
> and then you should be able to use:
>
> printf("%s:%s error msg x\n", basename(__FILE__), __FUNCTION__);
>
> nevertheless
2007/4/2, Manfred Rebentisch <[EMAIL PROTECTED]>:
Thank you Filipe,
Am Sonntag, 1. April 2007 23:20 schrieb Filipe Sousa:
>
> what about using basename()?
>
I do use a Macro:
#define CP_PREFIX(varname, functionname) \
static const char* varname = __FILE__ ":" functionname
and use
Thank you Filipe,
Am Sonntag, 1. April 2007 23:20 schrieb Filipe Sousa:
>
> what about using basename()?
>
I do use a Macro:
#define CP_PREFIX(varname, functionname) \
static const char* varname = __FILE__ ":" functionname
and use it:
int func(void)
{
CP_PREFIX(prefix, "func");
Manfred Rebentisch wrote:
> Hello,
> another effect. In the past I compiled projects with gcc in the actual
> directory, the source file was "mysource.c". But with the generated cmake
> Makefile it is "/home/mareb/sb/cp/bkupserver/src/mysource.c".
> Into Logfiles I write for example with syslog(
Hello,
another effect. In the past I compiled projects with gcc in the actual
directory, the source file was "mysource.c". But with the generated cmake
Makefile it is "/home/mareb/sb/cp/bkupserver/src/mysource.c".
Into Logfiles I write for example with syslog(LOG_INFO, "%s: abcdef",
__FILE__) a