Main Page | Data Structures | File List | Globals | Related Pages

location_info.h

Go to the documentation of this file.
00001 /* $Id: location_info.h,v 1.3 2003/09/12 21:06:45 legoater Exp $
00002  *
00003  * location_info.h
00004  * 
00005  * Copyright 2001-2003, Meiosys (www.meiosys.com). All rights reserved.
00006 
00007 
00008  * See the COPYING file for the terms of usage and distribution.
00009  */
00010 
00011 #ifndef log4c_location_info_h
00012 #define log4c_location_info_h
00013 
00023 #include <log4c/defs.h>
00024 
00025 __LOG4C_BEGIN_DECLS
00026 
00038 typedef struct 
00039 {
00040     const char* loc_file;
00041     int loc_line;
00042     const char* loc_function;
00043 
00044 } log4c_location_info_t;
00045 
00049 #ifdef __GNUC__
00050 #   define LOG4C_LOCATION_INFO_INITIALIZER { __FILE__, __LINE__, __FUNCTION__ }
00051 #else
00052 #   define LOG4C_LOCATION_INFO_INITIALIZER { __FILE__, __LINE__, "(nil)" }
00053 #endif
00054 
00055 #define __log4c_str(n) #n
00056 
00057 #ifdef __GNUC__
00058 #   define __log4c_location(n)  __FUNCTION__ "() at " __FILE__ ":" __log4c_str(n)
00059 #else
00060 #   define __log4c_location(n)  __FILE__ ":" __log4c_str(n)
00061 #endif
00062 
00067 #define log4c_location __log4c_location(__LINE__)
00068 
00069 __LOG4C_END_DECLS
00070 
00071 #endif

Generated on Sat Dec 11 10:03:58 2004 for log4c by  doxygen 1.3.9.1