*BSD News Article 22711


Return to BSD News archive

Newsgroups: comp.unix.bsd
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!howland.reston.ans.net!europa.eng.gtefsd.com!uunet!almserv!usenet
From: sxupjd@anubis (Philip J DiFalco)
Subject: does a __FUNCTION macro exist?
Message-ID: <1993Oct22.154317.16881@almserv.uucp>
Sender: usenet@almserv.uucp
Nntp-Posting-Host: anubis
Organization: Fannie Mae
Date: Fri, 22 Oct 1993 15:43:17 GMT
Lines: 14


I have the following statement in my x.h file to help me debug my *.c modules:

#define XDEBUG(fmt,var)	(printf("[%s, line %d] "fmt"\n", __FILE__, __LINE__,  
var))

Is there a macro, like __FILE__ or __LINE__, that will tell me what function
or procedure a printf statement occurred in?

Thanks.

--
email: sxupjd@fnma.com (NeXT Mail Okay)
Philip DiFalco