summaryrefslogtreecommitdiff
path: root/utils/log.h
blob: b1bebde34077961dbc5753d39c46eaea0599f039 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/**
 * $Id: log.h,v 1.2 2003/02/09 12:58:15 bursa Exp $
 */

#include <stdio.h>

#ifndef _NETSURF_LOG_H_
#define _NETSURF_LOG_H_

#ifdef NDEBUG

#define LOG(x) ((void) 0)

#else

#ifdef __GNUC__
#define LOG(x) (printf(__FILE__ " %s %i: ", __PRETTY_FUNCTION__, __LINE__), printf x, printf("\n"))
#else
#define LOG(x) (printf(__FILE__ " %i: ", __LINE__), printf x, printf("\n"))
#endif

#endif

#endif