Re: Short form of __FILE__





Emmanuel Delahaye wrote On 02/07/06 13:47,:
Lukas Ruf a écrit :

Dear all,

for debugging purposes, I like the pre-compiler macros

__FILE__, __FUNCTION__, __LINE__


[C99] ITYM __func__


I have been wondering if there is a short form of __FILE__ that
provides only the filename without path.


Nope, it's implementation dependent. There is nothing that prevents you
to use strrchr() to find the last '/' or '\\' in the __FILE__ string...

... or ']' or '>' or '(' membername ')' or ...

--
Eric.Sosman@xxxxxxx

.



Relevant Pages

  • Re: Short form of __FILE__
    ... for debugging purposes, I like the pre-compiler macros ... provides only the filename without path. ... Nope, it's implementation dependent. ...
    (comp.lang.c)
  • Re: Short form of __FILE__
    ... # for debugging purposes, I like the pre-compiler macros ... # provides only the filename without path. ... int main{ ...
    (comp.lang.c)
  • Re: Short form of __FILE__
    ... for debugging purposes, I like the pre-compiler macros ... provides only the filename without path. ... compilers may provide options to change this, or may provide other macros as an extension. ...
    (comp.lang.c)