From: "Michal Nazarewicz" <mina86@mina86.com>
To: linux-c-programming@vger.kernel.org,
ratheesh kannoth <ratheesh.ksz@gmail.com>
Subject: Re: macro to print filename
Date: Wed, 01 Jun 2011 19:38:32 +0200 [thread overview]
Message-ID: <op.vweraiul3l0zgt@mnazarewicz-glaptop> (raw)
In-Reply-To: <BANLkTi=TrKOcaQ4QcEHKOsqLaAPxL9f9Kw@mail.gmail.com>
On Wed, 01 Jun 2011 18:07:42 +0200, ratheesh kannoth
<ratheesh.ksz@gmail.com> 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@google.com>-----ooO--(_)--Ooo--
next prev parent reply other threads:[~2011-06-01 17:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-01 16:07 macro to print filename ratheesh kannoth
2011-06-01 17:38 ` Michal Nazarewicz [this message]
2011-06-01 18:45 ` Zhongye Jia
2011-06-01 19:08 ` Michal Nazarewicz
2011-06-02 13:39 ` Zhongye Jia
2011-06-02 18:11 ` ratheesh kannoth
2011-06-02 19:11 ` Michal Nazarewicz
2011-06-01 18:08 ` Zhongye Jia
2011-06-01 19:11 ` Michal Nazarewicz
2011-06-01 19:24 ` Aniruddha Bhattacharyya
2011-06-01 19:27 ` Michal Nazarewicz
2011-06-02 2:10 ` Libin Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=op.vweraiul3l0zgt@mnazarewicz-glaptop \
--to=mina86@mina86.com \
--cc=linux-c-programming@vger.kernel.org \
--cc=ratheesh.ksz@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).