Re: macro to print filename

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 01 Jun 2011 18:07:42 +0200, ratheesh kannoth <ratheesh.ksz@xxxxxxxxx> wrote:
__FILE__ macro prints relative path name of the file.

Not prints but expands to but we know what you mean. ;)

I need only filename. How to extract this?

I don't want to use any string library - since it includes more
Processing and needs to store the character array in executable.
Is there any method at preprocessing level to do this.

I can say with 99,9% confidence that there is no such thing in C
standard and 99% that there is no such thing in GCC.

You probably can do that in C++ with templates if that's any
constellation.

--
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michal "mina86" Nazarewicz    (o o)
ooo +-----<email/xmpp: mnazarewicz@xxxxxxxxxx>-----ooO--(_)--Ooo--
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Assembler]     [Git]     [Kernel List]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [C Programming]     [Yosemite Campsites]     [Yosemite News]     [GCC Help]

  Powered by Linux