Re: __FILE__ is absolute, howto get relative?
Re: __FILE__ is absolute, howto get relative?
- Subject: Re: __FILE__ is absolute, howto get relative?
- From: Simon Strandgaard <email@hidden>
- Date: Wed, 9 Nov 2005 15:21:50 +0100
On 11/9/05, Steve Checkoway <email@hidden> wrote:
> On Nov 8, 2005, at 2:53 PM, Simon Strandgaard wrote:
> >
> > Is there an option or a define I have overlooked?
> > Well I could extract 'experimental.mm' manually.
>
> Well, this is a bit of a hack, but if you include <string.h> you can
> use this
> #define THIS_FILE ((strrchr(__FILE__, '/') ?: __FILE__ - 1) + 1)
Thanks :-)
--
Simon Strandgaard
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden