2003-06-30 16:44:03 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2003 James Bursa <bursa@users.sourceforge.net>
|
2004-07-09 00:13:35 +04:00
|
|
|
* Copyright 2004 John Tytgat <John.Tytgat@aaug.net>
|
2007-08-08 20:16:03 +04:00
|
|
|
*
|
|
|
|
* This file is part of NetSurf, http://www.netsurf-browser.org/
|
|
|
|
*
|
|
|
|
* NetSurf is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; version 2 of the License.
|
|
|
|
*
|
|
|
|
* NetSurf is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2002-10-08 13:38:29 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdio.h>
|
2007-05-31 02:39:54 +04:00
|
|
|
#include "desktop/netsurf.h"
|
2002-10-08 13:38:29 +04:00
|
|
|
|
|
|
|
#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__
|
2007-05-31 02:27:58 +04:00
|
|
|
# define LOG(x) do { if (verbose_log) (printf(__FILE__ " %s %i: ", __PRETTY_FUNCTION__, __LINE__), printf x, fputc('\n', stdout)); } while (0)
|
2004-07-09 00:13:35 +04:00
|
|
|
# elif defined(__CC_NORCROFT)
|
2007-05-31 02:27:58 +04:00
|
|
|
# define LOG(x) do { if (verbose_log) (printf(__FILE__ " %s %i: ", __func__, __LINE__), printf x, fputc('\n', stdout)); } while (0)
|
2004-07-09 00:13:35 +04:00
|
|
|
# else
|
2007-05-31 02:27:58 +04:00
|
|
|
# define LOG(x) do { if (verbose_log) (printf(__FILE__ " %i: ", __LINE__), printf x, fputc('\n', stdout)); } while (0)
|
2004-07-09 00:13:35 +04:00
|
|
|
# endif
|
2002-10-08 13:38:29 +04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|