2003-06-30 16:44:03 +04:00
|
|
|
/*
|
2006-11-27 18:35:18 +03:00
|
|
|
* This file is part of NetSurf, http://netsurf-browser.org/
|
2003-06-30 16:44:03 +04:00
|
|
|
* Licensed under the GNU General Public License,
|
|
|
|
* http://www.opensource.org/licenses/gpl-license
|
|
|
|
* Copyright 2003 James Bursa <bursa@users.sourceforge.net>
|
2004-07-09 00:13:35 +04:00
|
|
|
* Copyright 2004 John Tytgat <John.Tytgat@aaug.net>
|
2002-10-08 13:38:29 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#ifndef _NETSURF_LOG_H_
|
|
|
|
#define _NETSURF_LOG_H_
|
|
|
|
|
|
|
|
#ifdef NDEBUG
|
2004-07-09 00:13:35 +04:00
|
|
|
# define LOG(x) ((void) 0)
|
2002-10-08 13:38:29 +04:00
|
|
|
#else
|
2004-07-09 00:13:35 +04:00
|
|
|
# ifdef __GNUC__
|
|
|
|
# define LOG(x) (printf(__FILE__ " %s %i: ", __PRETTY_FUNCTION__, __LINE__), printf x, fputc('\n', stdout))
|
|
|
|
# elif defined(__CC_NORCROFT)
|
|
|
|
# define LOG(x) (printf(__FILE__ " %s %i: ", __func__, __LINE__), printf x, fputc('\n', stdout))
|
|
|
|
# else
|
|
|
|
# define LOG(x) (printf(__FILE__ " %i: ", __LINE__), printf x, fputc('\n', stdout))
|
|
|
|
# endif
|
2002-10-08 13:38:29 +04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|