summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorSean Fox <dyntryx@gmail.com>2008-06-18 23:32:07 +0000
committerSean Fox <dyntryx@gmail.com>2008-06-18 23:32:07 +0000
commit701b5113963324efe386807130201dd4a4c72145 (patch)
tree1575193d5102cc78adcd3988136229ba56aec220 /utils
parent82d827c12a0a1ddcfbbe04617ba782e3f3fcebdd (diff)
downloadlibnsbmp-701b5113963324efe386807130201dd4a4c72145.tar.gz
libnsbmp-701b5113963324efe386807130201dd4a4c72145.tar.bz2
Added NetSurf's log file for debugging
svn path=/branches/dynis/libnsbmp/; revision=4400
Diffstat (limited to 'utils')
-rw-r--r--utils/log.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/utils/log.h b/utils/log.h
new file mode 100644
index 0000000..18b68d0
--- /dev/null
+++ b/utils/log.h
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2003 James Bursa <bursa@users.sourceforge.net>
+ * Copyright 2004 John Tytgat <John.Tytgat@aaug.net>
+ * Copyright 2008 Sean Fox <dyntryx@gmail.com>
+ *
+ * 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/>.
+ */
+
+#include <stdio.h>
+
+#ifndef _LIBNSBMP_LOG_H_
+#define _LIBNSBMP_LOG_H_
+
+#ifdef NDEBUG
+# define LOG(x) ((void) 0)
+#else
+# ifdef __GNUC__
+# define LOG(x) do { printf x, fputc('\n', stdout)); } while (0)
+# elif defined(__CC_NORCROFT)
+# define LOG(x) do { printf x, fputc('\n', stdout)); } while (0)
+# else
+# define LOG(x) do { printf x, fputc('\n', stdout)); } while (0)
+# endif
+#endif
+
+#endif