Subject: Re: Line & file debugging info for vnode locking.
To: None <tech-kern@netbsd.org>
From: John Kohl <jtk@kolvir.arlington.ma.us>
List: tech-kern
Date: 08/14/1999 09:59:34
We can use ANSI string pasting to use a single "const char *" argument
to include file and function name information (and, with a little bit of
quoting hair, the line number too):

#define _quote(x) #x
#define quote(x) _quote(x)

	printf("%s\n", __FILE__ ":" __FUNCTION__ ":" quote(__LINE__));

-- 
==John Kohl <jtk@kolvir.arlington.ma.us>, <john_kohl@alum.mit.edu>
Home page: <http://people.ne.mediaone.net/jtk/>
Bicycling and Skiing to keep fit.