On Thu, Dec 27, 2001 at 09:15:47PM +1100, Brad Leach wrote:
> Some time ago when I was doing some C programming on a Digital Unix
> machine, I remember using a define which gave the filename that the call
> was made from. I am not exactly sure what this define was though. I
> think it was something like "__FILENAME__". I tried to use this today,
> but it doesn't seem to be working with my version of gcc (2.95.3).
>
> I was wondering if this is actually the define to give the filename, or
> if it was something else entirely. If it is the right define, does
> anyone know the steps to get it working?
Look at the man-page of assert:
DIAGNOSTICS
The following diagnostic message is written to stderr if expression is
false:
"assertion \"%s\" failed: file \"%s\", line %d\n", \
"expression", __FILE__, __LINE__);
Edwin
--
Edwin Groothuis | Personal website: http://www.MavEtJu.org
[EMAIL PROTECTED] | Interested in MUDs? Visit Fatal Dimensions:
------------------+ http://www.FatalDimensions.org/