Re: __FILE__ is absolute, howto get relative?
Re: __FILE__ is absolute, howto get relative?
- Subject: Re: __FILE__ is absolute, howto get relative?
- From: Steve Checkoway <email@hidden>
- Date: Wed, 9 Nov 2005 05:22:05 -0800
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)
(I knew there had to be a use for the ?:'s default argument. This
macro qualifies as the first use I've ever found.)
- Steve
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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