From 53c0e810e5c34cb89c73c6b79b31dfa53b14f90f Mon Sep 17 00:00:00 2001 From: James Bursa Date: Tue, 8 Oct 2002 09:38:29 +0000 Subject: [project @ 2002-10-08 09:38:29 by bursa] LOG(()) macro for easier debugging. svn path=/import/netsurf/; revision=41 --- utils/log.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 utils/log.h (limited to 'utils/log.h') diff --git a/utils/log.h b/utils/log.h new file mode 100644 index 000000000..4ca658419 --- /dev/null +++ b/utils/log.h @@ -0,0 +1,24 @@ +/** + * $Id: log.h,v 1.1 2002/10/08 09:38:29 bursa Exp $ + */ + +#include + +#ifndef _NETSURF_LOG_H_ +#define _NETSURF_LOG_H_ + +#ifdef NDEBUG + +#define LOG(x) ((void) 0) + +#else + +#ifdef __GNUC__ +#define LOG(x) (printf(__FILE__ " " __PRETTY_FUNCTION__ " %i: ", __LINE__), printf x, printf("\n")) +#else +#define LOG(x) (printf(__FILE__ " %i: ", __LINE__), printf x, printf("\n")) +#endif + +#endif + +#endif -- cgit v1.2.3