Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site alice.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!alice!ark From: ark@alice.UucP (Andrew Koenig) Newsgroups: net.lang.c Subject: Re: How about a predefined #FILE, #PATH and #FUNCTION for C? Message-ID: <4884@alice.UUCP> Date: Mon, 27-Jan-86 14:16:35 EST Article-I.D.: alice.4884 Posted: Mon Jan 27 14:16:35 1986 Date-Received: Tue, 28-Jan-86 06:27:38 EST References: <313@yale.ARPA> Organization: Bell Labs, Murray Hill Lines: 13 > To explain what I mean... > definition by example: > > #PATH ==> /usr/fred/hello.c > #FILE ==> hello.c > #FUNCTION ==> main > > (N.B.: no quotation marks.) > Most versions of the C preprocessor have (undocumented) pre-defined macros called __FILE__ and __LINE__ that do close to what you want. See /usr/include/assert.h for an example of usage.